/*
 * This file contains D-Bus client proxy classes generated by qt4-client-gen.py.
 *
 * This file can be distributed under the same terms as the specification from
 * which it was generated.
 */

#ifndef IN_TELEPATHY_QT4_HEADER
#error IN_TELEPATHY_QT4_HEADER
#endif

#include <TelepathyQt4/Types>

#include <QtGlobal>

#include <QString>
#include <QObject>
#include <QVariant>

#include <QDBusPendingReply>

#include <TelepathyQt4/AbstractInterface>
#include <TelepathyQt4/DBusProxy>
#include <TelepathyQt4/Global>

namespace Tp{
class PendingVariant;
class PendingOperation;
}

// FIXME: (API/ABI break) Remove definition of TELEPATHY_GNUC_DEPRECATED

// basically the same as GLib's G_GNUC_DEPRECATED
#ifndef TELEPATHY_GNUC_DEPRECATED
#   if defined(Q_CC_GNUC) && __GNUC__ >= 4
#       define TELEPATHY_GNUC_DEPRECATED __attribute__((__deprecated__))
#   else
#       define TELEPATHY_GNUC_DEPRECATED
#   endif
#endif
namespace Tp
{
namespace Client
{

/**
 * \class ConnectionManagerInterface
 * \headerfile TelepathyQt4/connection-manager.h <TelepathyQt4/ConnectionManager>
 * \ingroup clientcm
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.ConnectionManager."
 */
class TELEPATHY_QT4_EXPORT ConnectionManagerInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.Telepathy.ConnectionManager", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline const char *staticInterfaceName()
    {
        return "org.freedesktop.Telepathy.ConnectionManager";
    }

    /**
     * Creates a ConnectionManagerInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    ConnectionManagerInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ConnectionManagerInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    ConnectionManagerInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ConnectionManagerInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    ConnectionManagerInterface(Tp::DBusProxy *proxy);

    /**
     * Represents property "Protocols" on the remote object.
     * 
     * <p>A map from protocol identifiers supported by this connection
     *   manager to the immutable properties of the corresponding
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">Protocol</tp:dbus-ref> objects.</p>
     * 
     * <tp:rationale>
     *   <p>Providing the immutable properties here means that
     *     when the API of Protocol objects has been finalized,
     *     most clients will only need one D-Bus round trip to interrogate
     *     the ConnectionManager about all its protocols.</p>
     * </tp:rationale>
     * 
     * <p>If this map is empty or missing, clients SHOULD fall back to
     *   calling <tp:member-ref>ListProtocols</tp:member-ref> and
     *   <tp:member-ref>GetParameters</tp:member-ref>.</p>
     */
    Q_PROPERTY(Tp::ProtocolPropertiesMap Protocols READ _deprecated_Protocols)

    /**
     * Getter for the remote object property "Protocols".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyProtocols() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED Tp::ProtocolPropertiesMap Protocols() const
    {
        return _deprecated_Protocols();
    }

private:
    inline Tp::ProtocolPropertiesMap _deprecated_Protocols() const
    {
        return qvariant_cast<Tp::ProtocolPropertiesMap>(internalPropGet("Protocols"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Protocols" of type Tp::ProtocolPropertiesMap.
     *
     * 
     * <p>A map from protocol identifiers supported by this connection
     *   manager to the immutable properties of the corresponding
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">Protocol</tp:dbus-ref> objects.</p>
     * 
     * <tp:rationale>
     *   <p>Providing the immutable properties here means that
     *     when the API of Protocol objects has been finalized,
     *     most clients will only need one D-Bus round trip to interrogate
     *     the ConnectionManager about all its protocols.</p>
     * </tp:rationale>
     * 
     * <p>If this map is empty or missing, clients SHOULD fall back to
     *   calling <tp:member-ref>ListProtocols</tp:member-ref> and
     *   <tp:member-ref>GetParameters</tp:member-ref>.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyProtocols() const
    {
        return internalRequestProperty(QLatin1String("Protocols"));
    }

    /**
     * Represents property "Interfaces" on the remote object.
     * 
     * <p>A list of the extra interfaces provided by this connection manager
     *   (i.e. extra functionality that can be provided even before a
     *   connection has been created).</p>
     * 
     * <p>No interfaces suitable for listing in this property are currently
     *   defined; it's provided as a hook for possible future
     *   functionality.</p>
     * 
     * <p>To be compatible with older connection managers, if retrieving
     *   this property fails, clients SHOULD assume that its value is
     *   an empty list.</p>
     * 
     * <p>Connection managers with a non-empty list of Interfaces MUST
     *   represent them in the <code>.manager</code> file, if they have one,
     *   as an <code>Interfaces</code> key in the
     *   group headed <code>[ConnectionManager]</code>, whose value is a list
     *   of strings each followed by a semicolon.</p>
     */
    Q_PROPERTY(QStringList Interfaces READ _deprecated_Interfaces)

