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)
92 Q_PROPERTY(Tp::
Connection::ErrorDetails connectionErrorDetails READ connectionErrorDetails)
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 =
116 static AccountPtr create(const QDBusConnection &bus,
117 const QString &busName, const QString &objectPath,
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;
133 QString cmName() const;
135 QString protocolName() const;
137 QString serviceName() const;
140 ProfilePtr profile() const;
142 QString displayName() const;
145 QString iconName() const;
148 QString nickname() const;
155 const
Avatar &avatar() const;
158 QVariantMap parameters() const;
160 const QStringList &unset);
166 bool connectsAutomatically() const;
169 bool hasBeenOnline() const;
173 QString connectionError() const;
174 Connection::ErrorDetails connectionErrorDetails() 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,
208 const QDateTime &userActionTime = QDateTime::currentDateTime(),
209 const QString &preferredHandler = QString(),
212 const ContactPtr &contact,
213 const QDateTime &userActionTime = QDateTime::currentDateTime(),
214 const QString &preferredHandler = QString(),
215 const ChannelRequestHints &hints = ChannelRequestHints());
218 const QString &roomName,
219 const QDateTime &userActionTime = QDateTime::currentDateTime(),
220 const QString &preferredHandler = QString(),
221 const ChannelRequestHints &hints = ChannelRequestHints());
224 const QString &contactIdentifier,
225 const QString &initialAudioContentName = QString(),
226 const QDateTime &userActionTime = QDateTime::currentDateTime(),
227 const QString &preferredHandler = QString(),
228 const ChannelRequestHints &hints = ChannelRequestHints());
230 const ContactPtr &contact,
231 const QString &initialAudioContentName = QString(),
232 const QDateTime &userActionTime = QDateTime::currentDateTime(),
233 const QString &preferredHandler = QString(),
234 const ChannelRequestHints &hints = ChannelRequestHints());
236 const QString &contactIdentifier,
237 const QString &initialVideoContentName = QString(),
238 const QDateTime &userActionTime = QDateTime::currentDateTime(),
239 const QString &preferredHandler = QString(),
240 const ChannelRequestHints &hints = ChannelRequestHints());
242 const ContactPtr &contact,
243 const QString &initialVideoContentName = QString(),
244 const QDateTime &userActionTime = QDateTime::currentDateTime(),
245 const QString &preferredHandler = QString(),
246 const ChannelRequestHints &hints = ChannelRequestHints());
248 const QString &contactIdentifier,
249 const QString &initialAudioContentName = QString(),
250 const QString &initialVideoContentName = QString(),
251 const QDateTime &userActionTime = QDateTime::currentDateTime(),
252 const QString &preferredHandler = QString(),
253 const ChannelRequestHints &hints = ChannelRequestHints());
255 const ContactPtr &contact,
256 const QString &initialAudioContentName = QString(),
257 const QString &initialVideoContentName = QString(),
258 const QDateTime &userActionTime = QDateTime::currentDateTime(),
259 const QString &preferredHandler = QString(),
260 const ChannelRequestHints &hints = ChannelRequestHints());
263 const QString &contactIdentifier,
264 const QDateTime &userActionTime = QDateTime::currentDateTime(),
265 const QString &preferredHandler = QString(),
266 const ChannelRequestHints &hints = ChannelRequestHints());
268 const ContactPtr &contact,
269 const QDateTime &userActionTime = QDateTime::currentDateTime(),
270 const QString &preferredHandler = QString(),
271 const ChannelRequestHints &hints = ChannelRequestHints());
273 const QString &contactIdentifier,
274 const QDateTime &userActionTime = QDateTime::currentDateTime(),
275 const QString &preferredHandler = QString(),
276 const ChannelRequestHints &hints = ChannelRequestHints());
278 const ContactPtr &contact,
279 const QDateTime &userActionTime = QDateTime::currentDateTime(),
280 const QString &preferredHandler = QString(),
281 const ChannelRequestHints &hints = ChannelRequestHints());
283 const QString &contactIdentifier,
284 bool withAudio = true,
285 const QDateTime &userActionTime = QDateTime::currentDateTime(),
286 const QString &preferredHandler = QString(),
287 const ChannelRequestHints &hints = ChannelRequestHints());
289 const ContactPtr &contact,
290 bool withAudio = false,
291 const QDateTime &userActionTime = QDateTime::currentDateTime(),
292 const QString &preferredHandler = QString(),
293 const ChannelRequestHints &hints = ChannelRequestHints());
296 const QString &contactIdentifier,
298 const QDateTime &userActionTime = QDateTime::currentDateTime(),
299 const QString &preferredHandler = QString(),
300 const ChannelRequestHints &hints = ChannelRequestHints());
302 const ContactPtr &contact,
304 const QDateTime &userActionTime = QDateTime::currentDateTime(),
305 const QString &preferredHandler = QString(),
306 const ChannelRequestHints &hints = ChannelRequestHints());
309 const QString &contactIdentifier,
310 const QString &service,
311 const QDateTime &userActionTime = QDateTime::currentDateTime(),
312 const QString &preferredHandler = QString(),
313 const ChannelRequestHints &hints = ChannelRequestHints());
315 const ContactPtr &contact,
316 const QString &service,
317 const QDateTime &userActionTime = QDateTime::currentDateTime(),
318 const QString &preferredHandler = QString(),
319 const ChannelRequestHints &hints = ChannelRequestHints());
322 const QString &contactIdentifier,
323 const QString &serviceName,
324 const QDateTime &userActionTime = QDateTime::currentDateTime(),
325 const QString &preferredHandler = QString(),
326 const ChannelRequestHints &hints = ChannelRequestHints());
328 const ContactPtr &contact,
329 const QString &serviceName,
330 const QDateTime &userActionTime = QDateTime::currentDateTime(),
331 const QString &preferredHandler = QString(),
332 const ChannelRequestHints &hints = ChannelRequestHints());
335 const QString &serviceName,
336 const QDateTime &userActionTime = QDateTime::currentDateTime(),
337 const QString &preferredHandler = QString(),
338 const ChannelRequestHints &hints = ChannelRequestHints());
341 const QList<ChannelPtr> &channels,
342 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
343 const QDateTime &userActionTime = QDateTime::currentDateTime(),
344 const QString &preferredHandler = QString(),
345 const ChannelRequestHints &hints = ChannelRequestHints());
347 const QList<ChannelPtr> &channels,
348 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
349 const QDateTime &userActionTime = QDateTime::currentDateTime(),
350 const QString &preferredHandler = QString(),
351 const ChannelRequestHints &hints = ChannelRequestHints());
354 const QList<ChannelPtr> &channels,
355 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
356 const QDateTime &userActionTime = QDateTime::currentDateTime(),
357 const QString &preferredHandler = QString(),
358 const ChannelRequestHints &hints = ChannelRequestHints());
360 const QList<ChannelPtr> &channels,
361 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
362 const QDateTime &userActionTime = QDateTime::currentDateTime(),
363 const QString &preferredHandler = QString(),
364 const ChannelRequestHints &hints = ChannelRequestHints());
367 const QString &roomName,
368 const QList<ChannelPtr> &channels,
369 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
370 const QDateTime &userActionTime = QDateTime::currentDateTime(),
371 const QString &preferredHandler = QString(),
372 const ChannelRequestHints &hints = ChannelRequestHints());
374 const QString &roomName,
375 const QList<ChannelPtr> &channels,
376 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
377 const QDateTime &userActionTime = QDateTime::currentDateTime(),
378 const QString &preferredHandler = QString(),
379 const ChannelRequestHints &hints = ChannelRequestHints());
382 const QString &server,
384 const QDateTime &userActionTime = QDateTime::currentDateTime(),
385 const QString &preferredHandler = QString(),
386 const ChannelRequestHints &hints = ChannelRequestHints());
389 const QString &contactIdentifier,
390 const QDateTime &userActionTime = QDateTime::currentDateTime());
392 const ContactPtr &contact,
393 const QDateTime &userActionTime = QDateTime::currentDateTime());
396 const QString &roomName,
397 const QDateTime &userActionTime = QDateTime::currentDateTime());
400 const QString &contactIdentifier,
401 const QString &initialAudioContentName = QString(),
402 const QDateTime &userActionTime = QDateTime::currentDateTime());
404 const ContactPtr &contact,
405 const QString &initialAudioContentName = QString(),
406 const QDateTime &userActionTime = QDateTime::currentDateTime());
408 const QString &contactIdentifier,
409 const QString &initialVideoContentName = QString(),
410 const QDateTime &userActionTime = QDateTime::currentDateTime());
412 const ContactPtr &contact,
413 const QString &initialVideoContentName = QString(),
414 const QDateTime &userActionTime = QDateTime::currentDateTime());
416 const QString &contactIdentifier,
417 const QString &initialAudioContentName = QString(),
418 const QString &initialVideoContentName = QString(),
419 const QDateTime &userActionTime = QDateTime::currentDateTime());
421 const ContactPtr &contact,
422 const QString &initialAudioContentName = QString(),
423 const QString &initialVideoContentName = QString(),
424 const QDateTime &userActionTime = QDateTime::currentDateTime());
426 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaCall(
427 const QString &contactIdentifier,
428 const QDateTime &userActionTime = QDateTime::currentDateTime());
429 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaCall(
430 const ContactPtr &contact,
431 const QDateTime &userActionTime = QDateTime::currentDateTime());
433 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaAudioCall(
434 const QString &contactIdentifier,
435 const QDateTime &userActionTime = QDateTime::currentDateTime());
436 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaAudioCall(
437 const ContactPtr &contact,
438 const QDateTime &userActionTime = QDateTime::currentDateTime());
440 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaVideoCall(
441 const QString &contactIdentifier,
442 bool withAudio = true,
443 const QDateTime &userActionTime = QDateTime::currentDateTime());
444 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaVideoCall(
445 const ContactPtr &contact,
446 bool withAudio = true,
447 const QDateTime &userActionTime = QDateTime::currentDateTime());
450 const QString &contactIdentifier,
452 const QDateTime &userActionTime = QDateTime::currentDateTime());
454 const ContactPtr &contact,
456 const QDateTime &userActionTime = QDateTime::currentDateTime());
459 const QString &contactIdentifier,
460 const QString &service,
461 const QDateTime &userActionTime = QDateTime::currentDateTime());
463 const ContactPtr &contact,
464 const QString &service,
465 const QDateTime &userActionTime = QDateTime::currentDateTime());
468 const QString &contactIdentifier,
469 const QString &serviceName,
470 const QDateTime &userActionTime = QDateTime::currentDateTime());
472 const ContactPtr &contact,
473 const QString &serviceName,
474 const QDateTime &userActionTime = QDateTime::currentDateTime());
477 const QList<ChannelPtr> &channels,
478 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
479 const QDateTime &userActionTime = QDateTime::currentDateTime());
481 const QList<ChannelPtr> &channels,
482 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
483 const QDateTime &userActionTime = QDateTime::currentDateTime());
486 const QString &roomName,
487 const QList<ChannelPtr> &channels,
488 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
489 const QDateTime &userActionTime = QDateTime::currentDateTime());
491 const QString &roomName,
492 const QList<ChannelPtr> &channels,
493 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
494 const QDateTime &userActionTime = QDateTime::currentDateTime());
496 TP_QT_DEPRECATED
PendingChannel *createAndHandleConferenceStreamedMediaCall(
497 const QList<ChannelPtr> &channels,
498 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
499 const QDateTime &userActionTime = QDateTime::currentDateTime());
500 TP_QT_DEPRECATED
PendingChannel *createAndHandleConferenceStreamedMediaCall(
501 const QList<ChannelPtr> &channels,
502 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
503 const QDateTime &userActionTime = QDateTime::currentDateTime());
506 const QString &server = QString(),
508 const QDateTime &userActionTime = QDateTime::currentDateTime());
512 const QVariantMap &requestedProperties,
513 const QDateTime &userActionTime = QDateTime::currentDateTime(),
514 const QString &preferredHandler = QString(),
515 const ChannelRequestHints &hints = ChannelRequestHints());
518 const QVariantMap &requestedProperties,
519 const QDateTime &userActionTime = QDateTime::currentDateTime(),
520 const QString &preferredHandler = QString(),
521 const ChannelRequestHints &hints = ChannelRequestHints());
524 const QVariantMap &requestedProperties,
525 const QDateTime &userActionTime);
527 const QVariantMap &requestedProperties,
528 const QDateTime &userActionTime);
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);
549 void avatarChanged(const Tp::
Avatar &avatar);
551 void connectionChanged(const Tp::ConnectionPtr &connection);
556 Account(const QDBusConnection &bus,
557 const QString &busName, const QString &objectPath,
558 const ConnectionFactoryConstPtr &connectionFactory,
559 const ChannelFactoryConstPtr &channelFactory,
560 const ContactFactoryConstPtr &contactFactory,
563 Client::AccountInterface *baseInterface() const;
564 Client::ChannelDispatcherInterface *dispatcherInterface() const;
568 TP_QT_NO_EXPORT
void gotMainProperties(QDBusPendingCallWatcher *);
569 TP_QT_NO_EXPORT
void gotAvatar(QDBusPendingCallWatcher *);
570 TP_QT_NO_EXPORT
void onAvatarChanged();
572 TP_QT_NO_EXPORT
void onConnectionReady(Tp::PendingOperation *);
573 TP_QT_NO_EXPORT
void onPropertyChanged(const QVariantMap &delta);
574 TP_QT_NO_EXPORT
void onRemoved();
575 TP_QT_NO_EXPORT
void onConnectionBuilt(Tp::PendingOperation *);
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
The Presence class represents a Telepathy simple presence.
Definition: presence.h:36
The ChannelFactory class is responsible for constructing Channel objects according to application-def...
Definition: channel-factory.h:46
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
The Connection class represents a Telepathy connection.
Definition: connection.h:62
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
Definition: buildqt4/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
The ContactFactory class is responsible for constructing Contact objects according to application-def...
Definition: contact-factory.h:44
The PendingStringList class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-string-list.h:37
The ConnectionFactory class is responsible for constructing Connection objects according to applicati...
Definition: connection-factory.h:49
The FileTransferChannelCreationProperties class represents the properties of a file transfer channel ...
Definition: file-transfer-channel-creation-properties.h:41
The PendingChannelRequest class represents the parameters of and the reply to an asynchronous Channel...
Definition: pending-channel-request.h:46
The ConnectionCapabilities class represents the capabilities of a Connection.
Definition: connection-capabilities.h:38
The AvatarSpec class represents a Telepathy avatar information supported by a protocol.
Definition: avatar.h:51
ConnectionStatusReason
Definition: buildqt4/TelepathyQt/_gen/constants.h:1465
ConnectionStatus
Definition: buildqt4/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