//Auto-generated by kalyptus. DO NOT EDIT.
namespace Akonadi {
    using Kimono;
    using System;
    using Qyoto;
    /// <remarks>
    ///  The agent instance is a representation of a running agent process.
    ///  It provides information about the instance and a reference to the
    ///  AgentType of that instance.
    ///  All available agent instances can be retrieved from the AgentManager.
    ///  @code
    ///  Akonadi.AgentInstance.List instances = Akonadi.AgentManager.Self().Instances();
    ///  foreach ( const Akonadi.AgentInstance &instance, instances ) {
    ///    qDebug() << "Name:" << instance.name() << "(" << instance.identifier() << ")";
    ///  }
    ///  @endcode
    /// </remarks>        <author> Tobias Koenig <tokoe@kde.org>
    ///  </author>
    ///         <short> A representation of an agent instance. </short>
    [SmokeClass("Akonadi::AgentInstance")]
    public class AgentInstance : Object, IDisposable {
        protected SmokeInvocation interceptor = null;
        private IntPtr smokeObject;
        protected AgentInstance(Type dummy) {}
        protected void CreateProxy() {
            interceptor = new SmokeInvocation(typeof(AgentInstance), this);
        }
        private static SmokeInvocation staticInterceptor = null;
        static AgentInstance() {
            staticInterceptor = new SmokeInvocation(typeof(AgentInstance), null);
        }
        /// <remarks>
        ///  Describes the status of the agent instance.
        ///      </remarks>        <short>    Describes the status of the agent instance.</short>
        public enum Status {
            Idle = 0,
            Running = 1,
            Broken = 2,
        }
        /// <remarks>
        ///  Creates a new agent instance object.
        ///      </remarks>        <short>    Creates a new agent instance object.</short>
        public AgentInstance() : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("AgentInstance", "AgentInstance()", typeof(void));
        }
        /// <remarks>
        ///  Creates an agent instance from an <code>other</code> agent instance.
        ///      </remarks>        <short>    Creates an agent instance from an <code>other</code> agent instance.</short>
        public AgentInstance(Akonadi.AgentInstance other) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("AgentInstance#", "AgentInstance(const Akonadi::AgentInstance&)", typeof(void), typeof(Akonadi.AgentInstance), other);
        }
        /// <remarks>
        ///  Returns whether the agent instance object is valid.
        ///      </remarks>        <short>    Returns whether the agent instance object is valid.</short>
        public bool IsValid() {
            return (bool) interceptor.Invoke("isValid", "isValid() const", typeof(bool));
        }
        /// <remarks>
        ///  Returns the agent type of this instance.
        ///      </remarks>        <short>    Returns the agent type of this instance.</short>
        public Akonadi.AgentType type() {
            return (Akonadi.AgentType) interceptor.Invoke("type", "type() const", typeof(Akonadi.AgentType));
        }
        /// <remarks>
        ///  Returns the unique identifier of the agent instance.
        ///      </remarks>        <short>    Returns the unique identifier of the agent instance.</short>
        public string Identifier() {
            return (string) interceptor.Invoke("identifier", "identifier() const", typeof(string));
        }
        /// <remarks>
        ///  Returns the user visible name of the agent instance.
        ///      </remarks>        <short>    Returns the user visible name of the agent instance.</short>
        public string Name() {
            return (string) interceptor.Invoke("name", "name() const", typeof(string));
        }
        /// <remarks>
        ///  Sets the user visible <code>name</code> of the agent instance.
        ///      </remarks>        <short>    Sets the user visible <code>name</code> of the agent instance.</short>
        public void SetName(string name) {
            interceptor.Invoke("setName$", "setName(const QString&)", typeof(void), typeof(string), name);
        }
        /// <remarks>
        ///  Returns the status of the agent instance.
        ///      </remarks>        <short>    Returns the status of the agent instance.</short>
        public Akonadi.AgentInstance.Status status() {
            return (Akonadi.AgentInstance.Status) interceptor.Invoke("status", "status() const", typeof(Akonadi.AgentInstance.Status));
        }
        /// <remarks>
        ///  Returns a textual presentation of the status of the agent instance.
        ///      </remarks>        <short>    Returns a textual presentation of the status of the agent instance.</short>
        public string StatusMessage() {
            return (string) interceptor.Invoke("statusMessage", "statusMessage() const", typeof(string));
        }
        /// <remarks>
        ///  Returns the progress of the agent instance in percent, or -1 if no
        ///  progress information are available.
        ///      </remarks>        <short>    Returns the progress of the agent instance in percent, or -1 if no  progress information are available.</short>
        public int Progress() {
            return (int) interceptor.Invoke("progress", "progress() const", typeof(int));
        }
        /// <remarks>
        ///  Returns whether the agent instance is online currently.
        ///      </remarks>        <short>    Returns whether the agent instance is online currently.</short>
        public bool IsOnline() {
            return (bool) interceptor.Invoke("isOnline", "isOnline() const", typeof(bool));
        }
        /// <remarks>
        ///  Sets <code>online</code> status of the agent instance.
        ///      </remarks>        <short>    Sets <code>online</code> status of the agent instance.</short>
        public void SetIsOnline(bool online) {
            interceptor.Invoke("setIsOnline$", "setIsOnline(bool)", typeof(void), typeof(bool), online);
        }
        /// <remarks>
        ///  Triggers the agent instance to show its configuration dialog.
        /// <param> name="parent" Parent window for the configuration dialog.
        ///      </param></remarks>        <short>    Triggers the agent instance to show its configuration dialog.</short>
        public void Configure(QWidget parent) {
            interceptor.Invoke("configure#", "configure(QWidget*)", typeof(void), typeof(QWidget), parent);
        }
        public void Configure() {
            interceptor.Invoke("configure", "configure()", typeof(void));
        }
        /// <remarks>
        ///  Triggers the agent instance to start synchronization.
        ///      </remarks>        <short>    Triggers the agent instance to start synchronization.</short>
        public void Synchronize() {
            interceptor.Invoke("synchronize", "synchronize()", typeof(void));
        }
        /// <remarks>
        ///  Triggers a synchronization of the collection tree by the given agent instance.
        ///      </remarks>        <short>    Triggers a synchronization of the collection tree by the given agent instance.</short>
        public void SynchronizeCollectionTree() {
            interceptor.Invoke("synchronizeCollectionTree", "synchronizeCollectionTree()", typeof(void));
        }
        /// <remarks>
        ///      </remarks>        <short>   </short>
        public override bool Equals(object o) {
            if (!(o is AgentInstance)) { return false; }
            return this == (AgentInstance) o;
        }
        public override int GetHashCode() {
            return interceptor.GetHashCode();
        }
        ~AgentInstance() {
            interceptor.Invoke("~AgentInstance", "~AgentInstance()", typeof(void));
        }
        public void Dispose() {
            interceptor.Invoke("~AgentInstance", "~AgentInstance()", typeof(void));
        }
        public static bool operator==(AgentInstance lhs, Akonadi.AgentInstance other) {
            return (bool) staticInterceptor.Invoke("operator==#", "operator==(const Akonadi::AgentInstance&) const", typeof(bool), typeof(AgentInstance), lhs, typeof(Akonadi.AgentInstance), other);
        }
        public static bool operator!=(AgentInstance lhs, Akonadi.AgentInstance other) {
            return !(bool) staticInterceptor.Invoke("operator==#", "operator==(const Akonadi::AgentInstance&) const", typeof(bool), typeof(AgentInstance), lhs, typeof(Akonadi.AgentInstance), other);
        }
    }
}
