25 namespace CapabilitiesHackPrivate {
29 static Tp::RequestableChannelClassSpec spec;
31 if (!spec.isValid()) {
32 Tp::RequestableChannelClass rcc;
33 rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(
".ChannelType"),
34 TP_QT_IFACE_CHANNEL_TYPE_CALL);
35 rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(
".TargetHandleType"),
36 (uint) Tp::HandleTypeContact);
37 rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL + QLatin1String(
".InitialAudio"));
38 rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL + QLatin1String(
".InitialAudioName"));
39 spec = Tp::RequestableChannelClassSpec(rcc);
47 static Tp::RequestableChannelClassSpec spec;
49 if (!spec.isValid()) {
50 Tp::RequestableChannelClass rcc;
51 rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(
".ChannelType"),
52 TP_QT_IFACE_CHANNEL_TYPE_CALL);
53 rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(
".TargetHandleType"),
54 (uint) Tp::HandleTypeContact);
55 rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL + QLatin1String(
".InitialVideo"));
56 rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL + QLatin1String(
".InitialVideoName"));
57 spec = Tp::RequestableChannelClassSpec(rcc);
63 bool audioCalls(
const Tp::CapabilitiesBase &caps,
const QString &cmName)
65 bool gabbleResult =
false;
66 if (cmName == QLatin1String(
"gabble")) {
67 Q_FOREACH (
const Tp::RequestableChannelClassSpec &rccSpec, caps.allClassSpecs()) {
75 return gabbleResult || caps.audioCalls();
78 bool videoCalls(
const Tp::CapabilitiesBase &caps,
const QString &cmName)
80 bool gabbleResult =
false;
81 if (cmName == QLatin1String(
"gabble")) {
82 Q_FOREACH (
const Tp::RequestableChannelClassSpec &rccSpec, caps.allClassSpecs()) {
90 return gabbleResult || caps.videoCalls();