    /**
     * Getter for the remote object property "Interfaces".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyInterfaces() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED QStringList Interfaces() const
    {
        return _deprecated_Interfaces();
    }

private:
    inline QStringList _deprecated_Interfaces() const
    {
        return qvariant_cast<QStringList>(internalPropGet("Interfaces"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Interfaces" of type QStringList.
     *
     * 
     * <p>A list of the extra interfaces provided by this connection manager
     *   (i.e. extra functionality that can be provided even before a
     *   connection has been created).</p>
     * 
     * <p>No interfaces suitable for listing in this property are currently
     *   defined; it's provided as a hook for possible future
     *   functionality.</p>
     * 
     * <p>To be compatible with older connection managers, if retrieving
     *   this property fails, clients SHOULD assume that its value is
     *   an empty list.</p>
     * 
     * <p>Connection managers with a non-empty list of Interfaces MUST
     *   represent them in the <code>.manager</code> file, if they have one,
     *   as an <code>Interfaces</code> key in the
     *   group headed <code>[ConnectionManager]</code>, whose value is a list
     *   of strings each followed by a semicolon.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyInterfaces() const
    {
        return internalRequestProperty(QLatin1String("Interfaces"));
    }

    /**
     * Request all of the DBus properties on the interface.
     *
     * \return A pending variant map which will emit finished when the properties have
     *          been retrieved.
     */
    Tp::PendingVariantMap *requestAllProperties() const
    {
        return internalRequestAllProperties();
    }

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method "GetParameters" on the remote object.
     * 
     * Get a list of the parameters which must or may be provided to the 
     * RequestConnection method when connecting to the given protocol, or 
     * registering (the boolean &quot;register&quot; parameter is available, 
     * and set to true).
     *
     * \param protocol
     *     
     *     The required protocol name
     *
     * \return
     *     
     *     An array of structs representing possible parameters.
     */
    inline QDBusPendingReply<Tp::ParamSpecList> GetParameters(const QString& protocol)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<Tp::ParamSpecList>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(protocol);
        return asyncCallWithArgumentList(QLatin1String("GetParameters"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "ListProtocols" on the remote object.
     * 
     * Get a list of protocol identifiers that are implemented by this 
     * connection manager.
     *
     * \return
     *     
     *     The keys of the Protocols map.
     */
    inline QDBusPendingReply<QStringList> ListProtocols()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QStringList>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        return asyncCall(QLatin1String("ListProtocols"));
    }

    /**
     * Begins a call to the D-Bus method "RequestConnection" on the remote object.
     * 
     * <p>Request a
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
     *   object representing a given account on a given
     *   protocol with the given parameters. The method returns the bus name
     *   and the object path where the new Connection object can be found,
     *   which should have the status of Connection_Status_Disconnected, to
     *   allow signal handlers to be attached before connecting is started
     *   with the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">Connect</tp:dbus-ref>
     *   method.</p>
     * 
     * <p>The parameters which must and may be provided in the parameters
     * dictionary can be discovered with the
     * <tp:member-ref>GetParameters</tp:member-ref> method. These
     * parameters, their types, and their default values may be cached
     * in files so that all available connection managers do not need to be
     * started to discover which protocols are available.</p>
     * 
     * <p>To request values for these parameters from the user, a client must
     * have prior knowledge of the meaning of the parameter names, so the
     * following well-known names and types should be used where appropriate:</p>
     * 
     * <dl>
     *   <dt>account (s)</dt>
     *   <dd>The identifier for the user's account on the server</dd>
     * 
     *   <dt>server (s)</dt>
     *   <dd>A fully qualified domain name or numeric IPv4 or IPv6 address.
     *     Using the fully-qualified domain name form is recommended whenever
     *     possible. If this parameter is specified and the account for that
     *     protocol also specifies a server, this parameter should override
     *     that in the user id.</dd>
     * 
     *   <dt>port (q)</dt>
     *   <dd>A TCP or UDP port number. If this parameter is specified and the
     *     account for that protocol also specifies a port, this parameter
     *     should override that in the account.</dd>
     * 
     *   <dt>password (s)</dt>
     *   <dd>A password associated with the account.</dd>
     * 
     *   <dt>require-encryption (b)</dt>
     *   <dd>Require encryption for this connection. A connection should fail
     *     to connect if require-encryption is set and an encrypted connection
     *     is not possible.</dd>
     * 
     *   <dt>register (b)</dt>
     *   <dd>This account should be created on the server if it does not
     *     already exist.</dd>
     * 
     *   <dt>ident (s)</dt>
     *   <dd>The local username to report to the server if necessary, such as
     *     in IRC.</dd>
     * 
     *   <dt>fullname (s)</dt>
     *   <dd>The user's full name if the service requires this when
     *     authenticating or registering.</dd>
     * 
     *   <dt>stun-server (s)</dt>
     *   <dd>The IP address or FQDN of a STUN server to use for NAT traversal,
     *     without any &quot;:port&quot; suffix.</dd>
     * 
     *   <dt>stun-port (q)</dt>
     *   <dd>The UDP port number on the stun-server to use for STUN. Only
     *     significant if the stun-server is also supplied.</dd>
     * 
     *   <dt>keepalive-interval (u)</dt>
     *   <dd>The time in seconds between pings sent to the server to ensure
     *     that the connection is still alive, or <tt>0</tt> to disable such
     *     pings.</dd>
     * </dl>
     * 
     * <p>Connection manager authors SHOULD avoid introducing parameters
     *   whose default values would not be serializable in a
     *   <code>.manager</code> file.</p>
     * 
     * <tp:rationale>
     *   <p>The same serialization format is used in Mission Control
     *     to store accounts.</p>
     * </tp:rationale>
     * 
     * <p>Every successful RequestConnection call will cause the emission of a
     * <tp:member-ref>NewConnection</tp:member-ref> signal for the same newly
     * created connection. The
     * requester can use the returned object path and service name
     * independently of the emission of that signal. In that case this signal
     * emission is most useful for, e.g. other processes that are monitoring
     * the creation of new connections.</p>
     *
     * \param protocol
     *     
     *     The protocol identifier
     *
     * \param parameters
     *     
     *     A dictionary mapping parameter names to values of the appropriate 
     *     type, as indicated by GetParameters and the above well-known list.
     *
     * \return
     *     
     *     A D-Bus service name where the new Connection object can be found
     *
     * \return
     *     
     *     The D-Bus object path to the Connection on this service
     */
    inline QDBusPendingReply<QString, QDBusObjectPath> RequestConnection(const QString& protocol, const QVariantMap& parameters)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString, QDBusObjectPath>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(protocol) << QVariant::fromValue(parameters);
        return asyncCallWithArgumentList(QLatin1String("RequestConnection"), argumentList);
    }

Q_SIGNALS:
    /**
     * Represents the signal "NewConnection" on the remote object.
     * 
     * Emitted when a new Connection object is created.
     *
     * \param busName
     *     
     *     The D-Bus service where the connection object can be found
     *
     * \param objectPath
     *     
     *     The object path of the Connection object on this service
     *
     * \param protocol
     *     
     *     The identifier for the protocol this connection uses
     */
    void NewConnection(const QString& busName, const QDBusObjectPath& objectPath, const QString& protocol);

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};

/**
 * \class ProtocolInterface
 * \headerfile TelepathyQt4/connection-manager.h <TelepathyQt4/ConnectionManager>
 * \ingroup clientcm
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol."
 */
class TELEPATHY_QT4_EXPORT ProtocolInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.Telepathy.Protocol", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline const char *staticInterfaceName()
    {
        return "org.freedesktop.Telepathy.Protocol";
    }

