Home · All Classes · All Namespaces · Modules · Functions · Files
pending-handles.h
1 
23 #ifndef _TelepathyQt_pending_handles_h_HEADER_GUARD_
24 #define _TelepathyQt_pending_handles_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/Constants>
31 #include <TelepathyQt/PendingOperation>
32 #include <TelepathyQt/Types>
33 
34 #include <QHash>
35 #include <QString>
36 #include <QStringList>
37 
38 #include <TelepathyQt/Types>
39 
40 namespace Tp
41 {
42 
43 class PendingHandles;
44 class ReferencedHandles;
45 
46 class TP_QT_EXPORT PendingHandles : public PendingOperation
47 {
48  Q_OBJECT
49  Q_DISABLE_COPY(PendingHandles)
50 
51 public:
52  ~PendingHandles();
53 
54  ConnectionPtr connection() const;
55 
56  HandleType handleType() const;
57 
58  bool isRequest() const;
59 
60  bool isReference() const;
61 
62  const QStringList &namesRequested() const;
63 
64  QStringList validNames() const;
65 
66  QHash<QString, QPair<QString, QString> > invalidNames() const;
67 
68  const UIntList &handlesToReference() const;
69 
70  ReferencedHandles handles() const;
71 
72  UIntList invalidHandles() const;
73 
74 private Q_SLOTS:
75  TP_QT_NO_EXPORT void onRequestHandlesFinished(QDBusPendingCallWatcher *watcher);
76  TP_QT_NO_EXPORT void onHoldHandlesFinished(QDBusPendingCallWatcher *watcher);
77  TP_QT_NO_EXPORT void onRequestHandlesFallbackFinished(QDBusPendingCallWatcher *watcher);
78  TP_QT_NO_EXPORT void onHoldHandlesFallbackFinished(QDBusPendingCallWatcher *watcher);
79 
80 private:
81  friend class ConnectionLowlevel;
82 
83  TP_QT_NO_EXPORT PendingHandles(const ConnectionPtr &connection, HandleType handleType,
84  const QStringList &names);
85  TP_QT_NO_EXPORT PendingHandles(const ConnectionPtr &connection, HandleType handleType,
86  const UIntList &handles, const UIntList &alreadyHeld, const UIntList &notYetHeld);
87  TP_QT_NO_EXPORT PendingHandles(const QString &errorName, const QString &errorMessage);
88 
89  struct Private;
90  friend struct Private;
91  Private *mPriv;
92 };
93 
94 } // Tp
95 
96 #endif
HandleType
Definition: build/TelepathyQt/_gen/constants.h:1375
The PendingHandles class represents the parameters of and the reply to an asynchronous handle request...
Definition: pending-handles.h:46
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
Definition: build/TelepathyQt/_gen/types.h:101
Helper container for safe management of handle lifetimes. Every handle in a ReferencedHandles contain...
Definition: referenced-handles.h:47
The ConnectionLowlevel class extends Connection with support to low-level features.
Definition: connection-lowlevel.h:43


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