23 #ifndef _TelepathyQt_channel_class_spec_h_HEADER_GUARD_
24 #define _TelepathyQt_channel_class_spec_h_HEADER_GUARD_
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
30 #include <TelepathyQt/Constants>
31 #include <TelepathyQt/Global>
32 #include <TelepathyQt/Types>
34 #include <QSharedDataPointer>
36 #include <QVariantMap>
49 const QVariantMap &otherProperties = QVariantMap());
51 const QVariantMap &otherProperties = QVariantMap());
53 const QVariantMap &additionalProperties = QVariantMap());
66 bool matches(
const QVariantMap &immutableProperties)
const;
70 return qdbus_cast<QString>(
77 QVariant::fromValue(type));
90 QVariant::fromValue((uint) type));
100 return qdbus_cast<
bool>(
107 QVariant::fromValue(requested));
117 return qdbus_cast<
bool>(
124 QVariant::fromValue(
true));
134 return qdbus_cast<
bool>(
141 QVariant::fromValue(
true));
151 return qdbus_cast<
bool>(
158 QVariant::fromValue(
true));
168 return qdbus_cast<
bool>(
175 QVariant::fromValue(
true));
183 bool hasProperty(
const QString &qualifiedName)
const;
184 QVariant property(
const QString &qualifiedName)
const;
186 void setProperty(
const QString &qualifiedName,
const QVariant &value);
187 void unsetProperty(
const QString &qualifiedName);
189 QVariantMap allProperties()
const;
192 static ChannelClassSpec textChat(
const QVariantMap &additionalProperties = QVariantMap());
193 static ChannelClassSpec textChatroom(
const QVariantMap &additionalProperties = QVariantMap());
194 static ChannelClassSpec unnamedTextChat(
const QVariantMap &additionalProperties = QVariantMap());
196 static ChannelClassSpec mediaCall(
const QVariantMap &additionalProperties = QVariantMap());
197 static ChannelClassSpec audioCall(
const QVariantMap &additionalProperties = QVariantMap());
198 static ChannelClassSpec videoCall(
const QVariantMap &additionalProperties = QVariantMap());
199 static ChannelClassSpec videoCallWithAudio(
const QVariantMap &additionalProperties =
202 TP_QT_DEPRECATED
static ChannelClassSpec streamedMediaCall(
const QVariantMap &additionalProperties = QVariantMap());
203 TP_QT_DEPRECATED
static ChannelClassSpec streamedMediaAudioCall(
const QVariantMap &additionalProperties =
205 TP_QT_DEPRECATED
static ChannelClassSpec streamedMediaVideoCall(
const QVariantMap &additionalProperties =
207 TP_QT_DEPRECATED
static ChannelClassSpec streamedMediaVideoCallWithAudio(
const QVariantMap &additionalProperties =
210 TP_QT_DEPRECATED
static ChannelClassSpec unnamedStreamedMediaCall(
const QVariantMap &additionalProperties =
212 TP_QT_DEPRECATED
static ChannelClassSpec unnamedStreamedMediaAudioCall(
const QVariantMap &additionalProperties =
214 TP_QT_DEPRECATED
static ChannelClassSpec unnamedStreamedMediaVideoCall(
const QVariantMap &additionalProperties =
216 TP_QT_DEPRECATED
static ChannelClassSpec unnamedStreamedMediaVideoCallWithAudio(
const QVariantMap &additionalProperties =
219 static ChannelClassSpec serverAuthentication(
const QVariantMap &additionalProperties =
222 static ChannelClassSpec roomList(
const QVariantMap &additionalProperties = QVariantMap());
223 static ChannelClassSpec outgoingFileTransfer(
const QVariantMap &additionalProperties = QVariantMap());
224 static ChannelClassSpec incomingFileTransfer(
const QVariantMap &additionalProperties = QVariantMap());
225 static ChannelClassSpec outgoingStreamTube(
const QString &service = QString(),
226 const QVariantMap &additionalProperties = QVariantMap());
227 static ChannelClassSpec incomingStreamTube(
const QString &service = QString(),
228 const QVariantMap &additionalProperties = QVariantMap());
229 static ChannelClassSpec outgoingRoomStreamTube(
const QString &service = QString(),
230 const QVariantMap &additionalProperties = QVariantMap());
231 static ChannelClassSpec incomingRoomStreamTube(
const QString &service = QString(),
232 const QVariantMap &additionalProperties = QVariantMap());
233 static ChannelClassSpec outgoingDBusTube(
const QString &serviceName = QString(),
234 const QVariantMap &additionalProperties = QVariantMap());
235 static ChannelClassSpec incomingDBusTube(
const QString &serviceName = QString(),
236 const QVariantMap &additionalProperties = QVariantMap());
237 static ChannelClassSpec outgoingRoomDBusTube(
const QString &serviceName = QString(),
238 const QVariantMap &additionalProperties = QVariantMap());
239 static ChannelClassSpec incomingRoomDBusTube(
const QString &serviceName = QString(),
240 const QVariantMap &additionalProperties = QVariantMap());
241 static ChannelClassSpec contactSearch(
const QVariantMap &additionalProperties = QVariantMap());
245 friend struct Private;
246 QSharedDataPointer<Private> mPriv;
250 public QList<ChannelClassSpec>
286 QVariantMap::const_iterator it = spec.
allProperties().constBegin();
287 QVariantMap::const_iterator end = spec.
allProperties().constEnd();
289 for (; it != end; ++it) {
291 QPair<QString, QString> p(it.key(), it.value().toString());
293 ret ^= ((h << (2 << i)) | (h >> (2 >> i)));
299 inline uint
qHash(
const QSet<ChannelClassSpec> &specSet)
312 QSet<ChannelClassSpec> uniqueSet = specList.toSet();
313 return qHash(uniqueSet);
ChannelClassSpecList(const ChannelClassSpec &spec)
Definition: channel-class-spec.h:255
The ChannelClassSpecList class represents a list of ChannelClassSpec.
Definition: channel-class-spec.h:249
void setChannelType(const QString &type)
Definition: channel-class-spec.h:74
bool hasStreamedMediaInitialVideoFlag() const
Definition: channel-class-spec.h:166
bool hasCallInitialVideoFlag() const
Definition: channel-class-spec.h:132
QList< ChannelClass > ChannelClassList
Definition: buildqt4/TelepathyQt/_gen/types.h:740
bool hasCallInitialAudioFlag() const
Definition: channel-class-spec.h:115
bool hasStreamedMediaInitialAudioFlag() const
Definition: channel-class-spec.h:149
void setStreamedMediaInitialVideoFlag()
Definition: channel-class-spec.h:172
void setCallInitialAudioFlag()
Definition: channel-class-spec.h:121
ChannelClassSpecList(const ChannelClassList &classes)
Definition: channel-class-spec.h:265
bool isRequested() const
Definition: channel-class-spec.h:98
QString channelType() const
Definition: channel-class-spec.h:68
The ChannelClassSpec class represents a Telepathy channel class.
Definition: channel-class-spec.h:42
void setRequested(bool requested)
Definition: channel-class-spec.h:104
void setTargetHandleType(HandleType type)
Definition: channel-class-spec.h:87
ChannelClassSpecList()
Definition: channel-class-spec.h:253
#define TP_QT_IFACE_CHANNEL_TYPE_STREAMED_MEDIA
Definition: buildqt4/TelepathyQt/_gen/constants.h:4913
void setStreamedMediaInitialAudioFlag()
Definition: channel-class-spec.h:155
void unsetCallInitialVideoFlag()
Definition: channel-class-spec.h:144
HandleType targetHandleType() const
Definition: channel-class-spec.h:80
bool hasRequested() const
Definition: channel-class-spec.h:93
#define TP_QT_IFACE_CHANNEL_TYPE_CALL
Definition: buildqt4/TelepathyQt/_gen/constants.h:4849
Definition: buildqt4/TelepathyQt/_gen/types.h:722
ChannelClass bareClass() const
Definition: channel-class-spec.cpp:188
void unsetRequested()
Definition: channel-class-spec.h:110
ChannelClassList bareClasses() const
Definition: channel-class-spec.h:273
uint qHash(const ChannelClassSpec &spec)
Definition: channel-class-spec.h:283
void unsetStreamedMediaInitialVideoFlag()
Definition: channel-class-spec.h:178
void setCallInitialVideoFlag()
Definition: channel-class-spec.h:138
ChannelClassSpecList(const QList< ChannelClassSpec > &other)
Definition: channel-class-spec.h:260
bool operator==(const ChannelClassSpec &other) const
Definition: channel-class-spec.h:60
void unsetCallInitialAudioFlag()
Definition: channel-class-spec.h:127
#define TP_QT_IFACE_CHANNEL
Definition: buildqt4/TelepathyQt/_gen/constants.h:4841
QVariantMap allProperties() const
Definition: channel-class-spec.cpp:183
void unsetStreamedMediaInitialAudioFlag()
Definition: channel-class-spec.h:161
HandleType
Definition: buildqt4/TelepathyQt/_gen/constants.h:1375