    /**
     * Creates a ProtocolInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    ProtocolInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ProtocolInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    ProtocolInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ProtocolInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    ProtocolInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a ProtocolInterface associated with the same object as the given proxy.
     * Additionally, the created proxy will have the same parent as the given
     * proxy.
     *
     * \param mainInterface The proxy to use.
     */
    explicit ProtocolInterface(const Tp::Client::ConnectionManagerInterface& mainInterface);

    /**
     * Creates a ProtocolInterface associated with the same object as the given proxy.
     * However, a different parent object can be specified.
     *
     * \param mainInterface The proxy to use.
     * \param parent Passed to the parent class constructor.
     */
    ProtocolInterface(const Tp::Client::ConnectionManagerInterface& mainInterface, QObject* parent);

    /**
     * Represents property "Interfaces" on the remote object.
     * 
     * <p>A list of interfaces supported by this Protocol object.</p>
     * 
     * <p>This property is immutable, and should not be confused with
     *   <tp:member-ref>ConnectionInterfaces</tp:member-ref>,
     *   which refers to the interfaces of <em>connections</em> to this
     *   protocol.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   (as described as part of the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface) MUST cache this
     *   property in the protocol's section of the <code>.manager</code>
     *   file, using the key <code>Interfaces</code>. The corresponding value
     *   is a list of D-Bus interface names, each followed by a semicolon.</p>
     */
    Q_PROPERTY(QStringList Interfaces READ _deprecated_Interfaces)

