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(),
218 const QString &roomName,
219 const QDateTime &userActionTime = QDateTime::currentDateTime(),
220 const QString &preferredHandler = QString(),
224 const QString &contactIdentifier,
225 const QString &initialAudioContentName = QString(),
226 const QDateTime &userActionTime = QDateTime::currentDateTime(),
227 const QString &preferredHandler = QString(),
230 const ContactPtr &contact,
231 const QString &initialAudioContentName = QString(),
232 const QDateTime &userActionTime = QDateTime::currentDateTime(),
233 const QString &preferredHandler = QString(),
236 const QString &contactIdentifier,
237 const QString &initialVideoContentName = QString(),
238 const QDateTime &userActionTime = QDateTime::currentDateTime(),
239 const QString &preferredHandler = QString(),
242 const ContactPtr &contact,
243 const QString &initialVideoContentName = QString(),
244 const QDateTime &userActionTime = QDateTime::currentDateTime(),
245 const QString &preferredHandler = QString(),
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(),
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(),
263 const QString &contactIdentifier,
264 const QDateTime &userActionTime = QDateTime::currentDateTime(),
265 const QString &preferredHandler = QString(),
268 const ContactPtr &contact,
269 const QDateTime &userActionTime = QDateTime::currentDateTime(),
270 const QString &preferredHandler = QString(),
273 const QString &contactIdentifier,
274 const QDateTime &userActionTime = QDateTime::currentDateTime(),
275 const QString &preferredHandler = QString(),
278 const ContactPtr &contact,
279 const QDateTime &userActionTime = QDateTime::currentDateTime(),
280 const QString &preferredHandler = QString(),
283 const QString &contactIdentifier,
284 bool withAudio = true,
285 const QDateTime &userActionTime = QDateTime::currentDateTime(),
286 const QString &preferredHandler = QString(),
289 const ContactPtr &contact,
290 bool withAudio = false,
291 const QDateTime &userActionTime = QDateTime::currentDateTime(),
292 const QString &preferredHandler = QString(),
296 const QString &contactIdentifier,
298 const QDateTime &userActionTime = QDateTime::currentDateTime(),
299 const QString &preferredHandler = QString(),
302 const ContactPtr &contact,
304 const QDateTime &userActionTime = QDateTime::currentDateTime(),
305 const QString &preferredHandler = QString(),
309 const QString &contactIdentifier,
310 const QString &service,
311 const QDateTime &userActionTime = QDateTime::currentDateTime(),
312 const QString &preferredHandler = QString(),
315 const ContactPtr &contact,
316 const QString &service,
317 const QDateTime &userActionTime = QDateTime::currentDateTime(),
318 const QString &preferredHandler = QString(),
322 const QString &contactIdentifier,
323 const QString &serviceName,
324 const QDateTime &userActionTime = QDateTime::currentDateTime(),
325 const QString &preferredHandler = QString(),
328 const ContactPtr &contact,
329 const QString &serviceName,
330 const QDateTime &userActionTime = QDateTime::currentDateTime(),
331 const QString &preferredHandler = QString(),
335 const QString &serviceName,
336 const QDateTime &userActionTime = QDateTime::currentDateTime(),
337 const QString &preferredHandler = QString(),
341 const QList<ChannelPtr> &channels,
342 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
343 const QDateTime &userActionTime = QDateTime::currentDateTime(),
344 const QString &preferredHandler = QString(),
347 const QList<ChannelPtr> &channels,
348 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
349 const QDateTime &userActionTime = QDateTime::currentDateTime(),
350 const QString &preferredHandler = QString(),
354 const QList<ChannelPtr> &channels,
355 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
356 const QDateTime &userActionTime = QDateTime::currentDateTime(),
357 const QString &preferredHandler = QString(),
360 const QList<ChannelPtr> &channels,
361 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
362 const QDateTime &userActionTime = QDateTime::currentDateTime(),
363 const QString &preferredHandler = QString(),
367 const QList<ChannelPtr> &channels,
368 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
369 const QDateTime &userActionTime = QDateTime::currentDateTime(),
370 const QString &preferredHandler = QString(),
373 const QList<ChannelPtr> &channels,
374 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
375 const QDateTime &userActionTime = QDateTime::currentDateTime(),
376 const QString &preferredHandler = QString(),
380 const QString &roomName,
381 const QList<ChannelPtr> &channels,
382 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
383 const QDateTime &userActionTime = QDateTime::currentDateTime(),
384 const QString &preferredHandler = QString(),
387 const QString &roomName,
388 const QList<ChannelPtr> &channels,
389 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
390 const QDateTime &userActionTime = QDateTime::currentDateTime(),
391 const QString &preferredHandler = QString(),
395 const QList<ChannelPtr> &channels,
396 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
397 const QDateTime &userActionTime = QDateTime::currentDateTime());
399 const QList<ChannelPtr> &channels,
400 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
401 const QDateTime &userActionTime = QDateTime::currentDateTime());
404 const QString &server,
406 const QDateTime &userActionTime = QDateTime::currentDateTime(),
407 const QString &preferredHandler = QString(),
411 const QString &contactIdentifier,
412 const QDateTime &userActionTime = QDateTime::currentDateTime());
414 const ContactPtr &contact,
415 const QDateTime &userActionTime = QDateTime::currentDateTime());
418 const QString &roomName,
419 const QDateTime &userActionTime = QDateTime::currentDateTime());
422 const QString &contactIdentifier,
423 const QString &initialAudioContentName = QString(),
424 const QDateTime &userActionTime = QDateTime::currentDateTime());
426 const ContactPtr &contact,
427 const QString &initialAudioContentName = QString(),
428 const QDateTime &userActionTime = QDateTime::currentDateTime());
430 const QString &contactIdentifier,
431 const QString &initialVideoContentName = QString(),
432 const QDateTime &userActionTime = QDateTime::currentDateTime());
434 const ContactPtr &contact,
435 const QString &initialVideoContentName = QString(),
436 const QDateTime &userActionTime = QDateTime::currentDateTime());
438 const QString &contactIdentifier,
439 const QString &initialAudioContentName = QString(),
440 const QString &initialVideoContentName = QString(),
441 const QDateTime &userActionTime = QDateTime::currentDateTime());
443 const ContactPtr &contact,
444 const QString &initialAudioContentName = QString(),
445 const QString &initialVideoContentName = QString(),
446 const QDateTime &userActionTime = QDateTime::currentDateTime());
448 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaCall(
449 const QString &contactIdentifier,
450 const QDateTime &userActionTime = QDateTime::currentDateTime());
451 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaCall(
452 const ContactPtr &contact,
453 const QDateTime &userActionTime = QDateTime::currentDateTime());
455 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaAudioCall(
456 const QString &contactIdentifier,
457 const QDateTime &userActionTime = QDateTime::currentDateTime());
458 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaAudioCall(
459 const ContactPtr &contact,
460 const QDateTime &userActionTime = QDateTime::currentDateTime());
462 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaVideoCall(
463 const QString &contactIdentifier,
464 bool withAudio = true,
465 const QDateTime &userActionTime = QDateTime::currentDateTime());
466 TP_QT_DEPRECATED
PendingChannel *ensureAndHandleStreamedMediaVideoCall(
467 const ContactPtr &contact,
468 bool withAudio = true,
469 const QDateTime &userActionTime = QDateTime::currentDateTime());
472 const QString &contactIdentifier,
474 const QDateTime &userActionTime = QDateTime::currentDateTime());
476 const ContactPtr &contact,
478 const QDateTime &userActionTime = QDateTime::currentDateTime());
481 const QString &contactIdentifier,
482 const QString &service,
483 const QDateTime &userActionTime = QDateTime::currentDateTime());
485 const ContactPtr &contact,
486 const QString &service,
487 const QDateTime &userActionTime = QDateTime::currentDateTime());
490 const QString &contactIdentifier,
491 const QString &serviceName,
492 const QDateTime &userActionTime = QDateTime::currentDateTime());
494 const ContactPtr &contact,
495 const QString &serviceName,
496 const QDateTime &userActionTime = QDateTime::currentDateTime());
499 const QList<ChannelPtr> &channels,
500 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
501 const QDateTime &userActionTime = QDateTime::currentDateTime());
503 const QList<ChannelPtr> &channels,
504 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
505 const QDateTime &userActionTime = QDateTime::currentDateTime());
508 const QString &roomName,
509 const QList<ChannelPtr> &channels,
510 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
511 const QDateTime &userActionTime = QDateTime::currentDateTime());
513 const QString &roomName,
514 const QList<ChannelPtr> &channels,
515 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
516 const QDateTime &userActionTime = QDateTime::currentDateTime());
518 TP_QT_DEPRECATED
PendingChannel *createAndHandleConferenceStreamedMediaCall(
519 const QList<ChannelPtr> &channels,
520 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
521 const QDateTime &userActionTime = QDateTime::currentDateTime());
522 TP_QT_DEPRECATED
PendingChannel *createAndHandleConferenceStreamedMediaCall(
523 const QList<ChannelPtr> &channels,
524 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
525 const QDateTime &userActionTime = QDateTime::currentDateTime());
528 const QString &server = QString(),
530 const QDateTime &userActionTime = QDateTime::currentDateTime());
534 const QVariantMap &requestedProperties,
535 const QDateTime &userActionTime = QDateTime::currentDateTime(),
536 const QString &preferredHandler = QString(),
540 const QVariantMap &requestedProperties,
541 const QDateTime &userActionTime = QDateTime::currentDateTime(),
542 const QString &preferredHandler = QString(),
546 const QVariantMap &requestedProperties,
547 const QDateTime &userActionTime);
549 const QVariantMap &requestedProperties,
550 const QDateTime &userActionTime);
554 void serviceNameChanged(const QString &serviceName);
555 void profileChanged(const
Tp::ProfilePtr &profile);
556 void displayNameChanged(const QString &displayName);
557 void iconNameChanged(const QString &iconName);
558 void nicknameChanged(const QString &nickname);
559 void normalizedNameChanged(const QString &normalizedName);
560 void validityChanged(
bool validity);
561 void stateChanged(
bool state);
563 void connectsAutomaticallyPropertyChanged(
bool connectsAutomatically);
565 void parametersChanged(const QVariantMap ¶meters);
566 void changingPresence(
bool value);
567 void automaticPresenceChanged(const
Tp::
Presence &automaticPresence);
568 void currentPresenceChanged(const
Tp::
Presence ¤tPresence);
569 void requestedPresenceChanged(const
Tp::
Presence &requestedPresence);
570 void onlinenessChanged(
bool online);
571 void avatarChanged(const
Tp::
Avatar &avatar);
573 void connectionChanged(const
Tp::ConnectionPtr &connection);
578 Account(const QDBusConnection &bus,
579 const QString &busName, const QString &objectPath,
580 const ConnectionFactoryConstPtr &connectionFactory,
581 const ChannelFactoryConstPtr &channelFactory,
582 const ContactFactoryConstPtr &contactFactory,
585 Client::AccountInterface *baseInterface() const;
586 Client::ChannelDispatcherInterface *dispatcherInterface() const;
590 TP_QT_NO_EXPORT
void gotMainProperties(QDBusPendingCallWatcher *);
591 TP_QT_NO_EXPORT
void gotAvatar(QDBusPendingCallWatcher *);
592 TP_QT_NO_EXPORT
void onAvatarChanged();
595 TP_QT_NO_EXPORT
void onPropertyChanged(const QVariantMap &delta);
596 TP_QT_NO_EXPORT
void onRemoved();
601 friend struct Private;
ConnectionStatus
Definition: build/TelepathyQt/_gen/constants.h:1420
The PendingChannelRequest class represents the parameters of and the reply to an asynchronous Channel...
Definition: pending-channel-request.h:46
Definition: build/TelepathyQt/_gen/types.h:254
The ProtocolInfo class represents a Telepathy Protocol.
Definition: protocol-info.h:46
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
The PresenceSpecList class represents a list of PresenceSpec.
Definition: presence.h:125
The Connection class represents a Telepathy connection.
Definition: connection.h:61
The Account class represents a Telepathy account.
Definition: account.h:68
The PendingStringList class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-string-list.h:37
The PendingChannel class represents the parameters of and the reply to an asynchronous channel reques...
Definition: pending-channel.h:44
The ChannelRequestHints class represents a dictionary of metadata provided by the channel requester w...
Definition: channel-request.h:121
The StatelessDBusProxy class is a base class representing a remote object whose API is basically stat...
Definition: dbus-proxy.h:80
ConnectionStatusReason
Definition: build/TelepathyQt/_gen/constants.h:1465
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
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:42
The Presence class represents a Telepathy simple presence.
Definition: presence.h:36
Definition: abstract-adaptor.cpp:31
The ContactFactory class is responsible for constructing Contact objects according to application-def...
Definition: contact-factory.h:44
The AvatarSpec class represents a Telepathy avatar information supported by a protocol.
Definition: avatar.h:51
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