Home · All Classes · All Namespaces · Modules · Functions · Files
account.h
1 
23 #ifndef _TelepathyQt_account_h_HEADER_GUARD_
24 #define _TelepathyQt_account_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/_gen/cli-account.h>
31 
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>
50 
51 #include <QSet>
52 #include <QString>
53 #include <QStringList>
54 #include <QVariantMap>
55 
56 namespace Tp
57 {
58 
59 class Account;
60 class Connection;
61 class PendingChannel;
62 class PendingChannelRequest;
63 class PendingConnection;
64 class PendingOperation;
65 class PendingReady;
66 class PendingStringList;
67 
68 class TP_QT_EXPORT Account : public StatelessDBusProxy,
69  public OptionalInterfaceFactory<Account>
70 {
71  Q_OBJECT
72  Q_DISABLE_COPY(Account)
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)
85  Q_PROPERTY(ProtocolInfo protocolInfo READ protocolInfo)
86  Q_PROPERTY(ConnectionCapabilities capabilities READ capabilities NOTIFY capabilitiesChanged)
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)
90  Q_PROPERTY(ConnectionStatusReason connectionStatusReason READ connectionStatusReason)
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)
101 
102 public:
103  static const Feature FeatureCore;
104  static const Feature FeatureAvatar;
105  static const Feature FeatureProtocolInfo;
106  static const Feature FeatureCapabilities;
107  static const Feature FeatureProfile;
108 
109  static AccountPtr create(const QString &busName, const QString &objectPath,
110  const ConnectionFactoryConstPtr &connectionFactory =
111  ConnectionFactory::create(QDBusConnection::sessionBus()),
112  const ChannelFactoryConstPtr &channelFactory =
113  ChannelFactory::create(QDBusConnection::sessionBus()),
114  const ContactFactoryConstPtr &contactFactory =
115  ContactFactory::create());
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 =
121  ContactFactory::create());
122  virtual ~Account();
123 
124  ConnectionFactoryConstPtr connectionFactory() const;
125  ChannelFactoryConstPtr channelFactory() const;
126  ContactFactoryConstPtr contactFactory() const;
127 
128  bool isValidAccount() const;
129 
130  bool isEnabled() const;
131  PendingOperation *setEnabled(bool value);
132 
133  QString cmName() const;
134 
135  QString protocolName() const;
136 
137  QString serviceName() const;
138  PendingOperation *setServiceName(const QString &value);
139 
140  ProfilePtr profile() const;
141 
142  QString displayName() const;
143  PendingOperation *setDisplayName(const QString &value);
144 
145  QString iconName() const;
146  PendingOperation *setIconName(const QString &value);
147 
148  QString nickname() const;
149  PendingOperation *setNickname(const QString &value);
150 
151  AvatarSpec avatarRequirements() const;
152  // TODO: We probably want to expose the avatar file name once we have the avatar token and MC
153  // starts sharing the cache used by tp-qt and tp-glib and use Tp::AvatarData to represent
154  // it as used in Tp::Contact
155  const Avatar &avatar() const;
156  PendingOperation *setAvatar(const Avatar &avatar);
157 
158  QVariantMap parameters() const;
159  PendingStringList *updateParameters(const QVariantMap &set,
160  const QStringList &unset);
161 
162  ProtocolInfo protocolInfo() const;
163 
164  ConnectionCapabilities capabilities() const;
165 
166  bool connectsAutomatically() const;
167  PendingOperation *setConnectsAutomatically(bool value);
168 
169  bool hasBeenOnline() const;
170 
171  ConnectionStatus connectionStatus() const;
172  ConnectionStatusReason connectionStatusReason() const;
173  QString connectionError() const;
174  Connection::ErrorDetails connectionErrorDetails() const;
175  ConnectionPtr connection() const;
176 
177  bool isChangingPresence() const;
178 
179  PresenceSpecList allowedPresenceStatuses(bool includeAllStatuses = false) const;
180  uint maxPresenceStatusMessageLength() const;
181 
182  // TODO: Add overload methods to set presence from a Profile::Presence
183  // TODO: Add usablePresences() that would return a list of presences that could be set on the
184  // account
185  Presence automaticPresence() const;
186  PendingOperation *setAutomaticPresence(const Presence &presence);
187 
188  Presence currentPresence() const;
189 
190  Presence requestedPresence() const;
191  PendingOperation *setRequestedPresence(const Presence &presence);
192 
193  bool isOnline() const;
194 
195  QString uniqueIdentifier() const;
196 
197  QString normalizedName() const;
198 
199  PendingOperation *reconnect();
200 
201  PendingOperation *remove();
202 
203  bool supportsRequestHints() const;
204  bool requestsSucceedWithChannel() const;
205 
206  PendingChannelRequest *ensureTextChat(
207  const QString &contactIdentifier,
208  const QDateTime &userActionTime = QDateTime::currentDateTime(),
209  const QString &preferredHandler = QString(),
210  const ChannelRequestHints &hints = ChannelRequestHints());
211  PendingChannelRequest *ensureTextChat(
212  const ContactPtr &contact,
213  const QDateTime &userActionTime = QDateTime::currentDateTime(),
214  const QString &preferredHandler = QString(),
215  const ChannelRequestHints &hints = ChannelRequestHints());
216 
217  PendingChannelRequest *ensureTextChatroom(
218  const QString &roomName,
219  const QDateTime &userActionTime = QDateTime::currentDateTime(),
220  const QString &preferredHandler = QString(),
221  const ChannelRequestHints &hints = ChannelRequestHints());
222 
223  PendingChannelRequest *ensureAudioCall(
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());
229  PendingChannelRequest *ensureAudioCall(
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());
235  PendingChannelRequest *ensureVideoCall(
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());
241  PendingChannelRequest *ensureVideoCall(
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());
247  PendingChannelRequest *ensureAudioVideoCall(
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());
254  PendingChannelRequest *ensureAudioVideoCall(
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());
261 
262  TP_QT_DEPRECATED PendingChannelRequest *ensureStreamedMediaCall(
263  const QString &contactIdentifier,
264  const QDateTime &userActionTime = QDateTime::currentDateTime(),
265  const QString &preferredHandler = QString(),
266  const ChannelRequestHints &hints = ChannelRequestHints());
267  TP_QT_DEPRECATED PendingChannelRequest *ensureStreamedMediaCall(
268  const ContactPtr &contact,
269  const QDateTime &userActionTime = QDateTime::currentDateTime(),
270  const QString &preferredHandler = QString(),
271  const ChannelRequestHints &hints = ChannelRequestHints());
272  TP_QT_DEPRECATED PendingChannelRequest *ensureStreamedMediaAudioCall(
273  const QString &contactIdentifier,
274  const QDateTime &userActionTime = QDateTime::currentDateTime(),
275  const QString &preferredHandler = QString(),
276  const ChannelRequestHints &hints = ChannelRequestHints());
277  TP_QT_DEPRECATED PendingChannelRequest *ensureStreamedMediaAudioCall(
278  const ContactPtr &contact,
279  const QDateTime &userActionTime = QDateTime::currentDateTime(),
280  const QString &preferredHandler = QString(),
281  const ChannelRequestHints &hints = ChannelRequestHints());
282  TP_QT_DEPRECATED PendingChannelRequest *ensureStreamedMediaVideoCall(
283  const QString &contactIdentifier,
284  bool withAudio = true,
285  const QDateTime &userActionTime = QDateTime::currentDateTime(),
286  const QString &preferredHandler = QString(),
287  const ChannelRequestHints &hints = ChannelRequestHints());
288  TP_QT_DEPRECATED PendingChannelRequest *ensureStreamedMediaVideoCall(
289  const ContactPtr &contact,
290  bool withAudio = false,
291  const QDateTime &userActionTime = QDateTime::currentDateTime(),
292  const QString &preferredHandler = QString(),
293  const ChannelRequestHints &hints = ChannelRequestHints());
294 
295  PendingChannelRequest *createFileTransfer(
296  const QString &contactIdentifier,
297  const FileTransferChannelCreationProperties &properties,
298  const QDateTime &userActionTime = QDateTime::currentDateTime(),
299  const QString &preferredHandler = QString(),
300  const ChannelRequestHints &hints = ChannelRequestHints());
301  PendingChannelRequest *createFileTransfer(
302  const ContactPtr &contact,
303  const FileTransferChannelCreationProperties &properties,
304  const QDateTime &userActionTime = QDateTime::currentDateTime(),
305  const QString &preferredHandler = QString(),
306  const ChannelRequestHints &hints = ChannelRequestHints());
307 
308  PendingChannelRequest *createStreamTube(
309  const QString &contactIdentifier,
310  const QString &service,
311  const QDateTime &userActionTime = QDateTime::currentDateTime(),
312  const QString &preferredHandler = QString(),
313  const ChannelRequestHints &hints = ChannelRequestHints());
314  PendingChannelRequest *createStreamTube(
315  const ContactPtr &contact,
316  const QString &service,
317  const QDateTime &userActionTime = QDateTime::currentDateTime(),
318  const QString &preferredHandler = QString(),
319  const ChannelRequestHints &hints = ChannelRequestHints());
320 
321  PendingChannelRequest *createDBusTube(
322  const QString &contactIdentifier,
323  const QString &serviceName,
324  const QDateTime &userActionTime = QDateTime::currentDateTime(),
325  const QString &preferredHandler = QString(),
326  const ChannelRequestHints &hints = ChannelRequestHints());
327  PendingChannelRequest *createDBusTube(
328  const ContactPtr &contact,
329  const QString &serviceName,
330  const QDateTime &userActionTime = QDateTime::currentDateTime(),
331  const QString &preferredHandler = QString(),
332  const ChannelRequestHints &hints = ChannelRequestHints());
333  PendingChannelRequest *createDBusTubeRoom(
334  const QString &room,
335  const QString &serviceName,
336  const QDateTime &userActionTime = QDateTime::currentDateTime(),
337  const QString &preferredHandler = QString(),
338  const ChannelRequestHints &hints = ChannelRequestHints());
339 
340  TP_QT_DEPRECATED PendingChannelRequest *createConferenceStreamedMediaCall(
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());
346  TP_QT_DEPRECATED PendingChannelRequest *createConferenceStreamedMediaCall(
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());
352 
353  PendingChannelRequest *createConferenceTextChat(
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());
359  PendingChannelRequest *createConferenceTextChat(
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());
365 
366  PendingChannelRequest *createConferenceTextChatroom(
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());
373  PendingChannelRequest *createConferenceTextChatroom(
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());
380 
381  PendingChannelRequest *createContactSearch(
382  const QString &server,
383  uint limit = 0,
384  const QDateTime &userActionTime = QDateTime::currentDateTime(),
385  const QString &preferredHandler = QString(),
386  const ChannelRequestHints &hints = ChannelRequestHints());
387 
388  PendingChannel *ensureAndHandleTextChat(
389  const QString &contactIdentifier,
390  const QDateTime &userActionTime = QDateTime::currentDateTime());
391  PendingChannel *ensureAndHandleTextChat(
392  const ContactPtr &contact,
393  const QDateTime &userActionTime = QDateTime::currentDateTime());
394 
395  PendingChannel *ensureAndHandleTextChatroom(
396  const QString &roomName,
397  const QDateTime &userActionTime = QDateTime::currentDateTime());
398 
399  PendingChannel *ensureAndHandleAudioCall(
400  const QString &contactIdentifier,
401  const QString &initialAudioContentName = QString(),
402  const QDateTime &userActionTime = QDateTime::currentDateTime());
403  PendingChannel *ensureAndHandleAudioCall(
404  const ContactPtr &contact,
405  const QString &initialAudioContentName = QString(),
406  const QDateTime &userActionTime = QDateTime::currentDateTime());
407  PendingChannel *ensureAndHandleVideoCall(
408  const QString &contactIdentifier,
409  const QString &initialVideoContentName = QString(),
410  const QDateTime &userActionTime = QDateTime::currentDateTime());
411  PendingChannel *ensureAndHandleVideoCall(
412  const ContactPtr &contact,
413  const QString &initialVideoContentName = QString(),
414  const QDateTime &userActionTime = QDateTime::currentDateTime());
415  PendingChannel *ensureAndHandleAudioVideoCall(
416  const QString &contactIdentifier,
417  const QString &initialAudioContentName = QString(),
418  const QString &initialVideoContentName = QString(),
419  const QDateTime &userActionTime = QDateTime::currentDateTime());
420  PendingChannel *ensureAndHandleAudioVideoCall(
421  const ContactPtr &contact,
422  const QString &initialAudioContentName = QString(),
423  const QString &initialVideoContentName = QString(),
424  const QDateTime &userActionTime = QDateTime::currentDateTime());
425 
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());
432 
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());
439 
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());
448 
449  PendingChannel *createAndHandleFileTransfer(
450  const QString &contactIdentifier,
451  const FileTransferChannelCreationProperties &properties,
452  const QDateTime &userActionTime = QDateTime::currentDateTime());
453  PendingChannel *createAndHandleFileTransfer(
454  const ContactPtr &contact,
455  const FileTransferChannelCreationProperties &properties,
456  const QDateTime &userActionTime = QDateTime::currentDateTime());
457 
458  PendingChannel *createAndHandleStreamTube(
459  const QString &contactIdentifier,
460  const QString &service,
461  const QDateTime &userActionTime = QDateTime::currentDateTime());
462  PendingChannel *createAndHandleStreamTube(
463  const ContactPtr &contact,
464  const QString &service,
465  const QDateTime &userActionTime = QDateTime::currentDateTime());
466 
467  PendingChannel *createAndHandleDBusTube(
468  const QString &contactIdentifier,
469  const QString &serviceName,
470  const QDateTime &userActionTime = QDateTime::currentDateTime());
471  PendingChannel *createAndHandleDBusTube(
472  const ContactPtr &contact,
473  const QString &serviceName,
474  const QDateTime &userActionTime = QDateTime::currentDateTime());
475 
476  PendingChannel *createAndHandleConferenceTextChat(
477  const QList<ChannelPtr> &channels,
478  const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
479  const QDateTime &userActionTime = QDateTime::currentDateTime());
480  PendingChannel *createAndHandleConferenceTextChat(
481  const QList<ChannelPtr> &channels,
482  const QStringList &initialInviteeContactsIdentifiers = QStringList(),
483  const QDateTime &userActionTime = QDateTime::currentDateTime());
484 
485  PendingChannel *createAndHandleConferenceTextChatroom(
486  const QString &roomName,
487  const QList<ChannelPtr> &channels,
488  const QStringList &initialInviteeContactsIdentifiers = QStringList(),
489  const QDateTime &userActionTime = QDateTime::currentDateTime());
490  PendingChannel *createAndHandleConferenceTextChatroom(
491  const QString &roomName,
492  const QList<ChannelPtr> &channels,
493  const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
494  const QDateTime &userActionTime = QDateTime::currentDateTime());
495 
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());
504 
505  PendingChannel *createAndHandleContactSearch(
506  const QString &server = QString(),
507  uint limit = 0,
508  const QDateTime &userActionTime = QDateTime::currentDateTime());
509 
510  // advanced
511  PendingChannelRequest *createChannel(
512  const QVariantMap &requestedProperties,
513  const QDateTime &userActionTime = QDateTime::currentDateTime(),
514  const QString &preferredHandler = QString(),
515  const ChannelRequestHints &hints = ChannelRequestHints());
516 
517  PendingChannelRequest *ensureChannel(
518  const QVariantMap &requestedProperties,
519  const QDateTime &userActionTime = QDateTime::currentDateTime(),
520  const QString &preferredHandler = QString(),
521  const ChannelRequestHints &hints = ChannelRequestHints());
522 
523  PendingChannel *createAndHandleChannel(
524  const QVariantMap &requestedProperties,
525  const QDateTime &userActionTime);
526  PendingChannel *ensureAndHandleChannel(
527  const QVariantMap &requestedProperties,
528  const QDateTime &userActionTime);
529 
530 Q_SIGNALS:
531  void removed();
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);
540  void capabilitiesChanged(const Tp::ConnectionCapabilities &capabilities);
541  void connectsAutomaticallyPropertyChanged(bool connectsAutomatically);
542  void firstOnline();
543  void parametersChanged(const QVariantMap &parameters);
544  void changingPresence(bool value);
545  void automaticPresenceChanged(const Tp::Presence &automaticPresence);
546  void currentPresenceChanged(const Tp::Presence &currentPresence);
547  void requestedPresenceChanged(const Tp::Presence &requestedPresence);
548  void onlinenessChanged(bool online);
549  void avatarChanged(const Tp::Avatar &avatar);
550  void connectionStatusChanged(Tp::ConnectionStatus status);
551  void connectionChanged(const Tp::ConnectionPtr &connection);
552 
553 protected:
554  friend class PendingChannelRequest; // to access dispatcherInterface()
555 
556  Account(const QDBusConnection &bus,
557  const QString &busName, const QString &objectPath,
558  const ConnectionFactoryConstPtr &connectionFactory,
559  const ChannelFactoryConstPtr &channelFactory,
560  const ContactFactoryConstPtr &contactFactory,
561  const Feature &coreFeature);
562 
563  Client::AccountInterface *baseInterface() const;
564  Client::ChannelDispatcherInterface *dispatcherInterface() const;
565 
566 private Q_SLOTS:
567  TP_QT_NO_EXPORT void onDispatcherIntrospected(Tp::PendingOperation *op);
568  TP_QT_NO_EXPORT void gotMainProperties(QDBusPendingCallWatcher *);
569  TP_QT_NO_EXPORT void gotAvatar(QDBusPendingCallWatcher *);
570  TP_QT_NO_EXPORT void onAvatarChanged();
571  TP_QT_NO_EXPORT void onConnectionManagerReady(Tp::PendingOperation *);
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 *);
576 
577 private:
578  struct Private;
579  friend struct Private;
580 
581  Private *mPriv;
582 };
583 
584 } // Tp
585 
586 #endif
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


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.5