    /**
     * Getter for the remote object property "Interfaces".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyInterfaces() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED QStringList Interfaces() const
    {
        return _deprecated_Interfaces();
    }

private:
    inline QStringList _deprecated_Interfaces() const
    {
        return qvariant_cast<QStringList>(internalPropGet("Interfaces"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Interfaces" of type QStringList.
     *
     * 
     * <p>A list of interfaces supported by this Protocol object.</p>
     * 
     * <p>This property is immutable, and should not be confused with
     *   <tp:member-ref>ConnectionInterfaces</tp:member-ref>,
     *   which refers to the interfaces of <em>connections</em> to this
     *   protocol.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   (as described as part of the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface) MUST cache this
     *   property in the protocol's section of the <code>.manager</code>
     *   file, using the key <code>Interfaces</code>. The corresponding value
     *   is a list of D-Bus interface names, each followed by a semicolon.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyInterfaces() const
    {
        return internalRequestProperty(QLatin1String("Interfaces"));
    }

    /**
     * Represents property "Parameters" on the remote object.
     * 
     * <p>The parameters which must or may be provided to the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.ConnectionManager">RequestConnection</tp:dbus-ref> method when connecting to the
     *   given protocol. This property is immutable.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   (as described as part of the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface) MUST cache this
     *   property in the protocol's section of the <code>.manager</code>
     *   file via keys of the form <code>param-<em>p</em></code> and
     *   <code>default-<em>p</em></code>, as documented in the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface.</p>
     */
    Q_PROPERTY(Tp::ParamSpecList Parameters READ _deprecated_Parameters)

    /**
     * Getter for the remote object property "Parameters".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyParameters() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED Tp::ParamSpecList Parameters() const
    {
        return _deprecated_Parameters();
    }

private:
    inline Tp::ParamSpecList _deprecated_Parameters() const
    {
        return qvariant_cast<Tp::ParamSpecList>(internalPropGet("Parameters"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Parameters" of type Tp::ParamSpecList.
     *
     * 
     * <p>The parameters which must or may be provided to the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.ConnectionManager">RequestConnection</tp:dbus-ref> method when connecting to the
     *   given protocol. This property is immutable.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   (as described as part of the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface) MUST cache this
     *   property in the protocol's section of the <code>.manager</code>
     *   file via keys of the form <code>param-<em>p</em></code> and
     *   <code>default-<em>p</em></code>, as documented in the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> interface.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyParameters() const
    {
        return internalRequestProperty(QLatin1String("Parameters"));
    }

    /**
     * Represents property "ConnectionInterfaces" on the remote object.
     * 
     * <p>A list of interface names which might be in the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">Interfaces</tp:dbus-ref> property of a
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to this protocol. Whether a Connection
     *   will have all, some or none of these interfaces depends on server
     *   capabilities.</p>
     * 
     * <p>This property is immutable, and should not be confused with
     *   <tp:member-ref>Interfaces</tp:member-ref>.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file, using the key
     *   <code>ConnectionInterfaces</code>. The corresponding value
     *   is a list of D-Bus interface names, each followed by a semicolon.</p>
     */
    Q_PROPERTY(QStringList ConnectionInterfaces READ _deprecated_ConnectionInterfaces)

