Home · Modules · All Classes · All Namespaces
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  Tp::BaseConnection *connection() const;
61 
62  QString channelType() const;
63  QList<AbstractChannelInterfacePtr> interfaces() const;
64  AbstractChannelInterfacePtr interface(const QString &interfaceName) const;
65  uint targetHandle() const;
66  QString targetID() const;
67  uint targetHandleType() const;
68  bool requested() const;
69  uint initiatorHandle() const;
70  QString initiatorID() const;
71  Tp::ChannelDetails details() const;
72 
73  void setInitiatorHandle(uint initiatorHandle);
74  void setInitiatorID(const QString &initiatorID);
75  void setTargetID(const QString &targetID);
76  void setRequested(bool requested);
77 
78  void close();
79 
80  bool plugInterface(const AbstractChannelInterfacePtr &interface);
81 
82 Q_SIGNALS:
83  void closed();
84 protected:
85  BaseChannel(const QDBusConnection &dbusConnection, BaseConnection *connection,
86  const QString &channelType, uint targetHandleType, uint targetHandle);
87  virtual bool registerObject(const QString &busName, const QString &objectPath,
88  DBusError *error);
89 private:
90  class Adaptee;
91  friend class Adaptee;
92  struct Private;
93  friend struct Private;
94  Private *mPriv;
95 };
96 
98 {
99  Q_OBJECT
100  Q_DISABLE_COPY(AbstractChannelInterface)
101 
102 public:
103  AbstractChannelInterface(const QString &interfaceName);
104  virtual ~AbstractChannelInterface();
105 
106 protected:
107  virtual void close();
108  virtual void setBaseChannel(BaseChannel *channel);
109 
110 private:
111  friend class BaseChannel;
112 
113  struct Private;
114  friend struct Private;
115  Private *mPriv;
116 
117 };
118 
120 {
121  Q_OBJECT
122  Q_DISABLE_COPY(BaseChannelTextType)
123 
124 public:
125  static BaseChannelTextTypePtr create(BaseChannel* channel) {
126  return BaseChannelTextTypePtr(new BaseChannelTextType(channel));
127  }
128  template<typename BaseChannelTextTypeSubclass>
131  new BaseChannelTextTypeSubclass(channel));
132  }
133 
134  virtual ~BaseChannelTextType();
135 
137  void setMessageAcknowledgedCallback(const MessageAcknowledgedCallback &cb);
138 
139  Tp::MessagePartListList pendingMessages() const;
140 
141  /* Convenience function */
142  void addReceivedMessage(const Tp::MessagePartList &message);
143  void acknowledgePendingMessages(const QStringList &tokens, DBusError *error);
144 
145 private Q_SLOTS:
146  void sent(uint timestamp, uint type, QString text);
147 protected:
149  void acknowledgePendingMessages(const Tp::UIntList &IDs, DBusError *error);
150  void removePendingMessages(const Tp::UIntList &IDs);
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 
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>
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() const;
193 
194  void messageSent(const Tp::MessagePartList &content, uint flags, const QString &messageToken);
195 
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:
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 
219 {
220  Q_OBJECT
221  Q_DISABLE_COPY(BaseChannelFileTransferType)
222 
223 public:
224  enum Direction {
226  Outgoing
227  };
228 
229  static BaseChannelFileTransferTypePtr create(const QVariantMap &request)
230  {
231  return BaseChannelFileTransferTypePtr(new BaseChannelFileTransferType(request));
232  }
233  template<typename BaseChannelFileTransferTypeSubclass>
234  static SharedPtr<BaseChannelFileTransferTypeSubclass> create(const QVariantMap &request)
235  {
237  new BaseChannelFileTransferTypeSubclass(request));
238  }
239 
240  virtual ~BaseChannelFileTransferType();
241 
242  QVariantMap immutableProperties() const;
243  Direction direction() const;
244 
245  QString contentType() const;
246  QString filename() const;
247  qulonglong size() const;
248  uint contentHashType() const;
249  QString contentHash() const;
250  QString description() const;
251  QDateTime date() const;
252  virtual Tp::SupportedSocketMap availableSocketTypes() const;
253 
254  uint state() const;
255  void setState(uint state, uint reason);
256 
257  qulonglong transferredBytes() const;
258  void setTransferredBytes(qulonglong count);
259  qulonglong initialOffset() const;
260 
261  QString uri() const;
262 
263  QString fileCollection() const;
264  void setFileCollection(const QString &fileCollection);
265 
266  bool remoteAcceptFile(QIODevice *output, qulonglong offset);
267  bool remoteProvideFile(QIODevice *input, qulonglong deviceOffset = 0);
268 
269 Q_SIGNALS:
270  void stateChanged(uint state, uint reason);
271  void uriDefined(const QString &uri);
272 
273 protected:
274  BaseChannelFileTransferType(const QVariantMap &request);
275 
276  virtual bool createSocket(uint addressType, uint accessControl, const QDBusVariant &accessControlParam, DBusError *error);
277  virtual QDBusVariant socketAddress() const;
278 
279  void setClientSocket(QIODevice *socket);
280 
281  void close(); // Add Q_DECL_OVERRIDE in Qt5
282 
283 private Q_SLOTS:
284  TP_QT_NO_EXPORT void onSocketConnection();
285  TP_QT_NO_EXPORT void doTransfer();
286  TP_QT_NO_EXPORT void onBytesWritten(qint64 count);
287 
288 private:
289  TP_QT_NO_EXPORT void setUri(const QString &uri);
290  TP_QT_NO_EXPORT void tryToOpenAndTransfer();
291 
292  void createAdaptor();
293 
294  class Adaptee;
295  friend class Adaptee;
296  struct Private;
297  friend struct Private;
298  Private *mPriv;
299 };
300 
302 {
303  Q_OBJECT
304  Q_DISABLE_COPY(BaseChannelRoomListType)
305 
306 public:
307  static BaseChannelRoomListTypePtr create(const QString &server = QString())
308  {
309  return BaseChannelRoomListTypePtr(new BaseChannelRoomListType(server));
310  }
311  template<typename BaseChannelRoomListTypeSubclass>
312  static SharedPtr<BaseChannelRoomListTypeSubclass> create(const QString &server = QString())
313  {
315  new BaseChannelRoomListTypeSubclass(server));
316  }
317 
318  virtual ~BaseChannelRoomListType();
319 
320  QVariantMap immutableProperties() const;
321 
322  QString server() const;
323 
324  bool getListingRooms();
325  void setListingRooms(bool listing);
326 
328  void setListRoomsCallback(const ListRoomsCallback &cb);
329  void listRooms(DBusError *error);
330 
332  void setStopListingCallback(const StopListingCallback &cb);
333  void stopListing(DBusError *error);
334 
335  void gotRooms(const Tp::RoomInfoList &rooms);
336 
337 protected:
338  BaseChannelRoomListType(const QString &server);
339 
340 private:
341  void createAdaptor();
342 
343  class Adaptee;
344  friend class Adaptee;
345  struct Private;
346  friend struct Private;
347  Private *mPriv;
348 };
349 
351 {
352  Q_OBJECT
354 
355 public:
356  static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod) {
357  return BaseChannelServerAuthenticationTypePtr(new BaseChannelServerAuthenticationType(authenticationMethod));
358  }
359  template<typename BaseChannelServerAuthenticationTypeSubclass>
360  static SharedPtr<BaseChannelServerAuthenticationTypeSubclass> create(const QString &authenticationMethod) {
362  new BaseChannelServerAuthenticationTypeSubclass(authenticationMethod));
363  }
365 
366  QVariantMap immutableProperties() const;
367 private Q_SLOTS:
368 private:
369  BaseChannelServerAuthenticationType(const QString &authenticationMethod);
370  void createAdaptor();
371 
372  class Adaptee;
373  friend class Adaptee;
374  struct Private;
375  friend struct Private;
376  Private *mPriv;
377 };
378 
380 {
381  Q_OBJECT
383 
384 public:
385  static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha) {
386  return BaseChannelCaptchaAuthenticationInterfacePtr(new BaseChannelCaptchaAuthenticationInterface(canRetryCaptcha));
387  }
388  template<typename BaseChannelCaptchaAuthenticationInterfaceSubclass>
391  new BaseChannelCaptchaAuthenticationInterfaceSubclass(canRetryCaptcha));
392  }
394 
395  QVariantMap immutableProperties() const;
396 
398  void setGetCaptchasCallback(const GetCaptchasCallback &cb);
399 
401  void setGetCaptchaDataCallback(const GetCaptchaDataCallback &cb);
402 
404  void setAnswerCaptchasCallback(const AnswerCaptchasCallback &cb);
405 
407  void setCancelCaptchaCallback(const CancelCaptchaCallback &cb);
408 
409  void setCaptchaStatus(uint status);
410  void setCaptchaError(const QString &busName);
411  void setCaptchaErrorDetails(const QVariantMap &error);
412 private Q_SLOTS:
413 private:
414  BaseChannelCaptchaAuthenticationInterface(bool canRetryCaptcha);
415  void createAdaptor();
416 
417  class Adaptee;
418  friend class Adaptee;
419  struct Private;
420  friend struct Private;
421  Private *mPriv;
422 };
423 
425 {
426  Q_OBJECT
428 
429 public:
430  static BaseChannelSASLAuthenticationInterfacePtr create(const QStringList &availableMechanisms,
431  bool hasInitialData,
432  bool canTryAgain,
433  const QString &authorizationIdentity,
434  const QString &defaultUsername,
435  const QString &defaultRealm,
436  bool maySaveResponse)
437  {
438  return BaseChannelSASLAuthenticationInterfacePtr(new BaseChannelSASLAuthenticationInterface(availableMechanisms,
439  hasInitialData,
440  canTryAgain,
441  authorizationIdentity,
442  defaultUsername,
443  defaultRealm,
444  maySaveResponse));
445  }
446  template<typename BaseChannelSASLAuthenticationInterfaceSubclass>
447  static SharedPtr<BaseChannelSASLAuthenticationInterfaceSubclass> create(const QStringList &availableMechanisms,
448  bool hasInitialData,
449  bool canTryAgain,
450  const QString &authorizationIdentity,
451  const QString &defaultUsername,
452  const QString &defaultRealm,
453  bool maySaveResponse)
454  {
456  new BaseChannelSASLAuthenticationInterfaceSubclass(availableMechanisms,
457  hasInitialData,
458  canTryAgain,
459  authorizationIdentity,
460  defaultUsername,
461  defaultRealm,
462  maySaveResponse));
463  }
464 
466 
467  QVariantMap immutableProperties() const;
468 
469  QStringList availableMechanisms() const;
470  bool hasInitialData() const;
471  bool canTryAgain() const;
472  QString authorizationIdentity() const;
473  QString defaultUsername() const;
474  QString defaultRealm() const;
475  bool maySaveResponse() const;
476 
477  uint saslStatus() const;
478  void setSaslStatus(uint status, const QString &reason, const QVariantMap &details);
479 
480  QString saslError() const;
481  void setSaslError(const QString &saslError);
482 
483  QVariantMap saslErrorDetails() const;
484  void setSaslErrorDetails(const QVariantMap &saslErrorDetails);
485 
487  void setStartMechanismCallback(const StartMechanismCallback &cb);
488  void startMechanism(const QString &mechanism, DBusError *error);
489 
491  void setStartMechanismWithDataCallback(const StartMechanismWithDataCallback &cb);
492  void startMechanismWithData(const QString &mechanism, const QByteArray &initialData, DBusError *error);
493 
495  void setRespondCallback(const RespondCallback &cb);
496  void respond(const QByteArray &responseData, DBusError *error);
497 
499  void setAcceptSaslCallback(const AcceptSASLCallback &cb);
500  void acceptSasl(DBusError *error);
501 
503  void setAbortSaslCallback(const AbortSASLCallback &cb);
504  void abortSasl(uint reason, const QString &debugMessage, DBusError *error);
505 
506  void newChallenge(const QByteArray &challengeData);
507 
508 protected:
509  BaseChannelSASLAuthenticationInterface(const QStringList &availableMechanisms,
510  bool hasInitialData,
511  bool canTryAgain,
512  const QString &authorizationIdentity,
513  const QString &defaultUsername,
514  const QString &defaultRealm,
515  bool maySaveResponse);
516 
517 private:
518  void createAdaptor();
519 
520  class Adaptee;
521  friend class Adaptee;
522  struct Private;
523  friend struct Private;
524  Private *mPriv;
525 };
526 
528 {
529  Q_OBJECT
530  Q_DISABLE_COPY(BaseChannelSecurableInterface)
531 
532 public:
533  static BaseChannelSecurableInterfacePtr create()
534  {
535  return BaseChannelSecurableInterfacePtr(new BaseChannelSecurableInterface());
536  }
537  template<typename BaseChannelSecurableInterfaceSubclass>
539  {
541  new BaseChannelSecurableInterfaceSubclass());
542  }
543 
545 
546  QVariantMap immutableProperties() const;
547 
548  bool encrypted() const;
549  void setEncrypted(bool encrypted);
550 
551  bool verified() const;
552  void setVerified(bool verified);
553 
554 protected:
556 
557 private:
558  void createAdaptor();
559 
560  class Adaptee;
561  friend class Adaptee;
562  struct Private;
563  friend struct Private;
564  Private *mPriv;
565 };
566 
568 {
569  Q_OBJECT
570  Q_DISABLE_COPY(BaseChannelChatStateInterface)
571 
572 public:
573  static BaseChannelChatStateInterfacePtr create()
574  {
575  return BaseChannelChatStateInterfacePtr(new BaseChannelChatStateInterface());
576  }
577  template<typename BaseChannelChatStateInterfaceSubclass>
579  {
581  new BaseChannelChatStateInterfaceSubclass());
582  }
583 
585 
586  Tp::ChatStateMap chatStates() const;
587  void setChatStates(const Tp::ChatStateMap &chatStates);
588 
590  void setSetChatStateCallback(const SetChatStateCallback &cb);
591  void setChatState(uint state, DBusError *error);
592 
593  void chatStateChanged(uint contact, uint state);
594 
595 protected:
597 
598 private:
599  void createAdaptor();
600 
601  class Adaptee;
602  friend class Adaptee;
603  struct Private;
604  friend struct Private;
605  Private *mPriv;
606 };
607 
609 {
610  Q_OBJECT
611  Q_DISABLE_COPY(BaseChannelGroupInterface)
612 
613 public:
614  static BaseChannelGroupInterfacePtr create()
615  {
616  return BaseChannelGroupInterfacePtr(new BaseChannelGroupInterface());
617  }
618  template<typename BaseChannelGroupInterfaceSubclass>
620  {
622  new BaseChannelGroupInterfaceSubclass());
623  }
624 
625  virtual ~BaseChannelGroupInterface();
626 
627  Tp::ChannelGroupFlags groupFlags() const;
628  void setGroupFlags(const Tp::ChannelGroupFlags &flags);
629 
630  Tp::UIntList members() const;
631  void setMembers(const Tp::UIntList &members, const QVariantMap &details);
632  void setMembers(const Tp::UIntList &members, const Tp::LocalPendingInfoList &localPending, const Tp::UIntList &remotePending, const QVariantMap &details);
633 
634  Tp::HandleOwnerMap handleOwners() const;
635  void setHandleOwners(const Tp::HandleOwnerMap &handleOwners);
636 
637  Tp::LocalPendingInfoList localPendingMembers() const;
638  void setLocalPendingMembers(const Tp::LocalPendingInfoList &localPendingMembers);
639 
640  Tp::UIntList remotePendingMembers() const;
641  void setRemotePendingMembers(const Tp::UIntList &remotePendingMembers);
642 
643  uint selfHandle() const;
644  void setSelfHandle(uint selfHandle);
645 
646  Tp::HandleIdentifierMap memberIdentifiers() const;
647 
649  void setAddMembersCallback(const AddMembersCallback &cb);
650  void addMembers(const Tp::UIntList &contacts, const QString &message, DBusError *error);
651 
653  void setRemoveMembersCallback(const RemoveMembersCallback &cb);
654  void removeMembers(const Tp::UIntList &contacts, const QString &message, uint reason, DBusError *error);
655 
656 protected:
658  void setBaseChannel(BaseChannel *channel);
659 
660 private:
661  void createAdaptor();
662 
663  class Adaptee;
664  friend class Adaptee;
665  struct Private;
666  friend struct Private;
667  Private *mPriv;
668 };
669 
671 {
672  Q_OBJECT
673  Q_DISABLE_COPY(BaseChannelRoomInterface)
674 
675 public:
676  static BaseChannelRoomInterfacePtr create(const QString &roomName,
677  const QString &server,
678  const QString &creator,
679  uint creatorHandle,
680  const QDateTime &creationTimestamp)
681  {
682  return BaseChannelRoomInterfacePtr(new BaseChannelRoomInterface(roomName,
683  server,
684  creator,
685  creatorHandle,
686  creationTimestamp));
687  }
688  template<typename BaseChannelRoomInterfaceSubclass>
689  static SharedPtr<BaseChannelRoomInterfaceSubclass> create(const QString &roomName,
690  const QString &server,
691  const QString &creator,
692  uint creatorHandle,
693  const QDateTime &creationTimestamp)
694  {
696  new BaseChannelRoomInterfaceSubclass(roomName,
697  server,
698  creator,
699  creatorHandle,
700  creationTimestamp));
701  }
702 
703  virtual ~BaseChannelRoomInterface();
704 
705  QVariantMap immutableProperties() const;
706 
707  QString roomName() const;
708  QString server() const;
709  QString creator() const;
710  uint creatorHandle() const;
711  QDateTime creationTimestamp() const;
712 
713 protected:
714  BaseChannelRoomInterface(const QString &roomName,
715  const QString &server,
716  const QString &creator,
717  uint creatorHandle,
718  const QDateTime &creationTimestamp);
719 
720 private:
721  void createAdaptor();
722 
723  class Adaptee;
724  friend class Adaptee;
725  struct Private;
726  friend struct Private;
727  Private *mPriv;
728 };
729 
731 {
732  Q_OBJECT
733  Q_DISABLE_COPY(BaseChannelRoomConfigInterface)
734 
735 public:
736  static BaseChannelRoomConfigInterfacePtr create()
737  {
738  return BaseChannelRoomConfigInterfacePtr(new BaseChannelRoomConfigInterface());
739  }
740  template<typename BaseChannelRoomConfigInterfaceSubclass>
742  {
744  new BaseChannelRoomConfigInterfaceSubclass());
745  }
746 
748 
749  bool anonymous() const;
750  void setAnonymous(bool anonymous);
751 
752  bool inviteOnly() const;
753  void setInviteOnly(bool inviteOnly);
754 
755  uint limit() const;
756  void setLimit(uint limit);
757 
758  bool moderated() const;
759  void setModerated(bool moderated);
760 
761  QString title() const;
762  void setTitle(const QString &title);
763 
764  QString description() const;
765  void setDescription(const QString &description);
766 
767  bool persistent() const;
768  void setPersistent(bool persistent);
769 
770  bool isPrivate() const;
771  void setPrivate(bool newPrivate);
772 
773  bool passwordProtected() const;
774  void setPasswordProtected(bool passwordProtected);
775 
776  QString password() const;
777  void setPassword(const QString &password);
778 
779  QString passwordHint() const;
780  void setPasswordHint(const QString &passwordHint);
781 
782  bool canUpdateConfiguration() const;
783  void setCanUpdateConfiguration(bool canUpdateConfiguration);
784 
785  QStringList mutableProperties() const;
786  void setMutableProperties(const QStringList &mutableProperties);
787 
788  bool configurationRetrieved() const;
789  void setConfigurationRetrieved(bool configurationRetrieved);
790 
792  void setUpdateConfigurationCallback(const UpdateConfigurationCallback &cb);
793  void updateConfiguration(const QVariantMap &properties, DBusError *error);
794 
795 protected:
797 
798 private:
799  void createAdaptor();
800 
801  class Adaptee;
802  friend class Adaptee;
803  struct Private;
804  friend struct Private;
805  Private *mPriv;
806 };
807 
809 {
810  Q_OBJECT
811  Q_DISABLE_COPY(BaseChannelCallType)
812 
813 public:
814  static BaseChannelCallTypePtr create(BaseChannel* channel, bool hardwareStreaming,
815  uint initialTransport,
816  bool initialAudio,
817  bool initialVideo,
818  QString initialAudioName,
819  QString initialVideoName,
820  bool mutableContents = false) {
821  return BaseChannelCallTypePtr(new BaseChannelCallType(channel,
822  hardwareStreaming,
823  initialTransport,
824  initialAudio,
825  initialVideo,
826  initialAudioName,
827  initialVideoName,
828  mutableContents));
829  }
830  template<typename BaseChannelCallTypeSubclass>
831  static SharedPtr<BaseChannelCallTypeSubclass> create(BaseChannel* channel, bool hardwareStreaming,
832  uint initialTransport,
833  bool initialAudio,
834  bool initialVideo,
835  QString initialAudioName,
836  QString initialVideoName,
837  bool mutableContents = false) {
839  new BaseChannelCallTypeSubclass(channel,
840  hardwareStreaming,
841  initialTransport,
842  initialAudio,
843  initialVideo,
844  initialAudioName,
845  initialVideoName,
846  mutableContents));
847  }
848 
851 
854 
855  virtual ~BaseChannelCallType();
856 
857  QVariantMap immutableProperties() const;
858 
859  Tp::ObjectPathList contents();
860  QVariantMap callStateDetails();
861  uint callState();
862  uint callFlags();
863  Tp::CallStateReason callStateReason();
864  bool hardwareStreaming();
865  Tp::CallMemberMap callMembers();
866  Tp::HandleIdentifierMap memberIdentifiers();
867  uint initialTransport();
868  bool initialAudio();
869  bool initialVideo();
870  QString initialAudioName();
871  QString initialVideoName();
872  bool mutableContents();
873 
875  void setAcceptCallback(const AcceptCallback &cb);
876 
878  void setHangupCallback(const HangupCallback &cb);
879 
881  void setSetRingingCallback(const SetRingingCallback &cb);
882 
884  void setSetQueuedCallback(const SetQueuedCallback &cb);
885 
887  void setAddContentCallback(const AddContentCallback &cb);
888 
889  void setCallState(const Tp::CallState &state, uint flags, const Tp::CallStateReason &stateReason, const QVariantMap &callStateDetails);
890  void setMembersFlags(const Tp::CallMemberMap &flagsChanged, const Tp::HandleIdentifierMap &identifiers, const Tp::UIntList &removed, const Tp::CallStateReason &reason);
891  BaseCallContentPtr addContent(const QString &name, const Tp::MediaStreamType &type, const Tp::MediaStreamDirection &direction);
892  void addContent(BaseCallContentPtr content);
893 
895 
896 protected:
898  bool hardwareStreaming,
899  uint initialTransport,
900  bool initialAudio,
901  bool initialVideo,
902  QString initialAudioName,
903  QString initialVideoName,
904  bool mutableContents = false);
905 
906 private:
907  void createAdaptor();
908 
909  class Adaptee;
910  friend class Adaptee;
911  struct Private;
912  friend struct Private;
913  Private *mPriv;
914 };
915 
917 {
918  Q_OBJECT
919  Q_DISABLE_COPY(BaseChannelHoldInterface)
920 
921 public:
922  static BaseChannelHoldInterfacePtr create() {
923  return BaseChannelHoldInterfacePtr(new BaseChannelHoldInterface());
924  }
925  template<typename BaseChannelHoldInterfaceSubclass>
928  new BaseChannelHoldInterfaceSubclass());
929  }
930  virtual ~BaseChannelHoldInterface();
931 
932  Tp::LocalHoldState getHoldState() const;
933  Tp::LocalHoldStateReason getHoldReason() const;
934  void setHoldState(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason);
935 
937  void setSetHoldStateCallback(const SetHoldStateCallback &cb);
938 Q_SIGNALS:
939  void holdStateChanged(const Tp::LocalHoldState &state, const Tp::LocalHoldStateReason &reason);
940 private:
942  void createAdaptor();
943 
944  class Adaptee;
945  friend class Adaptee;
946  struct Private;
947  friend struct Private;
948  Private *mPriv;
949 };
950 
952 {
953  Q_OBJECT
955 
956 public:
957  static BaseChannelMergeableConferenceInterfacePtr create() {
958  return BaseChannelMergeableConferenceInterfacePtr(new BaseChannelMergeableConferenceInterface());
959  }
960  template<typename BaseChannelMergeableConferenceInterfaceSubclass>
963  new BaseChannelMergeableConferenceInterfaceSubclass());
964  }
966 
967  void merge(const QDBusObjectPath &channel);
968 
970  void setMergeCallback(const MergeCallback &cb);
971 private:
973  void createAdaptor();
974 
975  class Adaptee;
976  friend class Adaptee;
977  struct Private;
978  friend struct Private;
979  Private *mPriv;
980 };
981 
983 {
984  Q_OBJECT
985  Q_DISABLE_COPY(BaseChannelSplittableInterface)
986 
987 public:
988  static BaseChannelSplittableInterfacePtr create() {
989  return BaseChannelSplittableInterfacePtr(new BaseChannelSplittableInterface());
990  }
991  template<typename BaseChannelSplittableInterfaceSubclass>
994  new BaseChannelSplittableInterfaceSubclass());
995  }
997 
998  void split();
999 
1001  void setSplitCallback(const SplitCallback &cb);
1002 private:
1004  void createAdaptor();
1005 
1006  class Adaptee;
1007  friend class Adaptee;
1008  struct Private;
1009  friend struct Private;
1010  Private *mPriv;
1011 };
1012 
1014 {
1015  Q_OBJECT
1016  Q_DISABLE_COPY(BaseChannelConferenceInterface)
1017 
1018 public:
1019  static BaseChannelConferenceInterfacePtr create(Tp::ObjectPathList initialChannels = Tp::ObjectPathList(),
1020  Tp::UIntList initialInviteeHandles = Tp::UIntList(),
1021  QStringList initialInviteeIDs = QStringList(),
1022  QString invitationMessage = QString(),
1023  ChannelOriginatorMap originalChannels = ChannelOriginatorMap()) {
1024  return BaseChannelConferenceInterfacePtr(new BaseChannelConferenceInterface(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
1025  }
1026  template<typename BaseChannelConferenceInterfaceSubclass>
1028  Tp::UIntList initialInviteeHandles = Tp::UIntList(),
1029  QStringList initialInviteeIDs = QStringList(),
1030  QString invitationMessage = QString(),
1031  ChannelOriginatorMap originalChannels = ChannelOriginatorMap()) {
1033  new BaseChannelConferenceInterfaceSubclass(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
1034  }
1035  virtual ~BaseChannelConferenceInterface();
1036 
1037  QVariantMap immutableProperties() const;
1038  Tp::ObjectPathList channels() const;
1039  Tp::ObjectPathList initialChannels() const;
1040  Tp::UIntList initialInviteeHandles() const;
1041  QStringList initialInviteeIDs() const;
1042  QString invitationMessage() const;
1043  ChannelOriginatorMap originalChannels() const;
1044 
1045  void mergeChannel(const QDBusObjectPath &channel, uint channelHandle, const QVariantMap &properties);
1046  void removeChannel(const QDBusObjectPath &channel, const QVariantMap &details);
1047 
1048 private:
1049  BaseChannelConferenceInterface(Tp::ObjectPathList initialChannels, Tp::UIntList initialInviteeHandles, QStringList initialInviteeIDs, QString invitationMessage, ChannelOriginatorMap originalChannels);
1050  void createAdaptor();
1051 
1052  class Adaptee;
1053  friend class Adaptee;
1054  struct Private;
1055  friend struct Private;
1056  Private *mPriv;
1057 };
1058 
1060 {
1061  Q_OBJECT
1062  Q_DISABLE_COPY(BaseChannelSMSInterface)
1063 
1064 public:
1065  static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel) {
1066  return BaseChannelSMSInterfacePtr(new BaseChannelSMSInterface(flash, smsChannel));
1067  }
1068  template<typename BaseChannelSMSInterfaceSubclass>
1069  static SharedPtr<BaseChannelSMSInterfaceSubclass> create(bool flash, bool smsChannel) {
1071  new BaseChannelSMSInterfaceSubclass(flash, smsChannel));
1072  }
1073  virtual ~BaseChannelSMSInterface();
1074 
1075  QVariantMap immutableProperties() const;
1076 
1078  void setGetSMSLengthCallback(const GetSMSLengthCallback &cb);
1079 
1080  bool flash() const;
1081  bool smsChannel() const;
1082 
1083 Q_SIGNALS:
1084  void smsChannelChanged(bool smsChannel);
1085 
1086 private:
1087  BaseChannelSMSInterface(bool flash, bool smsChannel);
1088  void createAdaptor();
1089 
1090  class Adaptee;
1091  friend class Adaptee;
1092  struct Private;
1093  friend struct Private;
1094  Private *mPriv;
1095 };
1096 
1097 }
1098 #endif
Definition: build/TelepathyQt/_gen/types.h:928
static BaseChannelMessagesInterfacePtr create(BaseChannelTextType *textTypeInterface, QStringList supportedContentTypes, UIntList messageTypes, uint messagePartSupportFlags, uint deliveryReportingSupport)
Definition: base-channel.h:168
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:1019
Definition: build/TelepathyQt/_gen/constants.h:1382
static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel)
Definition: base-channel.h:1065
Definition: build/TelepathyQt/_gen/types.h:772
Definition: base-channel.h:225
Base class for implementations of Channel.Interface.Messages.
Definition: base-channel.h:162
Callback1< void, DBusError * > SetQueuedCallback
Definition: base-channel.h:883
Base class for D-Bus services.
Definition: dbus-service.h:46
Base class for channel implementations.
Definition: base-channel.h:42
Callback1< void, DBusError * > ListRoomsCallback
Definition: base-channel.h:327
QFlags< ChannelGroupFlag > ChannelGroupFlags
Definition: build/TelepathyQt/_gen/constants.h:1043
static SharedPtr< BaseChannelRoomListTypeSubclass > create(const QString &server=QString())
Definition: base-channel.h:312
static SharedPtr< BaseChannelRoomInterfaceSubclass > create(const QString &roomName, const QString &server, const QString &creator, uint creatorHandle, const QDateTime &creationTimestamp)
Definition: base-channel.h:689
Definition: build/TelepathyQt/_gen/types.h:109
Callback2< void, const QDBusObjectPath &, DBusError * > MergeCallback
Definition: base-channel.h:969
Callback2< void, const Tp::CaptchaAnswers &, DBusError * > AnswerCaptchasCallback
Definition: base-channel.h:403
Callback3< QByteArray, uint, const QString &, DBusError * > GetCaptchaDataCallback
Definition: base-channel.h:400
static BaseChannelCallTypePtr create(BaseChannel *channel, bool hardwareStreaming, uint initialTransport, bool initialAudio, bool initialVideo, QString initialAudioName, QString initialVideoName, bool mutableContents=false)
Definition: base-channel.h:814
static SharedPtr< BaseChannelTextTypeSubclass > create(BaseChannel *channel)
Definition: base-channel.h:129
static BaseChannelPtr create(BaseConnection *connection, const QString &channelType, Tp::HandleType targetHandleType=Tp::HandleTypeNone, uint targetHandle=0)
Definition: base-channel.h:48
static BaseChannelRoomListTypePtr create(const QString &server=QString())
Definition: base-channel.h:307
static SharedPtr< BaseChannelSMSInterfaceSubclass > create(bool flash, bool smsChannel)
Definition: base-channel.h:1069
QList< MessagePart > MessagePartList
Definition: build/TelepathyQt/_gen/types.h:2068
Callback2< void, const QVariantMap &, DBusError * > UpdateConfigurationCallback
Definition: base-channel.h:791
Callback2< void, uint, DBusError * > SetChatStateCallback
Definition: base-channel.h:589
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:894
static BaseChannelGroupInterfacePtr create()
Definition: base-channel.h:614
EnsureChannelCallback ensureChannel
Definition: base-channel.h:853
Base class for implementations of Channel.Interface.CaptchaAuthentication.
Definition: base-channel.h:379
static BaseChannelSplittableInterfacePtr create()
Definition: base-channel.h:988
Base class of Channel.Type.FileTransfer channel type.
Definition: base-channel.h:218
static SharedPtr< BaseChannelRoomConfigInterfaceSubclass > create()
Definition: base-channel.h:741
CreateChannelCallback createChannel
Definition: base-channel.h:850
Base class for D-Bus service interfaces.
Definition: dbus-service.h:73
Callback3< void, uint, const QString &, DBusError * > CancelCaptchaCallback
Definition: base-channel.h:406
Base class for implementations of Channel.Interface.Room2.
Definition: base-channel.h:670
Callback1< void, DBusError * > AcceptSASLCallback
Definition: base-channel.h:498
Base class for Connection implementations.
Definition: base-connection.h:44
Base class for implementations of Channel.Interface.Securable.
Definition: base-channel.h:527
Callback1< void, DBusError * > StopListingCallback
Definition: base-channel.h:331
static SharedPtr< BaseChannelHoldInterfaceSubclass > create()
Definition: base-channel.h:926
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:1027
MediaStreamType
Definition: build/TelepathyQt/_gen/constants.h:2716
static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha)
Definition: base-channel.h:385
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:849
CallState
Definition: build/TelepathyQt/_gen/constants.h:2286
Base class for implementations of Channel.Interface.Splittable.
Definition: base-channel.h:982
Base class for implementations of Channel.Type.Call.
Definition: base-channel.h:808
LocalHoldStateReason
Definition: build/TelepathyQt/_gen/constants.h:3516
static BaseChannelChatStateInterfacePtr create()
Definition: base-channel.h:573
static BaseChannelMergeableConferenceInterfacePtr create()
Definition: base-channel.h:957
Definition: build/TelepathyQt/_gen/types.h:1700
static SharedPtr< BaseChannelCaptchaAuthenticationInterfaceSubclass > create(bool canRetryCaptcha)
Definition: base-channel.h:389
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > AddMembersCallback
Definition: base-channel.h:648
Base class for implementations of Channel.Type.ServerAuthentifcation.
Definition: base-channel.h:350
Base class for implementations of Channel.Interface.SMS.
Definition: base-channel.h:1059
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
MediaStreamDirection
Definition: build/TelepathyQt/_gen/constants.h:2777
Callback2< void, const QByteArray &, DBusError * > RespondCallback
Definition: base-channel.h:494
static SharedPtr< BaseChannelSecurableInterfaceSubclass > create()
Definition: base-channel.h:538
Definition: build/TelepathyQt/_gen/types.h:905
Callback3< void, uint, const QString &, DBusError * > AbortSASLCallback
Definition: base-channel.h:502
static SharedPtr< BaseChannelMessagesInterfaceSubclass > create()
Definition: base-channel.h:180
QList< RoomInfo > RoomInfoList
Definition: build/TelepathyQt/_gen/types.h:2733
Base class for implementations of Channel.Type.Text.
Definition: base-channel.h:119
Base class for implementations of Channel.Interface.Group.
Definition: base-channel.h:608
static SharedPtr< BaseChannelFileTransferTypeSubclass > create(const QVariantMap &request)
Definition: base-channel.h:234
Base class for implementations of Channel.Interface.SASLAuthentication.
Definition: base-channel.h:424
static SharedPtr< BaseChannelGroupInterfaceSubclass > create()
Definition: base-channel.h:619
Callback2< void, const QString &, DBusError * > StartMechanismCallback
Definition: base-channel.h:486
static SharedPtr< BaseChannelChatStateInterfaceSubclass > create()
Definition: base-channel.h:578
Base class for implementations of Channel.Type.RoomList.
Definition: base-channel.h:301
Callback3< void, const QString &, const QByteArray &, DBusError * > StartMechanismWithDataCallback
Definition: base-channel.h:490
static BaseChannelHoldInterfacePtr create()
Definition: base-channel.h:922
Definition: build/TelepathyQt/_gen/types.h:85
Callback1< void, DBusError * > SetRingingCallback
Definition: base-channel.h:880
Definition: build/TelepathyQt/_gen/types.h:336
HandleType
Definition: build/TelepathyQt/_gen/constants.h:1375
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:430
Callback3< QString, const Tp::MessagePartList &, uint, DBusError * > SendMessageCallback
Definition: base-channel.h:196
QList< MessagePartList > MessagePartListList
Definition: build/TelepathyQt/_gen/types.h:2076
Base class for implementations of Channel.Interface.MergeableConference.
Definition: base-channel.h:951
QList< LocalPendingInfo > LocalPendingInfoList
Definition: build/TelepathyQt/_gen/types.h:1758
static BaseChannelFileTransferTypePtr create(const QVariantMap &request)
Definition: base-channel.h:229
Base class for implementations of Channel.Interface.RoomConfig1.
Definition: base-channel.h:730
Small container class, containing a D-Bus error.
Definition: dbus-error.h:35
LocalHoldState
Definition: build/TelepathyQt/_gen/constants.h:3466
static BaseChannelSecurableInterfacePtr create()
Definition: base-channel.h:533
static SharedPtr< BaseChannelMergeableConferenceInterfaceSubclass > create()
Definition: base-channel.h:961
Base class for implementations of Channel.Interface.Chat.State.
Definition: base-channel.h:567
static BaseChannelTextTypePtr create(BaseChannel *channel)
Definition: base-channel.h:125
Definition: build/TelepathyQt/_gen/types.h:1677
Definition: build/TelepathyQt/_gen/types.h:3146
Callback1< void, DBusError * > SplitCallback
Definition: base-channel.h:1000
Direction
Definition: base-channel.h:224
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:852
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:447
Callback1< void, QString > MessageAcknowledgedCallback
Definition: base-channel.h:136
static SharedPtr< BaseChannelServerAuthenticationTypeSubclass > create(const QString &authenticationMethod)
Definition: base-channel.h:360
Callback1< void, DBusError * > AcceptCallback
Definition: base-channel.h:874
Callback3< void, const Tp::LocalHoldState &, const Tp::LocalHoldStateReason &, DBusError * > SetHoldStateCallback
Definition: base-channel.h:936
Definition: build/TelepathyQt/_gen/types.h:302
Base class for implementations of Channel.Interface.Conference.
Definition: base-channel.h:1013
Callback4< void, uint, const QString &, const QString &, DBusError * > HangupCallback
Definition: base-channel.h:877
Base class for implementations of Channel.Interface.Hold.
Definition: base-channel.h:916
Callback4< QDBusObjectPath, const QString &, const Tp::MediaStreamType &, const Tp::MediaStreamDirection &, DBusError * > AddContentCallback
Definition: base-channel.h:886
static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod)
Definition: base-channel.h:356
Callback4< void, Tp::CaptchaInfoList &, uint &, QString &, DBusError * > GetCaptchasCallback
Definition: base-channel.h:397
Definition: abstract-adaptor.cpp:31
Base class for all the Channel object interface implementations.
Definition: base-channel.h:97
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:831
static BaseChannelRoomConfigInterfacePtr create()
Definition: base-channel.h:736
static BaseChannelRoomInterfacePtr create(const QString &roomName, const QString &server, const QString &creator, uint creatorHandle, const QDateTime &creationTimestamp)
Definition: base-channel.h:676
QList< RequestableChannelClass > RequestableChannelClassList
Definition: build/TelepathyQt/_gen/types.h:2664
Callback4< void, const Tp::UIntList &, const QString &, uint, DBusError * > RemoveMembersCallback
Definition: base-channel.h:652
Callback2< void, const Tp::MessagePartList &, DBusError * > GetSMSLengthCallback
Definition: base-channel.h:1077
static SharedPtr< BaseChannelSplittableInterfaceSubclass > create()
Definition: base-channel.h:992