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


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