/*
 * 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.
 */

#include <TelepathyQt4/future-internal.h>

#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 TpFuture
{
namespace Client
{

/**
 * \class CallContentCodecOfferInterface
 * \headerfile TelepathyQt4/future-internal.h <TelepathyQt4/future-internal.h>
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Call.Content.CodecOffer.DRAFT."
 */
class TELEPATHY_QT4_NO_EXPORT CallContentCodecOfferInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a CallContentCodecOfferInterface 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.
     */
    CallContentCodecOfferInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallContentCodecOfferInterface 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.
     */
    CallContentCodecOfferInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallContentCodecOfferInterface 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.
     */
    CallContentCodecOfferInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a CallContentCodecOfferInterface 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 CallContentCodecOfferInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a CallContentCodecOfferInterface 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.
     */
    CallContentCodecOfferInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

    /**
     * Represents property "RemoteContactCodecMap" on the remote object.
     * 
     * A map from remote contacts to the lists of codecs they support.
     */
    Q_PROPERTY(TpFuture::ContactCodecMap RemoteContactCodecMap READ _deprecated_RemoteContactCodecMap)

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

private:
    inline TpFuture::ContactCodecMap _deprecated_RemoteContactCodecMap() const
    {
        return qvariant_cast<TpFuture::ContactCodecMap>(internalPropGet("RemoteContactCodecMap"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "RemoteContactCodecMap" of type TpFuture::ContactCodecMap.
     *
     * 
     * A map from remote contacts to the lists of codecs they support.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyRemoteContactCodecMap() const
    {
        return internalRequestProperty(QLatin1String("RemoteContactCodecMap"));
    }

    /**
     * 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 "Accept" on the remote object.
     * 
     * Accept the updated Codec mapping and update the local mapping
     */
    inline QDBusPendingReply<> Accept(const TpFuture::CodecList& codecs)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method "Reject" on the remote object.
     * 
     * Reject the proposed update to the codecs FIXME add error codes and 
     * strings here
     */
    inline QDBusPendingReply<> Reject()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

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

/**
 * \class CallContentInterface
 * \headerfile TelepathyQt4/future-internal.h <TelepathyQt4/future-internal.h>
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Call.Content.DRAFT."
 */
class TELEPATHY_QT4_NO_EXPORT CallContentInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a CallContentInterface 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.
     */
    CallContentInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallContentInterface 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.
     */
    CallContentInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallContentInterface 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.
     */
    CallContentInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a CallContentInterface 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 CallContentInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a CallContentInterface 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.
     */
    CallContentInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

    /**
     * Represents property "Interfaces" on the remote object.
     * 
     * <p>Extra interfaces provided by this content, such as <tp:dbus-ref namespace="ofdT.Call">Content.Interface.Media.DRAFT</tp:dbus-ref> or
     *   <tp:dbus-ref namespace="ofdT.Call">Content.Interface.Mute.DRAFT</tp:dbus-ref>.
     *   This SHOULD NOT include the Content interface itself, and cannot
     *   change once the content has been created.</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>Extra interfaces provided by this content, such as <tp:dbus-ref namespace="ofdT.Call">Content.Interface.Media.DRAFT</tp:dbus-ref> or
     *   <tp:dbus-ref namespace="ofdT.Call">Content.Interface.Mute.DRAFT</tp:dbus-ref>.
     *   This SHOULD NOT include the Content interface itself, and cannot
     *   change once the content has been created.</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 "Name" on the remote object.
     * 
     * <p>The name of the content.
     *   [FIXME: rationale?]</p>
     */
    Q_PROPERTY(QString Name READ _deprecated_Name)

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

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

    /**
     * Asynchronous getter for the remote object property "Name" of type QString.
     *
     * 
     * <p>The name of the content.
     *   [FIXME: rationale?]</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyName() const
    {
        return internalRequestProperty(QLatin1String("Name"));
    }

    /**
     * Represents property "Type" on the remote object.
     * 
     * <p>The media type of this content</p>
     */
    Q_PROPERTY(uint Type READ _deprecated_Type)

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

private:
    inline uint _deprecated_Type() const
    {
        return qvariant_cast<uint>(internalPropGet("Type"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Type" of type uint.
     *
     * 
     * <p>The media type of this content</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyType() const
    {
        return internalRequestProperty(QLatin1String("Type"));
    }

    /**
     * Represents property "Creator" on the remote object.
     * 
     * <p>The creator of this content</p>
     */
    Q_PROPERTY(uint Creator READ _deprecated_Creator)

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

private:
    inline uint _deprecated_Creator() const
    {
        return qvariant_cast<uint>(internalPropGet("Creator"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Creator" of type uint.
     *
     * 
     * <p>The creator of this content</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyCreator() const
    {
        return internalRequestProperty(QLatin1String("Creator"));
    }

    /**
     * Represents property "Disposition" on the remote object.
     * 
     * The disposition of this content. This property cannot change.
     */
    Q_PROPERTY(uint Disposition READ _deprecated_Disposition)

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

private:
    inline uint _deprecated_Disposition() const
    {
        return qvariant_cast<uint>(internalPropGet("Disposition"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Disposition" of type uint.
     *
     * 
     * The disposition of this content. This property cannot change.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyDisposition() const
    {
        return internalRequestProperty(QLatin1String("Disposition"));
    }

    /**
     * Represents property "Streams" on the remote object.
     * 
     * <p>The list of
     *    <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call">Stream.DRAFT</tp:dbus-ref>
     *    objects that exist in this content.</p>
     * 
     * <tp:rationale>
     *   <p>In a conference call multiple parties can share one media content
     *     (say, audio), but the streaming of that media can either be shared
     *     or separate. For example, in a multicast conference all contacts
     *     would share one stream, while in a Muji conference there would be
     *     a stream for each participant.</p>
     * </tp:rationale>
     * 
     * <p>Change notification is via
     *   <tp:member-ref>StreamAdded</tp:member-ref> and
     *   <tp:member-ref>StreamRemoved</tp:member-ref>.</p>
     */
    Q_PROPERTY(TpFuture::ObjectPathList Streams READ _deprecated_Streams)

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

private:
    inline TpFuture::ObjectPathList _deprecated_Streams() const
    {
        return qvariant_cast<TpFuture::ObjectPathList>(internalPropGet("Streams"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Streams" of type TpFuture::ObjectPathList.
     *
     * 
     * <p>The list of
     *    <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call">Stream.DRAFT</tp:dbus-ref>
     *    objects that exist in this content.</p>
     * 
     * <tp:rationale>
     *   <p>In a conference call multiple parties can share one media content
     *     (say, audio), but the streaming of that media can either be shared
     *     or separate. For example, in a multicast conference all contacts
     *     would share one stream, while in a Muji conference there would be
     *     a stream for each participant.</p>
     * </tp:rationale>
     * 
     * <p>Change notification is via
     *   <tp:member-ref>StreamAdded</tp:member-ref> and
     *   <tp:member-ref>StreamRemoved</tp:member-ref>.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyStreams() const
    {
        return internalRequestProperty(QLatin1String("Streams"));
    }

    /**
     * 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 "Remove" on the remote object.
     * 
     * Remove the content from the call.
     */
    inline QDBusPendingReply<> Remove()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

Q_SIGNALS:
    /**
     * Represents the signal "StreamAdded" on the remote object.
     * 
     * <p>Emitted when a stream is added to a call</p>
     *
     * \param stream
     *     
     *     The stream which was added
     */
    void StreamAdded(const QDBusObjectPath& stream);

    /**
     * Represents the signal "StreamRemoved" on the remote object.
     * 
     * <p>Emitted when a stream is added to a call</p>
     *
     * \param stream
     *     
     *     The stream which was removed
     */
    void StreamRemoved(const QDBusObjectPath& stream);

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

/**
 * \class CallContentInterfaceMediaInterface
 * \headerfile TelepathyQt4/future-internal.h <TelepathyQt4/future-internal.h>
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Call.Content.Interface.Media.DRAFT."
 */
class TELEPATHY_QT4_NO_EXPORT CallContentInterfaceMediaInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a CallContentInterfaceMediaInterface 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.
     */
    CallContentInterfaceMediaInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallContentInterfaceMediaInterface 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.
     */
    CallContentInterfaceMediaInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallContentInterfaceMediaInterface 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.
     */
    CallContentInterfaceMediaInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a CallContentInterfaceMediaInterface 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 CallContentInterfaceMediaInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a CallContentInterfaceMediaInterface 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.
     */
    CallContentInterfaceMediaInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

    /**
     * Represents property "ContactCodecMap" on the remote object.
     * 
     * A map from contact handles (including the local user&apos;s own handle) 
     * to the codecs supported by that contact. Change notification is via 
     * CodecsChanged.
     */
    Q_PROPERTY(TpFuture::ContactCodecMap ContactCodecMap READ _deprecated_ContactCodecMap)

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

private:
    inline TpFuture::ContactCodecMap _deprecated_ContactCodecMap() const
    {
        return qvariant_cast<TpFuture::ContactCodecMap>(internalPropGet("ContactCodecMap"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "ContactCodecMap" of type TpFuture::ContactCodecMap.
     *
     * 
     * A map from contact handles (including the local user&apos;s own handle) 
     * to the codecs supported by that contact. Change notification is via 
     * CodecsChanged.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyContactCodecMap() const
    {
        return internalRequestProperty(QLatin1String("ContactCodecMap"));
    }

    /**
     * Represents property "CodecOffer" on the remote object.
     * 
     * <p>The object path to the current
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content">CodecOffer.DRAFT</tp:dbus-ref> object, and its
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content">CodecOffer.DRAFT.RemoteContactCodecMap</tp:dbus-ref> property.
     *     If the object path is &quot;/&quot; then there isn't an outstanding
     *   codec offer, and the mapping MUST be empty.</p>
     * 
     * <tp:rationale>
     *   <p>Having the RemoteContactCodecMap property here saves a D-Bus
     *     round-trip - it shouldn't be necessary to get the property
     *     from the CodecOffer object, in practice.</p>
     * </tp:rationale>
     * 
     * <p>Change notification is via
     *   <tp:member-ref>NewCodecOffer</tp:member-ref> (which replaces the
     *   value of this property with a new codec offer), and
     *   <tp:member-ref>CodecsChanged</tp:member-ref> (which implies that
     *   there is no longer any active codec offer).</p>
     */
    Q_PROPERTY(TpFuture::CodecOffering CodecOffer READ _deprecated_CodecOffer)

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

private:
    inline TpFuture::CodecOffering _deprecated_CodecOffer() const
    {
        return qvariant_cast<TpFuture::CodecOffering>(internalPropGet("CodecOffer"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "CodecOffer" of type TpFuture::CodecOffering.
     *
     * 
     * <p>The object path to the current
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content">CodecOffer.DRAFT</tp:dbus-ref> object, and its
     *   <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content">CodecOffer.DRAFT.RemoteContactCodecMap</tp:dbus-ref> property.
     *     If the object path is &quot;/&quot; then there isn't an outstanding
     *   codec offer, and the mapping MUST be empty.</p>
     * 
     * <tp:rationale>
     *   <p>Having the RemoteContactCodecMap property here saves a D-Bus
     *     round-trip - it shouldn't be necessary to get the property
     *     from the CodecOffer object, in practice.</p>
     * </tp:rationale>
     * 
     * <p>Change notification is via
     *   <tp:member-ref>NewCodecOffer</tp:member-ref> (which replaces the
     *   value of this property with a new codec offer), and
     *   <tp:member-ref>CodecsChanged</tp:member-ref> (which implies that
     *   there is no longer any active codec offer).</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyCodecOffer() const
    {
        return internalRequestProperty(QLatin1String("CodecOffer"));
    }

    /**
     * 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 "SetCodecs" on the remote object.
     * 
     * Set or update the local codec mapping.
     *
     * \param codecs
     *     
     *     The codecs now supported by the local user.
     */
    inline QDBusPendingReply<> SetCodecs(const TpFuture::CodecList& codecs)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

Q_SIGNALS:
    /**
     * Represents the signal "CodecsChanged" on the remote object.
     * 
     * <p>Emitted when the codecs in use change.</p>
     * 
     * <p>As well as acting as change notification for the
     *   <tp:member-ref>ContactCodecMap</tp:member-ref>, emission of this
     *   signal implies that the <tp:member-ref>CodecOffer</tp:member-ref>
     *   property has changed to <code>('/', {})</code>.</p>
     *
     * \param updatedCodecs
     *     
     *     A map from contacts to their codecs. Each pair in this map is added 
     *     to the ContactCodecMap property, replacing any previous pair with 
     *     that key.
     *
     * \param removedContacts
     *     
     *     A list of keys which were removed from the ContactCodecMap, 
     *     probably because those contacts left the call.
     */
    void CodecsChanged(const TpFuture::ContactCodecMap& updatedCodecs, const TpFuture::UIntList& removedContacts);

    /**
     * Represents the signal "NewCodecOffer" on the remote object.
     * 
     * <p>Emitted when a new <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content">CodecOffer.DRAFT</tp:dbus-ref> appears. The streaming
     *   implementation MUST respond by calling the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content.CodecOffer.DRAFT">Accept</tp:dbus-ref> or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content.CodecOffer.DRAFT">Reject</tp:dbus-ref> method on the codec offer object.</p>
     * 
     * <p>Emission of this signal indicates that the
     *   <tp:member-ref>CodecOffer</tp:member-ref> property has changed to
     *   <code>(Offer, Codecs)</code>.</p>
     *
     * \param offer
     *     
     *     The object path of the new codec offer. This replaces any previous 
     *     codec offer.
     *
     * \param codecs
     *     
     *     <p>The <tp:dbus-ref namespace="org.freedesktop.Telepathy.Call.Content">CodecOffer.DRAFT.RemoteContactCodecMap</tp:dbus-ref> property
     *       of the codec offer.</p>
     *     
     *     <tp:rationale>
     *       <p>Having the RemoteContactCodecMap property here saves a D-Bus
     *         round-trip - it shouldn't be necessary to get the property
     *         from the CodecOffer object, in practice.</p>
     *     </tp:rationale>
     */
    void NewCodecOffer(const QDBusObjectPath& offer, const TpFuture::ContactCodecMap& codecs);

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

/**
 * \class CallStreamEndpointInterface
 * \headerfile TelepathyQt4/future-internal.h <TelepathyQt4/future-internal.h>
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Call.Stream.Endpoint.DRAFT."
 */
class TELEPATHY_QT4_NO_EXPORT CallStreamEndpointInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a CallStreamEndpointInterface 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.
     */
    CallStreamEndpointInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallStreamEndpointInterface 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.
     */
    CallStreamEndpointInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallStreamEndpointInterface 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.
     */
    CallStreamEndpointInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a CallStreamEndpointInterface 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 CallStreamEndpointInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a CallStreamEndpointInterface 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.
     */
    CallStreamEndpointInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

    /**
     * Represents property "RemoteCredentials" on the remote object.
     */
    Q_PROPERTY(TpFuture::StreamCredentials RemoteCredentials READ _deprecated_RemoteCredentials)

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

private:
    inline TpFuture::StreamCredentials _deprecated_RemoteCredentials() const
    {
        return qvariant_cast<TpFuture::StreamCredentials>(internalPropGet("RemoteCredentials"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "RemoteCredentials" of type TpFuture::StreamCredentials.
     *
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyRemoteCredentials() const
    {
        return internalRequestProperty(QLatin1String("RemoteCredentials"));
    }

    /**
     * Represents property "RemoteCandidates" on the remote object.
     */
    Q_PROPERTY(TpFuture::CandidateList RemoteCandidates READ _deprecated_RemoteCandidates)

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

private:
    inline TpFuture::CandidateList _deprecated_RemoteCandidates() const
    {
        return qvariant_cast<TpFuture::CandidateList>(internalPropGet("RemoteCandidates"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "RemoteCandidates" of type TpFuture::CandidateList.
     *
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyRemoteCandidates() const
    {
        return internalRequestProperty(QLatin1String("RemoteCandidates"));
    }

    /**
     * Represents property "SelectedCandidate" on the remote object.
     */
    Q_PROPERTY(TpFuture::Candidate SelectedCandidate READ _deprecated_SelectedCandidate)

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

private:
    inline TpFuture::Candidate _deprecated_SelectedCandidate() const
    {
        return qvariant_cast<TpFuture::Candidate>(internalPropGet("SelectedCandidate"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "SelectedCandidate" of type TpFuture::Candidate.
     *
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertySelectedCandidate() const
    {
        return internalRequestProperty(QLatin1String("SelectedCandidate"));
    }

    /**
     * Represents property "StreamState" on the remote object.
     */
    Q_PROPERTY(uint StreamState READ _deprecated_StreamState)

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

private:
    inline uint _deprecated_StreamState() const
    {
        return qvariant_cast<uint>(internalPropGet("StreamState"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "StreamState" of type uint.
     *
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyStreamState() const
    {
        return internalRequestProperty(QLatin1String("StreamState"));
    }

    /**
     * Represents property "Transport" on the remote object.
     */
    Q_PROPERTY(uint Transport READ _deprecated_Transport)

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

private:
    inline uint _deprecated_Transport() const
    {
        return qvariant_cast<uint>(internalPropGet("Transport"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Transport" of type uint.
     *
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyTransport() const
    {
        return internalRequestProperty(QLatin1String("Transport"));
    }

    /**
     * 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 "SetSelectedCandidate" on the remote object.
     */
    inline QDBusPendingReply<> SetSelectedCandidate(const TpFuture::Candidate& candidate)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method "SetStreamState" on the remote object.
     */
    inline QDBusPendingReply<> SetStreamState(uint state)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

Q_SIGNALS:
    /**
     * Represents the signal "RemoteCredentialsSet" on the remote object.
     */
    void RemoteCredentialsSet(const QString& username, const QString& password);

    /**
     * Represents the signal "RemoteCandidatesAdded" on the remote object.
     */
    void RemoteCandidatesAdded(const TpFuture::CandidateList& candidates);

    /**
     * Represents the signal "CandidateSelected" on the remote object.
     */
    void CandidateSelected(const TpFuture::Candidate& candidate);

    /**
     * Represents the signal "StreamStateChanged" on the remote object.
     */
    void StreamStateChanged(uint state);

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

/**
 * \class CallStreamInterface
 * \headerfile TelepathyQt4/future-internal.h <TelepathyQt4/future-internal.h>
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Call.Stream.DRAFT."
 */
class TELEPATHY_QT4_NO_EXPORT CallStreamInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a CallStreamInterface 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.
     */
    CallStreamInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallStreamInterface 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.
     */
    CallStreamInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallStreamInterface 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.
     */
    CallStreamInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a CallStreamInterface 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 CallStreamInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a CallStreamInterface 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.
     */
    CallStreamInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

    /**
     * Represents property "Interfaces" on the remote object.
     * 
     * <p>Extra interfaces provided by this stream, such as <tp:dbus-ref namespace="ofdT.Call">Stream.Interface.Media.DRAFT</tp:dbus-ref>.
     *   This SHOULD NOT include the Stream interface itself, and cannot
     *   change once the stream has been created.</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>Extra interfaces provided by this stream, such as <tp:dbus-ref namespace="ofdT.Call">Stream.Interface.Media.DRAFT</tp:dbus-ref>.
     *   This SHOULD NOT include the Stream interface itself, and cannot
     *   change once the stream has been created.</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 "Senders" on the remote object.
     * 
     * <p>A map from contacts to their sending state.</p>
     * 
     * <p>The local user's handle in this map (the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Group.SelfHandle</tp:dbus-ref> if the channel implements
     *   Group, or the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.SelfHandle</tp:dbus-ref> otherwise) indicates
     *   whether the local user is sending media. Media sent on this stream
     *   should be assumed to be received, directly or indirectly, by every
     *   other contact in the Senders mapping. Sending_State_Pending_Send
     *   indicates that another contact has asked the local user to send
     *   media.</p>
     * 
     * <p>Other contacts' handles in this map indicate whether they are
     *   sending media to the contacts in this stream.
     *   Sending_State_Pending_Send indicates contacts who are not sending but
     *   have been asked to do so.</p>
     */
    Q_PROPERTY(TpFuture::ContactSendingStateMap Senders READ _deprecated_Senders)

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

private:
    inline TpFuture::ContactSendingStateMap _deprecated_Senders() const
    {
        return qvariant_cast<TpFuture::ContactSendingStateMap>(internalPropGet("Senders"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Senders" of type TpFuture::ContactSendingStateMap.
     *
     * 
     * <p>A map from contacts to their sending state.</p>
     * 
     * <p>The local user's handle in this map (the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Group.SelfHandle</tp:dbus-ref> if the channel implements
     *   Group, or the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.SelfHandle</tp:dbus-ref> otherwise) indicates
     *   whether the local user is sending media. Media sent on this stream
     *   should be assumed to be received, directly or indirectly, by every
     *   other contact in the Senders mapping. Sending_State_Pending_Send
     *   indicates that another contact has asked the local user to send
     *   media.</p>
     * 
     * <p>Other contacts' handles in this map indicate whether they are
     *   sending media to the contacts in this stream.
     *   Sending_State_Pending_Send indicates contacts who are not sending but
     *   have been asked to do so.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertySenders() const
    {
        return internalRequestProperty(QLatin1String("Senders"));
    }

    /**
     * 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 "SetSending" on the remote object.
     * 
     * Set the stream to start or stop sending media from the local user to 
     * other contacts.
     *
     * \param send
     *     
     *     <p>If true, the local user's sending state should change
     *       to Sending, if it isn't already.</p>
     *     
     *     <p>If false, the local user's sending state should change to None,
     *       if it isn't already.</p>
     */
    inline QDBusPendingReply<> SetSending(bool send)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method "RequestReceiving" on the remote object.
     * 
     * Request that a remote contact stops or starts sending on this stream.
     *
     * \param contact
     *     
     *     <p>Contact from which sending is requested</p>
     *
     * \param receive
     *     
     *     <p>If true, request that the given contact starts to send media.
     *       If false, request that the given contact stops sending media.</p>
     */
    inline QDBusPendingReply<> RequestReceiving(uint contact, bool receive)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(contact) << QVariant::fromValue(receive);
        return asyncCallWithArgumentList(QLatin1String("RequestReceiving"), argumentList);
    }

Q_SIGNALS:
    /**
     * Represents the signal "SendersChanged" on the remote object.
     * 
     * Emitted when <tp:member-ref>Senders</tp:member-ref> changes.
     *
     * \param updates
     *     
     *     A mapping from channel-specific handles to their updated sending 
     *     state, whose keys include at least the senders who were added, and 
     *     the senders whose states changed.
     *
     * \param removed
     *     
     *     The channel-specific handles that were removed from the keys of the 
     *     Senders property, as a result of the contact leaving this stream
     */
    void SendersChanged(const TpFuture::ContactSendingStateMap& updates, const TpFuture::UIntList& removed);

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

/**
 * \class CallStreamInterfaceMediaInterface
 * \headerfile TelepathyQt4/future-internal.h <TelepathyQt4/future-internal.h>
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Call.Stream.Interface.Media.DRAFT."
 */
class TELEPATHY_QT4_NO_EXPORT CallStreamInterfaceMediaInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a CallStreamInterfaceMediaInterface 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.
     */
    CallStreamInterfaceMediaInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallStreamInterfaceMediaInterface 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.
     */
    CallStreamInterfaceMediaInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a CallStreamInterfaceMediaInterface 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.
     */
    CallStreamInterfaceMediaInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a CallStreamInterfaceMediaInterface 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 CallStreamInterfaceMediaInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a CallStreamInterfaceMediaInterface 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.
     */
    CallStreamInterfaceMediaInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

    /**
     * Represents property "Transport" on the remote object.
     * 
     * The transport for this stream. This property is immutable.
     */
    Q_PROPERTY(uint Transport READ _deprecated_Transport)

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

private:
    inline uint _deprecated_Transport() const
    {
        return qvariant_cast<uint>(internalPropGet("Transport"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Transport" of type uint.
     *
     * 
     * The transport for this stream. This property is immutable.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyTransport() const
    {
        return internalRequestProperty(QLatin1String("Transport"));
    }

    /**
     * Represents property "LocalCandidates" on the remote object.
     * 
     * [FIXME]. Change notification is via LocalCandidatesAdded.
     */
    Q_PROPERTY(TpFuture::CandidateList LocalCandidates READ _deprecated_LocalCandidates)

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

private:
    inline TpFuture::CandidateList _deprecated_LocalCandidates() const
    {
        return qvariant_cast<TpFuture::CandidateList>(internalPropGet("LocalCandidates"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "LocalCandidates" of type TpFuture::CandidateList.
     *
     * 
     * [FIXME]. Change notification is via LocalCandidatesAdded.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyLocalCandidates() const
    {
        return internalRequestProperty(QLatin1String("LocalCandidates"));
    }

    /**
     * Represents property "LocalCredentials" on the remote object.
     * 
     * [FIXME]. Change notification is via LocalCredentialsSet.
     */
    Q_PROPERTY(TpFuture::StreamCredentials LocalCredentials READ _deprecated_LocalCredentials)

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

private:
    inline TpFuture::StreamCredentials _deprecated_LocalCredentials() const
    {
        return qvariant_cast<TpFuture::StreamCredentials>(internalPropGet("LocalCredentials"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "LocalCredentials" of type TpFuture::StreamCredentials.
     *
     * 
     * [FIXME]. Change notification is via LocalCredentialsSet.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyLocalCredentials() const
    {
        return internalRequestProperty(QLatin1String("LocalCredentials"));
    }

    /**
     * Represents property "STUNServers" on the remote object.
     * 
     * The IP addresses of possible STUN servers to use for NAT traversal, as 
     * dotted-quad IPv4 address literals or RFC2373 IPv6 address literals. 
     * This property cannot change once the stream has been created, so there 
     * is no change notification. The IP addresses MUST NOT be given as DNS 
     * hostnames. High-quality connection managers already need an 
     * asynchronous DNS resolver, so they might as well resolve this name to 
     * an IP to make life easier for streaming implementations.
     */
    Q_PROPERTY(TpFuture::SocketAddressIPList STUNServers READ _deprecated_STUNServers)

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

private:
    inline TpFuture::SocketAddressIPList _deprecated_STUNServers() const
    {
        return qvariant_cast<TpFuture::SocketAddressIPList>(internalPropGet("STUNServers"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "STUNServers" of type TpFuture::SocketAddressIPList.
     *
     * 
     * The IP addresses of possible STUN servers to use for NAT traversal, as 
     * dotted-quad IPv4 address literals or RFC2373 IPv6 address literals. 
     * This property cannot change once the stream has been created, so there 
     * is no change notification. The IP addresses MUST NOT be given as DNS 
     * hostnames. High-quality connection managers already need an 
     * asynchronous DNS resolver, so they might as well resolve this name to 
     * an IP to make life easier for streaming implementations.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertySTUNServers() const
    {
        return internalRequestProperty(QLatin1String("STUNServers"));
    }

    /**
     * Represents property "RelayInfo" on the remote object.
     * 
     * <p>A list of mappings describing TURN or Google relay servers
     *   available for the client to use in its candidate gathering, as
     *   determined from the protocol. Map keys are:</p>
     * 
     * <dl>
     *   <dt><code>ip</code> - s</dt>
     *   <dd>The IP address of the relay server as a dotted-quad IPv4
     *     address literal or an RFC2373 IPv6 address literal. This MUST NOT
     *     be a DNS hostname.
     * 
     *     <tp:rationale>
     *       High-quality connection managers already need an asynchronous
     *       DNS resolver, so they might as well resolve this name to an IP
     *       and make life easier for streaming implementations.
     *     </tp:rationale>
     *   </dd>
     * 
     *   <dt><code>type</code> - s</dt>
     *   <dd>
     *     <p>Either <code>udp</code> for UDP (UDP MUST be assumed if this
     *       key is omitted), <code>tcp</code> for TCP, or
     *       <code>tls</code>.</p>
     * 
     *     <p>The precise meaning of this key depends on the
     *       <tp:member-ref>Transport</tp:member-ref> property: if
     *       Transport is ICE, <code>tls</code> means
     *       TLS over TCP as referenced by ICE draft 19, and if
     *       Transport is GTalk_P2P, <code>tls</code> means
     *       a fake SSL session over TCP as implemented by libjingle.</p>
     *   </dd>
     * 
     *   <dt><code>port</code> - q</dt>
     *   <dd>The UDP or TCP port of the relay server as an ASCII unsigned
     *     integer</dd>
     * 
     *   <dt><code>username</code> - s</dt>
     *   <dd>The username to use</dd>
     * 
     *   <dt><code>password</code> - s</dt>
     *   <dd>The password to use</dd>
     * 
     *   <dt><code>component</code> - u</dt>
     *   <dd>The component number to use this relay server for, as an
     *     ASCII unsigned integer; if not included, this relay server
     *     may be used for any or all components.
     * 
     *     <tp:rationale>
     *       In ICE draft 6, as used by Google Talk, credentials are only
     *       valid once, so each component needs relaying separately.
     *     </tp:rationale>
     *   </dd>
     * </dl>
     * 
     * <tp:rationale>
     *   <p>An equivalent of the gtalk-p2p-relay-token property on
     *     MediaSignalling channels is not included here. The connection
     *     manager should be responsible for making the necessary HTTP
     *     requests to turn the token into a username and password.</p>
     * </tp:rationale>
     * 
     * <p>The type of relay server that this represents depends on
     *   the value of the <tp:member-ref>Transport</tp:member-ref>
     *   property. If Transport is ICE, this is a TURN server;
     *   if Transport is GTalk_P2P, this is a Google relay server;
     *   otherwise, the meaning of RelayInfo is undefined.</p>
     * 
     * <p>If relaying is not possible for this stream, the list is empty.</p>
     */
    Q_PROPERTY(TpFuture::StringVariantMapList RelayInfo READ _deprecated_RelayInfo)

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

private:
    inline TpFuture::StringVariantMapList _deprecated_RelayInfo() const
    {
        return qvariant_cast<TpFuture::StringVariantMapList>(internalPropGet("RelayInfo"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "RelayInfo" of type TpFuture::StringVariantMapList.
     *
     * 
     * <p>A list of mappings describing TURN or Google relay servers
     *   available for the client to use in its candidate gathering, as
     *   determined from the protocol. Map keys are:</p>
     * 
     * <dl>
     *   <dt><code>ip</code> - s</dt>
     *   <dd>The IP address of the relay server as a dotted-quad IPv4
     *     address literal or an RFC2373 IPv6 address literal. This MUST NOT
     *     be a DNS hostname.
     * 
     *     <tp:rationale>
     *       High-quality connection managers already need an asynchronous
     *       DNS resolver, so they might as well resolve this name to an IP
     *       and make life easier for streaming implementations.
     *     </tp:rationale>
     *   </dd>
     * 
     *   <dt><code>type</code> - s</dt>
     *   <dd>
     *     <p>Either <code>udp</code> for UDP (UDP MUST be assumed if this
     *       key is omitted), <code>tcp</code> for TCP, or
     *       <code>tls</code>.</p>
     * 
     *     <p>The precise meaning of this key depends on the
     *       <tp:member-ref>Transport</tp:member-ref> property: if
     *       Transport is ICE, <code>tls</code> means
     *       TLS over TCP as referenced by ICE draft 19, and if
     *       Transport is GTalk_P2P, <code>tls</code> means
     *       a fake SSL session over TCP as implemented by libjingle.</p>
     *   </dd>
     * 
     *   <dt><code>port</code> - q</dt>
     *   <dd>The UDP or TCP port of the relay server as an ASCII unsigned
     *     integer</dd>
     * 
     *   <dt><code>username</code> - s</dt>
     *   <dd>The username to use</dd>
     * 
     *   <dt><code>password</code> - s</dt>
     *   <dd>The password to use</dd>
     * 
     *   <dt><code>component</code> - u</dt>
     *   <dd>The component number to use this relay server for, as an
     *     ASCII unsigned integer; if not included, this relay server
     *     may be used for any or all components.
     * 
     *     <tp:rationale>
     *       In ICE draft 6, as used by Google Talk, credentials are only
     *       valid once, so each component needs relaying separately.
     *     </tp:rationale>
     *   </dd>
     * </dl>
     * 
     * <tp:rationale>
     *   <p>An equivalent of the gtalk-p2p-relay-token property on
     *     MediaSignalling channels is not included here. The connection
     *     manager should be responsible for making the necessary HTTP
     *     requests to turn the token into a username and password.</p>
     * </tp:rationale>
     * 
     * <p>The type of relay server that this represents depends on
     *   the value of the <tp:member-ref>Transport</tp:member-ref>
     *   property. If Transport is ICE, this is a TURN server;
     *   if Transport is GTalk_P2P, this is a Google relay server;
     *   otherwise, the meaning of RelayInfo is undefined.</p>
     * 
     * <p>If relaying is not possible for this stream, the list is empty.</p>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyRelayInfo() const
    {
        return internalRequestProperty(QLatin1String("RelayInfo"));
    }

    /**
     * Represents property "RetrievedServerInfo" on the remote object.
     * 
     * <p>True if the initial information about STUN servers and Relay servers
     *   has been retrieved. Change notification is via the
     *   <tp:member-ref>ServerInfoRetrieved</tp:member-ref> signal.</p>
     * 
     * <tp:rationale>
     *   <p>Streaming implementations that can't cope with STUN and relay
     *     servers being added later SHOULD wait for this property
     *     to become true before proceeding.</p>
     * </tp:rationale>
     */
    Q_PROPERTY(bool RetrievedServerInfo READ _deprecated_RetrievedServerInfo)

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

private:
    inline bool _deprecated_RetrievedServerInfo() const
    {
        return qvariant_cast<bool>(internalPropGet("RetrievedServerInfo"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "RetrievedServerInfo" of type bool.
     *
     * 
     * <p>True if the initial information about STUN servers and Relay servers
     *   has been retrieved. Change notification is via the
     *   <tp:member-ref>ServerInfoRetrieved</tp:member-ref> signal.</p>
     * 
     * <tp:rationale>
     *   <p>Streaming implementations that can't cope with STUN and relay
     *     servers being added later SHOULD wait for this property
     *     to become true before proceeding.</p>
     * </tp:rationale>
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyRetrievedServerInfo() const
    {
        return internalRequestProperty(QLatin1String("RetrievedServerInfo"));
    }

    /**
     * Represents property "Endpoints" on the remote object.
     * 
     * The list of endpoints Endpoint.DRAFT that exist for this stream. Change 
     * notification is via the EndpointsChanged signal.
     */
    Q_PROPERTY(TpFuture::ObjectPathList Endpoints READ _deprecated_Endpoints)

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

private:
    inline TpFuture::ObjectPathList _deprecated_Endpoints() const
    {
        return qvariant_cast<TpFuture::ObjectPathList>(internalPropGet("Endpoints"));
    }
public:

    /**
     * Asynchronous getter for the remote object property "Endpoints" of type TpFuture::ObjectPathList.
     *
     * 
     * The list of endpoints Endpoint.DRAFT that exist for this stream. Change 
     * notification is via the EndpointsChanged signal.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyEndpoints() const
    {
        return internalRequestProperty(QLatin1String("Endpoints"));
    }

    /**
     * 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 "SetCredentials" on the remote object.
     * 
     * Used to set the username fragment and password for streams that have 
     * global credentials. [FIXME: rationale?]
     */
    inline QDBusPendingReply<> SetCredentials(const QString& username, const QString& password)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(username) << QVariant::fromValue(password);
        return asyncCallWithArgumentList(QLatin1String("SetCredentials"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "AddCandidates" on the remote object.
     * 
     * Add candidates to LocalCandidates and signal them to the remote 
     * contact(s).
     *
     * \param candidates
     *     
     *     Candidates to be appended to LocalCandidates
     */
    inline QDBusPendingReply<> AddCandidates(const TpFuture::CandidateList& candidates)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method "CandidatesPrepared" on the remote object.
     * 
     * This indicates to the CM that the initial batch of candidates has been 
     * added. [FIXME: rationale]
     */
    inline QDBusPendingReply<> CandidatesPrepared()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

Q_SIGNALS:
    /**
     * Represents the signal "LocalCandidatesAdded" on the remote object.
     * 
     * Emitted when local candidates are added to LocalCandidates.
     *
     * \param candidates
     *     
     *     Candidates that have been appended to LocalCandidates
     */
    void LocalCandidatesAdded(const TpFuture::CandidateList& candidates);

    /**
     * Represents the signal "LocalCredentialsSet" on the remote object.
     * 
     * Emitted when the value of LocalCredentials changes.
     */
    void LocalCredentialsSet(const QString& username, const QString& password);

    /**
     * Represents the signal "ServerInfoRetrieved" on the remote object.
     * 
     * <p>Signals that the initial information about STUN and Relay servers
     *   has been retrieved, i.e. the
     *   <tp:member-ref>RetrievedServerInfo</tp:member-ref> property is now
     *   true.</p>
     */
    void ServerInfoRetrieved();

    /**
     * Represents the signal "EndpointsChanged" on the remote object.
     * 
     * Emitted when the Endpoints property changes.
     *
     * \param endpointsAdded
     *     
     *     Endpoints that were added.
     *
     * \param endpointsRemoved
     *     
     *     Endpoints that no longer exist.
     */
    void EndpointsChanged(const TpFuture::ObjectPathList& endpointsAdded, const TpFuture::ObjectPathList& endpointsRemoved);

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
}
}
Q_DECLARE_METATYPE(TpFuture::Client::CallContentCodecOfferInterface*)
Q_DECLARE_METATYPE(TpFuture::Client::CallContentInterface*)
Q_DECLARE_METATYPE(TpFuture::Client::CallContentInterfaceMediaInterface*)
Q_DECLARE_METATYPE(TpFuture::Client::CallStreamEndpointInterface*)
Q_DECLARE_METATYPE(TpFuture::Client::CallStreamInterface*)
Q_DECLARE_METATYPE(TpFuture::Client::CallStreamInterfaceMediaInterface*)
