MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

cli-media-session-handler.h

00001 /*
00002  * This file contains D-Bus client proxy classes generated by qt4-client-gen.py.
00003  *
00004  * This file can be distributed under the same terms as the specification from
00005  * which it was generated.
00006  */
00007 
00008 #ifndef IN_TELEPATHY_QT4_HEADER
00009 #error IN_TELEPATHY_QT4_HEADER
00010 #endif
00011 
00012 #include <TelepathyQt4/Types>
00013 
00014 #include <QtGlobal>
00015 
00016 #include <QString>
00017 #include <QObject>
00018 #include <QVariant>
00019 
00020 #include <QDBusPendingReply>
00021 
00022 #include <TelepathyQt4/AbstractInterface>
00023 #include <TelepathyQt4/DBusProxy>
00024 #include <TelepathyQt4/Global>
00025 
00026 namespace Tp
00027 {
00028 class PendingVariant;
00029 class PendingOperation;
00030 }
00031 
00032 namespace Tp
00033 {
00034 namespace Client
00035 {
00036 
00044 class TELEPATHY_QT4_EXPORT MediaSessionHandlerInterface : public Tp::AbstractInterface
00045 {
00046     Q_OBJECT
00047 
00048 public:
00055     static inline QLatin1String staticInterfaceName()
00056     {
00057         return QLatin1String("org.freedesktop.Telepathy.Media.SessionHandler");
00058     }
00059 
00067     MediaSessionHandlerInterface(
00068         const QString& busName,
00069         const QString& objectPath,
00070         QObject* parent = 0
00071     );
00072 
00081     MediaSessionHandlerInterface(
00082         const QDBusConnection& connection,
00083         const QString& busName,
00084         const QString& objectPath,
00085         QObject* parent = 0
00086     );
00087 
00094     MediaSessionHandlerInterface(Tp::DBusProxy *proxy);
00095 
00102     Tp::PendingVariantMap *requestAllProperties() const
00103     {
00104         return internalRequestAllProperties();
00105     }
00106 
00107 public Q_SLOTS:
00121     inline QDBusPendingReply<> Error(uint errorCode, const QString& message, int timeout = -1)
00122     {
00123         if (!invalidationReason().isEmpty()) {
00124             return QDBusPendingReply<>(QDBusMessage::createError(
00125                 invalidationReason(),
00126                 invalidationMessage()
00127             ));
00128         }
00129 
00130         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00131                 this->staticInterfaceName(), QLatin1String("Error"));
00132         callMessage << QVariant::fromValue(errorCode) << QVariant::fromValue(message);
00133         return this->connection().asyncCall(callMessage, timeout);
00134     }
00135 
00148     inline QDBusPendingReply<> Ready(int timeout = -1)
00149     {
00150         if (!invalidationReason().isEmpty()) {
00151             return QDBusPendingReply<>(QDBusMessage::createError(
00152                 invalidationReason(),
00153                 invalidationMessage()
00154             ));
00155         }
00156 
00157         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00158                 this->staticInterfaceName(), QLatin1String("Ready"));
00159         return this->connection().asyncCall(callMessage, timeout);
00160     }
00161 
00162 Q_SIGNALS:
00184     void NewStreamHandler(const QDBusObjectPath& streamHandler, uint ID, uint mediaType, uint direction);
00185 
00186 protected:
00187     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00188 };
00189 }
00190 }
00191 Q_DECLARE_METATYPE(Tp::Client::MediaSessionHandlerInterface*)

Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5