| Home · All Classes · All Namespaces · Modules · Functions · Files

dbus-proxy-factory.h
1
23 #ifndef _TelepathyQt_dbus_proxy_factory_h_HEADER_GUARD_
24 #define _TelepathyQt_dbus_proxy_factory_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/SharedPtr>
32 #include <TelepathyQt/Types>
33
34 // For Q_DISABLE_COPY
35 #include <QtGlobal>
36
37 #include <QString>
38
39 class QDBusConnection;
40
41 namespace Tp
42 {
43
44 class Features;
45 class PendingReady;
46 class PendingOperation;
47
48 class TP_QT_EXPORT DBusProxyFactory : public QObject, public RefCounted
49 {
50 Q_OBJECT
51 Q_DISABLE_COPY(DBusProxyFactory)
52
53 public:
54 virtual ~DBusProxyFactory();
55
56 const QDBusConnection &dbusConnection() const;
57
58 protected:
59 DBusProxyFactory(const QDBusConnection &bus);
60
61 DBusProxyPtr cachedProxy(const QString &busName, const QString &objectPath) const;
62
63 PendingReady *nowHaveProxy(const DBusProxyPtr &proxy) const;
64
65 // I don't want this to be non-pure virtual, because I want ALL subclasses to have to think
66 // about whether or not they need to uniquefy the name or not. If a subclass doesn't implement
67 // this while it should, matching with the cache for future requests and invalidation breaks.
68 virtual QString finalBusNameFrom(const QString &uniqueOrWellKnown) const = 0;
69
70 virtual PendingOperation *initialPrepare(const DBusProxyPtr &proxy) const;
71 virtual PendingOperation *readyPrepare(const DBusProxyPtr &proxy) const;
72
73 virtual Features featuresFor(const DBusProxyPtr &proxy) const = 0;
74
75 private:
76 class Cache;
77
78 struct Private;
79 friend struct Private;
80 Private *mPriv;
81 };
82
83 } // Tp
84
85 #endif
Tp::PendingReady
The PendingReady class represents the features requested and the reply to a request for an object to ...
Definition: pending-ready.h:40
QDBusConnection
QObject
QString
Tp::RefCounted
The RefCounted class is a base class for shared objects used by SharedPtr.
Definition: shared-ptr.h:42
Tp::Features
The Features class represents a list of Feature.
Definition: feature.h:61
Tp::PendingOperation
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
Tp::DBusProxyFactory
The DBusProxyFactory class is a base class for all D-Bus proxy factory classes. Handles proxy caching...
Definition: dbus-proxy-factory.h:48
Tp
Definition: abstract-adaptor.cpp:31