Home · Modules · All Classes · All Namespaces
pending-operation.h
1 
23 #ifndef _TelepathyQt_pending_operation_h_HEADER_GUARD_
24 #define _TelepathyQt_pending_operation_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/Global>
31 #include <TelepathyQt/RefCounted>
32 #include <TelepathyQt/SharedPtr>
33 
34 #include <QObject>
35 
36 class QDBusError;
37 class QDBusPendingCall;
38 class QDBusPendingCallWatcher;
39 
40 namespace Tp
41 {
42 
43 class ReadinessHelper;
44 
45 class TP_QT_EXPORT PendingOperation : public QObject
46 {
47  Q_OBJECT
48  Q_DISABLE_COPY(PendingOperation)
49 
50 public:
51  virtual ~PendingOperation();
52 
53  bool isFinished() const;
54 
55  bool isValid() const;
56 
57  bool isError() const;
58  QString errorName() const;
59  QString errorMessage() const;
60 
61 Q_SIGNALS:
62  void finished(Tp::PendingOperation *operation);
63 
64 protected:
66  SharedPtr<RefCounted> object() const;
67 
68 protected Q_SLOTS:
69  void setFinished();
70  void setFinishedWithError(const QString &name, const QString &message);
71  void setFinishedWithError(const QDBusError &error);
72 
73 private Q_SLOTS:
74  TP_QT_NO_EXPORT void emitFinished();
75 
76 private:
77  friend class ContactManager;
78  friend class ReadinessHelper;
79 
80  struct Private;
81  friend struct Private;
82  Private *mPriv;
83 };
84 
85 } // Tp
86 
87 #endif
The ContactManager class is responsible for managing contacts.
Definition: contact-manager.h:50
The ReadinessHelper class is a helper class used by the introspection process.
Definition: readiness-helper.h:48
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
Definition: abstract-adaptor.cpp:31
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45