    /**
     * Getter for the remote object property "ConnectionInterfaces".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyConnectionInterfaces() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED QStringList ConnectionInterfaces() const
    {
        return _deprecated_ConnectionInterfaces();
    }

private:
    inline QStringList _deprecated_ConnectionInterfaces() const
    {
        return qvariant_cast<QStringList>(internalPropGet("ConnectionInterfaces"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "ConnectionInterfaces" of type QStringList.
     *
     * 
     * <p>A list of interface names which might be in the
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">Interfaces</tp:dbus-ref> property of a
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to this protocol. Whether a Connection
     *   will have all, some or none of these interfaces depends on server
     *   capabilities.</p>
     * 
     * <p>This property is immutable, and should not be confused with
     *   <tp:member-ref>Interfaces</tp:member-ref>.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file, using the key
     *   <code>ConnectionInterfaces</code>. The corresponding value
     *   is a list of D-Bus interface names, each followed by a semicolon.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyConnectionInterfaces() const
    {
        return internalRequestProperty(QLatin1String("ConnectionInterfaces"));
    }

    /**
     * Represents property "RequestableChannelClasses" on the remote object.
     * 
     *         <p>A list of channel classes which might be requestable from a
     *           <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to this protocol (i.e. they will,
     *           or might, appear in the Connection's <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref> property).</p>
     * 
     *         <p>Whether a Connection will have all, some or none of these
     *           requestable channel classes depends on server capabilities;
     *           similarly, individual contacts are not guaranteed to support
     *           all of these channel classes.</p>
     * 
     *         <p>This property is immutable.</p>
     * 
     *         <p>Connection managers with a <code>.manager</code> file
     *           MUST cache this property in the protocol's section of the
     *           <code>.manager</code> file, using the key
     *           <code>RequestableChannelClasses</code>. The corresponding value
     *           is a list of opaque strings, each followed by a semicolon; each
     *           of those strings is the name of a group in the <code>.manager</code>
     *           file which represents a channel class.</p>
     * 
     *         <p>The names of the groups representing channel classes are not
     *           significant, and MUST NOT be interpreted. When writing
     *           <tt>.manager</tt> files, authors MAY choose mnemonic group names,
     *           generate group names mechanically (e.g. with an incrementing
     *           integer), or use some combination of these.</p>
     * 
     *         <p>Each group representing a channel class has a key
     *           <code>allowed</code> which is a list of D-Bus property names
     *           representing allowed parameters. Any other keys that do not contain
     *           a space MUST be ignored. Any key containing a space represents
     *           a fixed property; the key has the form
     *           &quot;<code><em>propertyname</em> <em>type</em></code>&quot;, and the value
     *           is encoded in the same way as for the <code>default-<em>p</em></code>
     *           keys described in the <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> documentation.</p>
     * 
     *         <p>Connection managers that have channel classes whose fixed
     *           properties are not representable in this form SHOULD NOT have
     *           <code>.manager</code> files.</p>
     * 
     *         <p>For instance, this <code>.manager</code> file could represent
     *           a connection manager that supports 1-1 Text messages and
     *           StreamedMedia audio calls:</p>
     * 
     * <pre>[Protocol jabber]
     * param-account=s required
     * param-password=s required
     * RequestableChannelClasses=rcc0;rcc1;
     * 
     * [rcc0]
     * org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
     * org.freedesktop.Telepathy.Channel.TargetHandleType u=1
     * allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
     * 
     * [rcc1]
     * org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia
     * org.freedesktop.Telepathy.Channel.TargetHandleType u=1
     * allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
     * </pre>
     */
    Q_PROPERTY(Tp::RequestableChannelClassList RequestableChannelClasses READ _deprecated_RequestableChannelClasses)

