account.h Source File

| 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 *createConferenceCall(
354 const QList<ChannelPtr> &channels,
355 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
356 const QDateTime &userActionTime = QDateTime::currentDateTime(),
357 const QString &preferredHandler = QString(),
358 const ChannelRequestHints &hints = ChannelRequestHints());
359 PendingChannelRequest *createConferenceCall(
360 const QList<ChannelPtr> &channels,
361 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
362 const QDateTime &userActionTime = QDateTime::currentDateTime(),
363 const QString &preferredHandler = QString(),
364 const ChannelRequestHints &hints = ChannelRequestHints());
365
366 PendingChannelRequest *createConferenceTextChat(
367 const QList<ChannelPtr> &channels,
368 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
369 const QDateTime &userActionTime = QDateTime::currentDateTime(),
370 const QString &preferredHandler = QString(),
371 const ChannelRequestHints &hints = ChannelRequestHints());
372 PendingChannelRequest *createConferenceTextChat(
373 const QList<ChannelPtr> &channels,
374 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
375 const QDateTime &userActionTime = QDateTime::currentDateTime(),
376 const QString &preferredHandler = QString(),
377 const ChannelRequestHints &hints = ChannelRequestHints());
378
379 PendingChannelRequest *createConferenceTextChatroom(
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(),
385 const ChannelRequestHints &hints = ChannelRequestHints());
386 PendingChannelRequest *createConferenceTextChatroom(
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(),
392 const ChannelRequestHints &hints = ChannelRequestHints());
393
394 PendingChannel *createAndHandleConferenceCall(
395 const QList<ChannelPtr> &channels,
396 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
397 const QDateTime &userActionTime = QDateTime::currentDateTime());
398 PendingChannel *createAndHandleConferenceCall(
399 const QList<ChannelPtr> &channels,
400 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
401 const QDateTime &userActionTime = QDateTime::currentDateTime());
402
403 PendingChannelRequest *createContactSearch(
404 const QString &server,
405 uint limit = 0,
406 const QDateTime &userActionTime = QDateTime::currentDateTime(),
407 const QString &preferredHandler = QString(),
408 const ChannelRequestHints &hints = ChannelRequestHints());
409
410 PendingChannel *ensureAndHandleTextChat(
411 const QString &contactIdentifier,
412 const QDateTime &userActionTime = QDateTime::currentDateTime());
413 PendingChannel *ensureAndHandleTextChat(
414 const ContactPtr &contact,
415 const QDateTime &userActionTime = QDateTime::currentDateTime());
416
417 PendingChannel *ensureAndHandleTextChatroom(
418 const QString &roomName,
419 const QDateTime &userActionTime = QDateTime::currentDateTime());
420
421 PendingChannel *ensureAndHandleAudioCall(
422 const QString &contactIdentifier,
423 const QString &initialAudioContentName = QString(),
424 const QDateTime &userActionTime = QDateTime::currentDateTime());
425 PendingChannel *ensureAndHandleAudioCall(
426 const ContactPtr &contact,
427 const QString &initialAudioContentName = QString(),
428 const QDateTime &userActionTime = QDateTime::currentDateTime());
429 PendingChannel *ensureAndHandleVideoCall(
430 const QString &contactIdentifier,
431 const QString &initialVideoContentName = QString(),
432 const QDateTime &userActionTime = QDateTime::currentDateTime());
433 PendingChannel *ensureAndHandleVideoCall(
434 const ContactPtr &contact,
435 const QString &initialVideoContentName = QString(),
436 const QDateTime &userActionTime = QDateTime::currentDateTime());
437 PendingChannel *ensureAndHandleAudioVideoCall(
438 const QString &contactIdentifier,
439 const QString &initialAudioContentName = QString(),
440 const QString &initialVideoContentName = QString(),
441 const QDateTime &userActionTime = QDateTime::currentDateTime());
442 PendingChannel *ensureAndHandleAudioVideoCall(
443 const ContactPtr &contact,
444 const QString &initialAudioContentName = QString(),
445 const QString &initialVideoContentName = QString(),
446 const QDateTime &userActionTime = QDateTime::currentDateTime());
447
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());
454
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());
461
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());
470
471 PendingChannel *createAndHandleFileTransfer(
472 const QString &contactIdentifier,
473 const FileTransferChannelCreationProperties &properties,
474 const QDateTime &userActionTime = QDateTime::currentDateTime());
475 PendingChannel *createAndHandleFileTransfer(
476 const ContactPtr &contact,
477 const FileTransferChannelCreationProperties &properties,
478 const QDateTime &userActionTime = QDateTime::currentDateTime());
479
480 PendingChannel *createAndHandleStreamTube(
481 const QString &contactIdentifier,
482 const QString &service,
483 const QDateTime &userActionTime = QDateTime::currentDateTime());
484 PendingChannel *createAndHandleStreamTube(
485 const ContactPtr &contact,
486 const QString &service,
487 const QDateTime &userActionTime = QDateTime::currentDateTime());
488
489 PendingChannel *createAndHandleDBusTube(
490 const QString &contactIdentifier,
491 const QString &serviceName,
492 const QDateTime &userActionTime = QDateTime::currentDateTime());
493 PendingChannel *createAndHandleDBusTube(
494 const ContactPtr &contact,
495 const QString &serviceName,
496 const QDateTime &userActionTime = QDateTime::currentDateTime());
497
498 PendingChannel *createAndHandleConferenceTextChat(
499 const QList<ChannelPtr> &channels,
500 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
501 const QDateTime &userActionTime = QDateTime::currentDateTime());
502 PendingChannel *createAndHandleConferenceTextChat(
503 const QList<ChannelPtr> &channels,
504 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
505 const QDateTime &userActionTime = QDateTime::currentDateTime());
506
507 PendingChannel *createAndHandleConferenceTextChatroom(
508 const QString &roomName,
509 const QList<ChannelPtr> &channels,
510 const QStringList &initialInviteeContactsIdentifiers = QStringList(),
511 const QDateTime &userActionTime = QDateTime::currentDateTime());
512 PendingChannel *createAndHandleConferenceTextChatroom(
513 const QString &roomName,
514 const QList<ChannelPtr> &channels,
515 const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
516 const QDateTime &userActionTime = QDateTime::currentDateTime());
517
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());
526
527 PendingChannel *createAndHandleContactSearch(
528 const QString &server = QString(),
529 uint limit = 0,
530 const QDateTime &userActionTime = QDateTime::currentDateTime());
531
532 // advanced
533 PendingChannelRequest *createChannel(
534 const QVariantMap &requestedProperties,
535 const QDateTime &userActionTime = QDateTime::currentDateTime(),
536 const QString &preferredHandler = QString(),
537 const ChannelRequestHints &hints = ChannelRequestHints());
538
539 PendingChannelRequest *ensureChannel(
540 const QVariantMap &requestedProperties,
541 const QDateTime &userActionTime = QDateTime::currentDateTime(),
542 const QString &preferredHandler = QString(),
543 const ChannelRequestHints &hints = ChannelRequestHints());
544
545 PendingChannel *createAndHandleChannel(
546 const QVariantMap &requestedProperties,
547 const QDateTime &userActionTime);
548 PendingChannel *ensureAndHandleChannel(
549 const QVariantMap &requestedProperties,
550 const QDateTime &userActionTime);
551
552 Q_SIGNALS:
553 void removed();
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);
562 void capabilitiesChanged(const Tp::ConnectionCapabilities &capabilities);
563 void connectsAutomaticallyPropertyChanged(bool connectsAutomatically);
564 void firstOnline();
565 void parametersChanged(const QVariantMap &parameters);
566 void changingPresence(bool value);
567 void automaticPresenceChanged(const Tp::Presence &automaticPresence);
568 void currentPresenceChanged(const Tp::Presence &currentPresence);
569 void requestedPresenceChanged(const Tp::Presence &requestedPresence);
570 void onlinenessChanged(bool online);
571 void avatarChanged(const Tp::Avatar &avatar);
572 void connectionStatusChanged(Tp::ConnectionStatus status);
573 void connectionChanged(const Tp::ConnectionPtr &connection);
574
575 protected:
576 friend class PendingChannelRequest; // to access dispatcherInterface()
577
578 Account(const QDBusConnection &bus,
579 const QString &busName, const QString &objectPath,
580 const ConnectionFactoryConstPtr &connectionFactory,
581 const ChannelFactoryConstPtr &channelFactory,
582 const ContactFactoryConstPtr &contactFactory,
583 const Feature &coreFeature);
584
585 Client::AccountInterface *baseInterface() const;
586 Client::ChannelDispatcherInterface *dispatcherInterface() const;
587
588 private Q_SLOTS:
589 TP_QT_NO_EXPORT void onDispatcherIntrospected(Tp::PendingOperation *op);
590 TP_QT_NO_EXPORT void gotMainProperties(QDBusPendingCallWatcher *);
591 TP_QT_NO_EXPORT void gotAvatar(QDBusPendingCallWatcher *);
592 TP_QT_NO_EXPORT void onAvatarChanged();
593 TP_QT_NO_EXPORT void onConnectionManagerReady(Tp::PendingOperation *);
594 TP_QT_NO_EXPORT void onConnectionReady(Tp::PendingOperation *);
595 TP_QT_NO_EXPORT void onPropertyChanged(const QVariantMap &delta);
596 TP_QT_NO_EXPORT void onRemoved();
597 TP_QT_NO_EXPORT void onConnectionBuilt(Tp::PendingOperation *);
598
599 private:
600 struct Private;
601 friend struct Private;
602
603 Private *mPriv;
604 };
605
606 } // Tp
607
608 #endif
Tp::StatelessDBusProxy
The StatelessDBusProxy class is a base class representing a remote object whose API is basically stat...
Definition: dbus-proxy.h:80
Tp::AvatarSpec
The AvatarSpec class represents a Telepathy avatar information supported by a protocol.
Definition: avatar.h:51
Tp::ChannelRequestHints
The ChannelRequestHints class represents a dictionary of metadata provided by the channel requester w...
Definition: channel-request.h:121
Tp::Feature
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
Tp::ConnectionStatusReason
ConnectionStatusReason
Definition: build/TelepathyQt/_gen/constants.h:1465
Tp::ProtocolInfo
The ProtocolInfo class represents a Telepathy Protocol.
Definition: protocol-info.h:46
Tp::Presence
The Presence class represents a Telepathy simple presence.
Definition: presence.h:36
Tp::PendingOperation
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
Tp::ChannelFactory
The ChannelFactory class is responsible for constructing Channel objects according to application-def...
Definition: channel-factory.h:46
Tp::Connection
The Connection class represents a Telepathy connection.
Definition: connection.h:62
Tp::ConnectionStatus
ConnectionStatus
Definition: build/TelepathyQt/_gen/constants.h:1420
Tp::PresenceSpecList
The PresenceSpecList class represents a list of PresenceSpec.
Definition: presence.h:125
Tp::PendingChannel
The PendingChannel class represents the parameters of and the reply to an asynchronous channel reques...
Definition: pending-channel.h:44
Tp::ContactFactory
The ContactFactory class is responsible for constructing Contact objects according to application-def...
Definition: contact-factory.h:44
Tp::PendingStringList
The PendingStringList class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-string-list.h:37
Tp::ConnectionFactory
The ConnectionFactory class is responsible for constructing Connection objects according to applicati...
Definition: connection-factory.h:49
Tp::FileTransferChannelCreationProperties
The FileTransferChannelCreationProperties class represents the properties of a file transfer channel ...
Definition: file-transfer-channel-creation-properties.h:41
Tp::PendingChannelRequest
The PendingChannelRequest class represents the parameters of and the reply to an asynchronous Channel...
Definition: pending-channel-request.h:46
Tp::Avatar
Definition: build/TelepathyQt/_gen/types.h:240
Tp::ConnectionCapabilities
The ConnectionCapabilities class represents the capabilities of a Connection.
Definition: connection-capabilities.h:38
Tp::Account
The Account class represents a Telepathy account.
Definition: account.h:68
Tp::OptionalInterfaceFactory
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65