diff options
author | Leon Handreke <leonh@ndreke.de> | 2014-04-04 17:59:20 +0200 |
---|---|---|
committer | David Edmundson <kde@davidedmundson.co.uk> | 2014-04-11 23:56:35 +0200 |
commit | b9abb8be0232838a2c5e773a4f2d87aab2bd2eaa (patch) | |
tree | b586298d88828213e1e054ba4cfa4ab6ef82603d | |
parent | a07358ceb2d7392a53886d18feb7c082f2cf43d0 (diff) |
Rename HandleType to EntityType
44 files changed, 255 insertions, 255 deletions
diff --git a/TelepathyQt/account.cpp b/TelepathyQt/account.cpp index 76fa831b..aaa5d389 100644 --- a/TelepathyQt/account.cpp +++ b/TelepathyQt/account.cpp @@ -109,8 +109,8 @@ QVariantMap textChatCommonRequest() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); return request; } @@ -135,8 +135,8 @@ QVariantMap textChatroomRequest(const QString &roomName) QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeRoom); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeRoom); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), roomName); return request; @@ -148,8 +148,8 @@ QVariantMap callCommonRequest(bool withAudio, const QString &audioName, QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); if (withAudio) { request.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio"), @@ -234,8 +234,8 @@ QVariantMap fileTransferCommonRequest(const Tp::FileTransferChannelCreationPrope QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1 + QLatin1String(".Filename"), properties.suggestedFileName()); @@ -300,8 +300,8 @@ QVariantMap streamTubeCommonRequest(const QString &service) QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1 + QLatin1String(".Service"), service); return request; @@ -328,8 +328,8 @@ QVariantMap dbusTubeCommonRequest(const QString &serviceName) QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1 + QLatin1String(".ServiceName"), serviceName); return request; @@ -356,8 +356,8 @@ QVariantMap dbusTubeRoomRequest(const QString &roomName, const QString &serviceN QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeRoom); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeRoom); request.insert(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1 + QLatin1String(".ServiceName"), serviceName); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), @@ -365,15 +365,15 @@ QVariantMap dbusTubeRoomRequest(const QString &roomName, const QString &serviceN return request; } -QVariantMap conferenceCommonRequest(const QString &channelType, Tp::HandleType targetHandleType, +QVariantMap conferenceCommonRequest(const QString &channelType, Tp::EntityType targetEntityType, const QList<Tp::ChannelPtr> &channels) { QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - if (targetHandleType != Tp::HandleTypeNone) { - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) targetHandleType); + if (targetEntityType != Tp::EntityTypeNone) { + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) targetEntityType); } TpDBus::ObjectPathList objectPaths; @@ -386,10 +386,10 @@ QVariantMap conferenceCommonRequest(const QString &channelType, Tp::HandleType t return request; } -QVariantMap conferenceRequest(const QString &channelType, Tp::HandleType targetHandleType, +QVariantMap conferenceRequest(const QString &channelType, Tp::EntityType targetEntityType, const QList<Tp::ChannelPtr> &channels, const QStringList &initialInviteeContactsIdentifiers) { - QVariantMap request = conferenceCommonRequest(channelType, targetHandleType, channels); + QVariantMap request = conferenceCommonRequest(channelType, targetEntityType, channels); if (!initialInviteeContactsIdentifiers.isEmpty()) { request.insert(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialInviteeIDs"), initialInviteeContactsIdentifiers); @@ -397,10 +397,10 @@ QVariantMap conferenceRequest(const QString &channelType, Tp::HandleType targetH return request; } -QVariantMap conferenceRequest(const QString &channelType, Tp::HandleType targetHandleType, +QVariantMap conferenceRequest(const QString &channelType, Tp::EntityType targetEntityType, const QList<Tp::ChannelPtr> &channels, const QList<Tp::ContactPtr> &initialInviteeContacts) { - QVariantMap request = conferenceCommonRequest(channelType, targetHandleType, channels); + QVariantMap request = conferenceCommonRequest(channelType, targetEntityType, channels); if (!initialInviteeContacts.isEmpty()) { TpDBus::UIntList handles; foreach (const Tp::ContactPtr &contact, initialInviteeContacts) { @@ -421,7 +421,7 @@ QVariantMap conferenceTextChatRequest(const QList<Tp::ChannelPtr> &channels, const QStringList &initialInviteeContactsIdentifiers) { QVariantMap request = conferenceRequest(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - Tp::HandleTypeNone, channels, initialInviteeContactsIdentifiers); + Tp::EntityTypeNone, channels, initialInviteeContactsIdentifiers); return request; } @@ -429,7 +429,7 @@ QVariantMap conferenceTextChatRequest(const QList<Tp::ChannelPtr> &channels, const QList<Tp::ContactPtr> &initialInviteeContacts) { QVariantMap request = conferenceRequest(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - Tp::HandleTypeNone, channels, initialInviteeContacts); + Tp::EntityTypeNone, channels, initialInviteeContacts); return request; } @@ -438,7 +438,7 @@ QVariantMap conferenceTextChatroomRequest(const QString &roomName, const QStringList &initialInviteeContactsIdentifiers) { QVariantMap request = conferenceRequest(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - Tp::HandleTypeRoom, channels, initialInviteeContactsIdentifiers); + Tp::EntityTypeRoom, channels, initialInviteeContactsIdentifiers); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), roomName); return request; } @@ -448,7 +448,7 @@ QVariantMap conferenceTextChatroomRequest(const QString &roomName, const QList<Tp::ContactPtr> &initialInviteeContacts) { QVariantMap request = conferenceRequest(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - Tp::HandleTypeRoom, channels, initialInviteeContacts); + Tp::EntityTypeRoom, channels, initialInviteeContacts); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), roomName); return request; } diff --git a/TelepathyQt/channel-class-spec.cpp b/TelepathyQt/channel-class-spec.cpp index d5e46d05..c79532a9 100644 --- a/TelepathyQt/channel-class-spec.cpp +++ b/TelepathyQt/channel-class-spec.cpp @@ -59,31 +59,31 @@ ChannelClassSpec::ChannelClassSpec(const QVariantMap &props) { setChannelType(qdbus_cast<QString>( props.value(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType")))); - setTargetHandleType((HandleType) qdbus_cast<uint>( - props.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")))); + setTargetEntityType((EntityType) qdbus_cast<uint>( + props.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")))); foreach (QString propName, props.keys()) { setProperty(propName, props.value(propName)); } } -ChannelClassSpec::ChannelClassSpec(const QString &channelType, HandleType targetHandleType, +ChannelClassSpec::ChannelClassSpec(const QString &channelType, EntityType targetEntityType, const QVariantMap &otherProperties) : mPriv(new Private) { setChannelType(channelType); - setTargetHandleType(targetHandleType); + setTargetEntityType(targetEntityType); foreach (QString key, otherProperties.keys()) { setProperty(key, otherProperties.value(key)); } } -ChannelClassSpec::ChannelClassSpec(const QString &channelType, HandleType targetHandleType, +ChannelClassSpec::ChannelClassSpec(const QString &channelType, EntityType targetEntityType, bool requested, const QVariantMap &otherProperties) : mPriv(new Private) { setChannelType(channelType); - setTargetHandleType(targetHandleType); + setTargetEntityType(targetEntityType); setRequested(requested); foreach (QString key, otherProperties.keys()) { setProperty(key, otherProperties.value(key)); @@ -111,7 +111,7 @@ bool ChannelClassSpec::isValid() const !(qdbus_cast<QString>( mPriv->props.value(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"))) .isEmpty()) && - mPriv->props.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")); + mPriv->props.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")); } ChannelClassSpec &ChannelClassSpec::operator=(const ChannelClassSpec &other) @@ -210,7 +210,7 @@ ChannelClassSpec ChannelClassSpec::textChat(const QVariantMap &additionalPropert if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - HandleTypeContact); + EntityTypeContact); } if (additionalProperties.isEmpty()) { @@ -226,7 +226,7 @@ ChannelClassSpec ChannelClassSpec::textChatroom(const QVariantMap &additionalPro if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - HandleTypeRoom); + EntityTypeRoom); } if (additionalProperties.isEmpty()) { @@ -242,7 +242,7 @@ ChannelClassSpec ChannelClassSpec::unnamedTextChat(const QVariantMap &additional if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - HandleTypeNone); + EntityTypeNone); } if (additionalProperties.isEmpty()) { @@ -257,7 +257,7 @@ ChannelClassSpec ChannelClassSpec::mediaCall(const QVariantMap &additionalProper static ChannelClassSpec spec; if (!spec.isValid()) { - spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, HandleTypeContact); + spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, EntityTypeContact); } if (additionalProperties.isEmpty()) { @@ -272,7 +272,7 @@ ChannelClassSpec ChannelClassSpec::audioCall(const QVariantMap &additionalProper static ChannelClassSpec spec; if (!spec.isValid()) { - spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, HandleTypeContact); + spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, EntityTypeContact); spec.setCallInitialAudioFlag(); } @@ -288,7 +288,7 @@ ChannelClassSpec ChannelClassSpec::videoCall(const QVariantMap &additionalProper static ChannelClassSpec spec; if (!spec.isValid()) { - spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, HandleTypeContact); + spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, EntityTypeContact); spec.setCallInitialVideoFlag(); } @@ -304,7 +304,7 @@ ChannelClassSpec ChannelClassSpec::videoCallWithAudio(const QVariantMap &additio static ChannelClassSpec spec; if (!spec.isValid()) { - spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, HandleTypeContact); + spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL1, EntityTypeContact); spec.setCallInitialAudioFlag(); spec.setCallInitialVideoFlag(); } @@ -322,7 +322,7 @@ Tp::ChannelClassSpec ChannelClassSpec::serverAuthentication(const QVariantMap &a if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION1, - HandleTypeNone); + EntityTypeNone); } if (additionalProperties.isEmpty()) { @@ -338,7 +338,7 @@ ChannelClassSpec ChannelClassSpec::roomList(const QVariantMap &additionalPropert if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_ROOM_LIST1, - HandleTypeNone); + EntityTypeNone); } if (additionalProperties.isEmpty()) { @@ -354,7 +354,7 @@ ChannelClassSpec ChannelClassSpec::outgoingFileTransfer(const QVariantMap &addit if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, - HandleTypeContact, true); + EntityTypeContact, true); } if (additionalProperties.isEmpty()) { @@ -370,7 +370,7 @@ ChannelClassSpec ChannelClassSpec::incomingFileTransfer(const QVariantMap &addit if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, - HandleTypeContact, false); + EntityTypeContact, false); } if (additionalProperties.isEmpty()) { @@ -387,7 +387,7 @@ ChannelClassSpec ChannelClassSpec::outgoingStreamTube(const QString &service, if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1, - HandleTypeContact, true); + EntityTypeContact, true); } QVariantMap props = additionalProperties; @@ -410,7 +410,7 @@ ChannelClassSpec ChannelClassSpec::incomingStreamTube(const QString &service, if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1, - HandleTypeContact, false); + EntityTypeContact, false); } QVariantMap props = additionalProperties; @@ -433,7 +433,7 @@ ChannelClassSpec ChannelClassSpec::outgoingRoomStreamTube(const QString &service if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1, - HandleTypeRoom, true); + EntityTypeRoom, true); } QVariantMap props = additionalProperties; @@ -456,7 +456,7 @@ ChannelClassSpec ChannelClassSpec::incomingRoomStreamTube(const QString &service if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1, - HandleTypeRoom, false); + EntityTypeRoom, false); } QVariantMap props = additionalProperties; @@ -479,7 +479,7 @@ ChannelClassSpec ChannelClassSpec::outgoingDBusTube(const QString &serviceName, if (!spec.isValid()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1, - HandleTypeContact, true); + EntityTypeContact, true); } if (!serviceName.isEmpty()) { @@ -501,7 +501,7 @@ ChannelClassSpec ChannelClassSpec::incomingDBusTube(const QString &serviceName, if (!spec.isValid()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1, - HandleTypeContact, false); + EntityTypeContact, false); } if (!serviceName.isEmpty()) { @@ -523,7 +523,7 @@ ChannelClassSpec ChannelClassSpec::outgoingRoomDBusTube(const QString &serviceNa if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1, - HandleTypeRoom, true); + EntityTypeRoom, true); } QVariantMap props = additionalProperties; @@ -546,7 +546,7 @@ ChannelClassSpec ChannelClassSpec::incomingRoomDBusTube(const QString &serviceNa if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1, - HandleTypeRoom, false); + EntityTypeRoom, false); } QVariantMap props = additionalProperties; @@ -568,7 +568,7 @@ ChannelClassSpec ChannelClassSpec::contactSearch(const QVariantMap &additionalPr if (!spec.mPriv.constData()) { spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CONTACT_SEARCH1, - HandleTypeNone); + EntityTypeNone); } if (additionalProperties.isEmpty()) { diff --git a/TelepathyQt/channel-class-spec.h b/TelepathyQt/channel-class-spec.h index c26e9438..73564c14 100644 --- a/TelepathyQt/channel-class-spec.h +++ b/TelepathyQt/channel-class-spec.h @@ -45,9 +45,9 @@ public: ChannelClassSpec(); ChannelClassSpec(const TpDBus::ChannelClass &cc); ChannelClassSpec(const QVariantMap &props); - ChannelClassSpec(const QString &channelType, HandleType targetHandleType, + ChannelClassSpec(const QString &channelType, EntityType targetEntityType, const QVariantMap &otherProperties = QVariantMap()); - ChannelClassSpec(const QString &channelType, HandleType targetHandleType, bool requested, + ChannelClassSpec(const QString &channelType, EntityType targetEntityType, bool requested, const QVariantMap &otherProperties = QVariantMap()); ChannelClassSpec(const ChannelClassSpec &other, const QVariantMap &additionalProperties = QVariantMap()); @@ -77,16 +77,16 @@ public: QVariant::fromValue(type)); } - HandleType targetHandleType() const + EntityType targetEntityType() const { - return (HandleType) qdbus_cast<uint>( + return (EntityType) qdbus_cast<uint>( property( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"))); + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"))); } - void setTargetHandleType(HandleType type) + void setTargetEntityType(EntityType type) { - setProperty(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), + setProperty(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), QVariant::fromValue((uint) type)); } diff --git a/TelepathyQt/channel-factory.cpp b/TelepathyQt/channel-factory.cpp index c26719f7..0b2c1fa7 100644 --- a/TelepathyQt/channel-factory.cpp +++ b/TelepathyQt/channel-factory.cpp @@ -562,7 +562,7 @@ void ChannelFactory::setConstructorFor(const ChannelClassSpec &channelClass, { if (ctor.isNull()) { warning().nospace() << "Tried to set a NULL ctor for TpDBus::ChannelClass(" - << channelClass.channelType() << ", " << channelClass.targetHandleType() << ", " + << channelClass.channelType() << ", " << channelClass.targetEntityType() << ", " << channelClass.allProperties().size() << "props in total)"; return; } diff --git a/TelepathyQt/channel.cpp b/TelepathyQt/channel.cpp index 2af3bee2..9c025148 100644 --- a/TelepathyQt/channel.cpp +++ b/TelepathyQt/channel.cpp @@ -134,7 +134,7 @@ struct TP_QT_NO_EXPORT Channel::Private // Main interface QString channelType; - uint targetHandleType; + uint targetEntityType; uint targetHandle; QString targetId; ContactPtr targetContact; @@ -258,7 +258,7 @@ Channel::Private::Private(Channel *parent, const ConnectionPtr &connection, group(0), conference(0), readinessHelper(parent->readinessHelper()), - targetHandleType(0), + targetEntityType(0), targetHandle(0), requested(false), initiatorHandle(0), @@ -347,7 +347,7 @@ void Channel::Private::introspectMainProperties() const static QString names[numNames] = { QLatin1String("ChannelType"), QLatin1String("Interfaces"), - QLatin1String("TargetHandleType"), + QLatin1String("TargetEntityType"), QLatin1String("TargetHandle"), QLatin1String("TargetID"), QLatin1String("Requested"), @@ -357,7 +357,7 @@ void Channel::Private::introspectMainProperties() const static QString qualifiedNames[numNames] = { TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL + QLatin1String(".Interfaces"), - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), TP_QT_IFACE_CHANNEL + QLatin1String(".Requested"), @@ -507,13 +507,13 @@ void Channel::Private::extractMainProps(const QVariantMap &props) const static QString keyChannelType(QLatin1String("ChannelType")); const static QString keyInterfaces(QLatin1String("Interfaces")); const static QString keyTargetHandle(QLatin1String("TargetHandle")); - const static QString keyTargetHandleType(QLatin1String("TargetHandleType")); + const static QString keyTargetEntityType(QLatin1String("TargetEntityType")); parent->setInterfaces(qdbus_cast<QStringList>(props[keyInterfaces])); readinessHelper->setInterfaces(parent->interfaces()); channelType = qdbus_cast<QString>(props[keyChannelType]); targetHandle = qdbus_cast<uint>(props[keyTargetHandle]); - targetHandleType = qdbus_cast<uint>(props[keyTargetHandleType]); + targetEntityType = qdbus_cast<uint>(props[keyTargetEntityType]); const static QString keyTargetId(QLatin1String("TargetID")); const static QString keyRequested(QLatin1String("Requested")); @@ -523,7 +523,7 @@ void Channel::Private::extractMainProps(const QVariantMap &props) if (props.contains(keyTargetId)) { targetId = qdbus_cast<QString>(props[keyTargetId]); - if (targetHandleType == HandleTypeContact) { + if (targetEntityType == EntityTypeContact) { connection->lowlevel()->injectContactId(targetHandle, targetId); } } @@ -671,7 +671,7 @@ void Channel::Private::buildContacts() toBuild.append(initiatorHandle); } - if (!targetContact && targetHandleType == HandleTypeContact && targetHandle != 0) { + if (!targetContact && targetEntityType == EntityTypeContact && targetHandle != 0) { toBuild.append(targetHandle); } @@ -723,7 +723,7 @@ void Channel::Private::processMembersChanged() initiatorHandle; } - if (targetHandleType == HandleTypeContact && targetHandle != 0 && !targetContact) { + if (targetEntityType == EntityTypeContact && targetHandle != 0 && !targetContact) { warning() << " Unable to create contact object for target with handle" << targetHandle; } @@ -824,7 +824,7 @@ void Channel::Private::updateContacts(const QList<ContactPtr> &contacts) initiatorContact = contact; } - if (!targetContact && targetHandleType == HandleTypeContact && targetHandle == handle) { + if (!targetContact && targetEntityType == EntityTypeContact && targetHandle == handle) { targetContact = contact; if (targetId.isEmpty()) { @@ -936,7 +936,7 @@ bool Channel::Private::fakeGroupInterfaceIfNeeded() { if (parent->interfaces().contains(TP_QT_IFACE_CHANNEL_INTERFACE_GROUP1)) { return false; - } else if (targetHandleType != HandleTypeContact) { + } else if (targetEntityType != EntityTypeContact) { return false; } @@ -966,7 +966,7 @@ void Channel::Private::setReady() debug() << "Channel fully ready"; debug() << " Channel type" << channelType; debug() << " Target handle" << targetHandle; - debug() << " Target handle type" << targetHandleType; + debug() << " Target handle type" << targetEntityType; if (parent->interfaces().contains(TP_QT_IFACE_CHANNEL_INTERFACE_GROUP1)) { debug() << " Group: flags" << groupFlags; @@ -1259,7 +1259,7 @@ Channel::GroupMemberChangeDetails::GroupMemberChangeDetails(const ContactPtr &ac * objects. Specialized classes for some specific channel types such as * CallChannel, TextChannel, FileTransferChannel are provided. * - * The remote object accessor functions on this object (channelType(), targetHandleType(), + * The remote object accessor functions on this object (channelType(), targetEntityType(), * and so on) don't make any D-Bus calls; instead, they return/use * values cached from a previous introspection run. The introspection process * populates their values in the most efficient way possible based on what the @@ -1434,7 +1434,7 @@ ConnectionPtr Channel::connection() const * If the channel is ready (isReady(Channel::FeatureCore) returns true), the following keys are * guaranteed to be present: * im.telepathy.v1.Channel.ChannelType, - * im.telepathy.v1.Channel.TargetHandleType, + * im.telepathy.v1.Channel.TargetEntityType, * im.telepathy.v1.Channel.TargetHandle and * im.telepathy.v1.Channel.Requested. * @@ -1460,9 +1460,9 @@ QVariantMap Channel::immutableProperties() const mPriv->immutableProperties.insert(key, interfaces()); } - key = TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"); + key = TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"); if (!mPriv->immutableProperties.contains(key)) { - mPriv->immutableProperties.insert(key, mPriv->targetHandleType); + mPriv->immutableProperties.insert(key, mPriv->targetEntityType); } key = TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"); @@ -1518,20 +1518,20 @@ QString Channel::channelType() const /** * Return the type of the handle returned by targetHandle() as specified in - * #HandleType. + * #EntityType. * * This method requires Channel::FeatureCore to be ready. * - * \return The target handle type as #HandleType. + * \return The target handle type as #EntityType. * \sa targetHandle(), targetId() */ -HandleType Channel::targetHandleType() const +EntityType Channel::targetEntityType() const { if (!isReady(Channel::FeatureCore)) { - warning() << "Channel::targetHandleType() used channel not ready"; + warning() << "Channel::targetEntityType() used channel not ready"; } - return (HandleType) mPriv->targetHandleType; + return (EntityType) mPriv->targetEntityType; } /** @@ -1541,8 +1541,8 @@ HandleType Channel::targetHandleType() const * This method requires Channel::FeatureCore to be ready. * * \return An integer representing the target handle, which is of the type - * targetHandleType() indicates. - * \sa targetHandleType(), targetId() + * targetEntityType() indicates. + * \sa targetEntityType(), targetId() */ uint Channel::targetHandle() const { @@ -1556,8 +1556,8 @@ uint Channel::targetHandle() const /** * Return the persistent unique ID of the remote party with which this channel communicates. * - * If targetHandleType() is #HandleTypeContact, this will be the ID of the remote contact, and - * similarly the unique ID of the room when targetHandleType() is #HandleTypeRoom. + * If targetEntityType() is #EntityTypeContact, this will be the ID of the remote contact, and + * similarly the unique ID of the room when targetEntityType() is #EntityTypeRoom. * * This is not necessarily the best identifier to display to the user, though. In particular, for * contacts, their alias should be displayed instead. It can be used for matching channels and UI @@ -1583,16 +1583,16 @@ QString Channel::targetId() const * * This method requires Channel::FeatureCore to be ready. * - * \return A pointer to the Contact object, or a null ContactPtr if targetHandleType() is not - * #HandleTypeContact. + * \return A pointer to the Contact object, or a null ContactPtr if targetEntityType() is not + * #EntityTypeContact. * \sa targetHandle(), targetId() */ ContactPtr Channel::targetContact() const { if (!isReady(Channel::FeatureCore)) { warning() << "Channel::targetContact() used, but the channel is not ready"; - } else if (targetHandleType() != HandleTypeContact) { - warning() << "Channel::targetContact() used with targetHandleType() != Contact"; + } else if (targetEntityType() != EntityTypeContact) { + warning() << "Channel::targetContact() used with targetEntityType() != Contact"; } return mPriv->targetContact; @@ -1823,7 +1823,7 @@ PendingOperation *Channel::requestLeave(const QString &message, ChannelGroupChan * Cached access to state of the group interface on the associated remote * object, if the interface is present. * - * Some methods can be used when targetHandleType() == #HandleTypeContact, such + * Some methods can be used when targetEntityType() == #EntityTypeContact, such * as groupFlags(), groupCanAddContacts(), groupCanRemoveContacts(), * groupSelfContact() and groupContacts(). * diff --git a/TelepathyQt/channel.h b/TelepathyQt/channel.h index d39df969..6384af75 100644 --- a/TelepathyQt/channel.h +++ b/TelepathyQt/channel.h @@ -69,7 +69,7 @@ public: QString channelType() const; - HandleType targetHandleType() const; + EntityType targetEntityType() const; uint targetHandle() const; QString targetId() const; ContactPtr targetContact() const; diff --git a/TelepathyQt/connection-manager.cpp b/TelepathyQt/connection-manager.cpp index d230dc05..305da540 100644 --- a/TelepathyQt/connection-manager.cpp +++ b/TelepathyQt/connection-manager.cpp @@ -359,15 +359,15 @@ void ConnectionManager::Private::ProtocolWrapper::fillRCCs() TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); fixedProps.insert( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - static_cast<uint>(HandleTypeRoom)); + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + static_cast<uint>(EntityTypeRoom)); TpDBus::RequestableChannelClass textChatroom = {fixedProps, allowedProps}; classes.append(textChatroom); // 1-1 text chats - fixedProps[TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")] = - static_cast<uint>(HandleTypeContact); + fixedProps[TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")] = + static_cast<uint>(EntityTypeContact); TpDBus::RequestableChannelClass text = {fixedProps, allowedProps}; classes.append(text); diff --git a/TelepathyQt/connection.cpp b/TelepathyQt/connection.cpp index 3a9282f3..d5489883 100644 --- a/TelepathyQt/connection.cpp +++ b/TelepathyQt/connection.cpp @@ -1635,7 +1635,7 @@ PendingChannel *ConnectionLowlevel::createChannel(const QVariantMap &request) * * The request MUST contain the following keys: * im.telepathy.v1.Channel.ChannelType - * im.telepathy.v1.Channel.TargetHandleType + * im.telepathy.v1.Channel.TargetEntityType * * Upon completion, the reply to the request can be retrieved through the * returned PendingChannel object. The object also provides access to the @@ -1699,7 +1699,7 @@ PendingChannel *ConnectionLowlevel::ensureChannel(const QVariantMap &request) * * The request MUST contain the following keys: * im.telepathy.v1.Channel.ChannelType - * im.telepathy.v1.Channel.TargetHandleType + * im.telepathy.v1.Channel.TargetEntityType * * Upon completion, the reply to the request can be retrieved through the * returned PendingChannel object. The object also provides access to the @@ -1824,7 +1824,7 @@ PendingOperation *ConnectionLowlevel::requestDisconnect() * * \sa PendingContactAttributes * - * \param handles A list of handles of type HandleTypeContact + * \param handles A list of handles of type EntityTypeContact * \param interfaces D-Bus interfaces for which the client requires information * \param reference Whether the handles should additionally be referenced. * \return A PendingContactAttributes which will emit PendingContactAttributes::fininshed diff --git a/TelepathyQt/contact-capabilities.cpp b/TelepathyQt/contact-capabilities.cpp index e7b8d177..3e4dbe5d 100644 --- a/TelepathyQt/contact-capabilities.cpp +++ b/TelepathyQt/contact-capabilities.cpp @@ -113,7 +113,7 @@ QStringList ContactCapabilities::dbusTubeServices() const RequestableChannelClassSpecList rccSpecs = allClassSpecs(); foreach (const RequestableChannelClassSpec &rccSpec, rccSpecs) { if (rccSpec.channelType() == TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1 && - rccSpec.targetHandleType() == HandleTypeContact && + rccSpec.targetEntityType() == EntityTypeContact && rccSpec.hasFixedProperty( TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1 + QLatin1String(".ServiceName"))) { ret << rccSpec.fixedProperty( @@ -154,7 +154,7 @@ QStringList ContactCapabilities::streamTubeServices() const RequestableChannelClassSpecList rccSpecs = allClassSpecs(); foreach (const RequestableChannelClassSpec &rccSpec, rccSpecs) { if (rccSpec.channelType() == TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1 && - rccSpec.targetHandleType() == HandleTypeContact && + rccSpec.targetEntityType() == EntityTypeContact && rccSpec.hasFixedProperty( TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1 + QLatin1String(".Service"))) { ret << rccSpec.fixedProperty( diff --git a/TelepathyQt/dbus-tube-channel.cpp b/TelepathyQt/dbus-tube-channel.cpp index 766cdc27..a3a0db12 100644 --- a/TelepathyQt/dbus-tube-channel.cpp +++ b/TelepathyQt/dbus-tube-channel.cpp @@ -121,7 +121,7 @@ void DBusTubeChannel::Private::introspectBusNamesMonitoring(DBusTubeChannel::Pri Q_ASSERT(dbusTubeInterface); // It makes sense only if this is a room, if that's not the case just spit a warning - if (parent->targetHandleType() == static_cast<uint>(Tp::HandleTypeRoom)) { + if (parent->targetEntityType() == static_cast<uint>(Tp::EntityTypeRoom)) { parent->connect(dbusTubeInterface, SIGNAL(DBusNamesChanged(TpDBus::DBusTubeParticipants,TpDBus::UIntList)), parent, SLOT(onDBusNamesChanged(TpDBus::DBusTubeParticipants,TpDBus::UIntList))); diff --git a/TelepathyQt/pending-channel.cpp b/TelepathyQt/pending-channel.cpp index 63fc66da..26dbf5fd 100644 --- a/TelepathyQt/pending-channel.cpp +++ b/TelepathyQt/pending-channel.cpp @@ -147,7 +147,7 @@ PendingChannel::PendingChannel(const ConnectionPtr &connection, mPriv->connection = connection; mPriv->yours = create; mPriv->channelType = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType")).toString(); - mPriv->handleType = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")).toUInt(); + mPriv->handleType = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")).toUInt(); mPriv->handle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt(); mPriv->notifier = 0; mPriv->create = create; @@ -178,7 +178,7 @@ PendingChannel::PendingChannel(const AccountPtr &account, { mPriv->yours = true; mPriv->channelType = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType")).toString(); - mPriv->handleType = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")).toUInt(); + mPriv->handleType = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")).toUInt(); mPriv->handle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt(); mPriv->cr = ClientRegistrar::create( @@ -293,14 +293,14 @@ const QString &PendingChannel::channelType() const * * (One example of a request producing a different target handle type is that * on protocols like MSN, one-to-one conversations don't really exist, and if - * you request a text channel with handle type HandleTypeContact, what you - * will actually get is a text channel with handle type HandleTypeNone, with + * you request a text channel with handle type EntityTypeContact, what you + * will actually get is a text channel with handle type EntityTypeNone, with * the requested contact as a member.) * - * \return The target handle type as #HandleType. + * \return The target handle type as #EntityType. * \sa targetHandle() */ -uint PendingChannel::targetHandleType() const +uint PendingChannel::targetEntityType() const { return mPriv->handleType; } @@ -308,11 +308,11 @@ uint PendingChannel::targetHandleType() const /** * If the channel request has finished, return the target handle of the * resulting channel. Otherwise, return the target handle that was requested - * (which might be different in some situations - see targetHandleType()). + * (which might be different in some situations - see targetEntityType()). * * \return An integer representing the target handle, which is of the type - * targetHandleType() indicates. - * \sa targetHandleType() + * targetEntityType() indicates. + * \sa targetEntityType() */ uint PendingChannel::targetHandle() const { @@ -423,7 +423,7 @@ void PendingChannel::onConnectionCreateChannelFinished(QDBusPendingCallWatcher * mPriv->immutableProperties = map; mPriv->channelType = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType")).toString(); - mPriv->handleType = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")).toUInt(); + mPriv->handleType = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")).toUInt(); mPriv->handle = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt(); connect(channelReady, @@ -455,7 +455,7 @@ void PendingChannel::onConnectionEnsureChannelFinished(QDBusPendingCallWatcher * mPriv->immutableProperties = map; mPriv->channelType = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType")).toString(); - mPriv->handleType = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")).toUInt(); + mPriv->handleType = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")).toUInt(); mPriv->handle = map.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt(); connect(channelReady, @@ -500,7 +500,7 @@ void PendingChannel::onHandlerChannelReceived(const ChannelPtr &channel) return; } - mPriv->handleType = channel->targetHandleType(); + mPriv->handleType = channel->targetEntityType(); mPriv->handle = channel->targetHandle(); mPriv->immutableProperties = channel->immutableProperties(); mPriv->channel = channel; diff --git a/TelepathyQt/pending-channel.h b/TelepathyQt/pending-channel.h index 2480e431..b23019a9 100644 --- a/TelepathyQt/pending-channel.h +++ b/TelepathyQt/pending-channel.h @@ -55,7 +55,7 @@ public: const QString &channelType() const; - uint targetHandleType() const; + uint targetEntityType() const; uint targetHandle() const; diff --git a/TelepathyQt/requestable-channel-class-spec.cpp b/TelepathyQt/requestable-channel-class-spec.cpp index 3fbebef9..fdd11c43 100644 --- a/TelepathyQt/requestable-channel-class-spec.cpp +++ b/TelepathyQt/requestable-channel-class-spec.cpp @@ -68,8 +68,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::textChat() TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); spec = RequestableChannelClassSpec(rcc); } @@ -84,8 +84,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::textChatroom() TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeRoom); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeRoom); spec = RequestableChannelClassSpec(rcc); } @@ -100,8 +100,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::audioCall() TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio"), true); rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudioName")); @@ -119,8 +119,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::audioCallWithVideoAllow TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio"), true); rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudioName")); @@ -140,8 +140,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::videoCall() TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideo"), true); rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideoName")); @@ -159,8 +159,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::videoCallWithAudioAllow TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideo"), true); rcc.allowedProperties.append(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideoName")); @@ -180,8 +180,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::fileTransfer() TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); spec = RequestableChannelClassSpec(rcc); } @@ -230,8 +230,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::conferenceTextChatroom( TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeRoom); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeRoom); rcc.allowedProperties.append( TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialChannels")); @@ -249,8 +249,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::conferenceTextChatroomW TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeRoom); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeRoom); rcc.allowedProperties.append( TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialChannels")); @@ -334,8 +334,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::dbusTube(const QString TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); spec = RequestableChannelClassSpec(rcc); } @@ -357,8 +357,8 @@ RequestableChannelClassSpec RequestableChannelClassSpec::streamTube(const QStrin TpDBus::RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); spec = RequestableChannelClassSpec(rcc); } @@ -416,22 +416,22 @@ QString RequestableChannelClassSpec::channelType() const TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"))); } -bool RequestableChannelClassSpec::hasTargetHandleType() const +bool RequestableChannelClassSpec::hasTargetEntityType() const { if (!isValid()) { return false; } return mPriv->rcc.fixedProperties.contains( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")); + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType")); } -HandleType RequestableChannelClassSpec::targetHandleType() const +EntityType RequestableChannelClassSpec::targetEntityType() const { - if (!hasTargetHandleType()) { - return (HandleType) -1; + if (!hasTargetEntityType()) { + return (EntityType) -1; } - return (HandleType) qdbus_cast<uint>(mPriv->rcc.fixedProperties.value( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"))); + return (EntityType) qdbus_cast<uint>(mPriv->rcc.fixedProperties.value( + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"))); } bool RequestableChannelClassSpec::hasFixedProperty(const QString &name) const diff --git a/TelepathyQt/requestable-channel-class-spec.h b/TelepathyQt/requestable-channel-class-spec.h index 7aef2f77..10115c71 100644 --- a/TelepathyQt/requestable-channel-class-spec.h +++ b/TelepathyQt/requestable-channel-class-spec.h @@ -73,8 +73,8 @@ public: QString channelType() const; - bool hasTargetHandleType() const; - HandleType targetHandleType() const; + bool hasTargetEntityType() const; + EntityType targetEntityType() const; bool hasFixedProperty(const QString &name) const; QVariant fixedProperty(const QString &name) const; diff --git a/TelepathyQt/stream-tube-client.cpp b/TelepathyQt/stream-tube-client.cpp index e2a10b89..5024234a 100644 --- a/TelepathyQt/stream-tube-client.cpp +++ b/TelepathyQt/stream-tube-client.cpp @@ -340,8 +340,8 @@ void StreamTubeClient::TubeWrapper::onConnectionClosed(uint conn, const QString * the counterpart, offering services from a bytestream socket server to tubes requested to be * initiated. * - * Both peer-to-peer (\c TargetHandleType == \ref HandleTypeContact) and group (\c TargetHandleType - * == \ref HandleTypeRoom) channels are supported, and it's possible to specify the tube services to + * Both peer-to-peer (\c TargetEntityType == \ref EntityTypeContact) and group (\c TargetEntityType + * == \ref EntityTypeRoom) channels are supported, and it's possible to specify the tube services to * handle for each separately. There must be at least one service in total declared, as it never * makes sense to handle stream tubes without considering the protocol of the service offered * through them. diff --git a/TelepathyQt/stream-tube-server.cpp b/TelepathyQt/stream-tube-server.cpp index c240aedc..f019a731 100644 --- a/TelepathyQt/stream-tube-server.cpp +++ b/TelepathyQt/stream-tube-server.cpp @@ -390,8 +390,8 @@ void StreamTubeServer::TubeWrapper::onConnectionClosed(uint conn, const QString * counterpart, enabling TCP/UNIX socket clients to connect to services from such exported servers * offered to them via tubes. * - * Both peer-to-peer (\c TargetHandleType == \ref HandleTypeContact) and group (\c TargetHandleType - * == \ref HandleTypeRoom) channels are supported, and it's possible to specify the tube services to + * Both peer-to-peer (\c TargetEntityType == \ref EntityTypeContact) and group (\c TargetEntityType + * == \ref EntityTypeRoom) channels are supported, and it's possible to specify the tube services to * handle for each separately. It is also possible to not advertise handling capability for ANY tube * service; instead just using the StreamTubeServer to handle tubes on an one-off basis by passing * its corresponding %Client service name as the \a preferredHandler when requesting tubes via the diff --git a/tests/dbus/account-channel-dispatcher.cpp b/tests/dbus/account-channel-dispatcher.cpp index 5951d24a..de0b224e 100644 --- a/tests/dbus/account-channel-dispatcher.cpp +++ b/tests/dbus/account-channel-dispatcher.cpp @@ -777,8 +777,8 @@ void TestAccountChannelDispatcher::checkHandlerHandledChannels(ClientHandlerInte QVariantMap request; \ request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), \ TP_QT_IFACE_CHANNEL_TYPE_TEXT); \ - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), \ - (uint) Tp::HandleTypeContact); \ + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), \ + (uint) Tp::EntityTypeContact); \ request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), \ QLatin1String("foo@bar")); \ mChannelDispatcherAdaptor->mInvokeHandler = false; \ @@ -997,8 +997,8 @@ void TestAccountChannelDispatcher::testEnsureChannelCancel() QVariantMap request; \ request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), \ TP_QT_IFACE_CHANNEL_TYPE_TEXT); \ - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), \ - (uint) Tp::HandleTypeContact); \ + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), \ + (uint) Tp::EntityTypeContact); \ request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), \ QLatin1String("foo@bar")); \ mChannelDispatcherAdaptor->mInvokeHandler = invokeHandler; \ diff --git a/tests/dbus/account-set.cpp b/tests/dbus/account-set.cpp index 834f0575..901103dc 100644 --- a/tests/dbus/account-set.cpp +++ b/tests/dbus/account-set.cpp @@ -331,8 +331,8 @@ void TestAccountSet::testFilters() TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); rcc.fixedProperties.insert( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); rcc.allowedProperties.append( TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")); rcc.allowedProperties.append( diff --git a/tests/dbus/call-channel.cpp b/tests/dbus/call-channel.cpp index 385bc21b..807ef501 100644 --- a/tests/dbus/call-channel.cpp +++ b/tests/dbus/call-channel.cpp @@ -295,8 +295,8 @@ void TestCallChannel::testOutgoingCall() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), otherContact->handle()); request.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio"), @@ -599,8 +599,8 @@ void TestCallChannel::testHold() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), otherContact->handle()); request.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio"), @@ -669,8 +669,8 @@ void TestCallChannel::testHangup() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), otherContact->handle()); request.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideo"), @@ -711,8 +711,8 @@ void TestCallChannel::testCallMembers() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), otherContact->handle()); request.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideo"), @@ -905,8 +905,8 @@ void TestCallChannel::testFeatureCore() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), otherContact->handle()); request.insert(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio"), diff --git a/tests/dbus/chan-basics.cpp b/tests/dbus/chan-basics.cpp index 0334627a..ce199f90 100644 --- a/tests/dbus/chan-basics.cpp +++ b/tests/dbus/chan-basics.cpp @@ -83,7 +83,7 @@ void TestChanBasics::init() void TestChanBasics::testCreateChannel() { - mChan = mConn->createChannel(TP_QT_IFACE_CHANNEL_TYPE_TEXT, Tp::HandleTypeContact, mHandle); + mChan = mConn->createChannel(TP_QT_IFACE_CHANNEL_TYPE_TEXT, Tp::EntityTypeContact, mHandle); QVERIFY(mChan); mChanObjectPath = mChan->objectPath(); @@ -149,7 +149,7 @@ void TestChanBasics::testCreateChannel() void TestChanBasics::testEnsureChannel() { ChannelPtr chan = mConn->ensureChannel(TP_QT_IFACE_CHANNEL_TYPE_TEXT, - Tp::HandleTypeContact, mHandle); + Tp::EntityTypeContact, mHandle); QVERIFY(chan); QCOMPARE(chan->objectPath(), mChanObjectPath); mChan = chan; @@ -220,7 +220,7 @@ void TestChanBasics::testFallback() QCOMPARE(textChan->channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); QVERIFY(textChan->interfaces().isEmpty()); - QCOMPARE(textChan->targetHandleType(), Tp::HandleTypeContact); + QCOMPARE(textChan->targetEntityType(), Tp::EntityTypeContact); QCOMPARE(textChan->targetHandle(), handle); // we have no Group support, groupAddContacts should fail diff --git a/tests/dbus/conn-requests.cpp b/tests/dbus/conn-requests.cpp index 96d5178e..ec7b4ea7 100644 --- a/tests/dbus/conn-requests.cpp +++ b/tests/dbus/conn-requests.cpp @@ -92,8 +92,8 @@ void TestConnRequests::testCreateChannel() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), mHandle); QVERIFY(connect(mConn->client()->lowlevel()->createChannel(request), @@ -107,8 +107,8 @@ void TestConnRequests::testEnsureChannel() QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), mHandle); QVERIFY(connect(mConn->client()->lowlevel()->ensureChannel(request), diff --git a/tests/dbus/contacts-capabilities.cpp b/tests/dbus/contacts-capabilities.cpp index fdcdfac7..d0eb2943 100644 --- a/tests/dbus/contacts-capabilities.cpp +++ b/tests/dbus/contacts-capabilities.cpp @@ -63,7 +63,7 @@ static void freeRccList(GPtrArray *rccs) g_boxed_free(TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST, rccs); } -static void addTextChatClass(GPtrArray *classes, TpHandleType handle_type) +static void addTextChatClass(GPtrArray *classes, TpEntityType handle_type) { GHashTable *fixed = tp_asv_new( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT, diff --git a/tests/dbus/stream-tube-handlers.cpp b/tests/dbus/stream-tube-handlers.cpp index f8bc52d9..e217176e 100644 --- a/tests/dbus/stream-tube-handlers.cpp +++ b/tests/dbus/stream-tube-handlers.cpp @@ -312,7 +312,7 @@ private Q_SLOTS: private: QMap<QString, ClientHandlerInterface *> ourHandlers(); - QPair<QString, QVariantMap> createTubeChannel(bool requested, HandleType type, + QPair<QString, QVariantMap> createTubeChannel(bool requested, EntityType type, bool supportMonitoring, bool unixOnly = false); AccountManagerPtr mAM; @@ -352,7 +352,7 @@ private: }; QPair<QString, QVariantMap> TestStreamTubeHandlers::createTubeChannel(bool requested, - HandleType handleType, + EntityType handleType, bool supportMonitoring, bool unixOnly) { @@ -369,7 +369,7 @@ QPair<QString, QVariantMap> TestStreamTubeHandlers::createTubeChannel(bool reque chanProps.insert(TP_QT_IFACE_CHANNEL + QString::fromLatin1(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_STREAM_TUBE1); chanProps.insert(TP_QT_IFACE_CHANNEL + QString::fromLatin1(".Requested"), requested); - chanProps.insert(TP_QT_IFACE_CHANNEL + QString::fromLatin1(".TargetHandleType"), + chanProps.insert(TP_QT_IFACE_CHANNEL + QString::fromLatin1(".TargetEntityType"), static_cast<uint>(handleType)); TpHandleRepoIface *contactRepo = tp_base_connection_get_handles( @@ -378,7 +378,7 @@ QPair<QString, QVariantMap> TestStreamTubeHandlers::createTubeChannel(bool reque TP_BASE_CONNECTION(mConn->service()), TP_HANDLE_TYPE_ROOM); TpHandle handle; GType type; - if (handleType == HandleTypeContact) { + if (handleType == EntityTypeContact) { handle = tp_handle_ensure(contactRepo, "bob", NULL, NULL); type = TP_TESTS_TYPE_CONTACT_STREAM_TUBE_CHANNEL; chanProps.insert(TP_QT_IFACE_CHANNEL + QString::fromLatin1(".TargetID"), @@ -883,7 +883,7 @@ void TestStreamTubeHandlers::testBasicTcpExport() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::outgoingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(true, HandleTypeContact, false); + QPair<QString, QVariantMap> chan = createTubeChannel(true, EntityTypeContact, false); QVERIFY(connect(server.data(), SIGNAL(tubeRequested(Tp::AccountPtr,Tp::OutgoingStreamTubeChannelPtr,QDateTime,Tp::ChannelRequestHints)), @@ -994,7 +994,7 @@ void TestStreamTubeHandlers::testFailedExport() // To trigger the Offer error codepath, give it a channel which only supports Unix sockets // although we're exporting a TCP one - which is always supported in real CMs - QPair<QString, QVariantMap> chan = createTubeChannel(true, HandleTypeContact, false, true); + QPair<QString, QVariantMap> chan = createTubeChannel(true, EntityTypeContact, false, true); ChannelDetails details = { QDBusObjectPath(chan.first), chan.second }; // We should initially get tubeRequested just fine @@ -1035,7 +1035,7 @@ void TestStreamTubeHandlers::testServerConnMonitoring() ClientHandlerInterface *handler = handlers.value(server->clientName()); QVERIFY(handler != 0); - QPair<QString, QVariantMap> chan = createTubeChannel(true, HandleTypeRoom, true); + QPair<QString, QVariantMap> chan = createTubeChannel(true, EntityTypeRoom, true); QVERIFY(connect(server.data(), SIGNAL(tubeRequested(Tp::AccountPtr,Tp::OutgoingStreamTubeChannelPtr,QDateTime,Tp::ChannelRequestHints)), @@ -1229,7 +1229,7 @@ void TestStreamTubeHandlers::testSSTHErrorPaths() // Now pass it an incoming stream tube chan, which will trigger the error paths for constructing // wrong subclasses for tubes - QPair<QString, QVariantMap> tubeChan = createTubeChannel(false, HandleTypeContact, false); + QPair<QString, QVariantMap> tubeChan = createTubeChannel(false, EntityTypeContact, false); details.channel = QDBusObjectPath(tubeChan.first); details.properties = tubeChan.second; @@ -1264,7 +1264,7 @@ void TestStreamTubeHandlers::testSSTHErrorPaths() SIGNAL(tubeRequested(Tp::AccountPtr,Tp::OutgoingStreamTubeChannelPtr,QDateTime,Tp::ChannelRequestHints)), SLOT(onTubeRequested(Tp::AccountPtr,Tp::OutgoingStreamTubeChannelPtr,QDateTime,Tp::ChannelRequestHints)))); - tubeChan = createTubeChannel(true, HandleTypeContact, false); + tubeChan = createTubeChannel(true, EntityTypeContact, false); details.channel = QDBusObjectPath(tubeChan.first); details.properties = tubeChan.second; @@ -1332,7 +1332,7 @@ void TestStreamTubeHandlers::testClientBasicTcp() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::incomingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(false, HandleTypeContact, true); + QPair<QString, QVariantMap> chan = createTubeChannel(false, EntityTypeContact, true); QVERIFY(connect(client.data(), SIGNAL(tubeOffered(Tp::AccountPtr,Tp::IncomingStreamTubeChannelPtr)), @@ -1423,7 +1423,7 @@ void TestStreamTubeHandlers::testClientTcpGeneratorIgnore() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::incomingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(false, HandleTypeContact, false); + QPair<QString, QVariantMap> chan = createTubeChannel(false, EntityTypeContact, false); QVERIFY(connect(client.data(), SIGNAL(tubeOffered(Tp::AccountPtr,Tp::IncomingStreamTubeChannelPtr)), @@ -1504,7 +1504,7 @@ void TestStreamTubeHandlers::testClientTcpUnsupported() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::incomingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(false, HandleTypeContact, false, true); + QPair<QString, QVariantMap> chan = createTubeChannel(false, EntityTypeContact, false, true); QVERIFY(connect(client.data(), SIGNAL(tubeOffered(Tp::AccountPtr,Tp::IncomingStreamTubeChannelPtr)), @@ -1564,7 +1564,7 @@ void TestStreamTubeHandlers::testClientBasicUnix() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::incomingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(false, HandleTypeContact, true); + QPair<QString, QVariantMap> chan = createTubeChannel(false, EntityTypeContact, true); QVERIFY(connect(client.data(), SIGNAL(tubeOffered(Tp::AccountPtr,Tp::IncomingStreamTubeChannelPtr)), @@ -1645,7 +1645,7 @@ void TestStreamTubeHandlers::testClientUnixCredsIgnore() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::incomingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(false, HandleTypeContact, false); + QPair<QString, QVariantMap> chan = createTubeChannel(false, EntityTypeContact, false); QVERIFY(connect(client.data(), SIGNAL(tubeOffered(Tp::AccountPtr,Tp::IncomingStreamTubeChannelPtr)), @@ -1724,7 +1724,7 @@ void TestStreamTubeHandlers::testClientConnMonitoring() QVERIFY(ChannelClassSpec(filter.first()) == ChannelClassSpec::incomingStreamTube(QLatin1String("ftp"))); - QPair<QString, QVariantMap> chan = createTubeChannel(false, HandleTypeContact, true); + QPair<QString, QVariantMap> chan = createTubeChannel(false, EntityTypeContact, true); QVERIFY(connect(client.data(), SIGNAL(tubeOffered(Tp::AccountPtr,Tp::IncomingStreamTubeChannelPtr)), diff --git a/tests/lib/glib-helpers/test-conn-helper.cpp b/tests/lib/glib-helpers/test-conn-helper.cpp index 51f61ef3..58b24a4d 100644 --- a/tests/lib/glib-helpers/test-conn-helper.cpp +++ b/tests/lib/glib-helpers/test-conn-helper.cpp @@ -249,34 +249,34 @@ Tp::ChannelPtr TestConnHelper::createChannel(const QString &channelType, const T QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), target->handle()); return createChannel(request); } Tp::ChannelPtr TestConnHelper::createChannel(const QString &channelType, - Tp::HandleType targetHandleType, uint targetHandle) + Tp::EntityType targetEntityType, uint targetHandle) { QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) targetHandleType); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) targetEntityType); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), targetHandle); return createChannel(request); } Tp::ChannelPtr TestConnHelper::createChannel(const QString &channelType, - Tp::HandleType targetHandleType, const QString &targetID) + Tp::EntityType targetEntityType, const QString &targetID) { QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) targetHandleType); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) targetEntityType); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), targetID); return ensureChannel(request); @@ -303,34 +303,34 @@ Tp::ChannelPtr TestConnHelper::ensureChannel(const QString &channelType, const T QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) Tp::HandleTypeContact); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) Tp::EntityTypeContact); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), target->handle()); return ensureChannel(request); } Tp::ChannelPtr TestConnHelper::ensureChannel(const QString &channelType, - Tp::HandleType targetHandleType, uint targetHandle) + Tp::EntityType targetEntityType, uint targetHandle) { QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) targetHandleType); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) targetEntityType); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"), targetHandle); return ensureChannel(request); } Tp::ChannelPtr TestConnHelper::ensureChannel(const QString &channelType, - Tp::HandleType targetHandleType, const QString &targetID) + Tp::EntityType targetEntityType, const QString &targetID) { QVariantMap request; request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), channelType); - request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) targetHandleType); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) targetEntityType); request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), targetID); return ensureChannel(request); diff --git a/tests/lib/glib-helpers/test-conn-helper.h b/tests/lib/glib-helpers/test-conn-helper.h index 7f1a09f7..37a3528f 100644 --- a/tests/lib/glib-helpers/test-conn-helper.h +++ b/tests/lib/glib-helpers/test-conn-helper.h @@ -56,15 +56,15 @@ public: Tp::ChannelPtr createChannel(const QVariantMap &request); Tp::ChannelPtr createChannel(const QString &channelType, const Tp::ContactPtr &target); Tp::ChannelPtr createChannel(const QString &channelType, - Tp::HandleType targetHandleType, uint targetHandle); + Tp::EntityType targetEntityType, uint targetHandle); Tp::ChannelPtr createChannel(const QString &channelType, - Tp::HandleType targetHandleType, const QString &targetID); + Tp::EntityType targetEntityType, const QString &targetID); Tp::ChannelPtr ensureChannel(const QVariantMap &request); Tp::ChannelPtr ensureChannel(const QString &channelType, const Tp::ContactPtr &target); Tp::ChannelPtr ensureChannel(const QString &channelType, - Tp::HandleType targetHandleType, uint targetHandle); + Tp::EntityType targetEntityType, uint targetHandle); Tp::ChannelPtr ensureChannel(const QString &channelType, - Tp::HandleType targetHandleType, const QString &targetID); + Tp::EntityType targetEntityType, const QString &targetID); private Q_SLOTS: void expectConnInvalidated(); diff --git a/tests/lib/glib/call/example_call.manager b/tests/lib/glib/call/example_call.manager index 03a604a1..6bafe352 100644 --- a/tests/lib/glib/call/example_call.manager +++ b/tests/lib/glib/call/example_call.manager @@ -14,12 +14,12 @@ Icon=face-smile [audio] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.Call1 -im.telepathy.v1.Channel.TargetHandleType u=1 +im.telepathy.v1.Channel.TargetEntityType u=1 im.telepathy.v1.Channel.Type.Call1.InitialAudio b=1 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID;im.telepathy.v1.Channel.Type.Call1.InitialVideo; [video] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.Call1 -im.telepathy.v1.Channel.TargetHandleType u=1 +im.telepathy.v1.Channel.TargetEntityType u=1 im.telepathy.v1.Channel.Type.Call1.InitialVideo b=1 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID;im.telepathy.v1.Channel.Type.Call1.InitialAudio; diff --git a/tests/lib/glib/callable/media-channel.c b/tests/lib/glib/callable/media-channel.c index 17872f8e..e458d56a 100644 --- a/tests/lib/glib/callable/media-channel.c +++ b/tests/lib/glib/callable/media-channel.c @@ -327,7 +327,7 @@ get_property (GObject *object, g_value_take_boxed (value, tp_dbus_properties_mixin_make_properties_hash (object, TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", + TP_IFACE_CHANNEL, "TargetEntityType", TP_IFACE_CHANNEL, "TargetHandle", TP_IFACE_CHANNEL, "TargetID", TP_IFACE_CHANNEL, "InitiatorHandle", @@ -579,7 +579,7 @@ static void example_callable_media_channel_class_init (ExampleCallableMediaChannelClass *klass) { static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/contact-search-chan.c b/tests/lib/glib/contact-search-chan.c index e4fe4d8a..12f3b875 100644 --- a/tests/lib/glib/contact-search-chan.c +++ b/tests/lib/glib/contact-search-chan.c @@ -235,7 +235,7 @@ get_property (GObject *object, g_value_take_boxed (value, tp_dbus_properties_mixin_make_properties_hash (object, TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", + TP_IFACE_CHANNEL, "TargetEntityType", TP_IFACE_CHANNEL, "TargetHandle", TP_IFACE_CHANNEL, "TargetID", TP_IFACE_CHANNEL, "InitiatorHandle", @@ -359,7 +359,7 @@ static void tp_tests_contact_search_channel_class_init (TpTestsContactSearchChannelClass *klass) { static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/contactlist/contact-list-manager.c b/tests/lib/glib/contactlist/contact-list-manager.c index 465eadbe..7aed7aec 100644 --- a/tests/lib/glib/contactlist/contact-list-manager.c +++ b/tests/lib/glib/contactlist/contact-list-manager.c @@ -781,7 +781,7 @@ group_closed_cb (ExampleContactGroup *chan, static ExampleContactListBase * new_channel (ExampleContactListManager *self, - TpHandleType handle_type, + TpEntityType handle_type, TpHandle handle, gpointer request_token) { @@ -930,7 +930,7 @@ example_contact_list_manager_request (ExampleContactListManager *self, GHashTable *request_properties, gboolean require_new) { - TpHandleType handle_type; + TpEntityType handle_type; TpHandle handle; ExampleContactListBase *chan; GError *error = NULL; diff --git a/tests/lib/glib/contactlist/contact-list.c b/tests/lib/glib/contactlist/contact-list.c index 28a539ef..58320342 100644 --- a/tests/lib/glib/contactlist/contact-list.c +++ b/tests/lib/glib/contactlist/contact-list.c @@ -72,7 +72,7 @@ struct _ExampleContactListBasePrivate TpBaseConnection *conn; ExampleContactListManager *manager; gchar *object_path; - TpHandleType handle_type; + TpEntityType handle_type; TpHandle handle; /* These are really booleans, but gboolean is signed. Thanks, GLib */ @@ -265,7 +265,7 @@ get_property (GObject *object, g_value_take_boxed (value, tp_dbus_properties_mixin_make_properties_hash (object, TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", + TP_IFACE_CHANNEL, "TargetEntityType", TP_IFACE_CHANNEL, "TargetHandle", TP_IFACE_CHANNEL, "TargetID", TP_IFACE_CHANNEL, "InitiatorHandle", @@ -401,7 +401,7 @@ static void example_contact_list_base_class_init (ExampleContactListBaseClass *klass) { static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/contactlist2/example_contact_list.manager b/tests/lib/glib/contactlist2/example_contact_list.manager index c05f5a36..d20bf072 100644 --- a/tests/lib/glib/contactlist2/example_contact_list.manager +++ b/tests/lib/glib/contactlist2/example_contact_list.manager @@ -14,10 +14,10 @@ Icon=face-smile [contactlist] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.ContactList -im.telepathy.v1.Channel.TargetHandleType u=3 +im.telepathy.v1.Channel.TargetEntityType u=3 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID; [contactgroup] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.ContactList -im.telepathy.v1.Channel.TargetHandleType u=4 +im.telepathy.v1.Channel.TargetEntityType u=4 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID; diff --git a/tests/lib/glib/echo/chan.c b/tests/lib/glib/echo/chan.c index 85a6e010..7ccfb1c8 100644 --- a/tests/lib/glib/echo/chan.c +++ b/tests/lib/glib/echo/chan.c @@ -169,7 +169,7 @@ get_property (GObject *object, g_value_take_boxed (value, tp_dbus_properties_mixin_make_properties_hash (object, TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", + TP_IFACE_CHANNEL, "TargetEntityType", TP_IFACE_CHANNEL, "TargetHandle", TP_IFACE_CHANNEL, "TargetID", TP_IFACE_CHANNEL, "InitiatorHandle", @@ -257,7 +257,7 @@ static void example_echo_channel_class_init (ExampleEchoChannelClass *klass) { static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/echo2/chan.c b/tests/lib/glib/echo2/chan.c index 03253412..8601ea07 100644 --- a/tests/lib/glib/echo2/chan.c +++ b/tests/lib/glib/echo2/chan.c @@ -318,7 +318,7 @@ get_property (GObject *object, g_value_take_boxed (value, tp_dbus_properties_mixin_make_properties_hash (object, TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", + TP_IFACE_CHANNEL, "TargetEntityType", TP_IFACE_CHANNEL, "TargetHandle", TP_IFACE_CHANNEL, "TargetID", TP_IFACE_CHANNEL, "InitiatorHandle", @@ -406,7 +406,7 @@ static void example_echo_2_channel_class_init (ExampleEcho2ChannelClass *klass) { static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/future/conference/chan.c b/tests/lib/glib/future/conference/chan.c index 52145ff8..c0444aee 100644 --- a/tests/lib/glib/future/conference/chan.c +++ b/tests/lib/glib/future/conference/chan.c @@ -225,7 +225,7 @@ get_property (GObject *object, g_value_take_boxed (value, tp_dbus_properties_mixin_make_properties_hash (object, TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", + TP_IFACE_CHANNEL, "TargetEntityType", TP_IFACE_CHANNEL, "TargetHandle", TP_IFACE_CHANNEL, "TargetID", TP_IFACE_CHANNEL, "InitiatorHandle", @@ -406,7 +406,7 @@ static void tp_tests_conference_channel_class_init (TpTestsConferenceChannelClass *klass) { static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/textchan-group.c b/tests/lib/glib/textchan-group.c index c6a2cafe..59d43e42 100644 --- a/tests/lib/glib/textchan-group.c +++ b/tests/lib/glib/textchan-group.c @@ -268,7 +268,7 @@ tp_tests_text_channel_group_class_init (TpTestsTextChannelGroupClass *klass) GParamSpec *param_spec; static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, diff --git a/tests/lib/glib/textchan-null.c b/tests/lib/glib/textchan-null.c index aef9cbaf..3e307fd0 100644 --- a/tests/lib/glib/textchan-null.c +++ b/tests/lib/glib/textchan-null.c @@ -345,7 +345,7 @@ tp_tests_props_text_channel_class_init (TpTestsPropsTextChannelClass *klass) { GObjectClass *object_class = (GObjectClass *) klass; static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "TargetHandleType", "handle-type", NULL }, + { "TargetEntityType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, @@ -546,7 +546,7 @@ GHashTable * tp_tests_text_channel_get_props (TpTestsTextChannelNull *self) { GHashTable *props; - TpHandleType handle_type; + TpEntityType handle_type; TpHandle handle; gchar *target_id; gboolean requested; diff --git a/tests/manager-file.cpp b/tests/manager-file.cpp index f399ac04..8683cb3c 100644 --- a/tests/manager-file.cpp +++ b/tests/manager-file.cpp @@ -101,8 +101,8 @@ void TestManagerFile::testManagerFile() TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1); ftRcc.fixedProperties.insert( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - HandleTypeContact); + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + EntityTypeContact); ftRcc.fixedProperties.insert( TP_QT_IFACE_CHANNEL_TYPE_FILE_TRANSFER1 + QLatin1String(".ContentHashType"), FileHashTypeMD5); @@ -116,8 +116,8 @@ void TestManagerFile::testManagerFile() TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); fooTextRcc.fixedProperties.insert( - TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - HandleTypeContact); + TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + EntityTypeContact); fooTextRcc.allowedProperties.append( TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")); fooTextRcc.allowedProperties.append( diff --git a/tests/profile.cpp b/tests/profile.cpp index 3f162be4..ddfd68a0 100644 --- a/tests/profile.cpp +++ b/tests/profile.cpp @@ -115,8 +115,8 @@ void TestProfile::testProfile() QCOMPARE(profile->unsupportedChannelClassSpecs().count(), 2); RequestableChannelClassSpec rccSpec = profile->unsupportedChannelClassSpecs().first(); - QCOMPARE(rccSpec.hasTargetHandleType(), true); - QCOMPARE(rccSpec.targetHandleType(), HandleTypeContact); + QCOMPARE(rccSpec.hasTargetEntityType(), true); + QCOMPARE(rccSpec.targetEntityType(), EntityTypeContact); QCOMPARE(rccSpec.channelType(), QLatin1String("im.telepathy.v1.Channel.Type.Text")); profile = Profile::createForServiceName(QLatin1String("test-profile-no-icon-and-provider")); diff --git a/tests/rccspec.cpp b/tests/rccspec.cpp index 8eb17882..fb52a292 100644 --- a/tests/rccspec.cpp +++ b/tests/rccspec.cpp @@ -18,33 +18,33 @@ void TestRCCSpec::testRCCSpec() spec = RequestableChannelClassSpec::textChat(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - QCOMPARE(spec.targetHandleType(), HandleTypeContact); + QCOMPARE(spec.targetEntityType(), EntityTypeContact); QCOMPARE(spec.fixedProperties().size(), 2); QCOMPARE(spec.allowedProperties().isEmpty(), true); spec = RequestableChannelClassSpec::textChatroom(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - QCOMPARE(spec.targetHandleType(), HandleTypeRoom); + QCOMPARE(spec.targetEntityType(), EntityTypeRoom); QCOMPARE(spec.fixedProperties().size(), 2); QCOMPARE(spec.allowedProperties().isEmpty(), true); spec = RequestableChannelClassSpec::audioCall(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - QCOMPARE(spec.targetHandleType(), HandleTypeContact); + QCOMPARE(spec.targetEntityType(), EntityTypeContact); QCOMPARE(spec.fixedProperties().size(), 2); QCOMPARE(spec.allowedProperties().size(), 1); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio")), true); spec = RequestableChannelClassSpec::videoCall(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - QCOMPARE(spec.targetHandleType(), HandleTypeContact); + QCOMPARE(spec.targetEntityType(), EntityTypeContact); QCOMPARE(spec.fixedProperties().size(), 2); QCOMPARE(spec.allowedProperties().size(), 1); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialVideo")), true); spec = RequestableChannelClassSpec::audioCallWithVideoAllowed(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_CALL1); - QCOMPARE(spec.targetHandleType(), HandleTypeContact); + QCOMPARE(spec.targetEntityType(), EntityTypeContact); QCOMPARE(spec.fixedProperties().size(), 2); QCOMPARE(spec.allowedProperties().size(), 2); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_TYPE_CALL1 + QLatin1String(".InitialAudio")), true); @@ -52,26 +52,26 @@ void TestRCCSpec::testRCCSpec() spec = RequestableChannelClassSpec::conferenceTextChat(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - QVERIFY(!spec.hasTargetHandleType()); + QVERIFY(!spec.hasTargetEntityType()); QCOMPARE(spec.allowedProperties().size(), 1); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialChannels")), true); spec = RequestableChannelClassSpec::conferenceTextChatWithInvitees(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - QVERIFY(!spec.hasTargetHandleType()); + QVERIFY(!spec.hasTargetEntityType()); QCOMPARE(spec.allowedProperties().size(), 2); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialChannels")), true); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialInviteeHandles")), true); spec = RequestableChannelClassSpec::conferenceTextChatroom(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - QCOMPARE(spec.targetHandleType(), HandleTypeRoom); + QCOMPARE(spec.targetEntityType(), EntityTypeRoom); QCOMPARE(spec.allowedProperties().size(), 1); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialChannels")), true); spec = RequestableChannelClassSpec::conferenceTextChatroomWithInvitees(); QCOMPARE(spec.channelType(), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - QCOMPARE(spec.targetHandleType(), HandleTypeRoom); + QCOMPARE(spec.targetEntityType(), EntityTypeRoom); QCOMPARE(spec.allowedProperties().size(), 2); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialChannels")), true); QCOMPARE(spec.allowsProperty(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE1 + QLatin1String(".InitialInviteeHandles")), true); @@ -105,8 +105,8 @@ void TestRCCSpec::testRCCSpec() RequestableChannelClass rcc; rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), TP_QT_IFACE_CHANNEL_TYPE_TEXT); - rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), - (uint) HandleTypeContact); + rcc.fixedProperties.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetEntityType"), + (uint) EntityTypeContact); spec = RequestableChannelClassSpec(rcc); QCOMPARE(RequestableChannelClassSpec::textChat() == spec, true); } diff --git a/tests/telepathy/managers/protocol.manager b/tests/telepathy/managers/protocol.manager index de6ed342..b76fe1bf 100644 --- a/tests/telepathy/managers/protocol.manager +++ b/tests/telepathy/managers/protocol.manager @@ -31,5 +31,5 @@ AddressableURISchemes=protocol; [1-1-text] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.Text -im.telepathy.v1.Channel.TargetHandleType u=1 +im.telepathy.v1.Channel.TargetEntityType u=1 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID; diff --git a/tests/telepathy/managers/spurious.manager b/tests/telepathy/managers/spurious.manager index 2a8d8e80..37d53f44 100644 --- a/tests/telepathy/managers/spurious.manager +++ b/tests/telepathy/managers/spurious.manager @@ -15,7 +15,7 @@ status-xa=4 [text] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.Text -im.telepathy.v1.Channel.TargetHandleType u=1 +im.telepathy.v1.Channel.TargetEntityType u=1 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID; [Protocol weird] diff --git a/tests/telepathy/managers/test-manager-file.manager b/tests/telepathy/managers/test-manager-file.manager index 22c87fc6..f8ffc3de 100644 --- a/tests/telepathy/managers/test-manager-file.manager +++ b/tests/telepathy/managers/test-manager-file.manager @@ -32,13 +32,13 @@ AddressableURISchemes=foo; [ft] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.FileTransfer -im.telepathy.v1.Channel.TargetHandleType u=1 +im.telepathy.v1.Channel.TargetEntityType u=1 im.telepathy.v1.Channel.Type.FileTransfer.ContentHashType u=1 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID; [foo text] im.telepathy.v1.Channel.ChannelType s=im.telepathy.v1.Channel.Type.Text -im.telepathy.v1.Channel.TargetHandleType u=1 +im.telepathy.v1.Channel.TargetEntityType u=1 allowed=im.telepathy.v1.Channel.TargetHandle;im.telepathy.v1.Channel.TargetID; [Protocol bar] diff --git a/tests/telepathy/profiles/test-profile-invalid-service-id.profile b/tests/telepathy/profiles/test-profile-invalid-service-id.profile index 6958197d..bb51e559 100644 --- a/tests/telepathy/profiles/test-profile-invalid-service-id.profile +++ b/tests/telepathy/profiles/test-profile-invalid-service-id.profile @@ -23,7 +23,7 @@ <unsupported-channel-classes> <!-- this service doesn't support text roomlists --> <channel-class> - <property name="im.telepathy.v1.Channel.TargetHandleType" + <property name="im.telepathy.v1.Channel.TargetEntityType" type="u">3</property> <property name="im.telepathy.v1.Channel.ChannelType" type="s">im.telepathy.v1.Channel.Type.Text</property> diff --git a/tests/telepathy/profiles/test-profile.profile b/tests/telepathy/profiles/test-profile.profile index 4e683669..c10a896a 100644 --- a/tests/telepathy/profiles/test-profile.profile +++ b/tests/telepathy/profiles/test-profile.profile @@ -23,13 +23,13 @@ <unsupported-channel-classes> <!-- this service doesn't support text chats and roomlists --> <channel-class> - <property name="im.telepathy.v1.Channel.TargetHandleType" + <property name="im.telepathy.v1.Channel.TargetEntityType" type="u">1</property> <property name="im.telepathy.v1.Channel.ChannelType" type="s">im.telepathy.v1.Channel.Type.Text</property> </channel-class> <channel-class> - <property name="im.telepathy.v1.Channel.TargetHandleType" + <property name="im.telepathy.v1.Channel.TargetEntityType" type="u">3</property> <property name="im.telepathy.v1.Channel.ChannelType" type="s">im.telepathy.v1.Channel.Type.Text</property> |