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  Tp::HandleType targetHandleType = Tp::HandleTypeNone, uint targetHandle = 0) {
50  return BaseChannelPtr(new BaseChannel(QDBusConnection::sessionBus(), connection,
51  channelType, targetHandleType, targetHandle));
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 targetHandleType, uint targetHandle);
85  virtual bool registerObject(const QString &busName, const QString &objectPath,
86  DBusError *error);
87 private:
88  class Adaptee;
89  friend class Adaptee;
90  struct Private;
91  friend struct Private;
92  Private *mPriv;
93 };
94 
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  struct Private;
108  friend struct Private;
109  Private *mPriv;
110 
111 };
112 
114 {
115  Q_OBJECT
116  Q_DISABLE_COPY(BaseChannelTextType)
117 
118 public:
119  static BaseChannelTextTypePtr create(BaseChannel* channel) {
120  return BaseChannelTextTypePtr(new BaseChannelTextType(channel));
121  }
122  template<typename BaseChannelTextTypeSubclass>
125  new BaseChannelTextTypeSubclass(channel));
126  }
127 
130 
133 
134  virtual ~BaseChannelTextType();
135 
136  QVariantMap immutableProperties() const;
137 
139 
141  void setMessageAcknowledgedCallback(const MessageAcknowledgedCallback &cb);
142 
143  Tp::MessagePartListList pendingMessages();
144 
145  /* Convenience function */
146  void addReceivedMessage(const Tp::MessagePartList &message);
147 private Q_SLOTS:
148  void sent(uint timestamp, uint type, QString text);
149 protected:
151  void acknowledgePendingMessages(const Tp::UIntList &IDs, DBusError* error);
152 
153 private:
154  void createAdaptor();
155 
156  class Adaptee;
157  friend class Adaptee;
158  struct Private;
159  friend struct Private;
160  Private *mPriv;
161 };
162 
164 {
165  Q_OBJECT
166  Q_DISABLE_COPY(BaseChannelMessagesInterface)
167 
168 public:
169  static BaseChannelMessagesInterfacePtr create(BaseChannelTextType* textTypeInterface,
170  QStringList supportedContentTypes,
171  UIntList messageTypes,
172  uint messagePartSupportFlags,
173  uint deliveryReportingSupport) {
174  return BaseChannelMessagesInterfacePtr(new BaseChannelMessagesInterface(textTypeInterface,
175  supportedContentTypes,
176  messageTypes,
177  messagePartSupportFlags,
178  deliveryReportingSupport));
179  }
180  template<typename BaseChannelMessagesInterfaceSubclass>
183  new BaseChannelMessagesInterfaceSubclass());
184  }
185  virtual ~BaseChannelMessagesInterface();
186 
187  QVariantMap immutableProperties() const;
188 
189  QStringList supportedContentTypes();
190  Tp::UIntList messageTypes();
191  uint messagePartSupportFlags();
192  uint deliveryReportingSupport();
193  Tp::MessagePartListList pendingMessages();
194 
195  void messageSent(const Tp::MessagePartList &content, uint flags, const QString &messageToken);
196 
198  void setSendMessageCallback(const SendMessageCallback &cb);
199 protected:
200  QString sendMessage(const Tp::MessagePartList &message, uint flags, DBusError* error);
201 private Q_SLOTS:
202  void pendingMessagesRemoved(const Tp::UIntList &messageIDs);
203  void messageReceived(const Tp::MessagePartList &message);
204 private:
206  QStringList supportedContentTypes,
207  Tp::UIntList messageTypes,
208  uint messagePartSupportFlags,
209  uint deliveryReportingSupport);
210  void createAdaptor();
211 
212  class Adaptee;
213  friend class Adaptee;
214  struct Private;
215  friend struct Private;
216  Private *mPriv;
217 };
218 
220 {
221  Q_OBJECT
222  Q_DISABLE_COPY(BaseChannelRoomListType)
223 
224 public:
225  static BaseChannelRoomListTypePtr create(const QString &server = QString())
226  {
227  return BaseChannelRoomListTypePtr(new BaseChannelRoomListType(server));
228  }
229  template<typename BaseChannelRoomListTypeSubclass>
230  static SharedPtr<BaseChannelRoomListTypeSubclass> create(const QString &server = QString())
231  {
233  new BaseChannelRoomListTypeSubclass(server));
234  }
235 
236  virtual ~BaseChannelRoomListType();
237 
238  QVariantMap immutableProperties() const;
239 
240  QString server() const;
241 
242  bool getListingRooms();
243  void setListingRooms(bool listing);
244 
246  void setListRoomsCallback(const ListRoomsCallback &cb);
247  void listRooms(DBusError *error);
248 
250  void setStopListingCallback(const StopListingCallback &cb);
251  void stopListing(DBusError *error);
252 
253  void gotRooms(const Tp::RoomInfoList &rooms);
254 
255 protected:
256  BaseChannelRoomListType(const QString &server);
257 
258 private:
259  void createAdaptor();
260 
261  class Adaptee;
262  friend class Adaptee;
263  struct Private;
264  friend struct Private;
265  Private *mPriv;
266 };
267 
269 {
270  Q_OBJECT
272 
273 public:
274  static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod) {
275  return BaseChannelServerAuthenticationTypePtr(new BaseChannelServerAuthenticationType(authenticationMethod));
276  }
277  template<typename BaseChannelServerAuthenticationTypeSubclass>
278  static SharedPtr<BaseChannelServerAuthenticationTypeSubclass> create(const QString &authenticationMethod) {
280  new BaseChannelServerAuthenticationTypeSubclass(authenticationMethod));
281  }
283 
284  QVariantMap immutableProperties() const;
285 private Q_SLOTS:
286 private:
287  BaseChannelServerAuthenticationType(const QString &authenticationMethod);
288  void createAdaptor();
289 
290  class Adaptee;
291  friend class Adaptee;
292  struct Private;
293  friend struct Private;
294  Private *mPriv;
295 };
296 
298 {
299  Q_OBJECT
301 
302 public:
303  static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha) {
304  return BaseChannelCaptchaAuthenticationInterfacePtr(new BaseChannelCaptchaAuthenticationInterface(canRetryCaptcha));
305  }
306  template<typename BaseChannelCaptchaAuthenticationInterfaceSubclass>
309  new BaseChannelCaptchaAuthenticationInterfaceSubclass(canRetryCaptcha));
310  }
312 
313  QVariantMap immutableProperties() const;
314 
316  void setGetCaptchasCallback(const GetCaptchasCallback &cb);
317 
319  void setGetCaptchaDataCallback(const GetCaptchaDataCallback &cb);
320 
322  void setAnswerCaptchasCallback(const AnswerCaptchasCallback &cb);
323 
325  void setCancelCaptchaCallback(const CancelCaptchaCallback &cb);
326 
327  void setCaptchaStatus(uint status);
328  void setCaptchaError(const QString &busName);
329  void setCaptchaErrorDetails(const QVariantMap &error);
330 private Q_SLOTS:
331 private:
332  BaseChannelCaptchaAuthenticationInterface(bool canRetryCaptcha);
333  void createAdaptor();
334 
335  class Adaptee;
336  friend class Adaptee;
337  struct Private;
338  friend struct Private;
339  Private *mPriv;
340 };
341 
343 {
344  Q_OBJECT
346 
347 public:
348  static BaseChannelSASLAuthenticationInterfacePtr create(const QStringList &availableMechanisms,
349  bool hasInitialData,
350  bool canTryAgain,
351  const QString &authorizationIdentity,
352  const QString &defaultUsername,
353  const QString &defaultRealm,
354  bool maySaveResponse)
355  {
356  return BaseChannelSASLAuthenticationInterfacePtr(new BaseChannelSASLAuthenticationInterface(availableMechanisms,
357  hasInitialData,
358  canTryAgain,
359  authorizationIdentity,
360  defaultUsername,
361  defaultRealm,
362  maySaveResponse));
363  }
364  template<typename BaseChannelSASLAuthenticationInterfaceSubclass>
365  static SharedPtr<BaseChannelSASLAuthenticationInterfaceSubclass> create(const QStringList &availableMechanisms,
366  bool hasInitialData,
367  bool canTryAgain,
368  const QString &authorizationIdentity,
369  const QString &defaultUsername,
370  const QString &defaultRealm,
371  bool maySaveResponse)
372  {
374  new BaseChannelSASLAuthenticationInterfaceSubclass(availableMechanisms,
375  hasInitialData,
376  canTryAgain,
377  authorizationIdentity,
378  defaultUsername,
379  defaultRealm,
380  maySaveResponse));
381  }
382 
384 
385  QVariantMap immutableProperties() const;
386 
387  QStringList availableMechanisms() const;
388  bool hasInitialData() const;
389  bool canTryAgain() const;
390  QString authorizationIdentity() const;
391  QString defaultUsername() const;
392  QString defaultRealm() const;
393  bool maySaveResponse() const;
394 
395  uint saslStatus() const;
396  void setSaslStatus(uint status, const QString &reason, const QVariantMap &details);
397 
398  QString saslError() const;
399  void setSaslError(const QString &saslError);
400 
401  QVariantMap saslErrorDetails() const;
402  void setSaslErrorDetails(const QVariantMap &saslErrorDetails);
403 
405  void setStartMechanismCallback(const StartMechanismCallback &cb);
406  void startMechanism(const QString &mechanism, DBusError *error);
407 
409  void setStartMechanismWithDataCallback(const StartMechanismWithDataCallback &cb);
410  void startMechanismWithData(const QString &mechanism, const QByteArray &initialData, DBusError *error);
411 
413  void setRespondCallback(const RespondCallback &cb);
414  void respond(const QByteArray &responseData, DBusError *error);
415 
417  void setAcceptSaslCallback(const AcceptSASLCallback &cb);
418  void acceptSasl(DBusError *error);
419 
421  void setAbortSaslCallback(const AbortSASLCallback &cb);
422  void abortSasl(uint reason, const QString &debugMessage, DBusError *error);
423 
424  void newChallenge(const QByteArray &challengeData);
425 
426 protected:
427  BaseChannelSASLAuthenticationInterface(const QStringList &availableMechanisms,
428  bool hasInitialData,
429  bool canTryAgain,
430  const QString &authorizationIdentity,
431  const QString &defaultUsername,
432  const QString &defaultRealm,
433  bool maySaveResponse);
434 
435 private:
436  void createAdaptor();
437 
438  class Adaptee;
439  friend class Adaptee;
440  struct Private;
441  friend struct Private;
442  Private *mPriv;
443 };
444 
446 {
447  Q_OBJECT
448  Q_DISABLE_COPY(BaseChannelSecurableInterface)
449 
450 public:
451  static BaseChannelSecurableInterfacePtr create()
452  {
453  return BaseChannelSecurableInterfacePtr(new BaseChannelSecurableInterface());
454  }
455  template<typename BaseChannelSecurableInterfaceSubclass>
457  {
459  new BaseChannelSecurableInterfaceSubclass());
460  }
461 
463 
464  QVariantMap immutableProperties() const;
465 
466  bool encrypted() const;
467  void setEncrypted(bool encrypted);
468 
469  bool verified() const;
470  void setVerified(bool verified);
471 
472 protected:
474 
475 private:
476  void createAdaptor();
477 
478  class Adaptee;
479  friend class Adaptee;
480  struct Private;
481  friend struct Private;
482  Private *mPriv;
483 };
484 
486 {
487  Q_OBJECT
488  Q_DISABLE_COPY(BaseChannelChatStateInterface)
489 
490 public:
491  static BaseChannelChatStateInterfacePtr create()
492  {
493  return BaseChannelChatStateInterfacePtr(new BaseChannelChatStateInterface());
494  }
495  template<typename BaseChannelChatStateInterfaceSubclass>
497  {
499  new BaseChannelChatStateInterfaceSubclass());
500  }
501 
503 
504  QVariantMap immutableProperties() const;
505 
506  Tp::ChatStateMap chatStates() const;
507  void setChatStates(const Tp::ChatStateMap &chatStates);
508 
510  void setSetChatStateCallback(const SetChatStateCallback &cb);
511  void setChatState(uint state, DBusError *error);
512 
513  void chatStateChanged(uint contact, uint state);
514 
515 protected:
517 
518 private:
519  void createAdaptor();
520 
521  class Adaptee;
522  friend class Adaptee;
523  struct Private;
524  friend struct Private;
525  Private *mPriv;
526 };
527 
529 {
530  Q_OBJECT
531  Q_DISABLE_COPY(BaseChannelGroupInterface)
532 
533 public:
534  static BaseChannelGroupInterfacePtr create(ChannelGroupFlags initialFlags, uint selfHandle) {
535  return BaseChannelGroupInterfacePtr(new BaseChannelGroupInterface(initialFlags, selfHandle));
536  }
537  template<typename BaseChannelGroupInterfaceSubclass>
540  new BaseChannelGroupInterfaceSubclass(initialFlags, selfHandle));
541  }
542  virtual ~BaseChannelGroupInterface();
543 
544  QVariantMap immutableProperties() const;
545 
547  void setRemoveMembersCallback(const RemoveMembersCallback &cb);
548 
550  void setAddMembersCallback(const AddMembersCallback &cb);
551 
552  /* Adds a contact to this group. No-op if already in this group */
553  void addMembers(const Tp::UIntList &handles, const QStringList &identifiers);
554  void removeMembers(const Tp::UIntList &handles);
555 
556 private Q_SLOTS:
557 private:
558  BaseChannelGroupInterface(ChannelGroupFlags initialFlags, uint selfHandle);
559  void createAdaptor();
560 
561  class Adaptee;
562  friend class Adaptee;
563  struct Private;
564  friend struct Private;
565  Private *mPriv;
566 };
567 
569 {
570  Q_OBJECT
571  Q_DISABLE_COPY(BaseChannelRoomInterface)
572 
573 public:
574  static BaseChannelRoomInterfacePtr create(const QString &roomName,
575  const QString &server,
576  const QString &creator,
577  uint creatorHandle,
578  const QDateTime &creationTimestamp)
579  {
580  return BaseChannelRoomInterfacePtr(new BaseChannelRoomInterface(roomName,
581  server,
582  creator,
583  creatorHandle,
584  creationTimestamp));
585  }
586  template<typename BaseChannelRoomInterfaceSubclass>
587  static SharedPtr<BaseChannelRoomInterfaceSubclass> create(const QString &roomName,
588  const QString &server,
589  const QString &creator,
590  uint creatorHandle,
591  const QDateTime &creationTimestamp)
592  {
594  new BaseChannelRoomInterfaceSubclass(roomName,
595  server,
596  creator,
597  creatorHandle,
598  creationTimestamp));
599  }
600 
601  virtual ~BaseChannelRoomInterface();
602 
603  QVariantMap immutableProperties() const;
604 
605  QString roomName() const;
606  QString server() const;
607  QString creator() const;
608  uint creatorHandle() const;
609  QDateTime creationTimestamp() const;
610 
611 protected:
612  BaseChannelRoomInterface(const QString &roomName,
613  const QString &server,
614  const QString &creator,
615  uint creatorHandle,
616  const QDateTime &creationTimestamp);
617 
618 private:
619  void createAdaptor();
620 
621  class Adaptee;
622  friend class Adaptee;
623  struct Private;
624  friend struct Private;
625  Private *mPriv;
626 };
627 
629 {
630  Q_OBJECT
631  Q_DISABLE_COPY(BaseChannelRoomConfigInterface)
632 
633 public:
634  static BaseChannelRoomConfigInterfacePtr create()
635  {
636  return BaseChannelRoomConfigInterfacePtr(new BaseChannelRoomConfigInterface());
637  }
638  template<typename BaseChannelRoomConfigInterfaceSubclass>
640  {
642  new BaseChannelRoomConfigInterfaceSubclass());
643  }
644 
646 
647  QVariantMap immutableProperties() const;
648 
649  bool anonymous() const;
650  void setAnonymous(bool anonymous);
651 
652  bool inviteOnly() const;
653  void setInviteOnly(bool inviteOnly);
654 
655  uint limit() const;
656  void setLimit(uint limit);
657 
658  bool moderated() const;
659  void setModerated(bool moderated);
660 
661  QString title() const;
662  void setTitle(const QString &title);
663 
664  QString description() const;
665  void setDescription(const QString &description);
666 
667  bool persistent() const;
668  void setPersistent(bool persistent);
669 
670  bool isPrivate() const;
671  void setPrivate(bool newPrivate);
672 
673  bool passwordProtected() const;
674  void setPasswordProtected(bool passwordProtected);
675 
676  QString password() const;
677  void setPassword(const QString &password);
678 
679  QString passwordHint() const;
680  void setPasswordHint(const QString &passwordHint);
681 
682  bool canUpdateConfiguration() const;
683  void setCanUpdateConfiguration(bool canUpdateConfiguration);
684 
685  QStringList mutableProperties() const;
686  void setMutableProperties(const QStringList &mutableProperties);
687 
688  bool configurationRetrieved() const;
689  void setConfigurationRetrieved(bool configurationRetrieved);
690 
692  void setUpdateConfigurationCallback(const UpdateConfigurationCallback &cb);
693  void updateConfiguration(const QVariantMap &properties, DBusError *error);
694 
695 protected:
697 
698 private:
699  void createAdaptor();
700 
701  class Adaptee;
702  friend class Adaptee;
703  struct Private;
704  friend struct Private;
705  Private *mPriv;
706 };
707 
709 {
710  Q_OBJECT
711  Q_DISABLE_COPY(BaseChannelCallType)
712 
713 public:
714  static BaseChannelCallTypePtr create(BaseChannel* channel, bool hardwareStreaming,
715  uint initialTransport,
716  bool initialAudio,
717  bool initialVideo,
718  QString initialAudioName,
719  QString initialVideoName,
720  bool mutableContents = false) {
721  return BaseChannelCallTypePtr(new BaseChannelCallType(channel,
722  hardwareStreaming,
723  initialTransport,
724  initialAudio,
725  initialVideo,
726  initialAudioName,
727  initialVideoName,
728  mutableContents));
729  }
730  template<typename BaseChannelCallTypeSubclass>
731  static SharedPtr<BaseChannelCallTypeSubclass> create(BaseChannel* channel, bool hardwareStreaming,
732  uint initialTransport,
733  bool initialAudio,
734  bool initialVideo,
735  QString initialAudioName,
736  QString initialVideoName,
737  bool mutableContents = false) {
739  new BaseChannelCallTypeSubclass(channel,
740  hardwareStreaming,
741  initialTransport,
742  initialAudio,
743  initialVideo,
744  initialAudioName,
745  initialVideoName,
746  mutableContents));
747  }
748 
751 
754 
755  virtual ~BaseChannelCallType();
756 
757  QVariantMap immutableProperties() const;
758 
759  Tp::ObjectPathList contents();
760  QVariantMap callStateDetails();
761  uint callState();
762  uint callFlags();
763  Tp::CallStateReason callStateReason();
764  bool hardwareStreaming();
765  Tp::CallMemberMap callMembers();
766  Tp::HandleIdentifierMap memberIdentifiers();
767  uint initialTransport();
768  bool initialAudio();
769  bool initialVideo();
770  QString initialAudioName();
771  QString initialVideoName();
772  bool mutableContents();
773 
775  void setAcceptCallback(const AcceptCallback &cb);
776 
778  void setHangupCallback(const HangupCallback &cb);
779 
781  void setSetRingingCallback(const SetRingingCallback &cb);
782 
784  void setSetQueuedCallback(const SetQueuedCallback &cb);
785 
787  void setAddContentCallback(const AddContentCallback &cb);
788 
789  void setCallState(const Tp::CallState &state, uint flags, const Tp::CallStateReason &stateReason, const QVariantMap &callStateDetails);
790  void setMembersFlags(const Tp::CallMemberMap &flagsChanged, const Tp::HandleIdentifierMap &identifiers, const Tp::UIntList &removed, const Tp::CallStateReason &reason);
791  BaseCallContentPtr addContent(const QString &name, const Tp::MediaStreamType &type, const Tp::MediaStreamDirection &direction);
792  void addContent(BaseCallContentPtr content);
793 
795 
796 protected:
798  bool hardwareStreaming,
799  uint initialTransport,
800  bool initialAudio,
801  bool initialVideo,
802  QString initialAudioName,
803  QString initialVideoName,
804  bool mutableContents = false);
805 
806 private:
807  void createAdaptor();
808 
809  class Adaptee;
810  friend class Adaptee;
811  struct Private;
812  friend struct Private;
813  Private *mPriv;
814 };
815 
817 {
818  Q_OBJECT
819  Q_DISABLE_COPY(BaseChannelHoldInterface)
820 
821 public:
822  static BaseChannelHoldInterfacePtr create() {
823  return BaseChannelHoldInterfacePtr(new BaseChannelHoldInterface());
824  }
825  template<typename BaseChannelHoldInterfaceSubclass>
828  new BaseChannelHoldInterfaceSubclass());
829  }
830  virtual ~BaseChannelHoldInterface();
831 
832  QVariantMap immutableProperties() const;
833 
834  Tp::LocalHoldState getHoldState() const;
835  Tp::LocalHoldStateReason getHoldReason() const;
836  void setHoldState(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason);
837 
839  void setSetHoldStateCallback(const SetHoldStateCallback &cb);
840 Q_SIGNALS:
841  void holdStateChanged(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason);
842 private:
844  void createAdaptor();
845 
846  class Adaptee;
847  friend class Adaptee;
848  struct Private;
849  friend struct Private;
850  Private *mPriv;
851 };
852 
854 {
855  Q_OBJECT
857 
858 public:
859  static BaseChannelMergeableConferenceInterfacePtr create() {
860  return BaseChannelMergeableConferenceInterfacePtr(new BaseChannelMergeableConferenceInterface());
861  }
862  template<typename BaseChannelMergeableConferenceInterfaceSubclass>
865  new BaseChannelMergeableConferenceInterfaceSubclass());
866  }
868 
869  QVariantMap immutableProperties() const;
870 
871  void merge(const QDBusObjectPath &channel);
872 
874  void setMergeCallback(const MergeCallback &cb);
875 private:
877  void createAdaptor();
878 
879  class Adaptee;
880  friend class Adaptee;
881  struct Private;
882  friend struct Private;
883  Private *mPriv;
884 };
885 
887 {
888  Q_OBJECT
889  Q_DISABLE_COPY(BaseChannelSplittableInterface)
890 
891 public:
892  static BaseChannelSplittableInterfacePtr create() {
893  return BaseChannelSplittableInterfacePtr(new BaseChannelSplittableInterface());
894  }
895  template<typename BaseChannelSplittableInterfaceSubclass>
898  new BaseChannelSplittableInterfaceSubclass());
899  }
901 
902  QVariantMap immutableProperties() const;
903 
904  void split();
905 
907  void setSplitCallback(const SplitCallback &cb);
908 private:
910  void createAdaptor();
911 
912  class Adaptee;
913  friend class Adaptee;
914  struct Private;
915  friend struct Private;
916  Private *mPriv;
917 };
918 
920 {
921  Q_OBJECT
922  Q_DISABLE_COPY(BaseChannelConferenceInterface)
923 
924 public:
925  static BaseChannelConferenceInterfacePtr create(Tp::ObjectPathList initialChannels = Tp::ObjectPathList(),
926  Tp::UIntList initialInviteeHandles = Tp::UIntList(),
927  QStringList initialInviteeIDs = QStringList(),
928  QString invitationMessage = QString(),
929  ChannelOriginatorMap originalChannels = ChannelOriginatorMap()) {
930  return BaseChannelConferenceInterfacePtr(new BaseChannelConferenceInterface(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
931  }
932  template<typename BaseChannelConferenceInterfaceSubclass>
934  Tp::UIntList initialInviteeHandles = Tp::UIntList(),
935  QStringList initialInviteeIDs = QStringList(),
936  QString invitationMessage = QString(),
937  ChannelOriginatorMap originalChannels = ChannelOriginatorMap()) {
939  new BaseChannelConferenceInterfaceSubclass(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
940  }
942 
943  QVariantMap immutableProperties() const;
944  Tp::ObjectPathList channels() const;
945  Tp::ObjectPathList initialChannels() const;
946  Tp::UIntList initialInviteeHandles() const;
947  QStringList initialInviteeIDs() const;
948  QString invitationMessage() const;
949  ChannelOriginatorMap originalChannels() const;
950 
951  void mergeChannel(const QDBusObjectPath &channel, uint channelHandle, const QVariantMap &properties);
952  void removeChannel(const QDBusObjectPath &channel, const QVariantMap &details);
953 
954 private:
955  BaseChannelConferenceInterface(Tp::ObjectPathList initialChannels, Tp::UIntList initialInviteeHandles, QStringList initialInviteeIDs, QString invitationMessage, ChannelOriginatorMap originalChannels);
956  void createAdaptor();
957 
958  class Adaptee;
959  friend class Adaptee;
960  struct Private;
961  friend struct Private;
962  Private *mPriv;
963 };
964 
966 {
967  Q_OBJECT
968  Q_DISABLE_COPY(BaseChannelSMSInterface)
969 
970 public:
971  static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel) {
972  return BaseChannelSMSInterfacePtr(new BaseChannelSMSInterface(flash, smsChannel));
973  }
974  template<typename BaseChannelSMSInterfaceSubclass>
975  static SharedPtr<BaseChannelSMSInterfaceSubclass> create(bool flash, bool smsChannel) {
977  new BaseChannelSMSInterfaceSubclass(flash, smsChannel));
978  }
979  virtual ~BaseChannelSMSInterface();
980 
981  QVariantMap immutableProperties() const;
982 
984  void setGetSMSLengthCallback(const GetSMSLengthCallback &cb);
985 
986  bool flash() const;
987  bool smsChannel() const;
988 
989 Q_SIGNALS:
990  void smsChannelChanged(bool smsChannel);
991 
992 private:
993  BaseChannelSMSInterface(bool flash, bool smsChannel);
994  void createAdaptor();
995 
996  class Adaptee;
997  friend class Adaptee;
998  struct Private;
999  friend struct Private;
1000  Private *mPriv;
1001 };
1002 
1003 }
1004 #endif
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:138
Callback2< void, const QByteArray &, DBusError * > RespondCallback
Definition: base-channel.h:412
Callback3< void, uint, const QString &, DBusError * > CancelCaptchaCallback
Definition: base-channel.h:324
MediaStreamType
Definition: build/TelepathyQt/_gen/constants.h:2716
HandleType
Definition: build/TelepathyQt/_gen/constants.h:1375
CreateChannelCallback createChannel
Definition: base-channel.h:750
Base class for implementations of Channel.Interface.Securable.
Definition: base-channel.h:445
Callback3< void, const Tp::LocalHoldState &, const Tp::LocalHoldStateReason &, DBusError * > SetHoldStateCallback
Definition: base-channel.h:838
Base class for D-Bus service interfaces.
Definition: dbus-service.h:73
static BaseChannelGroupInterfacePtr create(ChannelGroupFlags initialFlags, uint selfHandle)
Definition: base-channel.h:534
static BaseChannelPtr create(BaseConnection *connection, const QString &channelType, Tp::HandleType targetHandleType=Tp::HandleTypeNone, uint targetHandle=0)
Definition: base-channel.h:48
Base class for Connection implementations.
Definition: base-connection.h:44
Callback3< QByteArray, uint, const QString &, DBusError * > GetCaptchaDataCallback
Definition: base-channel.h:318
Callback3< QString, const Tp::MessagePartList &, uint, DBusError * > SendMessageCallback
Definition: base-channel.h:197
Callback2< void, const QString &, DBusError * > StartMechanismCallback
Definition: base-channel.h:404
Base class for implementations of Channel.Interface.Hold.
Definition: base-channel.h:816
static SharedPtr< BaseChannelMergeableConferenceInterfaceSubclass > create()
Definition: base-channel.h:863
Callback1< void, DBusError * > SetQueuedCallback
Definition: base-channel.h:783
static BaseChannelRoomListTypePtr create(const QString &server=QString())
Definition: base-channel.h:225
Base class for implementations of Channel.Interface.Conference.
Definition: base-channel.h:919
static SharedPtr< BaseChannelSplittableInterfaceSubclass > create()
Definition: base-channel.h:896
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:933
QList< RoomInfo > RoomInfoList
Definition: build/TelepathyQt/_gen/types.h:2690
Base class for all the Channel object interface implementations.
Definition: base-channel.h:95
static BaseChannelTextTypePtr create(BaseChannel *channel)
Definition: base-channel.h:119
static SharedPtr< BaseChannelChatStateInterfaceSubclass > create()
Definition: base-channel.h:496
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:752
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:365
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > RemoveMembersCallback
Definition: base-channel.h:546
static BaseChannelRoomConfigInterfacePtr create()
Definition: base-channel.h:634
static BaseChannelRoomInterfacePtr create(const QString &roomName, const QString &server, const QString &creator, uint creatorHandle, const QDateTime &creationTimestamp)
Definition: base-channel.h:574
Callback1< void, DBusError * > AcceptSASLCallback
Definition: base-channel.h:416
Definition: build/TelepathyQt/_gen/types.h:320
static BaseChannelSplittableInterfacePtr create()
Definition: base-channel.h:892
Callback4< QDBusObjectPath, const QString &, const Tp::MediaStreamType &, const Tp::MediaStreamDirection &, DBusError * > AddContentCallback
Definition: base-channel.h:786
Callback2< void, const Tp::CaptchaAnswers &, DBusError * > AnswerCaptchasCallback
Definition: base-channel.h:321
Base class for D-Bus services.
Definition: dbus-service.h:46
Base class for implementations of Channel.Interface.CaptchaAuthentication.
Definition: base-channel.h:297
Base class for implementations of Channel.Interface.RoomConfig1.
Definition: base-channel.h:628
Definition: build/TelepathyQt/_gen/types.h:101
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
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:925
Callback1< void, DBusError * > SetRingingCallback
Definition: base-channel.h:780
QList< RequestableChannelClass > RequestableChannelClassList
Definition: build/TelepathyQt/_gen/types.h:2621
QList< MessagePartList > MessagePartListList
Definition: build/TelepathyQt/_gen/types.h:2039
Base class for implementations of Channel.Interface.SASLAuthentication.
Definition: base-channel.h:342
static SharedPtr< BaseChannelSMSInterfaceSubclass > create(bool flash, bool smsChannel)
Definition: base-channel.h:975
static BaseChannelMessagesInterfacePtr create(BaseChannelTextType *textTypeInterface, QStringList supportedContentTypes, UIntList messageTypes, uint messagePartSupportFlags, uint deliveryReportingSupport)
Definition: base-channel.h:169
static SharedPtr< BaseChannelSecurableInterfaceSubclass > create()
Definition: base-channel.h:456
Base class for implementations of Channel.Type.Text.
Definition: base-channel.h:113
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:128
EnsureChannelCallback ensureChannel
Definition: base-channel.h:753
QList< MessagePart > MessagePartList
Definition: build/TelepathyQt/_gen/types.h:2031
Base class for implementations of Channel.Interface.SMS.
Definition: base-channel.h:965
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:348
Base class for implementations of Channel.Interface.Chat.State.
Definition: base-channel.h:485
EnsureChannelCallback ensureChannel
Definition: base-channel.h:132
Callback2< void, const Tp::MessagePartList &, DBusError * > GetSMSLengthCallback
Definition: base-channel.h:983
Definition: build/TelepathyQt/_gen/types.h:81
static BaseChannelChatStateInterfacePtr create()
Definition: base-channel.h:491
static SharedPtr< BaseChannelHoldInterfaceSubclass > create()
Definition: base-channel.h:826
CreateChannelCallback createChannel
Definition: base-channel.h:129
Base class for implementations of Channel.Interface.Messages.
Definition: base-channel.h:163
Callback2< void, uint, DBusError * > SetChatStateCallback
Definition: base-channel.h:509
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:794
Callback3< void, uint, const QString &, DBusError * > AbortSASLCallback
Definition: base-channel.h:420
static SharedPtr< BaseChannelServerAuthenticationTypeSubclass > create(const QString &authenticationMethod)
Definition: base-channel.h:278
static BaseChannelMergeableConferenceInterfacePtr create()
Definition: base-channel.h:859
static BaseChannelSecurableInterfacePtr create()
Definition: base-channel.h:451
Small container class, containing a D-Bus error.
Definition: dbus-error.h:35
Callback1< void, QString > MessageAcknowledgedCallback
Definition: base-channel.h:140
Callback1< void, DBusError * > ListRoomsCallback
Definition: base-channel.h:245
Definition: build/TelepathyQt/_gen/types.h:907
MediaStreamDirection
Definition: build/TelepathyQt/_gen/constants.h:2777
Definition: build/TelepathyQt/_gen/types.h:287
static SharedPtr< BaseChannelRoomInterfaceSubclass > create(const QString &roomName, const QString &server, const QString &creator, uint creatorHandle, const QDateTime &creationTimestamp)
Definition: base-channel.h:587
static SharedPtr< BaseChannelRoomConfigInterfaceSubclass > create()
Definition: base-channel.h:639
Base class for implementations of Channel.Interface.Splittable.
Definition: base-channel.h:886
Definition: build/TelepathyQt/_gen/constants.h:1382
static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha)
Definition: base-channel.h:303
Base class for implementations of Channel.Type.Call.
Definition: base-channel.h:708
Base class for implementations of Channel.Type.ServerAuthentifcation.
Definition: base-channel.h:268
Callback3< void, const QString &, const QByteArray &, DBusError * > StartMechanismWithDataCallback
Definition: base-channel.h:408
Definition: build/TelepathyQt/_gen/types.h:1646
Callback1< void, DBusError * > SplitCallback
Definition: base-channel.h:906
Callback1< void, DBusError * > StopListingCallback
Definition: base-channel.h:249
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:731
Callback4< void, Tp::CaptchaInfoList &, uint &, QString &, DBusError * > GetCaptchasCallback
Definition: base-channel.h:315
QFlags< ChannelGroupFlag > ChannelGroupFlags
Definition: build/TelepathyQt/_gen/constants.h:1043
static SharedPtr< BaseChannelRoomListTypeSubclass > create(const QString &server=QString())
Definition: base-channel.h:230
Base class for implementations of Channel.Type.RoomList.
Definition: base-channel.h:219
static SharedPtr< BaseChannelCaptchaAuthenticationInterfaceSubclass > create(bool canRetryCaptcha)
Definition: base-channel.h:307
static SharedPtr< BaseChannelTextTypeSubclass > create(BaseChannel *channel)
Definition: base-channel.h:123
static BaseChannelCallTypePtr create(BaseChannel *channel, bool hardwareStreaming, uint initialTransport, bool initialAudio, bool initialVideo, QString initialAudioName, QString initialVideoName, bool mutableContents=false)
Definition: base-channel.h:714
LocalHoldState
Definition: build/TelepathyQt/_gen/constants.h:3466
Definition: build/TelepathyQt/_gen/types.h:752
Callback1< void, DBusError * > AcceptCallback
Definition: base-channel.h:774
static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel)
Definition: base-channel.h:971
static SharedPtr< BaseChannelMessagesInterfaceSubclass > create()
Definition: base-channel.h:181
static BaseChannelHoldInterfacePtr create()
Definition: base-channel.h:822
CallState
Definition: build/TelepathyQt/_gen/constants.h:2286
Definition: build/TelepathyQt/_gen/types.h:885
static SharedPtr< BaseChannelGroupInterfaceSubclass > create(ChannelGroupFlags initialFlags, uint selfHandle)
Definition: base-channel.h:538
Base class for channel implementations.
Definition: base-channel.h:42
Base class for implementations of Channel.Interface.MergeableConference.
Definition: base-channel.h:853
Base class for implementations of Channel.Interface.Group.
Definition: base-channel.h:528
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:131
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > AddMembersCallback
Definition: base-channel.h:549
LocalHoldStateReason
Definition: build/TelepathyQt/_gen/constants.h:3516
Callback4< void, uint, const QString &, const QString &, DBusError * > HangupCallback
Definition: base-channel.h:777
Callback2< void, const QVariantMap &, DBusError * > UpdateConfigurationCallback
Definition: base-channel.h:691
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:749
static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod)
Definition: base-channel.h:274
Callback2< void, const QDBusObjectPath &, DBusError * > MergeCallback
Definition: base-channel.h:873
Base class for implementations of Channel.Interface.Room2.
Definition: base-channel.h:568


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