23 #ifndef _TelepathyQt_connection_manager_h_HEADER_GUARD_
24 #define _TelepathyQt_connection_manager_h_HEADER_GUARD_
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
30 #include <TelepathyQt/_gen/cli-connection-manager.h>
32 #include <TelepathyQt/ChannelFactory>
33 #include <TelepathyQt/ConnectionFactory>
34 #include <TelepathyQt/Constants>
35 #include <TelepathyQt/ContactFactory>
36 #include <TelepathyQt/DBus>
37 #include <TelepathyQt/DBusProxy>
38 #include <TelepathyQt/OptionalInterfaceFactory>
39 #include <TelepathyQt/ProtocolInfo>
40 #include <TelepathyQt/ProtocolParameter>
41 #include <TelepathyQt/ReadinessHelper>
42 #include <TelepathyQt/SharedPtr>
43 #include <TelepathyQt/Types>
48 class ConnectionManagerLowlevel;
49 class PendingConnection;
50 class PendingStringList;
57 Q_PROPERTY(QString name READ name)
58 Q_PROPERTY(QStringList supportedProtocols READ supportedProtocols)
64 static ConnectionManagerPtr create(const QDBusConnection &bus,
66 static ConnectionManagerPtr create(const QString &name,
67 const ConnectionFactoryConstPtr &connectionFactory =
69 const ChannelFactoryConstPtr &channelFactory =
71 const ContactFactoryConstPtr &contactFactory =
73 static ConnectionManagerPtr create(const QDBusConnection &bus,
75 const ConnectionFactoryConstPtr &connectionFactory,
76 const ChannelFactoryConstPtr &channelFactory,
77 const ContactFactoryConstPtr &contactFactory =
84 ConnectionFactoryConstPtr connectionFactory() const;
85 ChannelFactoryConstPtr channelFactory() const;
86 ContactFactoryConstPtr contactFactory() const;
88 QStringList supportedProtocols() const;
90 bool hasProtocol(const QString &protocolName) const;
91 ProtocolInfo protocol(const QString &protocolName) const;
94 const QDBusConnection &bus = QDBusConnection::sessionBus());
96 #if defined(BUILDING_TP_QT) || defined(TP_QT_ENABLE_LOWLEVEL_API)
97 ConnectionManagerLowlevelPtr lowlevel();
98 ConnectionManagerLowlevelConstPtr lowlevel()
const;
103 const ConnectionFactoryConstPtr &connectionFactory,
104 const ChannelFactoryConstPtr &channelFactory,
105 const ContactFactoryConstPtr &contactFactory);
111 TP_QT_NO_EXPORT
void gotProtocolsLegacy(QDBusPendingCallWatcher *watcher);
112 TP_QT_NO_EXPORT
void gotParametersLegacy(QDBusPendingCallWatcher *watcher);
119 friend struct Private;