    /**
     * Getter for the remote object property "RequestableChannelClasses".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyRequestableChannelClasses() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED Tp::RequestableChannelClassList RequestableChannelClasses() const
    {
        return _deprecated_RequestableChannelClasses();
    }

private:
    inline Tp::RequestableChannelClassList _deprecated_RequestableChannelClasses() const
    {
        return qvariant_cast<Tp::RequestableChannelClassList>(internalPropGet("RequestableChannelClasses"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "RequestableChannelClasses" of type Tp::RequestableChannelClassList.
     *
     * 
     *         <p>A list of channel classes which might be requestable from a
     *           <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to this protocol (i.e. they will,
     *           or might, appear in the Connection's <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref> property).</p>
     * 
     *         <p>Whether a Connection will have all, some or none of these
     *           requestable channel classes depends on server capabilities;
     *           similarly, individual contacts are not guaranteed to support
     *           all of these channel classes.</p>
     * 
     *         <p>This property is immutable.</p>
     * 
     *         <p>Connection managers with a <code>.manager</code> file
     *           MUST cache this property in the protocol's section of the
     *           <code>.manager</code> file, using the key
     *           <code>RequestableChannelClasses</code>. The corresponding value
     *           is a list of opaque strings, each followed by a semicolon; each
     *           of those strings is the name of a group in the <code>.manager</code>
     *           file which represents a channel class.</p>
     * 
     *         <p>The names of the groups representing channel classes are not
     *           significant, and MUST NOT be interpreted. When writing
     *           <tt>.manager</tt> files, authors MAY choose mnemonic group names,
     *           generate group names mechanically (e.g. with an incrementing
     *           integer), or use some combination of these.</p>
     * 
     *         <p>Each group representing a channel class has a key
     *           <code>allowed</code> which is a list of D-Bus property names
     *           representing allowed parameters. Any other keys that do not contain
     *           a space MUST be ignored. Any key containing a space represents
     *           a fixed property; the key has the form
     *           &quot;<code><em>propertyname</em> <em>type</em></code>&quot;, and the value
     *           is encoded in the same way as for the <code>default-<em>p</em></code>
     *           keys described in the <tp:dbus-ref namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref> documentation.</p>
     * 
     *         <p>Connection managers that have channel classes whose fixed
     *           properties are not representable in this form SHOULD NOT have
     *           <code>.manager</code> files.</p>
     * 
     *         <p>For instance, this <code>.manager</code> file could represent
     *           a connection manager that supports 1-1 Text messages and
     *           StreamedMedia audio calls:</p>
     * 
     * <pre>[Protocol jabber]
     * param-account=s required
     * param-password=s required
     * RequestableChannelClasses=rcc0;rcc1;
     * 
     * [rcc0]
     * org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
     * org.freedesktop.Telepathy.Channel.TargetHandleType u=1
     * allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
     * 
     * [rcc1]
     * org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia
     * org.freedesktop.Telepathy.Channel.TargetHandleType u=1
     * allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
     * </pre>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyRequestableChannelClasses() const
    {
        return internalRequestProperty(QLatin1String("RequestableChannelClasses"));
    }

    /**
     * Represents property "VCardField" on the remote object.
     * 
     * <p>The name of the most common vCard field used for this protocol's
     *   contact identifiers, normalized to lower case, or the empty string
     *   if there is no such field.</p>
     * 
     * <p>For example, this would be <code>x-jabber</code> for
     *   Jabber/XMPP (including Google Talk), or <code>tel</code> for
     *   the <abbr title="Public Switched Telephone Network">PSTN</abbr>.</p>
     * 
     * <p>A more exhaustive list of addressable vCard fields can be found in
     *   the Protocol's Addressing interface's
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing.DRAFT">AddressableVCardFields</tp:dbus-ref>.</p>
     * 
     * <p>It is not necessarily valid to interpret contacts' identifiers
     *   as values of this vCard field. For instance, telepathy-sofiasip
     *   supports contacts whose identifiers are of the form
     *   sip:jenny@example.com or tel:8675309, which would not normally
     *   both be represented by any single vCard field. Arbitrary
     *   handles/identifiers as vCard fields are represented
     *   through the Connection's
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Addressing.DRAFT</tp:dbus-ref>
     *   contact attributes.</p>
     * 
     * <tp:rationale>
     *   <p>This is taken from Mission Control profiles as used on Maemo 5.
     *     One valid use of this field is to answer the question: given a
     *     contact's vCard containing an X-JABBER field, how can you
     *     communicate with the contact? By iterating through protocols
     *     looking for an x-jabber VCardField, one can build up a list of
     *     protocols that handle x-jabber, then offer the user a list of
     *     accounts for those protocols and/or the option to create a new
     *     account for one of those protocols.</p>
     * </tp:rationale>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file if it is non-empty, using the key
     *   <code>VCardField</code>. The corresponding value
     *   is a string, following the syntax of the &quot;localestring&quot; type from
     *   the Desktop Entry Specification.</p>
     */
    Q_PROPERTY(QString VCardField READ _deprecated_VCardField)

    /**
     * Getter for the remote object property "VCardField".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyVCardField() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED QString VCardField() const
    {
        return _deprecated_VCardField();
    }

private:
    inline QString _deprecated_VCardField() const
    {
        return qvariant_cast<QString>(internalPropGet("VCardField"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "VCardField" of type QString.
     *
     * 
     * <p>The name of the most common vCard field used for this protocol's
     *   contact identifiers, normalized to lower case, or the empty string
     *   if there is no such field.</p>
     * 
     * <p>For example, this would be <code>x-jabber</code> for
     *   Jabber/XMPP (including Google Talk), or <code>tel</code> for
     *   the <abbr title="Public Switched Telephone Network">PSTN</abbr>.</p>
     * 
     * <p>A more exhaustive list of addressable vCard fields can be found in
     *   the Protocol's Addressing interface's
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing.DRAFT">AddressableVCardFields</tp:dbus-ref>.</p>
     * 
     * <p>It is not necessarily valid to interpret contacts' identifiers
     *   as values of this vCard field. For instance, telepathy-sofiasip
     *   supports contacts whose identifiers are of the form
     *   sip:jenny@example.com or tel:8675309, which would not normally
     *   both be represented by any single vCard field. Arbitrary
     *   handles/identifiers as vCard fields are represented
     *   through the Connection's
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Addressing.DRAFT</tp:dbus-ref>
     *   contact attributes.</p>
     * 
     * <tp:rationale>
     *   <p>This is taken from Mission Control profiles as used on Maemo 5.
     *     One valid use of this field is to answer the question: given a
     *     contact's vCard containing an X-JABBER field, how can you
     *     communicate with the contact? By iterating through protocols
     *     looking for an x-jabber VCardField, one can build up a list of
     *     protocols that handle x-jabber, then offer the user a list of
     *     accounts for those protocols and/or the option to create a new
     *     account for one of those protocols.</p>
     * </tp:rationale>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file if it is non-empty, using the key
     *   <code>VCardField</code>. The corresponding value
     *   is a string, following the syntax of the &quot;localestring&quot; type from
     *   the Desktop Entry Specification.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyVCardField() const
    {
        return internalRequestProperty(QLatin1String("VCardField"));
    }

    /**
     * Represents property "EnglishName" on the remote object.
     * 
     * <p>The name of the protocol in a form suitable for display to users,
     *   such as &quot;AIM&quot; or &quot;Yahoo!&quot;, or the empty string if none is
     *   available.</p>
     * 
     * <p>This is effectively in the C locale (international English);
     *   user interfaces requiring a localized protocol name SHOULD look
     *   one up in their own message catalog based on either the Telepathy
     *   <tp:type>Protocol</tp:type> name or this property, but SHOULD use
     *   this English version as a fallback if no translated version can be
     *   found.</p>
     * 
     * <tp:rationale>
     *   <p>Many protocols are named after a company or product which isn't
     *     translated in non-English locales. This also provides a fallback
     *     display name, for UIs with no prior knowledge of a particular
     *     protocol.</p>
     * </tp:rationale>
     * 
     * <p>If this property's value is empty, clients MAY fall back to using
     *   the Telepathy <tp:type>Protocol</tp:type> name, possibly with its
     *   capitalization adjusted.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file if it is non-empty, using the key
     *   <code>EnglishName</code>. The corresponding value
     *   is a string, following the syntax of the &quot;localestring&quot; type from
     *   the Desktop Entry Specification.</p>
     */
    Q_PROPERTY(QString EnglishName READ _deprecated_EnglishName)

