22 #ifndef _TelepathyQt_base_channel_h_HEADER_GUARD_
23 #define _TelepathyQt_base_channel_h_HEADER_GUARD_
25 #ifndef IN_TP_QT_HEADER
26 #error IN_TP_QT_HEADER
29 #include <TelepathyQt/DBusService>
30 #include <TelepathyQt/Global>
31 #include <TelepathyQt/Types>
32 #include <TelepathyQt/Callbacks>
33 #include <TelepathyQt/Constants>
35 #include <QDBusConnection>
49 uint targetHandle, uint targetHandleType) {
51 channelType, targetHandle, targetHandleType));
56 QVariantMap immutableProperties()
const;
57 bool registerObject(
DBusError *error = NULL);
58 virtual QString uniqueName()
const;
62 AbstractChannelInterfacePtr interface(
const QString &interfaceName)
const;
63 uint targetHandle()
const;
65 uint targetHandleType()
const;
66 bool requested()
const;
67 uint initiatorHandle()
const;
71 void setInitiatorHandle(uint initiatorHandle);
72 void setInitiatorID(
const QString &initiatorID);
73 void setTargetID(
const QString &targetID);
74 void setRequested(
bool requested);
78 bool plugInterface(
const AbstractChannelInterfacePtr &interface);
84 const QString &channelType, uint targetHandle, uint targetHandleType);
85 virtual bool registerObject(
const QString &busName,
const QString &objectPath,
108 friend class Private;
121 template<
typename BaseChannelTextTypeSub
class>
124 new BaseChannelTextTypeSubclass(channel));
135 QVariantMap immutableProperties()
const;
140 void setMessageAcknowledgedCallback(
const MessageAcknowledgedCallback &cb);
147 void sent(uint timestamp, uint type,
QString text);
153 void createAdaptor();
156 friend class Adaptee;
158 friend struct Private;
171 uint messagePartSupportFlags,
172 uint deliveryReportingSupport) {
174 supportedContentTypes,
176 messagePartSupportFlags,
177 deliveryReportingSupport));
179 template<
typename BaseChannelMessagesInterfaceSub
class>
182 new BaseChannelMessagesInterfaceSubclass());
186 QVariantMap immutableProperties()
const;
190 uint messagePartSupportFlags();
191 uint deliveryReportingSupport();
197 void setSendMessageCallback(
const SendMessageCallback &cb);
201 void pendingMessagesRemoved(
const Tp::UIntList &messageIDs);
207 uint messagePartSupportFlags,
208 uint deliveryReportingSupport);
209 void createAdaptor();
212 friend class Adaptee;
214 friend struct Private;
224 static BaseChannelServerAuthenticationTypePtr
create(
const QString &authenticationMethod) {
227 template<
typename BaseChannelServerAuthenticationTypeSub
class>
230 new BaseChannelServerAuthenticationTypeSubclass(authenticationMethod));
234 QVariantMap immutableProperties()
const;
238 void createAdaptor();
241 friend class Adaptee;
243 friend struct Private;
253 static BaseChannelCaptchaAuthenticationInterfacePtr
create(
bool canRetryCaptcha) {
256 template<
typename BaseChannelCaptchaAuthenticationInterfaceSub
class>
259 new BaseChannelCaptchaAuthenticationInterfaceSubclass(canRetryCaptcha));
263 QVariantMap immutableProperties()
const;
266 void setGetCaptchasCallback(
const GetCaptchasCallback &cb);
269 void setGetCaptchaDataCallback(
const GetCaptchaDataCallback &cb);
272 void setAnswerCaptchasCallback(
const AnswerCaptchasCallback &cb);
275 void setCancelCaptchaCallback(
const CancelCaptchaCallback &cb);
277 void setCaptchaStatus(uint status);
278 void setCaptchaError(
const QString &busName);
279 void setCaptchaErrorDetails(
const QVariantMap &error);
283 void createAdaptor();
286 friend class Adaptee;
288 friend struct Private;
301 const QString &authorizationIdentity,
302 const QString &defaultUsername,
304 bool maySaveResponse)
309 authorizationIdentity,
314 template<
typename BaseChannelSASLAuthenticationInterfaceSub
class>
318 const QString &authorizationIdentity,
319 const QString &defaultUsername,
321 bool maySaveResponse)
324 new BaseChannelSASLAuthenticationInterfaceSubclass(availableMechanisms,
327 authorizationIdentity,
335 QVariantMap immutableProperties()
const;
338 bool hasInitialData()
const;
339 bool canTryAgain()
const;
340 QString authorizationIdentity()
const;
341 QString defaultUsername()
const;
343 bool maySaveResponse()
const;
345 uint saslStatus()
const;
346 void setSaslStatus(uint status,
const QString &reason,
const QVariantMap &details);
349 void setSaslError(
const QString &saslError);
351 QVariantMap saslErrorDetails()
const;
352 void setSaslErrorDetails(
const QVariantMap &saslErrorDetails);
355 void setStartMechanismCallback(
const StartMechanismCallback &cb);
359 void setStartMechanismWithDataCallback(
const StartMechanismWithDataCallback &cb);
363 void setRespondCallback(
const RespondCallback &cb);
367 void setAcceptSaslCallback(
const AcceptSASLCallback &cb);
371 void setAbortSaslCallback(
const AbortSASLCallback &cb);
374 void newChallenge(
const QByteArray &challengeData);
380 const QString &authorizationIdentity,
381 const QString &defaultUsername,
383 bool maySaveResponse);
386 void createAdaptor();
389 friend class Adaptee;
391 friend struct Private;
401 static BaseChannelSecurableInterfacePtr
create()
405 template<
typename BaseChannelSecurableInterfaceSub
class>
409 new BaseChannelSecurableInterfaceSubclass());
414 QVariantMap immutableProperties()
const;
416 bool encrypted()
const;
417 void setEncrypted(
bool encrypted);
419 bool verified()
const;
420 void setVerified(
bool verified);
426 void createAdaptor();
429 friend class Adaptee;
431 friend struct Private;
441 static BaseChannelChatStateInterfacePtr
create()
445 template<
typename BaseChannelChatStateInterfaceSub
class>
449 new BaseChannelChatStateInterfaceSubclass());
454 QVariantMap immutableProperties()
const;
460 void setSetChatStateCallback(
const SetChatStateCallback &cb);
461 void setChatState(uint state,
DBusError *error);
463 void chatStateChanged(uint contact, uint state);
469 void createAdaptor();
472 friend class Adaptee;
474 friend struct Private;
487 template<
typename BaseChannelGroupInterfaceSub
class>
490 new BaseChannelGroupInterfaceSubclass(initialFlags, selfHandle));
494 QVariantMap immutableProperties()
const;
497 void setRemoveMembersCallback(
const RemoveMembersCallback &cb);
500 void setAddMembersCallback(
const AddMembersCallback &cb);
509 void createAdaptor();
512 friend class Adaptee;
514 friend struct Private;
525 uint initialTransport,
530 bool mutableContents =
false) {
540 template<
typename BaseChannelCallTypeSub
class>
542 uint initialTransport,
547 bool mutableContents =
false) {
549 new BaseChannelCallTypeSubclass(channel,
567 QVariantMap immutableProperties()
const;
570 QVariantMap callStateDetails();
574 bool hardwareStreaming();
577 uint initialTransport();
582 bool mutableContents();
585 void setAcceptCallback(
const AcceptCallback &cb);
588 void setHangupCallback(
const HangupCallback &cb);
591 void setSetRingingCallback(
const SetRingingCallback &cb);
594 void setSetQueuedCallback(
const SetQueuedCallback &cb);
597 void setAddContentCallback(
const AddContentCallback &cb);
602 void addContent(BaseCallContentPtr content);
608 bool hardwareStreaming,
609 uint initialTransport,
614 bool mutableContents =
false);
617 void createAdaptor();
620 friend class Adaptee;
622 friend struct Private;
632 static BaseChannelHoldInterfacePtr
create() {
635 template<
typename BaseChannelHoldInterfaceSub
class>
638 new BaseChannelHoldInterfaceSubclass());
642 QVariantMap immutableProperties()
const;
649 void setSetHoldStateCallback(
const SetHoldStateCallback &cb);
654 void createAdaptor();
657 friend class Adaptee;
659 friend struct Private;
669 static BaseChannelMergeableConferenceInterfacePtr
create() {
672 template<
typename BaseChannelMergeableConferenceInterfaceSub
class>
675 new BaseChannelMergeableConferenceInterfaceSubclass());
679 QVariantMap immutableProperties()
const;
684 void setMergeCallback(
const MergeCallback &cb);
687 void createAdaptor();
690 friend class Adaptee;
692 friend struct Private;
702 static BaseChannelSplittableInterfacePtr
create() {
705 template<
typename BaseChannelSplittableInterfaceSub
class>
708 new BaseChannelSplittableInterfaceSubclass());
712 QVariantMap immutableProperties()
const;
717 void setSplitCallback(
const SplitCallback &cb);
720 void createAdaptor();
723 friend class Adaptee;
725 friend struct Private;
740 return BaseChannelConferenceInterfacePtr(
new BaseChannelConferenceInterface(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
742 template<
typename BaseChannelConferenceInterfaceSub
class>
749 new BaseChannelConferenceInterfaceSubclass(initialChannels, initialInviteeHandles, initialInviteeIDs, invitationMessage, originalChannels));
753 QVariantMap immutableProperties()
const;
758 QString invitationMessage()
const;
761 void mergeChannel(
const QDBusObjectPath &channel, uint channelHandle,
const QVariantMap &properties);
762 void removeChannel(
const QDBusObjectPath &channel,
const QVariantMap &details);
766 void createAdaptor();
769 friend class Adaptee;
771 friend struct Private;
781 static BaseChannelSMSInterfacePtr
create(
bool flash,
bool smsChannel) {
784 template<
typename BaseChannelSMSInterfaceSub
class>
787 new BaseChannelSMSInterfaceSubclass(flash, smsChannel));
791 QVariantMap immutableProperties()
const;
794 void setGetSMSLengthCallback(
const GetSMSLengthCallback &cb);
797 bool smsChannel()
const;
800 void smsChannelChanged(
bool smsChannel);
804 void createAdaptor();
807 friend class Adaptee;
809 friend struct Private;
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:885
static BaseChannelCallTypePtr create(BaseChannel *channel, bool hardwareStreaming, uint initialTransport, bool initialAudio, bool initialVideo, QString initialAudioName, QString initialVideoName, bool mutableContents=false)
Definition: base-channel.h:524
Base class for implementations of Channel.Type.Text.
Definition: base-channel.h:112
Callback3< void, const QString &, const QByteArray &, DBusError * > StartMechanismWithDataCallback
Definition: base-channel.h:358
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:137
Definition: abstract-adaptor.cpp:31
CreateChannelCallback createChannel
Definition: base-channel.h:560
Callback3< void, const Tp::LocalHoldState &, const Tp::LocalHoldStateReason &, DBusError * > SetHoldStateCallback
Definition: base-channel.h:648
Callback4< QDBusObjectPath, const QString &, const Tp::MediaStreamType &, const Tp::MediaStreamDirection &, DBusError * > AddContentCallback
Definition: base-channel.h:596
Callback2< void, const Tp::CaptchaAnswers &, DBusError * > AnswerCaptchasCallback
Definition: base-channel.h:271
static BaseChannelSplittableInterfacePtr create()
Definition: base-channel.h:702
static SharedPtr< BaseChannelGroupInterfaceSubclass > create(ChannelGroupFlags initialFlags, uint selfHandle)
Definition: base-channel.h:488
Base class for implementations of Channel.Interface.MergeableConference.
Definition: base-channel.h:663
Callback2< void, const Tp::MessagePartList &, DBusError * > GetSMSLengthCallback
Definition: base-channel.h:793
Base class for implementations of Channel.Interface.Group.
Definition: base-channel.h:478
Callback3< QByteArray, uint, const QString &, DBusError * > GetCaptchaDataCallback
Definition: base-channel.h:268
static SharedPtr< BaseChannelSecurableInterfaceSubclass > create()
Definition: base-channel.h:406
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > AddMembersCallback
Definition: base-channel.h:499
static BaseChannelServerAuthenticationTypePtr create(const QString &authenticationMethod)
Definition: base-channel.h:224
Callback4< void, uint, const QString &, const QString &, DBusError * > HangupCallback
Definition: base-channel.h:587
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:559
Callback2< void, const QDBusObjectPath &, DBusError * > MergeCallback
Definition: base-channel.h:683
EnsureChannelCallback ensureChannel
Definition: base-channel.h:131
QDBusConnection sessionBus()
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:907
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:287
Callback3< QString, const Tp::MessagePartList &, uint, DBusError * > SendMessageCallback
Definition: base-channel.h:196
Callback3< void, uint, const QString &, DBusError * > AbortSASLCallback
Definition: base-channel.h:370
Callback3< void, uint, const QString &, DBusError * > CancelCaptchaCallback
Definition: base-channel.h:274
Base class for channel implementations.
Definition: base-channel.h:42
Base class for D-Bus service interfaces.
Definition: dbus-service.h:73
static BaseChannelSMSInterfacePtr create(bool flash, bool smsChannel)
Definition: base-channel.h:781
static SharedPtr< BaseChannelCallTypeSubclass > create(BaseChannel *channel, bool hardwareStreaming, uint initialTransport, bool initialAudio, bool initialVideo, QString initialAudioName, QString initialVideoName, bool mutableContents=false)
Definition: base-channel.h:541
Base class for implementations of Channel.Interface.Chat.State.
Definition: base-channel.h:435
Base class for implementations of Channel.Interface.Securable.
Definition: base-channel.h:395
LocalHoldState
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:3466
Callback2< QDBusObjectPath, const QVariantMap &, DBusError * > CreateChannelCallback
Definition: base-channel.h:127
Callback2< void, const QByteArray &, DBusError * > RespondCallback
Definition: base-channel.h:362
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:562
static SharedPtr< BaseChannelConferenceInterfaceSubclass > create(Tp::ObjectPathList initialChannels=Tp::ObjectPathList(), Tp::UIntList initialInviteeHandles=Tp::UIntList(), QStringList initialInviteeIDs=QStringList(), QString invitationMessage=QString(), ChannelOriginatorMap originalChannels=ChannelOriginatorMap())
Definition: base-channel.h:743
CallState
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2286
static BaseChannelTextTypePtr create(BaseChannel *channel)
Definition: base-channel.h:118
Base class for implementations of Channel.Interface.Splittable.
Definition: base-channel.h:696
Base class for all the Channel object interface implementations.
Definition: base-channel.h:95
Callback1< void, DBusError * > AcceptCallback
Definition: base-channel.h:584
static BaseChannelMessagesInterfacePtr create(BaseChannelTextType *textTypeInterface, QStringList supportedContentTypes, UIntList messageTypes, uint messagePartSupportFlags, uint deliveryReportingSupport)
Definition: base-channel.h:168
MediaStreamDirection
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2777
Base class for implementations of Channel.Interface.Conference.
Definition: base-channel.h:729
Callback1< void, DBusError * > SplitCallback
Definition: base-channel.h:716
static SharedPtr< BaseChannelTextTypeSubclass > create(BaseChannel *channel)
Definition: base-channel.h:122
Tp::RequestableChannelClassList requestableChannelClasses
Definition: base-channel.h:604
static SharedPtr< BaseChannelMergeableConferenceInterfaceSubclass > create()
Definition: base-channel.h:673
static BaseChannelHoldInterfacePtr create()
Definition: base-channel.h:632
Callback2< void, uint, DBusError * > SetChatStateCallback
Definition: base-channel.h:459
Callback1< void, DBusError * > SetQueuedCallback
Definition: base-channel.h:593
Base class for implementations of Channel.Interface.SASLAuthentication.
Definition: base-channel.h:292
CreateChannelCallback createChannel
Definition: base-channel.h:128
static BaseChannelConferenceInterfacePtr create(Tp::ObjectPathList initialChannels=Tp::ObjectPathList(), Tp::UIntList initialInviteeHandles=Tp::UIntList(), QStringList initialInviteeIDs=QStringList(), QString invitationMessage=QString(), ChannelOriginatorMap originalChannels=ChannelOriginatorMap())
Definition: base-channel.h:735
EnsureChannelCallback ensureChannel
Definition: base-channel.h:563
MediaStreamType
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2716
static SharedPtr< BaseChannelSASLAuthenticationInterfaceSubclass > create(const QStringList &availableMechanisms, bool hasInitialData, bool canTryAgain, const QString &authorizationIdentity, const QString &defaultUsername, const QString &defaultRealm, bool maySaveResponse)
Definition: base-channel.h:315
static SharedPtr< BaseChannelChatStateInterfaceSubclass > create()
Definition: base-channel.h:446
static BaseChannelChatStateInterfacePtr create()
Definition: base-channel.h:441
Base class for D-Bus services.
Definition: dbus-service.h:46
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:101
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:81
Callback4< void, Tp::CaptchaInfoList &, uint &, QString &, DBusError * > GetCaptchasCallback
Definition: base-channel.h:265
static BaseChannelGroupInterfacePtr create(ChannelGroupFlags initialFlags, uint selfHandle)
Definition: base-channel.h:484
Callback3< void, const Tp::UIntList &, const QString &, DBusError * > RemoveMembersCallback
Definition: base-channel.h:496
Base class for implementations of Channel.Interface.CaptchaAuthentication.
Definition: base-channel.h:247
Base class for Connection implementations.
Definition: base-connection.h:44
static SharedPtr< BaseChannelSMSInterfaceSubclass > create(bool flash, bool smsChannel)
Definition: base-channel.h:785
Callback1< void, QString > MessageAcknowledgedCallback
Definition: base-channel.h:139
static SharedPtr< BaseChannelCaptchaAuthenticationInterfaceSubclass > create(bool canRetryCaptcha)
Definition: base-channel.h:257
static BaseChannelCaptchaAuthenticationInterfacePtr create(bool canRetryCaptcha)
Definition: base-channel.h:253
Callback2< void, const QString &, DBusError * > StartMechanismCallback
Definition: base-channel.h:354
Small container class, containing a D-Bus error.
Definition: dbus-error.h:35
Base class for implementations of Channel.Interface.SMS.
Definition: base-channel.h:775
static SharedPtr< BaseChannelMessagesInterfaceSubclass > create()
Definition: base-channel.h:180
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:1646
Callback2< bool, const QVariantMap &, DBusError * > EnsureChannelCallback
Definition: base-channel.h:130
static BaseChannelSASLAuthenticationInterfacePtr create(const QStringList &availableMechanisms, bool hasInitialData, bool canTryAgain, const QString &authorizationIdentity, const QString &defaultUsername, const QString &defaultRealm, bool maySaveResponse)
Definition: base-channel.h:298
static SharedPtr< BaseChannelHoldInterfaceSubclass > create()
Definition: base-channel.h:636
static BaseChannelMergeableConferenceInterfacePtr create()
Definition: base-channel.h:669
static BaseChannelSecurableInterfacePtr create()
Definition: base-channel.h:401
static BaseChannelPtr create(BaseConnection *connection, const QString &channelType, uint targetHandle, uint targetHandleType)
Definition: base-channel.h:48
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:320
Base class for implementations of Channel.Type.Call.
Definition: base-channel.h:518
Base class for implementations of Channel.Interface.Messages.
Definition: base-channel.h:162
Base class for implementations of Channel.Interface.Hold.
Definition: base-channel.h:626
Callback1< void, DBusError * > AcceptSASLCallback
Definition: base-channel.h:366
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
static SharedPtr< BaseChannelSplittableInterfaceSubclass > create()
Definition: base-channel.h:706
Callback1< void, DBusError * > SetRingingCallback
Definition: base-channel.h:590
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:752
static SharedPtr< BaseChannelServerAuthenticationTypeSubclass > create(const QString &authenticationMethod)
Definition: base-channel.h:228
LocalHoldStateReason
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:3516
Base class for implementations of Channel.Type.ServerAuthentifcation.
Definition: base-channel.h:218