| Home · All Classes · All Namespaces · Modules · Functions · Files

base-connection.h
1
23 #ifndef _TelepathyQt_base_connection_h_HEADER_GUARD_
24 #define _TelepathyQt_base_connection_h_HEADER_GUARD_
25
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29
30 #include <TelepathyQt/AvatarSpec>
31 #include <TelepathyQt/DBusService>
32 #include <TelepathyQt/Global>
33 #include <TelepathyQt/Types>
34 #include <TelepathyQt/Callbacks>
35 #include <TelepathyQt/Constants>
36
37 #include <QDBusConnection>
38
39 class QString;
40
41 namespace Tp
42 {
43
44 class TP_QT_EXPORT BaseConnection : public DBusService
45 {
46 Q_OBJECT
47 Q_DISABLE_COPY(BaseConnection)
48
49 public:
50 static BaseConnectionPtr create(const QString &cmName, const QString &protocolName,
51 const QVariantMap &parameters,
52 const QDBusConnection &dbusConnection = QDBusConnection::sessionBus())
53 {
54 return BaseConnectionPtr(new BaseConnection(
55 dbusConnection, cmName, protocolName, parameters));
56 }
57 template<typename BaseConnectionSubclass>
58 static SharedPtr<BaseConnectionSubclass> create(const QString &cmName,
59 const QString &protocolName, const QVariantMap &parameters,
60 const QDBusConnection &dbusConnection = QDBusConnection::sessionBus())
61 {
62 return SharedPtr<BaseConnectionSubclass>(new BaseConnectionSubclass(
63 dbusConnection, cmName, protocolName, parameters));
64 }
65
66 virtual ~BaseConnection();
67
68 QString cmName() const;
69 QString protocolName() const;
70 QVariantMap parameters() const;
71 QVariantMap immutableProperties() const;
72
73 uint selfHandle() const;
74 void setSelfHandle(uint selfHandle);
75
76 QString selfID() const;
77 void setSelfID(const QString &selfID);
78
79 void setSelfContact(uint selfHandle, const QString &selfID);
80
81 uint status() const;
82 void setStatus(uint newStatus, uint reason);
83
84 typedef Callback2<BaseChannelPtr, const QVariantMap &, DBusError*> CreateChannelCallback;
85 void setCreateChannelCallback(const CreateChannelCallback &cb);
86 BaseChannelPtr createChannel(const QVariantMap &request, bool suppressHandler, DBusError *error);
87
88 typedef Callback1<void, DBusError*> ConnectCallback;
89 void setConnectCallback(const ConnectCallback &cb);
90
91 typedef Callback3<QStringList, uint, const Tp::UIntList &, DBusError*> InspectHandlesCallback;
92 void setInspectHandlesCallback(const InspectHandlesCallback &cb);
93 QStringList inspectHandles(uint handleType, const Tp::UIntList &handles, DBusError *error);
94
95 typedef Callback3<Tp::UIntList, uint, const QStringList &, DBusError*> RequestHandlesCallback;
96 void setRequestHandlesCallback(const RequestHandlesCallback &cb);
97 Tp::UIntList requestHandles(uint handleType, const QStringList &identifiers, DBusError *error);
98
99 Tp::ChannelInfoList channelsInfo();
100 Tp::ChannelDetailsList channelsDetails();
101
102 BaseChannelPtr ensureChannel(const QVariantMap &request, bool &yours, bool suppressHandler, DBusError *error);
103
104 void addChannel(BaseChannelPtr channel, bool suppressHandler = false);
105
106 QList<AbstractConnectionInterfacePtr> interfaces() const;
107 AbstractConnectionInterfacePtr interface(const QString &interfaceName) const;
108 bool plugInterface(const AbstractConnectionInterfacePtr &interface);
109 bool registerObject(DBusError *error = NULL);
110
111 virtual QString uniqueName() const;
112
113 Q_SIGNALS:
114 void disconnected();
115
116 private Q_SLOTS:
117 TP_QT_NO_EXPORT void removeChannel();
118
119 protected:
120 BaseConnection(const QDBusConnection &dbusConnection,
121 const QString &cmName, const QString &protocolName,
122 const QVariantMap &parameters);
123
124 virtual bool registerObject(const QString &busName, const QString &objectPath,
125 DBusError *error);
126
127 virtual bool matchChannel(const Tp::BaseChannelPtr &channel, const QVariantMap &request, Tp::DBusError *error);
128
129 private:
130 class Adaptee;
131 friend class Adaptee;
132 struct Private;
133 friend struct Private;
134 Private *mPriv;
135 };
136
137 class TP_QT_EXPORT AbstractConnectionInterface : public AbstractDBusServiceInterface
138 {
139 Q_OBJECT
140 Q_DISABLE_COPY(AbstractConnectionInterface)
141
142 public:
143 AbstractConnectionInterface(const QString &interfaceName);
144 virtual ~AbstractConnectionInterface();
145
146 protected:
147 virtual void setBaseConnection(BaseConnection *connection);
148
149 private:
150 friend class BaseConnection;
151
152 struct Private;
153 friend struct Private;
154 Private *mPriv;
155 };
156
157 class TP_QT_EXPORT BaseConnectionRequestsInterface : public AbstractConnectionInterface
158 {
159 Q_OBJECT
160 Q_DISABLE_COPY(BaseConnectionRequestsInterface)
161
162 public:
163 static BaseConnectionRequestsInterfacePtr create(BaseConnection* connection) {
164 return BaseConnectionRequestsInterfacePtr(new BaseConnectionRequestsInterface(connection));
165 }
166 template<typename BaseConnectionRequestsInterfaceSubclass>
167 static SharedPtr<BaseConnectionRequestsInterfaceSubclass> create(BaseConnection* connection) {
168 return SharedPtr<BaseConnectionRequestsInterfaceSubclass>(
169 new BaseConnectionRequestsInterfaceSubclass(connection));
170 }
171
172 virtual ~BaseConnectionRequestsInterface();
173
174 QVariantMap immutableProperties() const;
175
176 Tp::RequestableChannelClassList requestableChannelClasses;
177 void ensureChannel(const QVariantMap &request, bool &yours,
178 QDBusObjectPath &channel, QVariantMap &details, DBusError* error);
179 void createChannel(const QVariantMap &request, QDBusObjectPath &channel,
180 QVariantMap &details, DBusError* error);
181
182 public Q_SLOTS:
183 void newChannels(const Tp::ChannelDetailsList &channels);
184 void channelClosed(const QDBusObjectPath &removed);
185
186 protected:
187 BaseConnectionRequestsInterface(BaseConnection* connection);
188
189 private:
190 void createAdaptor();
191
192 class Adaptee;
193 friend class Adaptee;
194 struct Private;
195 friend struct Private;
196 Private *mPriv;
197 };
198
199 class TP_QT_EXPORT BaseConnectionContactsInterface : public AbstractConnectionInterface
200 {
201 Q_OBJECT
202 Q_DISABLE_COPY(BaseConnectionContactsInterface)
203
204 public:
205 static BaseConnectionContactsInterfacePtr create()
206 {
207 return BaseConnectionContactsInterfacePtr(new BaseConnectionContactsInterface());
208 }
209 template<typename BaseConnectionContactsInterfaceSubclass>
210 static SharedPtr<BaseConnectionContactsInterfaceSubclass> create()
211 {
212 return SharedPtr<BaseConnectionContactsInterfaceSubclass>(
213 new BaseConnectionContactsInterfaceSubclass());
214 }
215
216 virtual ~BaseConnectionContactsInterface();
217
218 QVariantMap immutableProperties() const;
219
220 QStringList contactAttributeInterfaces() const;
221 void setContactAttributeInterfaces(const QStringList &contactAttributeInterfaces);
222
223 typedef Callback3<Tp::ContactAttributesMap, const Tp::UIntList &, const QStringList &, DBusError*> GetContactAttributesCallback;
224 void setGetContactAttributesCallback(const GetContactAttributesCallback &cb);
225 Tp::ContactAttributesMap getContactAttributes(const Tp::UIntList &handles, const QStringList &interfaces, DBusError *error);
226
227 void getContactByID(const QString &identifier, const QStringList &interfaces, uint &handle, QVariantMap &attributes, DBusError *error);
228
229 protected:
230 BaseConnectionContactsInterface();
231 void setBaseConnection(BaseConnection *connection);
232
233 private:
234 void createAdaptor();
235
236 class Adaptee;
237 friend class Adaptee;
238 struct Private;
239 friend struct Private;
240 Private *mPriv;
241 };
242
243 class TP_QT_EXPORT BaseConnectionSimplePresenceInterface : public AbstractConnectionInterface
244 {
245 Q_OBJECT
246 Q_DISABLE_COPY(BaseConnectionSimplePresenceInterface)
247
248 public:
249 static BaseConnectionSimplePresenceInterfacePtr create()
250 {
251 return BaseConnectionSimplePresenceInterfacePtr(new BaseConnectionSimplePresenceInterface());
252 }
253 template<typename BaseConnectionSimplePresenceInterfaceSubclass>
254 static SharedPtr<BaseConnectionSimplePresenceInterfaceSubclass> create()
255 {
256 return SharedPtr<BaseConnectionSimplePresenceInterfaceSubclass>(
257 new BaseConnectionSimplePresenceInterfaceSubclass());
258 }
259
260 virtual ~BaseConnectionSimplePresenceInterface();
261
262 QVariantMap immutableProperties() const;
263
264 Tp::SimpleStatusSpecMap statuses() const;
265 void setStatuses(const Tp::SimpleStatusSpecMap &statuses);
266
267 uint maximumStatusMessageLength() const;
268 void setMaximumStatusMessageLength(uint maximumStatusMessageLength);
269
270 typedef Callback3<uint, const QString &, const QString &, DBusError*> SetPresenceCallback;
271 void setSetPresenceCallback(const SetPresenceCallback &cb);
272
273 void setPresences(const Tp::SimpleContactPresences &presences);
274
275 Tp::SimpleContactPresences getPresences(const Tp::UIntList &contacts);
276
277 protected:
278 BaseConnectionSimplePresenceInterface();
279
280 private:
281 void createAdaptor();
282
283 class Adaptee;
284 friend class Adaptee;
285 struct Private;
286 friend struct Private;
287 Private *mPriv;
288 };
289
290 class TP_QT_EXPORT BaseConnectionContactListInterface : public AbstractConnectionInterface
291 {
292 Q_OBJECT
293 Q_DISABLE_COPY(BaseConnectionContactListInterface)
294
295 public:
296 static BaseConnectionContactListInterfacePtr create()
297 {
298 return BaseConnectionContactListInterfacePtr(new BaseConnectionContactListInterface());
299 }
300 template<typename BaseConnectionContactListInterfaceSubclass>
301 static SharedPtr<BaseConnectionContactListInterfaceSubclass> create()
302 {
303 return SharedPtr<BaseConnectionContactListInterfaceSubclass>(
304 new BaseConnectionContactListInterfaceSubclass());
305 }
306
307 virtual ~BaseConnectionContactListInterface();
308
309 QVariantMap immutableProperties() const;
310
311 uint contactListState() const;
312 void setContactListState(uint contactListState);
313
314 bool contactListPersists() const;
315 void setContactListPersists(bool contactListPersists);
316
317 bool canChangeContactList() const;
318 void setCanChangeContactList(bool canChangeContactList);
319
320 bool requestUsesMessage() const;
321 void setRequestUsesMessage(bool requestUsesMessage);
322
323 bool downloadAtConnection() const;
324 void setDownloadAtConnection(bool downloadAtConnection);
325
326 typedef Callback3<Tp::ContactAttributesMap, const QStringList &, bool, DBusError*> GetContactListAttributesCallback;
327 void setGetContactListAttributesCallback(const GetContactListAttributesCallback &cb);
328 Tp::ContactAttributesMap getContactListAttributes(const QStringList &interfaces, bool hold, DBusError *error);
329
330 typedef Callback3<void, const Tp::UIntList &, const QString &, DBusError*> RequestSubscriptionCallback;
331 void setRequestSubscriptionCallback(const RequestSubscriptionCallback &cb);
332 void requestSubscription(const Tp::UIntList &contacts, const QString &message, DBusError *error);
333
334 typedef Callback2<void, const Tp::UIntList &, DBusError*> AuthorizePublicationCallback;
335 void setAuthorizePublicationCallback(const AuthorizePublicationCallback &cb);
336 void authorizePublication(const Tp::UIntList &contacts, DBusError *error);
337
338 typedef Callback2<void, const Tp::UIntList &, DBusError*> RemoveContactsCallback;
339 void setRemoveContactsCallback(const RemoveContactsCallback &cb);
340 void removeContacts(const Tp::UIntList &contacts, DBusError *error);
341
342 typedef Callback2<void, const Tp::UIntList &, DBusError*> UnsubscribeCallback;
343 void setUnsubscribeCallback(const UnsubscribeCallback &cb);
344 void unsubscribe(const Tp::UIntList &contacts, DBusError *error);
345
346 typedef Callback2<void, const Tp::UIntList &, DBusError*> UnpublishCallback;
347 void setUnpublishCallback(const UnpublishCallback &cb);
348 void unpublish(const Tp::UIntList &contacts, DBusError *error);
349
350 typedef Callback1<void, DBusError*> DownloadCallback;
351 void setDownloadCallback(const DownloadCallback &cb);
352 void download(DBusError *error);
353
354 void contactsChangedWithID(const Tp::ContactSubscriptionMap &changes, const Tp::HandleIdentifierMap &identifiers, const Tp::HandleIdentifierMap &removals);
355
356 protected:
357 BaseConnectionContactListInterface();
358
359 private:
360 void createAdaptor();
361
362 class Adaptee;
363 friend class Adaptee;
364 struct Private;
365 friend struct Private;
366 Private *mPriv;
367 };
368
369 class TP_QT_EXPORT BaseConnectionContactInfoInterface : public AbstractConnectionInterface
370 {
371 Q_OBJECT
372 Q_DISABLE_COPY(BaseConnectionContactInfoInterface)
373
374 public:
375 static BaseConnectionContactInfoInterfacePtr create()
376 {
377 return BaseConnectionContactInfoInterfacePtr(new BaseConnectionContactInfoInterface());
378 }
379 template<typename BaseConnectionContactInfoInterfaceSubclass>
380 static SharedPtr<BaseConnectionContactInfoInterfaceSubclass> create()
381 {
382 return SharedPtr<BaseConnectionContactInfoInterfaceSubclass>(
383 new BaseConnectionContactInfoInterfaceSubclass());
384 }
385
386 virtual ~BaseConnectionContactInfoInterface();
387
388 QVariantMap immutableProperties() const;
389
390 Tp::ContactInfoFlags contactInfoFlags() const;
391 void setContactInfoFlags(const Tp::ContactInfoFlags &contactInfoFlags);
392
393 Tp::FieldSpecs supportedFields() const;
394 void setSupportedFields(const Tp::FieldSpecs &supportedFields);
395
396 typedef Callback2<Tp::ContactInfoMap, const Tp::UIntList &, DBusError*> GetContactInfoCallback;
397 void setGetContactInfoCallback(const GetContactInfoCallback &cb);
398 Tp::ContactInfoMap getContactInfo(const Tp::UIntList &contacts, DBusError *error);
399
400 typedef Callback2<void, const Tp::UIntList &, DBusError*> RefreshContactInfoCallback;
401 void setRefreshContactInfoCallback(const RefreshContactInfoCallback &cb);
402 void refreshContactInfo(const Tp::UIntList &contacts, DBusError *error);
403
404 typedef Callback2<Tp::ContactInfoFieldList, uint, DBusError*> RequestContactInfoCallback;
405 void setRequestContactInfoCallback(const RequestContactInfoCallback &cb);
406 Tp::ContactInfoFieldList requestContactInfo(uint contact, DBusError *error);
407
408 typedef Callback2<void, const Tp::ContactInfoFieldList &, DBusError*> SetContactInfoCallback;
409 void setSetContactInfoCallback(const SetContactInfoCallback &cb);
410 void setContactInfo(const Tp::ContactInfoFieldList &contactInfo, DBusError *error);
411
412 void contactInfoChanged(uint contact, const Tp::ContactInfoFieldList &contactInfo);
413
414 protected:
415 BaseConnectionContactInfoInterface();
416
417 private:
418 void createAdaptor();
419
420 class Adaptee;
421 friend class Adaptee;
422 struct Private;
423 friend struct Private;
424 Private *mPriv;
425 };
426
427 class TP_QT_EXPORT BaseConnectionAddressingInterface : public AbstractConnectionInterface
428 {
429 Q_OBJECT
430 Q_DISABLE_COPY(BaseConnectionAddressingInterface)
431
432 public:
433 static BaseConnectionAddressingInterfacePtr create() {
434 return BaseConnectionAddressingInterfacePtr(new BaseConnectionAddressingInterface());
435 }
436 template<typename BaseConnectionAddressingInterfaceSubclass>
437 static SharedPtr<BaseConnectionAddressingInterfaceSubclass> create() {
438 return SharedPtr<BaseConnectionAddressingInterfaceSubclass>(
439 new BaseConnectionAddressingInterfaceSubclass());
440 }
441
442 virtual ~BaseConnectionAddressingInterface();
443
444 QVariantMap immutableProperties() const;
445
446
447
448 typedef Callback6 < void, const QString&, const QStringList&, const QStringList&,
449 Tp::AddressingNormalizationMap&, Tp::ContactAttributesMap&, DBusError* > GetContactsByVCardFieldCallback;
450 void setGetContactsByVCardFieldCallback(const GetContactsByVCardFieldCallback &cb);
451
452 typedef Callback5 < void, const QStringList&, const QStringList&,
453 Tp::AddressingNormalizationMap&, Tp::ContactAttributesMap&, DBusError* > GetContactsByURICallback;
454 void setGetContactsByURICallback(const GetContactsByURICallback &cb);
455
456 protected:
457 BaseConnectionAddressingInterface();
458
459 private:
460 void createAdaptor();
461
462 class Adaptee;
463 friend class Adaptee;
464 struct Private;
465 friend struct Private;
466 Private *mPriv;
467 };
468
469 class TP_QT_EXPORT BaseConnectionAliasingInterface : public AbstractConnectionInterface
470 {
471 Q_OBJECT
472 Q_DISABLE_COPY(BaseConnectionAliasingInterface)
473
474 public:
475 static BaseConnectionAliasingInterfacePtr create()
476 {
477 return BaseConnectionAliasingInterfacePtr(new BaseConnectionAliasingInterface());
478 }
479 template<typename BaseConnectionAliasingInterfaceSubclass>
480 static SharedPtr<BaseConnectionAliasingInterfaceSubclass> create()
481 {
482 return SharedPtr<BaseConnectionAliasingInterfaceSubclass>(
483 new BaseConnectionAliasingInterfaceSubclass());
484 }
485
486 virtual ~BaseConnectionAliasingInterface();
487
488 QVariantMap immutableProperties() const;
489
490 typedef Callback1<Tp::ConnectionAliasFlags, DBusError*> GetAliasFlagsCallback;
491 void setGetAliasFlagsCallback(const GetAliasFlagsCallback &cb);
492 Tp::ConnectionAliasFlags getAliasFlags(DBusError *error);
493
494 typedef Callback2<QStringList, const Tp::UIntList &, DBusError*> RequestAliasesCallback;
495 void setRequestAliasesCallback(const RequestAliasesCallback &cb);
496 QStringList requestAliases(const Tp::UIntList &contacts, DBusError *error);
497
498 typedef Callback2<Tp::AliasMap, const Tp::UIntList &, DBusError*> GetAliasesCallback;
499 void setGetAliasesCallback(const GetAliasesCallback &cb);
500 Tp::AliasMap getAliases(const Tp::UIntList &contacts, DBusError *error);
501
502 typedef Callback2<void, const Tp::AliasMap &, DBusError*> SetAliasesCallback;
503 void setSetAliasesCallback(const SetAliasesCallback &cb);
504 void setAliases(const Tp::AliasMap &aliases, DBusError *error);
505
506 void aliasesChanged(const Tp::AliasPairList &aliases);
507
508 protected:
509 BaseConnectionAliasingInterface();
510
511 private:
512 void createAdaptor();
513
514 class Adaptee;
515 friend class Adaptee;
516 struct Private;
517 friend struct Private;
518 Private *mPriv;
519 };
520
521 class TP_QT_EXPORT BaseConnectionAvatarsInterface : public AbstractConnectionInterface
522 {
523 Q_OBJECT
524 Q_DISABLE_COPY(BaseConnectionAvatarsInterface)
525
526 public:
527 static BaseConnectionAvatarsInterfacePtr create()
528 {
529 return BaseConnectionAvatarsInterfacePtr(new BaseConnectionAvatarsInterface());
530 }
531 template<typename BaseConnectionAvatarsInterfaceSubclass>
532 static SharedPtr<BaseConnectionAvatarsInterfaceSubclass> create()
533 {
534 return SharedPtr<BaseConnectionAvatarsInterfaceSubclass>(
535 new BaseConnectionAvatarsInterfaceSubclass());
536 }
537
538 virtual ~BaseConnectionAvatarsInterface();
539
540 QVariantMap immutableProperties() const;
541
542 AvatarSpec avatarDetails() const;
543 void setAvatarDetails(const AvatarSpec &spec);
544
545 typedef Callback2<Tp::AvatarTokenMap, const Tp::UIntList &, DBusError*> GetKnownAvatarTokensCallback;
546 void setGetKnownAvatarTokensCallback(const GetKnownAvatarTokensCallback &cb);
547 Tp::AvatarTokenMap getKnownAvatarTokens(const Tp::UIntList &contacts, DBusError *error);
548
549 typedef Callback2<void, const Tp::UIntList &, DBusError*> RequestAvatarsCallback;
550 void setRequestAvatarsCallback(const RequestAvatarsCallback &cb);
551 void requestAvatars(const Tp::UIntList &contacts, DBusError *error);
552
553 typedef Callback3<QString, const QByteArray &, const QString &, DBusError*> SetAvatarCallback;
554 void setSetAvatarCallback(const SetAvatarCallback &cb);
555 QString setAvatar(const QByteArray &avatar, const QString &mimeType, DBusError *error);
556
557 typedef Callback1<void, DBusError*> ClearAvatarCallback;
558 void setClearAvatarCallback(const ClearAvatarCallback &cb);
559 void clearAvatar(DBusError *error);
560
561 void avatarUpdated(uint contact, const QString &newAvatarToken);
562 void avatarRetrieved(uint contact, const QString &token, const QByteArray &avatar, const QString &type);
563
564 protected:
565 BaseConnectionAvatarsInterface();
566
567 private:
568 void createAdaptor();
569
570 class Adaptee;
571 friend class Adaptee;
572 struct Private;
573 friend struct Private;
574 Private *mPriv;
575 };
576
577 class TP_QT_EXPORT BaseConnectionClientTypesInterface : public AbstractConnectionInterface
578 {
579 Q_OBJECT
580 Q_DISABLE_COPY(BaseConnectionClientTypesInterface)
581
582 public:
583 static BaseConnectionClientTypesInterfacePtr create()
584 {
585 return BaseConnectionClientTypesInterfacePtr(new BaseConnectionClientTypesInterface());
586 }
587 template<typename BaseConnectionClientTypesInterfaceSubclass>
588 static SharedPtr<BaseConnectionClientTypesInterfaceSubclass> create()
589 {
590 return SharedPtr<BaseConnectionClientTypesInterfaceSubclass>(
591 new BaseConnectionClientTypesInterfaceSubclass());
592 }
593
594 virtual ~BaseConnectionClientTypesInterface();
595
596 QVariantMap immutableProperties() const;
597
598 typedef Callback2<Tp::ContactClientTypes, const Tp::UIntList &, DBusError*> GetClientTypesCallback;
599 void setGetClientTypesCallback(const GetClientTypesCallback &cb);
600 Tp::ContactClientTypes getClientTypes(const Tp::UIntList &contacts, DBusError *error);
601
602 typedef Callback2<QStringList, uint, DBusError*> RequestClientTypesCallback;
603 void setRequestClientTypesCallback(const RequestClientTypesCallback &cb);
604 QStringList requestClientTypes(uint contact, DBusError *error);
605
606 void clientTypesUpdated(uint contact, const QStringList &clientTypes);
607
608 protected:
609 BaseConnectionClientTypesInterface();
610
611 private:
612 void createAdaptor();
613
614 class Adaptee;
615 friend class Adaptee;
616 struct Private;
617 friend struct Private;
618 Private *mPriv;
619 };
620
621 class TP_QT_EXPORT BaseConnectionContactCapabilitiesInterface : public AbstractConnectionInterface
622 {
623 Q_OBJECT
624 Q_DISABLE_COPY(BaseConnectionContactCapabilitiesInterface)
625
626 public:
627 static BaseConnectionContactCapabilitiesInterfacePtr create()
628 {
629 return BaseConnectionContactCapabilitiesInterfacePtr(new BaseConnectionContactCapabilitiesInterface());
630 }
631 template<typename BaseConnectionContactCapabilitiesInterfaceSubclass>
632 static SharedPtr<BaseConnectionContactCapabilitiesInterfaceSubclass> create()
633 {
634 return SharedPtr<BaseConnectionContactCapabilitiesInterfaceSubclass>(
635 new BaseConnectionContactCapabilitiesInterfaceSubclass());
636 }
637
638 virtual ~BaseConnectionContactCapabilitiesInterface();
639
640 QVariantMap immutableProperties() const;
641
642 typedef Callback2<void, const Tp::HandlerCapabilitiesList &, DBusError*> UpdateCapabilitiesCallback;
643 void setUpdateCapabilitiesCallback(const UpdateCapabilitiesCallback &cb);
644 void updateCapabilities(const Tp::HandlerCapabilitiesList &handlerCapabilities, DBusError *error);
645
646 typedef Callback2<Tp::ContactCapabilitiesMap, const Tp::UIntList &, DBusError*> GetContactCapabilitiesCallback;
647 void setGetContactCapabilitiesCallback(const GetContactCapabilitiesCallback &cb);
648 Tp::ContactCapabilitiesMap getContactCapabilities(const Tp::UIntList &handles, DBusError *error);
649
650 void contactCapabilitiesChanged(const Tp::ContactCapabilitiesMap &caps);
651
652 protected:
653 BaseConnectionContactCapabilitiesInterface();
654
655 private:
656 void createAdaptor();
657
658 class Adaptee;
659 friend class Adaptee;
660 struct Private;
661 friend struct Private;
662 Private *mPriv;
663 };
664
665 }
666
667 #endif
Tp::AvatarSpec
The AvatarSpec class represents a Telepathy avatar information supported by a protocol.
Definition: avatar.h:51
Tp::BaseConnectionContactInfoInterface::create
static SharedPtr< BaseConnectionContactInfoInterfaceSubclass > create()
Definition: base-connection.h:380
Tp::BaseConnectionContactsInterface::create
static BaseConnectionContactsInterfacePtr create()
Definition: base-connection.h:205
Tp::BaseConnectionContactCapabilitiesInterface::create
static BaseConnectionContactCapabilitiesInterfacePtr create()
Definition: base-connection.h:627
Tp::BaseConnectionAliasingInterface::GetAliasFlagsCallback
Callback1< Tp::ConnectionAliasFlags, DBusError * > GetAliasFlagsCallback
Definition: base-connection.h:490
Tp::SharedPtr
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
Tp::BaseConnectionContactListInterface::GetContactListAttributesCallback
Callback3< Tp::ContactAttributesMap, const QStringList &, bool, DBusError * > GetContactListAttributesCallback
Definition: base-connection.h:326
Tp::BaseConnection::InspectHandlesCallback
Callback3< QStringList, uint, const Tp::UIntList &, DBusError * > InspectHandlesCallback
Definition: base-connection.h:91
Tp::BaseConnectionContactListInterface::create
static BaseConnectionContactListInterfacePtr create()
Definition: base-connection.h:296
QByteArray
Tp::BaseConnectionContactInfoInterface::RefreshContactInfoCallback
Callback2< void, const Tp::UIntList &, DBusError * > RefreshContactInfoCallback
Definition: base-connection.h:400
Tp::BaseConnectionContactInfoInterface::RequestContactInfoCallback
Callback2< Tp::ContactInfoFieldList, uint, DBusError * > RequestContactInfoCallback
Definition: base-connection.h:404
Tp::AvatarTokenMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:274
Tp::BaseConnectionAddressingInterface::GetContactsByURICallback
Callback5< void, const QStringList &, const QStringList &, Tp::AddressingNormalizationMap &, Tp::ContactAttributesMap &, DBusError *> GetContactsByURICallback
Definition: base-connection.h:453
Tp::AliasMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:192
Tp::BaseConnectionAliasingInterface::RequestAliasesCallback
Callback2< QStringList, const Tp::UIntList &, DBusError * > RequestAliasesCallback
Definition: base-connection.h:494
Tp::BaseConnectionContactCapabilitiesInterface::GetContactCapabilitiesCallback
Callback2< Tp::ContactCapabilitiesMap, const Tp::UIntList &, DBusError * > GetContactCapabilitiesCallback
Definition: base-connection.h:646
Tp::AbstractDBusServiceInterface
Base class for D-Bus service interfaces.
Definition: dbus-service.h:73
Tp::Callback2< BaseChannelPtr, const QVariantMap &, DBusError * >
Tp::BaseConnectionClientTypesInterface::create
static SharedPtr< BaseConnectionClientTypesInterfaceSubclass > create()
Definition: base-connection.h:588
QDBusConnection
Tp::BaseConnection::RequestHandlesCallback
Callback3< Tp::UIntList, uint, const QStringList &, DBusError * > RequestHandlesCallback
Definition: base-connection.h:95
QDBusConnection::sessionBus
QDBusConnection sessionBus()
Tp::ContactCapabilitiesMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:3437
Tp::BaseConnectionContactListInterface::UnpublishCallback
Callback2< void, const Tp::UIntList &, DBusError * > UnpublishCallback
Definition: base-connection.h:346
Tp::BaseConnectionContactListInterface::AuthorizePublicationCallback
Callback2< void, const Tp::UIntList &, DBusError * > AuthorizePublicationCallback
Definition: base-connection.h:334
Tp::Callback6
Callback with 6 arguments.
Definition: callbacks.h:327
Tp::BaseConnection::ConnectCallback
Callback1< void, DBusError * > ConnectCallback
Definition: base-connection.h:88
Tp::BaseConnectionAliasingInterface::create
static BaseConnectionAliasingInterfacePtr create()
Definition: base-connection.h:475
Tp::BaseConnectionContactListInterface::UnsubscribeCallback
Callback2< void, const Tp::UIntList &, DBusError * > UnsubscribeCallback
Definition: base-connection.h:342
QDBusObjectPath
Tp::BaseConnectionSimplePresenceInterface::create
static SharedPtr< BaseConnectionSimplePresenceInterfaceSubclass > create()
Definition: base-connection.h:254
QFlags
Tp::HandleIdentifierMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:1655
Tp::BaseConnectionContactCapabilitiesInterface::UpdateCapabilitiesCallback
Callback2< void, const Tp::HandlerCapabilitiesList &, DBusError * > UpdateCapabilitiesCallback
Definition: base-connection.h:642
Tp::BaseConnectionSimplePresenceInterface
Base class for implementations of Connection.Interface.SimplePresence.
Definition: base-connection.h:243
Tp::BaseConnectionRequestsInterface::create
static BaseConnectionRequestsInterfacePtr create(BaseConnection *connection)
Definition: base-connection.h:163
Tp::AbstractConnectionInterface
Base class for all the Connection object interface implementations.
Definition: base-connection.h:137
Tp::BaseConnectionClientTypesInterface::create
static BaseConnectionClientTypesInterfacePtr create()
Definition: base-connection.h:583
Tp::BaseConnectionContactListInterface::create
static SharedPtr< BaseConnectionContactListInterfaceSubclass > create()
Definition: base-connection.h:301
Tp::BaseConnectionAvatarsInterface::create
static SharedPtr< BaseConnectionAvatarsInterfaceSubclass > create()
Definition: base-connection.h:532
Tp::BaseConnectionAvatarsInterface
Base class for implementations of Connection.Interface.Avatars.
Definition: base-connection.h:521
Tp::Callback3< QStringList, uint, const Tp::UIntList &, DBusError * >
Tp::DBusService
Base class for D-Bus services.
Definition: dbus-service.h:46
Tp::BaseConnectionContactInfoInterface
Base class for implementations of Connection.Interface.Contact.Info.
Definition: base-connection.h:369
Tp::BaseConnectionContactsInterface::GetContactAttributesCallback
Callback3< Tp::ContactAttributesMap, const Tp::UIntList &, const QStringList &, DBusError * > GetContactAttributesCallback
Definition: base-connection.h:223
Tp::DBusError
Small container class, containing a D-Bus error.
Definition: dbus-error.h:35
Tp::BaseConnectionAddressingInterface::GetContactsByVCardFieldCallback
Callback6< void, const QString &, const QStringList &, const QStringList &, Tp::AddressingNormalizationMap &, Tp::ContactAttributesMap &, DBusError *> GetContactsByVCardFieldCallback
Definition: base-connection.h:449
QString
QList
Tp::BaseConnectionRequestsInterface::create
static SharedPtr< BaseConnectionRequestsInterfaceSubclass > create(BaseConnection *connection)
Definition: base-connection.h:167
Tp::SimpleContactPresences
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:3836
QStringList
Tp::Callback1< void, DBusError * >
Tp::BaseConnectionAddressingInterface::create
static BaseConnectionAddressingInterfacePtr create()
Definition: base-connection.h:433
Tp::BaseConnectionRequestsInterface::requestableChannelClasses
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-connection.h:176
Tp::BaseConnectionContactCapabilitiesInterface
Base class for implementations of Connection.Interface.ContactCapabilities.
Definition: base-connection.h:621
Tp::BaseConnectionAliasingInterface::GetAliasesCallback
Callback2< Tp::AliasMap, const Tp::UIntList &, DBusError * > GetAliasesCallback
Definition: base-connection.h:498
Tp::BaseConnectionContactInfoInterface::create
static BaseConnectionContactInfoInterfacePtr create()
Definition: base-connection.h:375
Tp::BaseConnectionAvatarsInterface::ClearAvatarCallback
Callback1< void, DBusError * > ClearAvatarCallback
Definition: base-connection.h:557
Tp::ContactInfoMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:3468
Tp::BaseConnectionAddressingInterface::create
static SharedPtr< BaseConnectionAddressingInterfaceSubclass > create()
Definition: base-connection.h:437
Tp::BaseConnectionAvatarsInterface::RequestAvatarsCallback
Callback2< void, const Tp::UIntList &, DBusError * > RequestAvatarsCallback
Definition: base-connection.h:549
Tp::BaseConnectionContactsInterface
Base class for implementations of Connection.Interface.Contacts.
Definition: base-connection.h:199
Tp::BaseConnection::create
static BaseConnectionPtr create(const QString &cmName, const QString &protocolName, const QVariantMap &parameters, const QDBusConnection &dbusConnection=QDBusConnection::sessionBus())
Definition: base-connection.h:50
Tp::BaseConnectionAvatarsInterface::GetKnownAvatarTokensCallback
Callback2< Tp::AvatarTokenMap, const Tp::UIntList &, DBusError * > GetKnownAvatarTokensCallback
Definition: base-connection.h:545
Tp::BaseConnection
Base class for Connection implementations.
Definition: base-connection.h:44
Tp::Callback5
Callback with 5 arguments.
Definition: callbacks.h:290
Tp::BaseConnectionAvatarsInterface::create
static BaseConnectionAvatarsInterfacePtr create()
Definition: base-connection.h:527
Tp::BaseConnectionContactListInterface::RemoveContactsCallback
Callback2< void, const Tp::UIntList &, DBusError * > RemoveContactsCallback
Definition: base-connection.h:338
Tp::BaseConnectionClientTypesInterface::RequestClientTypesCallback
Callback2< QStringList, uint, DBusError * > RequestClientTypesCallback
Definition: base-connection.h:602
Tp::ContactSubscriptionMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:3514
Tp::BaseConnectionAliasingInterface
Base class for implementations of Connection.Interface.Aliasing.
Definition: base-connection.h:469
Tp::BaseConnectionContactListInterface::RequestSubscriptionCallback
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > RequestSubscriptionCallback
Definition: base-connection.h:330
Tp::BaseConnectionContactListInterface
Base class for implementations of Connection.Interface.ContactList.
Definition: base-connection.h:290
Tp::BaseConnectionAliasingInterface::create
static SharedPtr< BaseConnectionAliasingInterfaceSubclass > create()
Definition: base-connection.h:480
Tp::UIntList
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:107
Tp::BaseConnectionRequestsInterface
Base class for implementations of Connection.Interface.Requests.
Definition: base-connection.h:157
Tp::ContactAttributesMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:959
Tp::BaseConnection::CreateChannelCallback
Callback2< BaseChannelPtr, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-connection.h:84
Tp::BaseConnectionContactInfoInterface::GetContactInfoCallback
Callback2< Tp::ContactInfoMap, const Tp::UIntList &, DBusError * > GetContactInfoCallback
Definition: base-connection.h:396
Tp::BaseConnection::create
static SharedPtr< BaseConnectionSubclass > create(const QString &cmName, const QString &protocolName, const QVariantMap &parameters, const QDBusConnection &dbusConnection=QDBusConnection::sessionBus())
Definition: base-connection.h:58
Tp::BaseConnectionSimplePresenceInterface::create
static BaseConnectionSimplePresenceInterfacePtr create()
Definition: base-connection.h:249
Tp::BaseConnectionClientTypesInterface
Base class for implementations of Connection.Interface.ClientTypes.
Definition: base-connection.h:577
Tp::BaseConnectionContactsInterface::create
static SharedPtr< BaseConnectionContactsInterfaceSubclass > create()
Definition: base-connection.h:210
Tp::BaseConnectionContactCapabilitiesInterface::create
static SharedPtr< BaseConnectionContactCapabilitiesInterfaceSubclass > create()
Definition: base-connection.h:632
Tp::BaseConnectionContactInfoInterface::SetContactInfoCallback
Callback2< void, const Tp::ContactInfoFieldList &, DBusError * > SetContactInfoCallback
Definition: base-connection.h:408
Tp::BaseConnectionAddressingInterface
Base class for implementations of Connection.Interface.Addressing.
Definition: base-connection.h:427
Tp::BaseConnectionAvatarsInterface::SetAvatarCallback
Callback3< QString, const QByteArray &, const QString &, DBusError * > SetAvatarCallback
Definition: base-connection.h:553
Tp::AddressingNormalizationMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:170
Tp::BaseConnectionAliasingInterface::SetAliasesCallback
Callback2< void, const Tp::AliasMap &, DBusError * > SetAliasesCallback
Definition: base-connection.h:502
Tp::BaseConnectionContactListInterface::DownloadCallback
Callback1< void, DBusError * > DownloadCallback
Definition: base-connection.h:350
Tp::ContactClientTypes
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:1016
Tp::BaseConnectionSimplePresenceInterface::SetPresenceCallback
Callback3< uint, const QString &, const QString &, DBusError * > SetPresenceCallback
Definition: base-connection.h:270
Tp
Definition: abstract-adaptor.cpp:31
Tp::SimpleStatusSpecMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:3858
Tp::BaseConnectionClientTypesInterface::GetClientTypesCallback
Callback2< Tp::ContactClientTypes, const Tp::UIntList &, DBusError * > GetClientTypesCallback
Definition: base-connection.h:598