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

requestable-channel-class-spec.h
1
23 #ifndef _TelepathyQt_requestable_channel_class_spec_h_HEADER_GUARD_
24 #define _TelepathyQt_requestable_channel_class_spec_h_HEADER_GUARD_
25
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29
30 #include <TelepathyQt/Constants>
31 #include <TelepathyQt/Types>
32
33 namespace Tp
34 {
35
36 class TP_QT_EXPORT RequestableChannelClassSpec
37 {
38 public:
39 RequestableChannelClassSpec();
40 RequestableChannelClassSpec(const RequestableChannelClass &rcc);
41 RequestableChannelClassSpec(const RequestableChannelClassSpec &other);
42 ~RequestableChannelClassSpec();
43
44 static RequestableChannelClassSpec textChat();
45 static RequestableChannelClassSpec textChatroom();
46
47 static RequestableChannelClassSpec audioCall();
48 static RequestableChannelClassSpec audioCallWithVideoAllowed();
49 static RequestableChannelClassSpec videoCall();
50 static RequestableChannelClassSpec videoCallWithAudioAllowed();
51
52 TP_QT_DEPRECATED static RequestableChannelClassSpec streamedMediaCall();
53 TP_QT_DEPRECATED static RequestableChannelClassSpec streamedMediaAudioCall();
54 TP_QT_DEPRECATED static RequestableChannelClassSpec streamedMediaVideoCall();
55 TP_QT_DEPRECATED static RequestableChannelClassSpec streamedMediaVideoCallWithAudio();
56
57 static RequestableChannelClassSpec fileTransfer();
58
59 static RequestableChannelClassSpec conferenceTextChat();
60 static RequestableChannelClassSpec conferenceTextChatWithInvitees();
61 static RequestableChannelClassSpec conferenceTextChatroom();
62 static RequestableChannelClassSpec conferenceTextChatroomWithInvitees();
63 TP_QT_DEPRECATED static RequestableChannelClassSpec conferenceStreamedMediaCall();
64 TP_QT_DEPRECATED static RequestableChannelClassSpec conferenceStreamedMediaCallWithInvitees();
65
66 static RequestableChannelClassSpec contactSearch();
67 static RequestableChannelClassSpec contactSearchWithSpecificServer();
68 static RequestableChannelClassSpec contactSearchWithLimit();
69 static RequestableChannelClassSpec contactSearchWithSpecificServerAndLimit();
70
71 static RequestableChannelClassSpec dbusTube(const QString &serviceName = QString());
72 static RequestableChannelClassSpec streamTube(const QString &service = QString());
73
74 bool isValid() const { return mPriv.constData() != 0; }
75
76 RequestableChannelClassSpec &operator=(const RequestableChannelClassSpec &other);
77 bool operator==(const RequestableChannelClassSpec &other) const;
78
79 bool supports(const RequestableChannelClassSpec &spec) const;
80
81 QString channelType() const;
82
83 bool hasTargetHandleType() const;
84 HandleType targetHandleType() const;
85
86 bool hasFixedProperty(const QString &name) const;
87 QVariant fixedProperty(const QString &name) const;
88 QVariantMap fixedProperties() const;
89
90 bool allowsProperty(const QString &name) const;
91 QStringList allowedProperties() const;
92
93 RequestableChannelClass bareClass() const;
94
95 private:
96 struct Private;
97 friend struct Private;
98 QSharedDataPointer<Private> mPriv;
99 };
100
101 class TP_QT_EXPORT RequestableChannelClassSpecList :
102 public QList<RequestableChannelClassSpec>
103 {
104 public:
105 RequestableChannelClassSpecList() { }
106 RequestableChannelClassSpecList(const RequestableChannelClass &rcc)
107 {
108 append(RequestableChannelClassSpec(rcc));
109 }
110 RequestableChannelClassSpecList(const RequestableChannelClassList &rccs)
111 {
112 Q_FOREACH (const RequestableChannelClass &rcc, rccs) {
113 append(RequestableChannelClassSpec(rcc));
114 }
115 }
116 RequestableChannelClassSpecList(const RequestableChannelClassSpec &rccSpec)
117 {
118 append(rccSpec);
119 }
120 RequestableChannelClassSpecList(const QList<RequestableChannelClassSpec> &other)
121 : QList<RequestableChannelClassSpec>(other)
122 {
123 }
124
125 RequestableChannelClassList bareClasses() const
126 {
127 RequestableChannelClassList list;
128 Q_FOREACH (const RequestableChannelClassSpec &rccSpec, *this) {
129 list.append(rccSpec.bareClass());
130 }
131 return list;
132 }
133 };
134
135 } // Tp
136
137 Q_DECLARE_METATYPE(Tp::RequestableChannelClassSpec);
138 Q_DECLARE_METATYPE(Tp::RequestableChannelClassSpecList);
139
140 #endif
Tp::RequestableChannelClassSpecList::RequestableChannelClassSpecList
RequestableChannelClassSpecList(const RequestableChannelClassList &rccs)
Definition: requestable-channel-class-spec.h:110
Tp::RequestableChannelClassSpecList::RequestableChannelClassSpecList
RequestableChannelClassSpecList(const RequestableChannelClass &rcc)
Definition: requestable-channel-class-spec.h:106
Tp::RequestableChannelClassSpecList::RequestableChannelClassSpecList
RequestableChannelClassSpecList(const RequestableChannelClassSpec &rccSpec)
Definition: requestable-channel-class-spec.h:116
Tp
Definition: abstract-adaptor.cpp:31
Tp::RequestableChannelClass
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/types.h:2545
Tp::RequestableChannelClassSpecList::bareClasses
RequestableChannelClassList bareClasses() const
Definition: requestable-channel-class-spec.h:125
Tp::RequestableChannelClassSpec::isValid
bool isValid() const
Definition: requestable-channel-class-spec.h:74
Tp::RequestableChannelClassSpecList::RequestableChannelClassSpecList
RequestableChannelClassSpecList(const QList< RequestableChannelClassSpec > &other)
Definition: requestable-channel-class-spec.h:120
QList::append
void append(const T &value)
Tp::RequestableChannelClassSpecList::RequestableChannelClassSpecList
RequestableChannelClassSpecList()
Definition: requestable-channel-class-spec.h:105
Tp::RequestableChannelClassSpecList
The RequestableChannelClassSpecList class represents a list of RequestableChannelClassSpec.
Definition: requestable-channel-class-spec.h:101
Tp::HandleType
HandleType
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:1375
QString
QList
QStringList
Tp::operator==
bool operator==(const SUSocketAddress &v1, const SUSocketAddress &v2)
Definition: types.cpp:50
Tp::RequestableChannelClassSpec::bareClass
RequestableChannelClass bareClass() const
Definition: requestable-channel-class-spec.cpp:583
Tp::RequestableChannelClassSpec
The RequestableChannelClassSpec class represents a Telepathy requestable channel class.
Definition: requestable-channel-class-spec.h:36
QSharedDataPointer< Private >
QVariant