00001
00023 #ifndef _TelepathyQt4_dbus_proxy_factory_h_HEADER_GUARD_
00024 #define _TelepathyQt4_dbus_proxy_factory_h_HEADER_GUARD_
00025
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029
00030 #include <TelepathyQt4/Global>
00031 #include <TelepathyQt4/SharedPtr>
00032 #include <TelepathyQt4/Types>
00033
00034
00035 #include <QtGlobal>
00036
00037 #include <QString>
00038
00039 class QDBusConnection;
00040
00041 namespace Tp
00042 {
00043
00044 class Features;
00045 class PendingReady;
00046 class PendingOperation;
00047
00048 class TELEPATHY_QT4_EXPORT DBusProxyFactory : public QObject, public RefCounted
00049 {
00050 Q_OBJECT
00051 Q_DISABLE_COPY(DBusProxyFactory)
00052
00053 public:
00054 virtual ~DBusProxyFactory();
00055
00056 const QDBusConnection &dbusConnection() const;
00057
00058 protected:
00059 DBusProxyFactory(const QDBusConnection &bus);
00060
00061 DBusProxyPtr cachedProxy(const QString &busName, const QString &objectPath) const;
00062
00063 PendingReady *nowHaveProxy(const DBusProxyPtr &proxy) const;
00064
00065
00066
00067
00068 virtual QString finalBusNameFrom(const QString &uniqueOrWellKnown) const = 0;
00069
00070 virtual PendingOperation *initialPrepare(const DBusProxyPtr &proxy) const;
00071 virtual PendingOperation *readyPrepare(const DBusProxyPtr &proxy) const;
00072
00073 virtual Features featuresFor(const DBusProxyPtr &proxy) const = 0;
00074
00075 private:
00076 class Cache;
00077
00078 struct Private;
00079 friend struct Private;
00080 Private *mPriv;
00081 };
00082
00083 }
00084
00085 #endif