Home · Modules · All Classes · All Namespaces
pending-channel.h
1 
23 #ifndef _TelepathyQt_pending_channel_h_HEADER_GUARD_
24 #define _TelepathyQt_pending_channel_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/Channel>
31 #include <TelepathyQt/PendingOperation>
32 
33 #include <QString>
34 #include <QVariantMap>
35 
36 #include <QDBusPendingCallWatcher>
37 
38 namespace Tp
39 {
40 
41 class Connection;
42 class HandledChannelNotifier;
43 
44 class TP_QT_EXPORT PendingChannel : public PendingOperation
45 {
46  Q_OBJECT
47  Q_DISABLE_COPY(PendingChannel)
48 
49 public:
50  ~PendingChannel();
51 
52  ConnectionPtr connection() const;
53 
54  bool yours() const;
55 
56  const QString &channelType() const;
57 
58  uint targetHandleType() const;
59 
60  uint targetHandle() const;
61 
62  QVariantMap immutableProperties() const;
63 
64  ChannelPtr channel() const;
65 
66  HandledChannelNotifier *handledChannelNotifier() const;
67 
68 private Q_SLOTS:
69  TP_QT_NO_EXPORT void onConnectionCreateChannelFinished(
70  QDBusPendingCallWatcher *watcher);
71  TP_QT_NO_EXPORT void onConnectionEnsureChannelFinished(
72  QDBusPendingCallWatcher *watcher);
73  TP_QT_NO_EXPORT void onChannelReady(Tp::PendingOperation *op);
74 
75  TP_QT_NO_EXPORT void onHandlerError(const QString &errorName,
76  const QString &errorMessage);
77  TP_QT_NO_EXPORT void onHandlerChannelReceived(
78  const Tp::ChannelPtr &channel);
79  TP_QT_NO_EXPORT void onAccountCreateChannelFinished(
81 
82 private:
83  friend class Account;
84  friend class ConnectionLowlevel;
85 
86  TP_QT_NO_EXPORT PendingChannel(const ConnectionPtr &connection,
87  const QString &errorName, const QString &errorMessage);
88  TP_QT_NO_EXPORT PendingChannel(const ConnectionPtr &connection,
89  const QVariantMap &request, bool create, int timeout = -1);
90  TP_QT_NO_EXPORT PendingChannel(const AccountPtr &account,
91  const QVariantMap &request, const QDateTime &userActionTime,
92  bool create);
93  TP_QT_NO_EXPORT PendingChannel(const QString &errorName,
94  const QString &errorMessage);
95 
96  struct Private;
97  friend struct Private;
98  Private *mPriv;
99 };
100 
101 } // Tp
102 
103 #endif
The ConnectionLowlevel class extends Connection with support to low-level features.
Definition: connection-lowlevel.h:43
The Account class represents a Telepathy account.
Definition: account.h:68
The PendingChannel class represents the parameters of and the reply to an asynchronous channel reques...
Definition: pending-channel.h:44
The HandledChannelNotifier class can be used to keep track of channel() being re-requested.
Definition: handled-channel-notifier.h:41
Definition: abstract-adaptor.cpp:31
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45