From 117bff483d456b40491b46b99be90cbe6e5e435d Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 3 May 2011 16:53:29 +0200 Subject: [PATCH] Add setProxy() method to SipPlugin interface --- src/libtomahawk/sip/SipPlugin.cpp | 9 ++++++++- src/libtomahawk/sip/SipPlugin.h | 7 ++++++- src/sip/jreen/jabber.cpp | 4 ++-- src/sip/jreen/jabber.h | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/sip/SipPlugin.cpp b/src/libtomahawk/sip/SipPlugin.cpp index 4af179694..bb849637f 100644 --- a/src/libtomahawk/sip/SipPlugin.cpp +++ b/src/libtomahawk/sip/SipPlugin.cpp @@ -1,6 +1,7 @@ /* === This file is part of Tomahawk Player - === - * + * * Copyright 2010-2011, Christian Muehlhaeuser + * 2011, Dominik Schmidt * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,3 +32,9 @@ SipPlugin::configWidget() { return 0; } + +void +SipPlugin::setProxy( const QNetworkProxy& proxy ) +{ + qDebug() << Q_FUNC_INFO << "Not implemented"; +} \ No newline at end of file diff --git a/src/libtomahawk/sip/SipPlugin.h b/src/libtomahawk/sip/SipPlugin.h index 4bd55fc31..bc7640349 100644 --- a/src/libtomahawk/sip/SipPlugin.h +++ b/src/libtomahawk/sip/SipPlugin.h @@ -1,6 +1,7 @@ /* === This file is part of Tomahawk Player - === - * + * * Copyright 2010-2011, Christian Muehlhaeuser + * 2011, Dominik Schmidt * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +23,8 @@ #include #include #include +#include + #include "dllmacro.h" @@ -49,6 +52,8 @@ public slots: virtual void addContact( const QString &jid, const QString& msg = QString() ) = 0; virtual void sendMsg( const QString& to, const QString& msg ) = 0; + void setProxy( const QNetworkProxy &proxy ); + signals: void error( int, const QString& ); void connected(); diff --git a/src/sip/jreen/jabber.cpp b/src/sip/jreen/jabber.cpp index 0558c8a0a..3c4f519c3 100644 --- a/src/sip/jreen/jabber.cpp +++ b/src/sip/jreen/jabber.cpp @@ -115,7 +115,7 @@ JabberPlugin::~JabberPlugin() } void -JabberPlugin::setProxy( QNetworkProxy* proxy ) +JabberPlugin::setProxy( const QNetworkProxy &proxy ) { if(m_currentServer.isEmpty() || !(m_currentPort > 0)) { @@ -130,7 +130,7 @@ JabberPlugin::setProxy( QNetworkProxy* proxy ) m_client->setConnection(new Jreen::TcpConnection(m_currentServer, m_currentPort)); } - qobject_cast(m_client->connection())->setProxy(*proxy); + qobject_cast(m_client->connection())->setProxy(proxy); } diff --git a/src/sip/jreen/jabber.h b/src/sip/jreen/jabber.h index 67e3722d6..cb0b3c2b8 100644 --- a/src/sip/jreen/jabber.h +++ b/src/sip/jreen/jabber.h @@ -62,7 +62,6 @@ public: virtual const QString accountName(); virtual QMenu* menu(); - void setProxy( QNetworkProxy* proxy ); signals: void jidChanged( const QString& ); @@ -73,6 +72,7 @@ public slots: void sendMsg( const QString& to, const QString& msg ); void broadcastMsg( const QString &msg ); void addContact( const QString &jid, const QString& msg = QString() ); + void setProxy( const QNetworkProxy &proxy ); private slots: void showAddFriendDialog();