23 #ifndef _TelepathyQt_connection_h_HEADER_GUARD_ 24 #define _TelepathyQt_connection_h_HEADER_GUARD_ 26 #ifndef IN_TP_QT_HEADER 27 #error IN_TP_QT_HEADER 30 #include <TelepathyQt/_gen/cli-connection.h> 32 #include <TelepathyQt/ConnectionCapabilities> 33 #include <TelepathyQt/Contact> 34 #include <TelepathyQt/DBus> 35 #include <TelepathyQt/DBusProxy> 36 #include <TelepathyQt/OptionalInterfaceFactory> 37 #include <TelepathyQt/ReadinessHelper> 38 #include <TelepathyQt/Types> 39 #include <TelepathyQt/SharedPtr> 41 #include <TelepathyQt/Constants> 42 #include <TelepathyQt/Types> 46 #include <QStringList> 52 class ConnectionCapabilities;
53 class ConnectionLowlevel;
57 class PendingContactAttributes;
59 class PendingOperation;
77 static ConnectionPtr create(
const QString &busName,
79 const ChannelFactoryConstPtr &channelFactory,
80 const ContactFactoryConstPtr &contactFactory);
83 const ChannelFactoryConstPtr &channelFactory,
84 const ContactFactoryConstPtr &contactFactory);
88 ChannelFactoryConstPtr channelFactory()
const;
89 ContactFactoryConstPtr contactFactory()
const;
107 bool isValid()
const {
return mPriv.constData() != 0; }
111 return allDetails().contains(
QLatin1String(
"debug-message"));
121 return allDetails().contains(
QLatin1String(
"server-message"));
131 return allDetails().contains(
QLatin1String(
"user-requested"));
136 return qdbus_cast<
bool>(allDetails().value(
QLatin1String(
"user-requested")));
141 return allDetails().contains(
QLatin1String(
"expected-hostname"));
151 return allDetails().contains(
QLatin1String(
"certificate-hostname"));
159 QVariantMap allDetails()
const;
165 friend struct Private;
171 uint selfHandle()
const;
172 ContactPtr selfContact()
const;
178 ContactManagerPtr contactManager()
const;
180 #if defined(BUILDING_TP_QT) || defined(TP_QT_ENABLE_LOWLEVEL_API) 181 ConnectionLowlevelPtr lowlevel();
182 ConnectionLowlevelConstPtr lowlevel()
const;
188 void selfHandleChanged(uint newHandle);
190 void selfContactChanged();
197 const ChannelFactoryConstPtr &channelFactory,
198 const ContactFactoryConstPtr &contactFactory,
204 TP_QT_NO_EXPORT
void onStatusReady(uint status);
205 TP_QT_NO_EXPORT
void onStatusChanged(uint status, uint reason);
206 TP_QT_NO_EXPORT
void onConnectionError(
const QString &error,
const QVariantMap &details);
219 TP_QT_NO_EXPORT
void doReleaseSweep(uint handleType);
221 TP_QT_NO_EXPORT
void onSelfHandleChanged(uint);
227 class PendingConnect;
230 friend class PendingConnect;
236 TP_QT_NO_EXPORT
void refHandle(
HandleType handleType, uint handle);
237 TP_QT_NO_EXPORT
void unrefHandle(
HandleType handleType, uint handle);
238 TP_QT_NO_EXPORT
void handleRequestLanded(
HandleType handleType);
241 friend struct Private;
bool hasDebugMessage() const
Definition: connection.h:109
Definition: cli-connection.h:44
static const Feature FeatureRosterGroups
Definition: connection.h:73
ConnectionStatus
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:1420
bool hasUserRequested() const
Definition: connection.h:129
static const Feature FeatureSimplePresence
Definition: connection.h:71
The Connection::ErrorDetails class represents the details of a connection error.
Definition: connection.h:97
static const Feature FeatureConnected
Definition: connection.h:75
static const Feature FeatureSelfContact
Definition: connection.h:70
The StatefulDBusProxy class is a base class representing a remote object whose API is stateful...
Definition: dbus-proxy.h:96
The Connection class represents a Telepathy connection.
Definition: connection.h:62
static const Feature FeatureAccountBalance
Definition: connection.h:74
QString debugMessage() const
Definition: connection.h:114
The PendingContactAttributes class represents the parameters of and the reply to an asynchronous requ...
Definition: pending-contact-attributes.h:40
QString expectedHostname() const
Definition: connection.h:144
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:1352
The PendingChannel class represents the parameters of and the reply to an asynchronous channel reques...
Definition: pending-channel.h:44
static const Feature FeatureRoster
Definition: connection.h:72
The PendingHandles class represents the parameters of and the reply to an asynchronous handle request...
Definition: pending-handles.h:46
bool isValid() const
Definition: connection.h:107
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
The ConnectionCapabilities class represents the capabilities of a Connection.
Definition: connection-capabilities.h:38
Helper container for safe management of handle lifetimes. Every handle in a ReferencedHandles contain...
Definition: referenced-handles.h:47
The PendingContacts class is used by ContactManager when creating/updating Contact objects...
Definition: pending-contacts.h:46
ConnectionStatusReason
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:1465
QString serverMessage() const
Definition: connection.h:124
bool hasCertificateHostname() const
Definition: connection.h:149
Definition: abstract-adaptor.cpp:31
bool hasServerMessage() const
Definition: connection.h:119
The ConnectionLowlevel class extends Connection with support to low-level features.
Definition: connection-lowlevel.h:43
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
bool userRequested() const
Definition: connection.h:134
QString certificateHostname() const
Definition: connection.h:154
static const Feature FeatureCore
Definition: connection.h:69
HandleType
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:1375
bool hasExpectedHostname() const
Definition: connection.h:139
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45