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

base-channel.h
1
22 #ifndef _TelepathyQt_base_channel_h_HEADER_GUARD_
23 #define _TelepathyQt_base_channel_h_HEADER_GUARD_
24
25 #ifndef IN_TP_QT_HEADER
26 #error IN_TP_QT_HEADER
27 #endif
28
29 #include <TelepathyQt/DBusService>
30 #include <TelepathyQt/Global>
31 #include <TelepathyQt/Types>
32 #include <TelepathyQt/Callbacks>
33 #include <TelepathyQt/Constants>
34
35 #include <QDBusConnection>
36
37 class QString;
38
39 namespace Tp
40 {
41
42 class TP_QT_EXPORT BaseChannel : public DBusService
43 {
44 Q_OBJECT
45 Q_DISABLE_COPY(BaseChannel)
46
47 public:
48 static BaseChannelPtr create(BaseConnection* connection, const QString &channelType,
49 uint targetHandle, uint targetHandleType) {
50 return BaseChannelPtr(new BaseChannel(QDBusConnection::sessionBus(), connection,
51 channelType, targetHandle, targetHandleType));
52 }
53
54 virtual ~BaseChannel();
55
56 QVariantMap immutableProperties() const;
57 bool registerObject(DBusError *error = NULL);
58 virtual QString uniqueName() const;
59
60 QString channelType() const;
61 QList<AbstractChannelInterfacePtr> interfaces() const;
62 AbstractChannelInterfacePtr interface(const QString &interfaceName) const;
63 uint targetHandle() const;
64 QString targetID() const;
65 uint targetHandleType() const;
66 bool requested() const;
67 uint initiatorHandle() const;
68 QString initiatorID() const;
69 Tp::ChannelDetails details() const;
70
71 void setInitiatorHandle(uint initiatorHandle);
72 void setInitiatorID(const QString &initiatorID);
73 void setTargetID(const QString &targetID);
74 void setRequested(bool requested);
75
76 void close();
77
78 bool plugInterface(const AbstractChannelInterfacePtr &interface);
79
80 Q_SIGNALS:
81 void closed();
82 protected:
83 BaseChannel(const QDBusConnection &dbusConnection, BaseConnection* connection,
84 const QString &channelType, uint targetHandle, uint targetHandleType);
85 virtual bool registerObject(const QString &busName, const QString &objectPath,
86 DBusError *error);
87 private:
88 class Adaptee;
89 friend class Adaptee;
90 class Private;
91 friend class Private;
92 Private *mPriv;
93 };
94
95 class TP_QT_EXPORT AbstractChannelInterface : public AbstractDBusServiceInterface
96 {
97 Q_OBJECT
98 Q_DISABLE_COPY(AbstractChannelInterface)
99
100 public:
101 AbstractChannelInterface(const QString &interfaceName);
102 virtual ~AbstractChannelInterface();
103
104 private:
105 friend class BaseChannel;
106
107 class Private;
108 friend class Private;
109 Private *mPriv;
110 };
111
112 class TP_QT_EXPORT BaseChannelTextType : public AbstractChannelInterface
113 {
114 Q_OBJECT
115 Q_DISABLE_COPY(BaseChannelTextType)
116
117 public:
118 static BaseChannelTextTypePtr create(BaseChannel* channel) {
119 return BaseChannelTextTypePtr(new BaseChannelTextType(channel));
120 }
121 template<typename BaseChannelTextTypeSubclass>
122 static SharedPtr<BaseChannelTextTypeSubclass> create(BaseChannel* channel) {
123 return SharedPtr<BaseChannelTextTypeSubclass>(
124 new BaseChannelTextTypeSubclass(channel));
125 }
126
127 typedef Callback2<QDBusObjectPath, const QVariantMap&, DBusError*> CreateChannelCallback;
128 CreateChannelCallback createChannel;
129
130 typedef Callback2<bool, const QVariantMap&, DBusError*> EnsureChannelCallback;
131 EnsureChannelCallback ensureChannel;
132
133 virtual ~BaseChannelTextType();
134
135 QVariantMap immutableProperties() const;
136
137 Tp::RequestableChannelClassList requestableChannelClasses;
138
139 typedef Callback1<void, QString> MessageAcknowledgedCallback;
140 void setMessageAcknowledgedCallback(const MessageAcknowledgedCallback &cb);
141
142 Tp::MessagePartListList pendingMessages();
143
144 /* Convenience function */
145 void addReceivedMessage(const Tp::MessagePartList &message);
146 private Q_SLOTS:
147 void sent(uint timestamp, uint type, QString text);
148 protected:
149 BaseChannelTextType(BaseChannel* channel);
150 void acknowledgePendingMessages(const Tp::UIntList &IDs, DBusError* error);
151
152 private:
153 void createAdaptor();
154
155 class Adaptee;
156 friend class Adaptee;
157 struct Private;
158 friend struct Private;
159 Private *mPriv;
160 };
161
162 class TP_QT_EXPORT BaseChannelMessagesInterface : public AbstractChannelInterface
163 {
164 Q_OBJECT
165 Q_DISABLE_COPY(BaseChannelMessagesInterface)
166
167 public:
168 static BaseChannelMessagesInterfacePtr create(BaseChannelTextType* textTypeInterface,
169 QStringList supportedContentTypes,
170 UIntList messageTypes,
171 uint messagePartSupportFlags,
172 uint deliveryReportingSupport) {
173 return BaseChannelMessagesInterfacePtr(new BaseChannelMessagesInterface(textTypeInterface,
174 supportedContentTypes,
175 messageTypes,
176 messagePartSupportFlags,
177 deliveryReportingSupport));
178 }
179 template<typename BaseChannelMessagesInterfaceSubclass>
180 static SharedPtr<BaseChannelMessagesInterfaceSubclass> create() {
181 return SharedPtr<BaseChannelMessagesInterfaceSubclass>(
182 new BaseChannelMessagesInterfaceSubclass());
183 }
184 virtual ~BaseChannelMessagesInterface();
185
186 QVariantMap immutableProperties() const;
187
188 QStringList supportedContentTypes();
189 Tp::UIntList messageTypes();
190 uint messagePartSupportFlags();
191 uint deliveryReportingSupport();
192 Tp::MessagePartListList pendingMessages();
193
194 void messageSent(const Tp::MessagePartList &content, uint flags, const QString &messageToken);
195
196 typedef Callback3<QString, const Tp::MessagePartList&, uint, DBusError*> SendMessageCallback;
197 void setSendMessageCallback(const SendMessageCallback &cb);
198 protected:
199 QString sendMessage(const Tp::MessagePartList &message, uint flags, DBusError* error);
200 private Q_SLOTS:
201 void pendingMessagesRemoved(const Tp::UIntList &messageIDs);
202 void messageReceived(const Tp::MessagePartList &message);
203 private:
204 BaseChannelMessagesInterface(BaseChannelTextType* textType,
205 QStringList supportedContentTypes,
206 Tp::UIntList messageTypes,
207 uint messagePartSupportFlags,
208 uint deliveryReportingSupport);
209 void createAdaptor();
210
211 class Adaptee;
212 friend class Adaptee;
213 struct Private;
214 friend struct Private;
215 Private *mPriv;
216 };
217
218 class TP_QT_EXPORT BaseChannelServerAuthenticationType : public AbstractChannelInterface
219 {
220 Q_OBJECT
221 Q_DISABLE_COPY(BaseChannelServerAuthenticationType)
222
223 public:
224 static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod) {
225 return BaseChannelServerAuthenticationTypePtr(new BaseChannelServerAuthenticationType(authenticationMethod));
226 }
227 template<typename BaseChannelServerAuthenticationTypeSubclass>
228 static SharedPtr<BaseChannelServerAuthenticationTypeSubclass> create(const QString &authenticationMethod) {
229 return SharedPtr<BaseChannelServerAuthenticationTypeSubclass>(
230 new BaseChannelServerAuthenticationTypeSubclass(authenticationMethod));
231 }
232 virtual ~BaseChannelServerAuthenticationType();
233
234 QVariantMap immutableProperties() const;
235 private Q_SLOTS:
236 private:
237 BaseChannelServerAuthenticationType(const QString &authenticationMethod);
238 void createAdaptor();
239
240 class Adaptee;
241 friend class Adaptee;
242 struct Private;
243 friend struct Private;
244 Private *mPriv;
245 };
246
247 class TP_QT_EXPORT BaseChannelCaptchaAuthenticationInterface : public AbstractChannelInterface
248 {
249 Q_OBJECT
250 Q_DISABLE_COPY(BaseChannelCaptchaAuthenticationInterface)
251
252 public:
253 static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha) {
254 return BaseChannelCaptchaAuthenticationInterfacePtr(new BaseChannelCaptchaAuthenticationInterface(canRetryCaptcha));
255 }
256 template<typename BaseChannelCaptchaAuthenticationInterfaceSubclass>
257 static SharedPtr<BaseChannelCaptchaAuthenticationInterfaceSubclass> create(bool canRetryCaptcha) {
258 return SharedPtr<BaseChannelCaptchaAuthenticationInterfaceSubclass>(
259 new BaseChannelCaptchaAuthenticationInterfaceSubclass(canRetryCaptcha));
260 }
261 virtual ~BaseChannelCaptchaAuthenticationInterface();
262
263 QVariantMap immutableProperties() const;
264
265 typedef Callback4<void, Tp::CaptchaInfoList&, uint&, QString&, DBusError*> GetCaptchasCallback;
266 void setGetCaptchasCallback(const GetCaptchasCallback &cb);
267
268 typedef Callback3<QByteArray, uint, const QString&, DBusError*> GetCaptchaDataCallback;
269 void setGetCaptchaDataCallback(const GetCaptchaDataCallback &cb);
270
271 typedef Callback2<void, const Tp::CaptchaAnswers&, DBusError*> AnswerCaptchasCallback;
272 void setAnswerCaptchasCallback(const AnswerCaptchasCallback &cb);
273
274 typedef Callback3<void, uint, const QString&, DBusError*> CancelCaptchaCallback;
275 void setCancelCaptchaCallback(const CancelCaptchaCallback &cb);
276
277 void setCaptchaStatus(uint status);
278 void setCaptchaError(const QString &busName);
279 void setCaptchaErrorDetails(const QVariantMap &error);
280 private Q_SLOTS:
281 private:
282 BaseChannelCaptchaAuthenticationInterface(bool canRetryCaptcha);
283 void createAdaptor();
284
285 class Adaptee;
286 friend class Adaptee;
287 struct Private;
288 friend struct Private;
289 Private *mPriv;
290 };
291
292 class TP_QT_EXPORT BaseChannelSASLAuthenticationInterface : public AbstractChannelInterface
293 {
294 Q_OBJECT
295 Q_DISABLE_COPY(BaseChannelSASLAuthenticationInterface)
296
297 public:
298 static BaseChannelSASLAuthenticationInterfacePtr create(const QStringList &availableMechanisms,
299 bool hasInitialData,
300 bool canTryAgain,
301 const QString &authorizationIdentity,
302 const QString &defaultUsername,
303 const QString &defaultRealm,
304 bool maySaveResponse)
305 {
306 return BaseChannelSASLAuthenticationInterfacePtr(new BaseChannelSASLAuthenticationInterface(availableMechanisms,
307 hasInitialData,
308 canTryAgain,
309 authorizationIdentity,
310 defaultUsername,
311 defaultRealm,
312 maySaveResponse));
313 }
314 template<typename BaseChannelSASLAuthenticationInterfaceSubclass>
315 static SharedPtr<BaseChannelSASLAuthenticationInterfaceSubclass> create(const QStringList &availableMechanisms,
316 bool hasInitialData,
317 bool canTryAgain,
318 const QString &authorizationIdentity,
319 const QString &defaultUsername,
320 const QString &defaultRealm,
321 bool maySaveResponse)
322 {
323 return SharedPtr<BaseChannelSASLAuthenticationInterfaceSubclass>(
324 new BaseChannelSASLAuthenticationInterfaceSubclass(availableMechanisms,
325 hasInitialData,
326 canTryAgain,
327 authorizationIdentity,
328 defaultUsername,
329 defaultRealm,
330 maySaveResponse));
331 }
332
333 virtual ~BaseChannelSASLAuthenticationInterface();
334
335 QVariantMap immutableProperties() const;
336
337 QStringList availableMechanisms() const;
338 bool hasInitialData() const;
339 bool canTryAgain() const;
340 QString authorizationIdentity() const;
341 QString defaultUsername() const;
342 QString defaultRealm() const;
343 bool maySaveResponse() const;
344
345 uint saslStatus() const;
346 void setSaslStatus(uint status, const QString &reason, const QVariantMap &details);
347
348 QString saslError() const;
349 void setSaslError(const QString &saslError);
350
351 QVariantMap saslErrorDetails() const;
352 void setSaslErrorDetails(const QVariantMap &saslErrorDetails);
353
354 typedef Callback2<void, const QString &, DBusError*> StartMechanismCallback;
355 void setStartMechanismCallback(const StartMechanismCallback &cb);
356 void startMechanism(const QString &mechanism, DBusError *error);
357
358 typedef Callback3<void, const QString &, const QByteArray &, DBusError*> StartMechanismWithDataCallback;
359 void setStartMechanismWithDataCallback(const StartMechanismWithDataCallback &cb);
360 void startMechanismWithData(const QString &mechanism, const QByteArray &initialData, DBusError *error);
361
362 typedef Callback2<void, const QByteArray &, DBusError*> RespondCallback;
363 void setRespondCallback(const RespondCallback &cb);
364 void respond(const QByteArray &responseData, DBusError *error);
365
366 typedef Callback1<void, DBusError*> AcceptSASLCallback;
367 void setAcceptSaslCallback(const AcceptSASLCallback &cb);
368 void acceptSasl(DBusError *error);
369
370 typedef Callback3<void, uint, const QString &, DBusError*> AbortSASLCallback;
371 void setAbortSaslCallback(const AbortSASLCallback &cb);
372 void abortSasl(uint reason, const QString &debugMessage, DBusError *error);
373
374 void newChallenge(const QByteArray &challengeData);
375
376 protected:
377 BaseChannelSASLAuthenticationInterface(const QStringList &availableMechanisms,
378 bool hasInitialData,
379 bool canTryAgain,
380 const QString &authorizationIdentity,
381 const QString &defaultUsername,
382 const QString &defaultRealm,
383 bool maySaveResponse);
384
385 private:
386 void createAdaptor();
387
388 class Adaptee;
389 friend class Adaptee;
390 struct Private;
391 friend struct Private;
392 Private *mPriv;
393 };
394
395 class TP_QT_EXPORT BaseChannelSecurableInterface : public AbstractChannelInterface
396 {
397 Q_OBJECT
398 Q_DISABLE_COPY(BaseChannelSecurableInterface)
399
400 public:
401 static BaseChannelSecurableInterfacePtr create()
402 {
403 return BaseChannelSecurableInterfacePtr(new BaseChannelSecurableInterface());
404 }
405 template<typename BaseChannelSecurableInterfaceSubclass>
406 static SharedPtr<BaseChannelSecurableInterfaceSubclass> create()
407 {
408 return SharedPtr<BaseChannelSecurableInterfaceSubclass>(
409 new BaseChannelSecurableInterfaceSubclass());
410 }
411
412 virtual ~BaseChannelSecurableInterface();
413
414 QVariantMap immutableProperties() const;
415
416 bool encrypted() const;
417 void setEncrypted(bool encrypted);
418
419 bool verified() const;
420 void setVerified(bool verified);
421
422 protected:
423 BaseChannelSecurableInterface();
424
425 private:
426 void createAdaptor();
427
428 class Adaptee;
429 friend class Adaptee;
430 struct Private;
431 friend struct Private;
432 Private *mPriv;
433 };
434
435 class TP_QT_EXPORT BaseChannelChatStateInterface : public AbstractChannelInterface
436 {
437 Q_OBJECT
438 Q_DISABLE_COPY(BaseChannelChatStateInterface)
439
440 public:
441 static BaseChannelChatStateInterfacePtr create()
442 {
443 return BaseChannelChatStateInterfacePtr(new BaseChannelChatStateInterface());
444 }
445 template<typename BaseChannelChatStateInterfaceSubclass>
446 static SharedPtr<BaseChannelChatStateInterfaceSubclass> create()
447 {
448 return SharedPtr<BaseChannelChatStateInterfaceSubclass>(
449 new BaseChannelChatStateInterfaceSubclass());
450 }
451
452 virtual ~BaseChannelChatStateInterface();
453
454 QVariantMap immutableProperties() const;
455
456 Tp::ChatStateMap chatStates() const;
457 void setChatStates(const Tp::ChatStateMap &chatStates);
458
459 typedef Callback2<void, uint, DBusError*> SetChatStateCallback;
460 void setSetChatStateCallback(const SetChatStateCallback &cb);
461 void setChatState(uint state, DBusError *error);
462
463 void chatStateChanged(uint contact, uint state);
464
465 protected:
466 BaseChannelChatStateInterface();
467
468 private:
469 void createAdaptor();
470
471 class Adaptee;
472 friend class Adaptee;
473 struct Private;
474 friend struct Private;
475 Private *mPriv;
476 };
477
478 class TP_QT_EXPORT BaseChannelGroupInterface : public AbstractChannelInterface
479 {
480 Q_OBJECT
481 Q_DISABLE_COPY(BaseChannelGroupInterface)
482
483 public:
484 static BaseChannelGroupInterfacePtr create(ChannelGroupFlags initialFlags, uint selfHandle) {
485 return BaseChannelGroupInterfacePtr(new BaseChannelGroupInterface(initialFlags, selfHandle));
486 }
487 template<typename BaseChannelGroupInterfaceSubclass>
488 static SharedPtr<BaseChannelGroupInterfaceSubclass> create(ChannelGroupFlags initialFlags, uint selfHandle) {
489 return SharedPtr<BaseChannelGroupInterfaceSubclass>(
490 new BaseChannelGroupInterfaceSubclass(initialFlags, selfHandle));
491 }
492 virtual ~BaseChannelGroupInterface();
493
494 QVariantMap immutableProperties() const;
495
496 typedef Callback3<void, const Tp::UIntList&, const QString&, DBusError*> RemoveMembersCallback;
497 void setRemoveMembersCallback(const RemoveMembersCallback &cb);
498
499 typedef Callback3<void, const Tp::UIntList&, const QString&, DBusError*> AddMembersCallback;
500 void setAddMembersCallback(const AddMembersCallback &cb);
501
502 /* Adds a contact to this group. No-op if already in this group */
503 void addMembers(const Tp::UIntList &handles, const QStringList &identifiers);
504 void removeMembers(const Tp::UIntList &handles);
505
506 private Q_SLOTS:
507 private:
508 BaseChannelGroupInterface(ChannelGroupFlags initialFlags, uint selfHandle);
509 void createAdaptor();
510
511 class Adaptee;
512 friend class Adaptee;
513 struct Private;
514 friend struct Private;
515 Private *mPriv;
516 };
517
518 class TP_QT_EXPORT BaseChannelCallType : public AbstractChannelInterface
519 {
520 Q_OBJECT
521 Q_DISABLE_COPY(BaseChannelCallType)
522
523 public:
524 static BaseChannelCallTypePtr create(BaseChannel* channel, bool hardwareStreaming,
525 uint initialTransport,
526 bool initialAudio,
527 bool initialVideo,
528 QString initialAudioName,
529 QString initialVideoName,
530 bool mutableContents = false) {
531 return BaseChannelCallTypePtr(new BaseChannelCallType(channel,
532 hardwareStreaming,
533 initialTransport,
534 initialAudio,
535 initialVideo,
536 initialAudioName,
537 initialVideoName,
538 mutableContents));
539 }
540 template<typename BaseChannelCallTypeSubclass>
541 static SharedPtr<BaseChannelCallTypeSubclass> create(BaseChannel* channel, bool hardwareStreaming,
542 uint initialTransport,
543 bool initialAudio,
544 bool initialVideo,
545 QString initialAudioName,
546 QString initialVideoName,
547 bool mutableContents = false) {
548 return SharedPtr<BaseChannelCallTypeSubclass>(
549 new BaseChannelCallTypeSubclass(channel,
550 hardwareStreaming,
551 initialTransport,
552 initialAudio,
553 initialVideo,
554 initialAudioName,
555 initialVideoName,
556 mutableContents));
557 }
558
559 typedef Callback2<QDBusObjectPath, const QVariantMap&, DBusError*> CreateChannelCallback;
560 CreateChannelCallback createChannel;
561
562 typedef Callback2<bool, const QVariantMap&, DBusError*> EnsureChannelCallback;
563 EnsureChannelCallback ensureChannel;
564
565 virtual ~BaseChannelCallType();
566
567 QVariantMap immutableProperties() const;
568
569 Tp::ObjectPathList contents();
570 QVariantMap callStateDetails();
571 uint callState();
572 uint callFlags();
573 Tp::CallStateReason callStateReason();
574 bool hardwareStreaming();
575 Tp::CallMemberMap callMembers();
576 Tp::HandleIdentifierMap memberIdentifiers();
577 uint initialTransport();
578 bool initialAudio();
579 bool initialVideo();
580 QString initialAudioName();
581 QString initialVideoName();
582 bool mutableContents();
583
584 typedef Callback1<void, DBusError*> AcceptCallback;
585 void setAcceptCallback(const AcceptCallback &cb);
586
587 typedef Callback4<void, uint, const QString &, const QString &, DBusError*> HangupCallback;
588 void setHangupCallback(const HangupCallback &cb);
589
590 typedef Callback1<void, DBusError*> SetRingingCallback;
591 void setSetRingingCallback(const SetRingingCallback &cb);
592
593 typedef Callback1<void, DBusError*> SetQueuedCallback;
594 void setSetQueuedCallback(const SetQueuedCallback &cb);
595
596 typedef Callback4<QDBusObjectPath, const QString&, const Tp::MediaStreamType&, const Tp::MediaStreamDirection&, DBusError*> AddContentCallback;
597 void setAddContentCallback(const AddContentCallback &cb);
598
599 void setCallState(const Tp::CallState &state, uint flags, const Tp::CallStateReason &stateReason, const QVariantMap &callStateDetails);
600 void setMembersFlags(const Tp::CallMemberMap &flagsChanged, const Tp::HandleIdentifierMap &identifiers, const Tp::UIntList &removed, const Tp::CallStateReason &reason);
601 BaseCallContentPtr addContent(const QString &name, const Tp::MediaStreamType &type, const Tp::MediaStreamDirection &direction);
602 void addContent(BaseCallContentPtr content);
603
604 Tp::RequestableChannelClassList requestableChannelClasses;
605
606 protected:
607 BaseChannelCallType(BaseChannel* channel,
608 bool hardwareStreaming,
609 uint initialTransport,
610 bool initialAudio,
611 bool initialVideo,
612 QString initialAudioName,
613 QString initialVideoName,
614 bool mutableContents = false);
615
616 private:
617 void createAdaptor();
618
619 class Adaptee;
620 friend class Adaptee;
621 struct Private;
622 friend struct Private;
623 Private *mPriv;
624 };
625
626 class TP_QT_EXPORT BaseChannelHoldInterface : public AbstractChannelInterface
627 {
628 Q_OBJECT
629 Q_DISABLE_COPY(BaseChannelHoldInterface)
630
631 public:
632 static BaseChannelHoldInterfacePtr create() {
633 return BaseChannelHoldInterfacePtr(new BaseChannelHoldInterface());
634 }
635 template<typename BaseChannelHoldInterfaceSubclass>
636 static SharedPtr<BaseChannelHoldInterfaceSubclass> create() {
637 return SharedPtr<BaseChannelHoldInterfaceSubclass>(
638 new BaseChannelHoldInterfaceSubclass());
639 }
640 virtual ~BaseChannelHoldInterface();
641
642 QVariantMap immutableProperties() const;
643
644 Tp::LocalHoldState getHoldState() const;
645 Tp::LocalHoldStateReason getHoldReason() const;
646 void setHoldState(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason);
647
648 typedef Callback3<void, const Tp::LocalHoldState&, const Tp::LocalHoldStateReason &, DBusError*> SetHoldStateCallback;
649 void setSetHoldStateCallback(const SetHoldStateCallback &cb);
650 Q_SIGNALS:
651 void holdStateChanged(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason);
652 private:
653 BaseChannelHoldInterface();
654 void createAdaptor();
655
656 class Adaptee;
657 friend class Adaptee;
658 struct Private;
659 friend struct Private;
660 Private *mPriv;
661 };
662
663 class TP_QT_EXPORT BaseChannelMergeableConferenceInterface : public AbstractChannelInterface
664 {
665 Q_OBJECT
666 Q_DISABLE_COPY(BaseChannelMergeableConferenceInterface)
667
668 public:
669 static BaseChannelMergeableConferenceInterfacePtr create() {
670 return BaseChannelMergeableConferenceInterfacePtr(new BaseChannelMergeableConferenceInterface());
671 }
672 template<typename BaseChannelMergeableConferenceInterfaceSubclass>
673 static SharedPtr<BaseChannelMergeableConferenceInterfaceSubclass> create() {
674 return SharedPtr<BaseChannelMergeableConferenceInterfaceSubclass>(
675 new BaseChannelMergeableConferenceInterfaceSubclass());
676 }
677 virtual ~BaseChannelMergeableConferenceInterface();
678
679 QVariantMap immutableProperties() const;
680
681 void merge(const QDBusObjectPath &channel);
682
683 typedef Callback2<void, const QDBusObjectPath&, DBusError*> MergeCallback;
684 void setMergeCallback(const MergeCallback &cb);
685 private:
686 BaseChannelMergeableConferenceInterface();
687 void createAdaptor();
688
689 class Adaptee;
690 friend class Adaptee;
691 struct Private;
692 friend struct Private;
693 Private *mPriv;
694 };
695
696 class TP_QT_EXPORT BaseChannelSplittableInterface : public AbstractChannelInterface
697 {
698 Q_OBJECT
699 Q_DISABLE_COPY(BaseChannelSplittableInterface)
700
701 public:
702 static BaseChannelSplittableInterfacePtr create() {
703 return BaseChannelSplittableInterfacePtr(new BaseChannelSplittableInterface());
704 }
705 template<typename BaseChannelSplittableInterfaceSubclass>
706 static SharedPtr<BaseChannelSplittableInterfaceSubclass> create() {
707 return SharedPtr<BaseChannelSplittableInterfaceSubclass>(
708 new BaseChannelSplittableInterfaceSubclass());
709 }
710 virtual ~BaseChannelSplittableInterface();
711
712 QVariantMap immutableProperties() const;
713
714 void split();
715
716 typedef Callback1<void, DBusError*> SplitCallback;
717 void setSplitCallback(const SplitCallback &cb);
718 private:
719 BaseChannelSplittableInterface();
720 void createAdaptor();
721
722 class Adaptee;
723 friend class Adaptee;
724 struct Private;
725 friend struct Private;
726 Private *mPriv;
727 };
728
729 class TP_QT_EXPORT BaseChannelConferenceInterface : public AbstractChannelInterface
730 {
731 Q_OBJECT
732 Q_DISABLE_COPY(BaseChannelConferenceInterface)
733
734 public:
735 static BaseChannelConferenceInterfacePtr create(Tp::ObjectPathList initialChannels = Tp::ObjectPathList(),
736 Tp::UIntList initialInviteeHandles = Tp::UIntList(),
737 QStringList initialInviteeIDs = QStringList(),
738 QString invitationMessage = QString(),
739 ChannelOriginatorMap originalChannels = ChannelOriginatorMap()) {
740 return BaseChannelConferenceInterfacePtr(new BaseChannelConferenceInterface(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
741 }
742 template<typename BaseChannelConferenceInterfaceSubclass>
743 static SharedPtr<BaseChannelConferenceInterfaceSubclass> create(Tp::ObjectPathList initialChannels = Tp::ObjectPathList(),
744 Tp::UIntList initialInviteeHandles = Tp::UIntList(),
745 QStringList initialInviteeIDs = QStringList(),
746 QString invitationMessage = QString(),
747 ChannelOriginatorMap originalChannels = ChannelOriginatorMap()) {
748 return SharedPtr<BaseChannelConferenceInterfaceSubclass>(
749 new BaseChannelConferenceInterfaceSubclass(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
750 }
751 virtual ~BaseChannelConferenceInterface();
752
753 QVariantMap immutableProperties() const;
754 Tp::ObjectPathList channels() const;
755 Tp::ObjectPathList initialChannels() const;
756 Tp::UIntList initialInviteeHandles() const;
757 QStringList initialInviteeIDs() const;
758 QString invitationMessage() const;
759 ChannelOriginatorMap originalChannels() const;
760
761 void mergeChannel(const QDBusObjectPath &channel, uint channelHandle, const QVariantMap &properties);
762 void removeChannel(const QDBusObjectPath &channel, const QVariantMap &details);
763
764 private:
765 BaseChannelConferenceInterface(Tp::ObjectPathList initialChannels, Tp::UIntList initialInviteeHandles, QStringList initialInviteeIDs, QString invitationMessage, ChannelOriginatorMap originalChannels);
766 void createAdaptor();
767
768 class Adaptee;
769 friend class Adaptee;
770 struct Private;
771 friend struct Private;
772 Private *mPriv;
773 };
774
775 class TP_QT_EXPORT BaseChannelSMSInterface : public AbstractChannelInterface
776 {
777 Q_OBJECT
778 Q_DISABLE_COPY(BaseChannelSMSInterface)
779
780 public:
781 static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel) {
782 return BaseChannelSMSInterfacePtr(new BaseChannelSMSInterface(flash, smsChannel));
783 }
784 template<typename BaseChannelSMSInterfaceSubclass>
785 static SharedPtr<BaseChannelSMSInterfaceSubclass> create(bool flash, bool smsChannel) {
786 return SharedPtr<BaseChannelSMSInterfaceSubclass>(
787 new BaseChannelSMSInterfaceSubclass(flash, smsChannel));
788 }
789 virtual ~BaseChannelSMSInterface();
790
791 QVariantMap immutableProperties() const;
792
793 typedef Callback2<void, const Tp::MessagePartList &, DBusError*> GetSMSLengthCallback;
794 void setGetSMSLengthCallback(const GetSMSLengthCallback &cb);
795
796 bool flash() const;
797 bool smsChannel() const;
798
799 Q_SIGNALS:
800 void smsChannelChanged(bool smsChannel);
801
802 private:
803 BaseChannelSMSInterface(bool flash, bool smsChannel);
804 void createAdaptor();
805
806 class Adaptee;
807 friend class Adaptee;
808 struct Private;
809 friend struct Private;
810 Private *mPriv;
811 };
812
813 }
814 #endif
Tp::ChannelOriginatorMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:885
Tp::BaseChannelCallType::create
static BaseChannelCallTypePtr create(BaseChannel *channel, bool hardwareStreaming, uint initialTransport, bool initialAudio, bool initialVideo, QString initialAudioName, QString initialVideoName, bool mutableContents=false)
Definition: base-channel.h:524
Tp::BaseChannelTextType
Base class for implementations of Channel.Type.Text.
Definition: base-channel.h:112
Tp::BaseChannelSASLAuthenticationInterface::StartMechanismWithDataCallback
Callback3< void, const QString &, const QByteArray &, DBusError * > StartMechanismWithDataCallback
Definition: base-channel.h:358
Tp::BaseChannelTextType::requestableChannelClasses
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:137
Tp
Definition: abstract-adaptor.cpp:31
Tp::BaseChannelCallType::createChannel
CreateChannelCallback createChannel
Definition: base-channel.h:560
Tp::BaseChannelHoldInterface::SetHoldStateCallback
Callback3< void, const Tp::LocalHoldState &, const Tp::LocalHoldStateReason &, DBusError * > SetHoldStateCallback
Definition: base-channel.h:648
Tp::BaseChannelCallType::AddContentCallback
Callback4< QDBusObjectPath, const QString &, const Tp::MediaStreamType &, const Tp::MediaStreamDirection &, DBusError * > AddContentCallback
Definition: base-channel.h:596
Tp::BaseChannelCaptchaAuthenticationInterface::AnswerCaptchasCallback
Callback2< void, const Tp::CaptchaAnswers &, DBusError * > AnswerCaptchasCallback
Definition: base-channel.h:271
QByteArray
Tp::BaseChannelSplittableInterface::create
static BaseChannelSplittableInterfacePtr create()
Definition: base-channel.h:702
Tp::BaseChannelGroupInterface::create
static SharedPtr< BaseChannelGroupInterfaceSubclass > create(ChannelGroupFlags initialFlags, uint selfHandle)
Definition: base-channel.h:488
Tp::BaseChannelMergeableConferenceInterface
Base class for implementations of Channel.Interface.MergeableConference.
Definition: base-channel.h:663
Tp::BaseChannelSMSInterface::GetSMSLengthCallback
Callback2< void, const Tp::MessagePartList &, DBusError * > GetSMSLengthCallback
Definition: base-channel.h:793
Tp::Callback2< QDBusObjectPath, const QVariantMap &, DBusError * >
Tp::BaseChannelGroupInterface
Base class for implementations of Channel.Interface.Group.
Definition: base-channel.h:478
Tp::BaseChannelCaptchaAuthenticationInterface::GetCaptchaDataCallback
Callback3< QByteArray, uint, const QString &, DBusError * > GetCaptchaDataCallback
Definition: base-channel.h:268
Tp::BaseChannelSecurableInterface::create
static SharedPtr< BaseChannelSecurableInterfaceSubclass > create()
Definition: base-channel.h:406
Tp::BaseChannelGroupInterface::AddMembersCallback
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > AddMembersCallback
Definition: base-channel.h:499
Tp::BaseChannelServerAuthenticationType::create
static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod)
Definition: base-channel.h:224
Tp::BaseChannelCallType::HangupCallback
Callback4< void, uint, const QString &, const QString &, DBusError * > HangupCallback
Definition: base-channel.h:587
Tp::BaseChannelCallType::CreateChannelCallback
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:559
Tp::BaseChannelMergeableConferenceInterface::MergeCallback
Callback2< void, const QDBusObjectPath &, DBusError * > MergeCallback
Definition: base-channel.h:683
QDBusConnection
Tp::BaseChannelTextType::ensureChannel
EnsureChannelCallback ensureChannel
Definition: base-channel.h:131
QDBusConnection::sessionBus
QDBusConnection sessionBus()
Tp::ChatStateMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:907
Tp::CallMemberMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:287
Tp::BaseChannelMessagesInterface::SendMessageCallback
Callback3< QString, const Tp::MessagePartList &, uint, DBusError * > SendMessageCallback
Definition: base-channel.h:196
Tp::BaseChannelSASLAuthenticationInterface::AbortSASLCallback
Callback3< void, uint, const QString &, DBusError * > AbortSASLCallback
Definition: base-channel.h:370
Tp::BaseChannelCaptchaAuthenticationInterface::CancelCaptchaCallback
Callback3< void, uint, const QString &, DBusError * > CancelCaptchaCallback
Definition: base-channel.h:274
Tp::BaseChannel
Base class for channel implementations.
Definition: base-channel.h:42
Tp::AbstractDBusServiceInterface
Base class for D-Bus service interfaces.
Definition: dbus-service.h:73
Tp::BaseChannelSMSInterface::create
static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel)
Definition: base-channel.h:781
Tp::BaseChannelCallType::create
static SharedPtr< BaseChannelCallTypeSubclass > create(BaseChannel *channel, bool hardwareStreaming, uint initialTransport, bool initialAudio, bool initialVideo, QString initialAudioName, QString initialVideoName, bool mutableContents=false)
Definition: base-channel.h:541
Tp::BaseChannelChatStateInterface
Base class for implementations of Channel.Interface.Chat.State.
Definition: base-channel.h:435
Tp::BaseChannelSecurableInterface
Base class for implementations of Channel.Interface.Securable.
Definition: base-channel.h:395
QDBusObjectPath
Tp::LocalHoldState
LocalHoldState
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:3466
QFlags
Tp::BaseChannelTextType::CreateChannelCallback
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:127
Tp::BaseChannelSASLAuthenticationInterface::RespondCallback
Callback2< void, const QByteArray &, DBusError * > RespondCallback
Definition: base-channel.h:362
Tp::BaseChannelCallType::EnsureChannelCallback
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:562
Tp::BaseChannelConferenceInterface::create
static SharedPtr< BaseChannelConferenceInterfaceSubclass > create(Tp::ObjectPathList initialChannels=Tp::ObjectPathList(), Tp::UIntList initialInviteeHandles=Tp::UIntList(), QStringList initialInviteeIDs=QStringList(), QString invitationMessage=QString(), ChannelOriginatorMap originalChannels=ChannelOriginatorMap())
Definition: base-channel.h:743
Tp::CallState
CallState
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2286
Tp::BaseChannelTextType::create
static BaseChannelTextTypePtr create(BaseChannel *channel)
Definition: base-channel.h:118
Tp::BaseChannelSplittableInterface
Base class for implementations of Channel.Interface.Splittable.
Definition: base-channel.h:696
Tp::AbstractChannelInterface
Base class for all the Channel object interface implementations.
Definition: base-channel.h:95
Tp::BaseChannelCallType::AcceptCallback
Callback1< void, DBusError * > AcceptCallback
Definition: base-channel.h:584
Tp::BaseChannelMessagesInterface::create
static BaseChannelMessagesInterfacePtr create(BaseChannelTextType *textTypeInterface, QStringList supportedContentTypes, UIntList messageTypes, uint messagePartSupportFlags, uint deliveryReportingSupport)
Definition: base-channel.h:168
Tp::MediaStreamDirection
MediaStreamDirection
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2777
Tp::BaseChannelConferenceInterface
Base class for implementations of Channel.Interface.Conference.
Definition: base-channel.h:729
Tp::BaseChannelSplittableInterface::SplitCallback
Callback1< void, DBusError * > SplitCallback
Definition: base-channel.h:716
Tp::BaseChannelTextType::create
static SharedPtr< BaseChannelTextTypeSubclass > create(BaseChannel *channel)
Definition: base-channel.h:122
Tp::BaseChannelCallType::requestableChannelClasses
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:604
Tp::Callback1< void, QString >
Tp::BaseChannelMergeableConferenceInterface::create
static SharedPtr< BaseChannelMergeableConferenceInterfaceSubclass > create()
Definition: base-channel.h:673
Tp::BaseChannelHoldInterface::create
static BaseChannelHoldInterfacePtr create()
Definition: base-channel.h:632
Tp::BaseChannelChatStateInterface::SetChatStateCallback
Callback2< void, uint, DBusError * > SetChatStateCallback
Definition: base-channel.h:459
QString
QList
Tp::BaseChannelCallType::SetQueuedCallback
Callback1< void, DBusError * > SetQueuedCallback
Definition: base-channel.h:593
Tp::BaseChannelSASLAuthenticationInterface
Base class for implementations of Channel.Interface.SASLAuthentication.
Definition: base-channel.h:292
Tp::BaseChannelTextType::createChannel
CreateChannelCallback createChannel
Definition: base-channel.h:128
QStringList
Tp::Callback4< void, Tp::CaptchaInfoList &, uint &, QString &, DBusError * >
Tp::BaseChannelConferenceInterface::create
static BaseChannelConferenceInterfacePtr create(Tp::ObjectPathList initialChannels=Tp::ObjectPathList(), Tp::UIntList initialInviteeHandles=Tp::UIntList(), QStringList initialInviteeIDs=QStringList(), QString invitationMessage=QString(), ChannelOriginatorMap originalChannels=ChannelOriginatorMap())
Definition: base-channel.h:735
Tp::BaseChannelCallType::ensureChannel
EnsureChannelCallback ensureChannel
Definition: base-channel.h:563
Tp::MediaStreamType
MediaStreamType
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2716
Tp::BaseChannelSASLAuthenticationInterface::create
static SharedPtr< BaseChannelSASLAuthenticationInterfaceSubclass > create(const QStringList &availableMechanisms, bool hasInitialData, bool canTryAgain, const QString &authorizationIdentity, const QString &defaultUsername, const QString &defaultRealm, bool maySaveResponse)
Definition: base-channel.h:315
Tp::BaseChannelChatStateInterface::create
static SharedPtr< BaseChannelChatStateInterfaceSubclass > create()
Definition: base-channel.h:446
Tp::BaseChannelChatStateInterface::create
static BaseChannelChatStateInterfacePtr create()
Definition: base-channel.h:441
Tp::DBusService
Base class for D-Bus services.
Definition: dbus-service.h:46
Tp::UIntList
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:101
Tp::ObjectPathList
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:81
Tp::BaseChannelCaptchaAuthenticationInterface::GetCaptchasCallback
Callback4< void, Tp::CaptchaInfoList &, uint &, QString &, DBusError * > GetCaptchasCallback
Definition: base-channel.h:265
Tp::BaseChannelGroupInterface::create
static BaseChannelGroupInterfacePtr create(ChannelGroupFlags initialFlags, uint selfHandle)
Definition: base-channel.h:484
Tp::BaseChannelGroupInterface::RemoveMembersCallback
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > RemoveMembersCallback
Definition: base-channel.h:496
Tp::BaseChannelCaptchaAuthenticationInterface
Base class for implementations of Channel.Interface.CaptchaAuthentication.
Definition: base-channel.h:247
Tp::BaseConnection
Base class for Connection implementations.
Definition: base-connection.h:44
Tp::BaseChannelSMSInterface::create
static SharedPtr< BaseChannelSMSInterfaceSubclass > create(bool flash, bool smsChannel)
Definition: base-channel.h:785
Tp::BaseChannelTextType::MessageAcknowledgedCallback
Callback1< void, QString > MessageAcknowledgedCallback
Definition: base-channel.h:139
Tp::BaseChannelCaptchaAuthenticationInterface::create
static SharedPtr< BaseChannelCaptchaAuthenticationInterfaceSubclass > create(bool canRetryCaptcha)
Definition: base-channel.h:257
Tp::BaseChannelCaptchaAuthenticationInterface::create
static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha)
Definition: base-channel.h:253
Tp::BaseChannelSASLAuthenticationInterface::StartMechanismCallback
Callback2< void, const QString &, DBusError * > StartMechanismCallback
Definition: base-channel.h:354
Tp::DBusError
Small container class, containing a D-Bus error.
Definition: dbus-error.h:35
Tp::BaseChannelSMSInterface
Base class for implementations of Channel.Interface.SMS.
Definition: base-channel.h:775
Tp::Callback3< QString, const Tp::MessagePartList &, uint, DBusError * >
Tp::BaseChannelMessagesInterface::create
static SharedPtr< BaseChannelMessagesInterfaceSubclass > create()
Definition: base-channel.h:180
Tp::HandleIdentifierMap
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:1646
Tp::BaseChannelTextType::EnsureChannelCallback
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:130
Tp::BaseChannelSASLAuthenticationInterface::create
static BaseChannelSASLAuthenticationInterfacePtr create(const QStringList &availableMechanisms, bool hasInitialData, bool canTryAgain, const QString &authorizationIdentity, const QString &defaultUsername, const QString &defaultRealm, bool maySaveResponse)
Definition: base-channel.h:298
Tp::BaseChannelHoldInterface::create
static SharedPtr< BaseChannelHoldInterfaceSubclass > create()
Definition: base-channel.h:636
Tp::BaseChannelMergeableConferenceInterface::create
static BaseChannelMergeableConferenceInterfacePtr create()
Definition: base-channel.h:669
Tp::BaseChannelSecurableInterface::create
static BaseChannelSecurableInterfacePtr create()
Definition: base-channel.h:401
Tp::BaseChannel::create
static BaseChannelPtr create(BaseConnection *connection, const QString &channelType, uint targetHandle, uint targetHandleType)
Definition: base-channel.h:48
Tp::CallStateReason
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:320
Tp::BaseChannelCallType
Base class for implementations of Channel.Type.Call.
Definition: base-channel.h:518
Tp::BaseChannelMessagesInterface
Base class for implementations of Channel.Interface.Messages.
Definition: base-channel.h:162
Tp::BaseChannelHoldInterface
Base class for implementations of Channel.Interface.Hold.
Definition: base-channel.h:626
Tp::BaseChannelSASLAuthenticationInterface::AcceptSASLCallback
Callback1< void, DBusError * > AcceptSASLCallback
Definition: base-channel.h:366
Tp::SharedPtr
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
Tp::BaseChannelSplittableInterface::create
static SharedPtr< BaseChannelSplittableInterfaceSubclass > create()
Definition: base-channel.h:706
Tp::BaseChannelCallType::SetRingingCallback
Callback1< void, DBusError * > SetRingingCallback
Definition: base-channel.h:590
Tp::ChannelDetails
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:752
Tp::BaseChannelServerAuthenticationType::create
static SharedPtr< BaseChannelServerAuthenticationTypeSubclass > create(const QString &authenticationMethod)
Definition: base-channel.h:228
Tp::LocalHoldStateReason
LocalHoldStateReason
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:3516
Tp::BaseChannelServerAuthenticationType
Base class for implementations of Channel.Type.ServerAuthentifcation.
Definition: base-channel.h:218