Home · All Classes · All Namespaces · Modules · Functions · Files
channel-dispatch-operation.h
1 
23 #ifndef _TelepathyQt_channel_dispatch_operation_h_HEADER_GUARD_
24 #define _TelepathyQt_channel_dispatch_operation_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/_gen/cli-channel-dispatch-operation.h>
31 
32 #include <TelepathyQt/Constants>
33 #include <TelepathyQt/DBus>
34 #include <TelepathyQt/DBusProxy>
35 #include <TelepathyQt/Feature>
36 #include <TelepathyQt/OptionalInterfaceFactory>
37 #include <TelepathyQt/ReadinessHelper>
38 #include <TelepathyQt/Types>
39 #include <TelepathyQt/SharedPtr>
40 
41 #include <QString>
42 #include <QStringList>
43 #include <QVariantMap>
44 
45 namespace Tp
46 {
47 
48 class PendingOperation;
49 
50 class TP_QT_EXPORT ChannelDispatchOperation : public StatefulDBusProxy,
51  public OptionalInterfaceFactory<ChannelDispatchOperation>
52 {
53  Q_OBJECT
54  Q_DISABLE_COPY(ChannelDispatchOperation)
55 
56 public:
57  static const Feature FeatureCore;
58 
59  static ChannelDispatchOperationPtr create(const QDBusConnection &bus,
60  const QString &objectPath, const QVariantMap &immutableProperties,
61  const QList<ChannelPtr> &initialChannels,
62  const AccountFactoryConstPtr &accountFactory,
63  const ConnectionFactoryConstPtr &connectionFactory,
64  const ChannelFactoryConstPtr &channelFactory,
65  const ContactFactoryConstPtr &contactFactory);
66  virtual ~ChannelDispatchOperation();
67 
68  ConnectionPtr connection() const;
69 
70  AccountPtr account() const;
71 
72  QList<ChannelPtr> channels() const;
73 
74  QStringList possibleHandlers() const;
75 
76  PendingOperation *handleWith(const QString &handler);
77 
78  PendingOperation *claim();
79  PendingOperation *claim(const AbstractClientHandlerPtr &handler);
80 
81 Q_SIGNALS:
82  void channelLost(const Tp::ChannelPtr &channel, const QString &errorName,
83  const QString &errorMessage);
84 
85 protected:
86  ChannelDispatchOperation(const QDBusConnection &bus,
87  const QString &objectPath, const QVariantMap &immutableProperties,
88  const QList<ChannelPtr> &initialChannels,
89  const AccountFactoryConstPtr &accountFactory,
90  const ConnectionFactoryConstPtr &connectionFactory,
91  const ChannelFactoryConstPtr &channelFactory,
92  const ContactFactoryConstPtr &contactFactory);
93 
94  Client::ChannelDispatchOperationInterface *baseInterface() const;
95 
96 private Q_SLOTS:
97  TP_QT_NO_EXPORT void onFinished();
98  TP_QT_NO_EXPORT void gotMainProperties(QDBusPendingCallWatcher *watcher);
99  TP_QT_NO_EXPORT void onChannelLost(const QDBusObjectPath &channelObjectPath,
100  const QString &errorName, const QString &errorMessage);
101  TP_QT_NO_EXPORT void onProxiesPrepared(Tp::PendingOperation *op);
102 
103 private:
104  class PendingClaim;
105  friend class PendingClaim;
106 
107  struct Private;
108  friend struct Private;
109  Private *mPriv;
110 };
111 
112 } // Tp
113 
114 #endif
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
The StatefulDBusProxy class is a base class representing a remote object whose API is stateful...
Definition: dbus-proxy.h:96
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
The ChannelDispatchOperation class represents a Telepathy channel dispatch operation.
Definition: channel-dispatch-operation.h:50
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
Definition: cli-channel-dispatch-operation.h:44
static const Feature FeatureCore
Definition: channel-dispatch-operation.h:57


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.5