Home · All Classes · All Namespaces · Modules · Functions · Files
channel-dispatch-operation.h
00001 
00023 #ifndef _TelepathyQt4_channel_dispatch_operation_h_HEADER_GUARD_
00024 #define _TelepathyQt4_channel_dispatch_operation_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/_gen/cli-channel-dispatch-operation.h>
00031 
00032 #include <TelepathyQt4/Constants>
00033 #include <TelepathyQt4/DBus>
00034 #include <TelepathyQt4/DBusProxy>
00035 #include <TelepathyQt4/Feature>
00036 #include <TelepathyQt4/OptionalInterfaceFactory>
00037 #include <TelepathyQt4/ReadinessHelper>
00038 #include <TelepathyQt4/Types>
00039 #include <TelepathyQt4/SharedPtr>
00040 
00041 #include <QString>
00042 #include <QStringList>
00043 #include <QVariantMap>
00044 
00045 namespace Tp
00046 {
00047 
00048 class PendingOperation;
00049 
00050 class TELEPATHY_QT4_EXPORT ChannelDispatchOperation : public StatefulDBusProxy,
00051                 public OptionalInterfaceFactory<ChannelDispatchOperation>
00052 {
00053     Q_OBJECT
00054     Q_DISABLE_COPY(ChannelDispatchOperation)
00055 
00056 public:
00057     static const Feature FeatureCore;
00058 
00059     static ChannelDispatchOperationPtr create(const QDBusConnection &bus,
00060             const QString &objectPath, const QVariantMap &immutableProperties,
00061             const QList<ChannelPtr> &initialChannels,
00062             const AccountFactoryConstPtr &accountFactory,
00063             const ConnectionFactoryConstPtr &connectionFactory,
00064             const ChannelFactoryConstPtr &channelFactory,
00065             const ContactFactoryConstPtr &contactFactory);
00066     virtual ~ChannelDispatchOperation();
00067 
00068     ConnectionPtr connection() const;
00069 
00070     AccountPtr account() const;
00071 
00072     QList<ChannelPtr> channels() const;
00073 
00074     QStringList possibleHandlers() const;
00075 
00076     PendingOperation *handleWith(const QString &handler);
00077 
00078     PendingOperation *claim();
00079 
00080 Q_SIGNALS:
00081     void channelLost(const Tp::ChannelPtr &channel, const QString &errorName,
00082             const QString &errorMessage);
00083 
00084 protected:
00085     ChannelDispatchOperation(const QDBusConnection &bus,
00086             const QString &objectPath, const QVariantMap &immutableProperties,
00087             const QList<ChannelPtr> &initialChannels,
00088             const AccountFactoryConstPtr &accountFactory,
00089             const ConnectionFactoryConstPtr &connectionFactory,
00090             const ChannelFactoryConstPtr &channelFactory,
00091             const ContactFactoryConstPtr &contactFactory);
00092 
00093     Client::ChannelDispatchOperationInterface *baseInterface() const;
00094 
00095 private Q_SLOTS:
00096     TELEPATHY_QT4_NO_EXPORT void onFinished();
00097     TELEPATHY_QT4_NO_EXPORT void gotMainProperties(QDBusPendingCallWatcher *watcher);
00098     TELEPATHY_QT4_NO_EXPORT void onChannelLost(const QDBusObjectPath &channelObjectPath,
00099         const QString &errorName, const QString &errorMessage);
00100     TELEPATHY_QT4_NO_EXPORT void onProxiesPrepared(Tp::PendingOperation *op);
00101 
00102 private:
00103     struct Private;
00104     friend struct Private;
00105     Private *mPriv;
00106 };
00107 
00108 } // Tp
00109 
00110 #endif


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