    /**
     * Getter for the remote object property "EnglishName".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyEnglishName() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED QString EnglishName() const
    {
        return _deprecated_EnglishName();
    }

private:
    inline QString _deprecated_EnglishName() const
    {
        return qvariant_cast<QString>(internalPropGet("EnglishName"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "EnglishName" of type QString.
     *
     * 
     * <p>The name of the protocol in a form suitable for display to users,
     *   such as &quot;AIM&quot; or &quot;Yahoo!&quot;, or the empty string if none is
     *   available.</p>
     * 
     * <p>This is effectively in the C locale (international English);
     *   user interfaces requiring a localized protocol name SHOULD look
     *   one up in their own message catalog based on either the Telepathy
     *   <tp:type>Protocol</tp:type> name or this property, but SHOULD use
     *   this English version as a fallback if no translated version can be
     *   found.</p>
     * 
     * <tp:rationale>
     *   <p>Many protocols are named after a company or product which isn't
     *     translated in non-English locales. This also provides a fallback
     *     display name, for UIs with no prior knowledge of a particular
     *     protocol.</p>
     * </tp:rationale>
     * 
     * <p>If this property's value is empty, clients MAY fall back to using
     *   the Telepathy <tp:type>Protocol</tp:type> name, possibly with its
     *   capitalization adjusted.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file if it is non-empty, using the key
     *   <code>EnglishName</code>. The corresponding value
     *   is a string, following the syntax of the &quot;localestring&quot; type from
     *   the Desktop Entry Specification.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyEnglishName() const
    {
        return internalRequestProperty(QLatin1String("EnglishName"));
    }

    /**
     * Represents property "Icon" on the remote object.
     * 
     * <p>The name of an icon in the system's icon theme, such as &quot;im-msn&quot;, or
     *   the empty string.</p>
     * 
     * <tp:rationale>
     *   <p>This can be used as a default if the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Account">Icon</tp:dbus-ref>
     *     property is not set on an Account, or used by the <tp:dbus-ref namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>
     *     to choose a default icon if none is set during account
     *     creation.</p>
     * </tp:rationale>
     * 
     * <p>If this property's value is empty, clients MAY fall back to
     *   generating a name based on the <tp:type>Protocol</tp:type> name.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file if it is non-empty, using the key
     *   <code>Icon</code>. The corresponding value
     *   is a string, following the syntax of the &quot;localestring&quot; type from
     *   the Desktop Entry Specification.</p>
     */
    Q_PROPERTY(QString Icon READ _deprecated_Icon)

