diff --git a/examples/file-transfer/receiver.cpp b/examples/file-transfer/receiver.cpp index bb0fab8..0be77db 100644 --- a/examples/file-transfer/receiver.cpp +++ b/examples/file-transfer/receiver.cpp @@ -105,6 +105,15 @@ void Receiver::onConnectionConnected(PendingOperation *op) qDebug() << "Connected!"; + QMap filter; + filter[ QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".ChannelType") ] = QDBusVariant(QLatin1String(TELEPATHY_INTERFACE_CHANNEL_TYPE_FILE_TRANSFER)); + filter[ QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetHandleType") ] = QDBusVariant(uint(1)); + Tp::ChannelClassList channelClassList; + + HandlerCapabilities capabilities; + capabilities.channelClasses << Tp::ChannelClass(filter); + mConn->contactCapabilitiesInterface()->UpdateCapabilities(HandlerCapabilitiesList() << capabilities); + connect(mConn->requestsInterface(), SIGNAL(NewChannels(const Tp::ChannelDetailsList&)), SLOT(onNewChannels(const Tp::ChannelDetailsList&)));