23 #ifndef _TelepathyQt_account_h_HEADER_GUARD_
24 #define _TelepathyQt_account_h_HEADER_GUARD_
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
30 #include <TelepathyQt/_gen/cli-account.h>
32 #include <TelepathyQt/ChannelRequestHints>
33 #include <TelepathyQt/Connection>
34 #include <TelepathyQt/ConnectionCapabilities>
35 #include <TelepathyQt/ConnectionFactory>
36 #include <TelepathyQt/ContactFactory>
37 #include <TelepathyQt/ChannelFactory>
38 #include <TelepathyQt/ChannelDispatcherInterface>
39 #include <TelepathyQt/DBus>
40 #include <TelepathyQt/DBusProxy>
41 #include <TelepathyQt/FileTransferChannelCreationProperties>
42 #include <TelepathyQt/OptionalInterfaceFactory>
43 #include <TelepathyQt/Presence>
44 #include <TelepathyQt/PresenceSpec>
45 #include <TelepathyQt/ProtocolInfo>
46 #include <TelepathyQt/ReadinessHelper>
47 #include <TelepathyQt/Types>
48 #include <TelepathyQt/Constants>
49 #include <TelepathyQt/SharedPtr>
53 #include <QStringList>
54 #include <QVariantMap>
62 class PendingChannelRequest;
63 class PendingConnection;
64 class PendingOperation;
66 class PendingStringList;
73 Q_PROPERTY(
bool valid READ isValidAccount NOTIFY validityChanged)
74 Q_PROPERTY(
bool enabled READ isEnabled NOTIFY stateChanged)
75 Q_PROPERTY(
QString cmName READ cmName)
76 Q_PROPERTY(
QString protocolName READ protocolName)
77 Q_PROPERTY(
QString serviceName READ serviceName NOTIFY serviceNameChanged)
78 Q_PROPERTY(ProfilePtr profile READ profile NOTIFY profileChanged)
79 Q_PROPERTY(
QString displayName READ displayName NOTIFY displayNameChanged)
80 Q_PROPERTY(
QString iconName READ iconName NOTIFY iconNameChanged)
81 Q_PROPERTY(
QString nickname READ nickname NOTIFY nicknameChanged)
82 Q_PROPERTY(
AvatarSpec avatarRequirements READ avatarRequirements)
83 Q_PROPERTY(
Avatar avatar READ avatar NOTIFY avatarChanged)
84 Q_PROPERTY(QVariantMap parameters READ parameters NOTIFY parametersChanged)
87 Q_PROPERTY(
bool hasBeenOnline READ hasBeenOnline)
88 Q_PROPERTY(
bool connectsAutomatically READ connectsAutomatically NOTIFY connectsAutomaticallyPropertyChanged)
89 Q_PROPERTY(
ConnectionStatus connectionStatus READ connectionStatus NOTIFY connectionStatusChanged)
91 Q_PROPERTY(
QString connectionError READ connectionError)
93 Q_PROPERTY(ConnectionPtr connection READ connection NOTIFY connectionChanged)
94 Q_PROPERTY(
bool changingPresence READ isChangingPresence NOTIFY changingPresence)
95 Q_PROPERTY(
Presence automaticPresence READ automaticPresence NOTIFY automaticPresenceChanged)
96 Q_PROPERTY(
Presence currentPresence READ currentPresence NOTIFY currentPresenceChanged)
97 Q_PROPERTY(
Presence requestedPresence READ requestedPresence NOTIFY requestedPresenceChanged)
98 Q_PROPERTY(
bool online READ isOnline NOTIFY onlinenessChanged)
99 Q_PROPERTY(
QString uniqueIdentifier READ uniqueIdentifier)
100 Q_PROPERTY(
QString normalizedName READ normalizedName NOTIFY normalizedNameChanged)
109 static AccountPtr create(
const QString &busName,
const QString &objectPath,
110 const ConnectionFactoryConstPtr &connectionFactory =
112 const ChannelFactoryConstPtr &channelFactory =
114 const ContactFactoryConstPtr &contactFactory =
118 const ConnectionFactoryConstPtr &connectionFactory,
119 const ChannelFactoryConstPtr &channelFactory,
120 const ContactFactoryConstPtr &contactFactory =
124 ConnectionFactoryConstPtr connectionFactory()
const;
125 ChannelFactoryConstPtr channelFactory()
const;
126 ContactFactoryConstPtr contactFactory()
const;
128 bool isValidAccount()
const;
130 bool isEnabled()
const;
140 ProfilePtr profile()
const;
155 const Avatar &avatar()
const;
158 QVariantMap parameters()
const;
166 bool connectsAutomatically()
const;
169 bool hasBeenOnline()
const;
173 QString connectionError()
const;
175 ConnectionPtr connection()
const;
177 bool isChangingPresence()
const;
179 PresenceSpecList allowedPresenceStatuses(
bool includeAllStatuses =
false)
const;
180 uint maxPresenceStatusMessageLength()
const;
193 bool isOnline()
const;
195 QString uniqueIdentifier()
const;
197 QString normalizedName()
const;
203 bool supportsRequestHints()
const;
204 bool requestsSucceedWithChannel()
const;
207 const QString &contactIdentifier,
212 const ContactPtr &contact,
224 const QString &contactIdentifier,
230 const ContactPtr &contact,
236 const QString &contactIdentifier,
242 const ContactPtr &contact,
248 const QString &contactIdentifier,
255 const ContactPtr &contact,
263 const QString &contactIdentifier,
268 const ContactPtr &contact,
273 const QString &contactIdentifier,
278 const ContactPtr &contact,
283 const QString &contactIdentifier,
284 bool withAudio =
true,
289 const ContactPtr &contact,
290 bool withAudio =
false,
296 const QString &contactIdentifier,
302 const ContactPtr &contact,
309 const QString &contactIdentifier,
315 const ContactPtr &contact,
322 const QString &contactIdentifier,
328 const ContactPtr &contact,
389 const QString &contactIdentifier,
392 const ContactPtr &contact,
400 const QString &contactIdentifier,
404 const ContactPtr &contact,
408 const QString &contactIdentifier,
412 const ContactPtr &contact,
416 const QString &contactIdentifier,
421 const ContactPtr &contact,
426 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaCall(
427 const QString &contactIdentifier,
429 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaCall(
430 const ContactPtr &contact,
433 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaAudioCall(
434 const QString &contactIdentifier,
436 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaAudioCall(
437 const ContactPtr &contact,
440 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaVideoCall(
441 const QString &contactIdentifier,
442 bool withAudio =
true,
444 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaVideoCall(
445 const ContactPtr &contact,
446 bool withAudio =
true,
450 const QString &contactIdentifier,
454 const ContactPtr &contact,
459 const QString &contactIdentifier,
463 const ContactPtr &contact,
468 const QString &contactIdentifier,
472 const ContactPtr &contact,
496 TP_QT_DEPRECATED
PendingChannel *createAndHandleConferenceStreamedMediaCall(
500 TP_QT_DEPRECATED
PendingChannel *createAndHandleConferenceStreamedMediaCall(
512 const QVariantMap &requestedProperties,
518 const QVariantMap &requestedProperties,
524 const QVariantMap &requestedProperties,
527 const QVariantMap &requestedProperties,
532 void serviceNameChanged(
const QString &serviceName);
533 void profileChanged(
const Tp::ProfilePtr &profile);
534 void displayNameChanged(
const QString &displayName);
535 void iconNameChanged(
const QString &iconName);
536 void nicknameChanged(
const QString &nickname);
537 void normalizedNameChanged(
const QString &normalizedName);
538 void validityChanged(
bool validity);
539 void stateChanged(
bool state);
541 void connectsAutomaticallyPropertyChanged(
bool connectsAutomatically);
543 void parametersChanged(
const QVariantMap ¶meters);
544 void changingPresence(
bool value);
545 void automaticPresenceChanged(
const Tp::Presence &automaticPresence);
546 void currentPresenceChanged(
const Tp::Presence ¤tPresence);
547 void requestedPresenceChanged(
const Tp::Presence &requestedPresence);
548 void onlinenessChanged(
bool online);
551 void connectionChanged(
const Tp::ConnectionPtr &connection);
558 const ConnectionFactoryConstPtr &connectionFactory,
559 const ChannelFactoryConstPtr &channelFactory,
560 const ContactFactoryConstPtr &contactFactory,
570 TP_QT_NO_EXPORT
void onAvatarChanged();
573 TP_QT_NO_EXPORT
void onPropertyChanged(
const QVariantMap &delta);
574 TP_QT_NO_EXPORT
void onRemoved();
579 friend struct Private;
The ChannelRequestHints class represents a dictionary of metadata provided by the channel requester w...
Definition: channel-request.h:121
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
The ProtocolInfo class represents a Telepathy Protocol.
Definition: protocol-info.h:46
static const Feature FeatureProtocolInfo
Definition: account.h:105
The Presence class represents a Telepathy simple presence.
Definition: presence.h:36
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
QDBusConnection sessionBus()
static const Feature FeatureAvatar
Definition: account.h:104
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:240
The PresenceSpecList class represents a list of PresenceSpec.
Definition: presence.h:125
The PendingChannel class represents the parameters of and the reply to an asynchronous channel reques...
Definition: pending-channel.h:44
static const Feature FeatureCore
Definition: account.h:103
The PendingStringList class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-string-list.h:37
The Connection::ErrorDetails class represents the details of a connection error.
Definition: connection.h:97
The FileTransferChannelCreationProperties class represents the properties of a file transfer channel ...
Definition: file-transfer-channel-creation-properties.h:41
static ChannelFactoryPtr create(const QDBusConnection &bus)
Definition: channel-factory.cpp:86
static const Feature FeatureCapabilities
Definition: account.h:106
The PendingChannelRequest class represents the parameters of and the reply to an asynchronous Channel...
Definition: pending-channel-request.h:46
QDateTime currentDateTime()
static ConnectionFactoryPtr create(const QDBusConnection &bus, const Features &features=Features())
Definition: connection-factory.cpp:57
Definition: cli-account.h:44
The ConnectionCapabilities class represents the capabilities of a Connection.
Definition: connection-capabilities.h:38
static const Feature FeatureProfile
Definition: account.h:107
Definition: cli-channel-dispatcher.h:44
The AvatarSpec class represents a Telepathy avatar information supported by a protocol.
Definition: avatar.h:51
static ContactFactoryPtr create(const Features &features=Features())
Definition: contact-factory.cpp:48
ConnectionStatusReason
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:1465
ConnectionStatus
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:1420
The StatelessDBusProxy class is a base class representing a remote object whose API is basically stat...
Definition: dbus-proxy.h:80
The Account class represents a Telepathy account.
Definition: account.h:68
Definition: abstract-adaptor.cpp:31