    /**
     * Getter for the remote object property "Icon".
     *
     * Don't use this: it blocks the main loop. Use the asynchronous
     * requestPropertyIcon() instead.
     *
     * \return The value of the property, or a default-constructed value
     *          if the property is not readable.
     */
    inline TELEPATHY_QT4_DEPRECATED QString Icon() const
    {
        return _deprecated_Icon();
    }

private:
    inline QString _deprecated_Icon() const
    {
        return qvariant_cast<QString>(internalPropGet("Icon"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Icon" of type QString.
     *
     * 
     * <p>The name of an icon in the system's icon theme, such as &quot;im-msn&quot;, or
     *   the empty string.</p>
     * 
     * <tp:rationale>
     *   <p>This can be used as a default if the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Account">Icon</tp:dbus-ref>
     *     property is not set on an Account, or used by the <tp:dbus-ref namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>
     *     to choose a default icon if none is set during account
     *     creation.</p>
     * </tp:rationale>
     * 
     * <p>If this property's value is empty, clients MAY fall back to
     *   generating a name based on the <tp:type>Protocol</tp:type> name.</p>
     * 
     * <p>Connection managers with a <code>.manager</code> file
     *   MUST cache this property in the protocol's section of the
     *   <code>.manager</code> file if it is non-empty, using the key
     *   <code>Icon</code>. The corresponding value
     *   is a string, following the syntax of the &quot;localestring&quot; type from
     *   the Desktop Entry Specification.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyIcon() const
    {
        return internalRequestProperty(QLatin1String("Icon"));
    }

    /**
     * Request all of the DBus properties on the interface.
     *
     * \return A pending variant map which will emit finished when the properties have
     *          been retrieved.
     */
    Tp::PendingVariantMap *requestAllProperties() const
    {
        return internalRequestAllProperties();
    }

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method "IdentifyAccount" on the remote object.
     * 
     * <p>Return a string which uniquely identifies the account to which the
     *   given parameters would connect.</p>
     * 
     * <tp:rationale>
     *   <p>For many protocols, this would return the well-known 'account'
     *     parameter. However, for IRC the returned string would be composed
     *     from the 'account' (i.e. nickname) and 'server' parameters.
     *     AccountManager implementations can use this to form the
     *     account-specific part of an Account's object path.</p>
     * </tp:rationale>
     *
     * \param parameters
     *     
     *     A set of parameters as would be provided to RequestConnection
     *
     * \return
     *     
     *     An opaque string suitable for use as the account-specific part of 
     *     an Account&apos;s object path. This is not necessarily globally 
     *     unique, but should represent a &quot;best-effort&quot; 
     *     identification of the account. For a pathological case, consider a 
     *     user signing in as &apos;me@example.com&apos; with 
     *     &apos;server&apos; set to either jabber1.example.com or 
     *     jabber2.example.com. Both of these should result in me@example.com 
     *     being returned from this method, even if the user can actually be 
     *     signed in to those two servers simultaneously.
     */
    inline QDBusPendingReply<QString> IdentifyAccount(const QVariantMap& parameters)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(parameters);
        return asyncCallWithArgumentList(QLatin1String("IdentifyAccount"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "NormalizeContact" on the remote object.
     * 
     * <p>Attempt to normalize the given contact ID. Where possible, this
     *   SHOULD return the same thing that would be returned by
     *   InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>.</p>
     * 
     * <p>If full normalization requires network activity or is otherwise
     *   impossible to do without a <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>,
     *   this method SHOULD perform a best-effort normalization.</p>
     * 
     * <tp:rationale>
     *   <p>One common example of a best-effort offline normalization
     *     differing from the ideal normalization is XMPP.</p>
     * 
     *   <p>On XMPP, contacts' JIDs should normally have the resource removed
     *     during normalization, but for contacts in a MUC (chatroom), the
     *     resource is an integral part of the JID - so the contact JID
     *     alice@example.com/Empathy should normalize to alice@example.com,
     *     but the in-MUC JID wonderland@conference.example.com/Alice should
     *     normalize to itself.</p>
     * 
     *   <p>While online, the connection manager has enough context to know
     *     which chatrooms the user is in, and can infer from that whether
     *     to remove resources, but the best-effort normalization performed
     *     while offline does not have this context, so the best that can be
     *     done is to remove the resource from all JIDs.</p>
     * </tp:rationale>
     * 
     * <p>This method MAY simply raise NotImplemented on some protocols.</p>
     * 
     * <tp:rationale>
     *   <p>In link-local XMPP, you can't talk to someone who isn't present
     *     on your local network, so normalizing identifiers in advance is
     *     meaningless.</p>
     * </tp:rationale>
     *
     * \param contactID
     *     
     *     The identifier of a contact in this protocol
     *
     * \return
     *     
     *     The identifier of a contact in this protocol, normalized as much as 
     *     possible
     */
    inline QDBusPendingReply<QString> NormalizeContact(const QString& contactID)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(contactID);
        return asyncCallWithArgumentList(QLatin1String("NormalizeContact"), argumentList);
    }

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
}
}
Q_DECLARE_METATYPE(Tp::Client::ConnectionManagerInterface*)
Q_DECLARE_METATYPE(Tp::Client::ProtocolInterface*)
