File indexing completed on 2023-12-03 08:28:36

0001 #define IN_TP_QT_HEADER
0002 #include "proxy-service-interface.h"
0003 
0004 namespace KTp
0005 {
0006 namespace Client
0007 {
0008 
0009 ProxyServiceInterface::ProxyServiceInterface(const QString& busName, const QString& objectPath, QObject *parent)
0010     : Tp::AbstractInterface(busName, objectPath, staticInterfaceName(), QDBusConnection::sessionBus(), parent)
0011 {
0012 }
0013 
0014 ProxyServiceInterface::ProxyServiceInterface(const QDBusConnection& connection, const QString& busName, const QString& objectPath, QObject *parent)
0015     : Tp::AbstractInterface(busName, objectPath, staticInterfaceName(), connection, parent)
0016 {
0017 }
0018 
0019 ProxyServiceInterface::ProxyServiceInterface(Tp::DBusProxy *proxy)
0020     : Tp::AbstractInterface(proxy, staticInterfaceName())
0021 {
0022 }
0023 
0024 ProxyServiceInterface::ProxyServiceInterface(const Tp::AbstractInterface& mainInterface)
0025     : Tp::AbstractInterface(mainInterface.service(), mainInterface.path(), staticInterfaceName(), mainInterface.connection(), mainInterface.parent())
0026 {
0027 }
0028 
0029 ProxyServiceInterface::ProxyServiceInterface(const Tp::AbstractInterface& mainInterface, QObject *parent)
0030     : Tp::AbstractInterface(mainInterface.service(), mainInterface.path(), staticInterfaceName(), mainInterface.connection(), parent)
0031 {
0032 }
0033 
0034 void ProxyServiceInterface::invalidate(Tp::DBusProxy *proxy,
0035         const QString &error, const QString &message)
0036 {
0037     disconnect(this, SIGNAL(ProxyConnected(const QDBusObjectPath&)), nullptr, nullptr);
0038     disconnect(this, SIGNAL(ProxyDisconnected(const QDBusObjectPath&)), nullptr, nullptr);
0039     disconnect(this, SIGNAL(KeyGenerationStarted(const QDBusObjectPath&)), nullptr, nullptr);
0040     disconnect(this, SIGNAL(KeyGenerationFinished(const QDBusObjectPath&, bool)), nullptr, nullptr);
0041 
0042     Tp::AbstractInterface::invalidate(proxy, error, message);
0043 }
0044 }
0045 }