1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

Merge branch 'master' into leos-crash

This commit is contained in:
Jeff Mitchell
2011-05-03 14:18:12 -04:00
4 changed files with 32 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
* *
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* 2011, Dominik Schmidt <dev@dominik-schmidt.de>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -31,3 +32,9 @@ SipPlugin::configWidget()
{ {
return 0; return 0;
} }
void
SipPlugin::setProxy( const QNetworkProxy& proxy )
{
qDebug() << Q_FUNC_INFO << "Not implemented";
}

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
* *
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* 2011, Dominik Schmidt <dev@dominik-schmidt.de>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -22,6 +23,8 @@
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QMenu> #include <QMenu>
#include <QNetworkProxy>
#include "dllmacro.h" #include "dllmacro.h"
@@ -49,6 +52,8 @@ public slots:
virtual void addContact( const QString &jid, const QString& msg = QString() ) = 0; virtual void addContact( const QString &jid, const QString& msg = QString() ) = 0;
virtual void sendMsg( const QString& to, const QString& msg ) = 0; virtual void sendMsg( const QString& to, const QString& msg ) = 0;
void setProxy( const QNetworkProxy &proxy );
signals: signals:
void error( int, const QString& ); void error( int, const QString& );
void connected(); void connected();

View File

@@ -29,6 +29,8 @@
#include <jreen/capabilities.h> #include <jreen/capabilities.h>
#include <jreen/vcardupdate.h> #include <jreen/vcardupdate.h>
#include <jreen/vcard.h> #include <jreen/vcard.h>
#include <jreen/directconnection.h>
#include <jreen/tcpconnection.h>
#include <qjson/parser.h> #include <qjson/parser.h>
#include <qjson/serializer.h> #include <qjson/serializer.h>
@@ -113,9 +115,22 @@ JabberPlugin::~JabberPlugin()
} }
void void
JabberPlugin::setProxy( QNetworkProxy* proxy ) JabberPlugin::setProxy( const QNetworkProxy &proxy )
{ {
qDebug() << Q_FUNC_INFO << "Not implemented"; if(m_currentServer.isEmpty() || !(m_currentPort > 0))
{
// patches are welcome in Jreen that implement jdns through proxy
qDebug() << Q_FUNC_INFO << "Jreen proxy only works when you explicitly set host and port";
Q_ASSERT(false);
return;
}
if(!m_client->connection())
{
m_client->setConnection(new Jreen::TcpConnection(m_currentServer, m_currentPort));
}
qobject_cast<Jreen::DirectConnection*>(m_client->connection())->setProxy(proxy);
} }

View File

@@ -62,7 +62,6 @@ public:
virtual const QString accountName(); virtual const QString accountName();
virtual QMenu* menu(); virtual QMenu* menu();
void setProxy( QNetworkProxy* proxy );
signals: signals:
void jidChanged( const QString& ); void jidChanged( const QString& );
@@ -73,6 +72,7 @@ public slots:
void sendMsg( const QString& to, const QString& msg ); void sendMsg( const QString& to, const QString& msg );
void broadcastMsg( const QString &msg ); void broadcastMsg( const QString &msg );
void addContact( const QString &jid, const QString& msg = QString() ); void addContact( const QString &jid, const QString& msg = QString() );
void setProxy( const QNetworkProxy &proxy );
private slots: private slots:
void showAddFriendDialog(); void showAddFriendDialog();