mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 22:56:42 +02:00
Work towards getting friends statuses
This commit is contained in:
@@ -16,10 +16,11 @@ public:
|
|||||||
virtual ~SipPlugin() {}
|
virtual ~SipPlugin() {}
|
||||||
|
|
||||||
virtual bool isValid() = 0;
|
virtual bool isValid() = 0;
|
||||||
|
virtual const QString name() = 0;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool connect( bool startup = false ) = 0;
|
virtual bool connectPlugin( bool startup = false ) = 0;
|
||||||
virtual void disconnect() = 0;
|
virtual void disconnectPlugin() = 0;
|
||||||
|
|
||||||
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;
|
||||||
|
@@ -402,6 +402,30 @@ TomahawkSettings::setTwitterOAuthTokenSecret( const QString& oauthtokensecret )
|
|||||||
setValue( "twitter/oauthtokensecret", oauthtokensecret );
|
setValue( "twitter/oauthtokensecret", oauthtokensecret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint64
|
||||||
|
TomahawkSettings::twitterCachedFriendsSinceId() const
|
||||||
|
{
|
||||||
|
return value( "twitter/cachedfriendssinceid", 0 ).toLongLong();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TomahawkSettings::setTwitterCachedFriendsSinceId( qint64 cachedId )
|
||||||
|
{
|
||||||
|
setValue( "twitter/cachedfriendssinceid", cachedId );
|
||||||
|
}
|
||||||
|
|
||||||
|
qint64
|
||||||
|
TomahawkSettings::twitterCachedMentionsSinceId() const
|
||||||
|
{
|
||||||
|
return value( "twitter/cachedmentionssinceid", 0 ).toLongLong();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TomahawkSettings::setTwitterCachedMentionsSinceId( qint64 cachedId )
|
||||||
|
{
|
||||||
|
setValue( "twitter/cachedmentionssinceid", cachedId );
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TomahawkSettings::scrobblingEnabled() const
|
TomahawkSettings::scrobblingEnabled() const
|
||||||
{
|
{
|
||||||
|
@@ -103,6 +103,12 @@ public:
|
|||||||
QString twitterOAuthTokenSecret() const;
|
QString twitterOAuthTokenSecret() const;
|
||||||
void setTwitterOAuthTokenSecret( const QString& oauthtokensecret );
|
void setTwitterOAuthTokenSecret( const QString& oauthtokensecret );
|
||||||
|
|
||||||
|
qint64 twitterCachedFriendsSinceId() const;
|
||||||
|
void setTwitterCachedFriendsSinceId( qint64 sinceid );
|
||||||
|
|
||||||
|
qint64 twitterCachedMentionsSinceId() const;
|
||||||
|
void setTwitterCachedMentionsSinceId( qint64 sinceid );
|
||||||
|
|
||||||
/// XMPP Component Settings
|
/// XMPP Component Settings
|
||||||
QString xmppBotServer() const;
|
QString xmppBotServer() const;
|
||||||
void setXmppBotServer( const QString &server );
|
void setXmppBotServer( const QString &server );
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
#include "settingsdialog.h"
|
|
||||||
#include "ui_settingsdialog.h"
|
|
||||||
#include "ui_proxydialog.h"
|
|
||||||
|
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
@@ -14,14 +10,17 @@
|
|||||||
#include <lastfm/XmlQuery>
|
#include <lastfm/XmlQuery>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <qtweetaccountverifycredentials.h>
|
||||||
|
#include <qtweetstatusupdate.h>
|
||||||
|
|
||||||
|
#include "settingsdialog.h"
|
||||||
|
#include "ui_settingsdialog.h"
|
||||||
|
#include "ui_proxydialog.h"
|
||||||
#include "tomahawk/tomahawkapp.h"
|
#include "tomahawk/tomahawkapp.h"
|
||||||
#include "musicscanner.h"
|
#include "musicscanner.h"
|
||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
#include "sip/SipHandler.h"
|
#include "sip/SipHandler.h"
|
||||||
#include "sip/twitter/tomahawkoauthtwitter.h"
|
#include "sip/twitter/tomahawkoauthtwitter.h"
|
||||||
#include <qtweetaccountverifycredentials.h>
|
|
||||||
#include <qtweetstatusupdate.h>
|
|
||||||
|
|
||||||
|
|
||||||
static QString
|
static QString
|
||||||
md5( const QByteArray& src )
|
md5( const QByteArray& src )
|
||||||
@@ -156,8 +155,8 @@ SettingsDialog::~SettingsDialog()
|
|||||||
|
|
||||||
if( rejabber )
|
if( rejabber )
|
||||||
{
|
{
|
||||||
APP->sipHandler()->disconnect();
|
APP->sipHandler()->disconnectPlugins();
|
||||||
APP->sipHandler()->connect();
|
APP->sipHandler()->connectPlugins();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -303,6 +302,7 @@ SettingsDialog::authenticateTwitter()
|
|||||||
ui->twitterStatusLabel->setText("Status: Credentials saved");
|
ui->twitterStatusLabel->setText("Status: Credentials saved");
|
||||||
ui->twitterAuthenticateButton->setText( "Re-authenticate" );
|
ui->twitterAuthenticateButton->setText( "Re-authenticate" );
|
||||||
ui->twitterInstructionsBox->setVisible( true );
|
ui->twitterInstructionsBox->setVisible( true );
|
||||||
|
TomahawkApp::instance()->sipHandler()->connectPlugins( false, "SIPTWITTER" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -114,30 +114,39 @@ SipHandler::loadPlugin( QObject* plugin )
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SipHandler::connect( bool startup )
|
SipHandler::connectPlugins( bool startup, const QString &pluginName )
|
||||||
{
|
{
|
||||||
foreach( SipPlugin* sip, m_plugins )
|
foreach( SipPlugin* sip, m_plugins )
|
||||||
sip->connect( startup );
|
{
|
||||||
|
if ( pluginName.isEmpty() || ( !pluginName.isEmpty() && sip->name() == pluginName ) )
|
||||||
|
sip->connectPlugin( startup );
|
||||||
|
}
|
||||||
m_connected = true;
|
m_connected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SipHandler::disconnect()
|
SipHandler::disconnectPlugins( const QString &pluginName )
|
||||||
{
|
{
|
||||||
foreach( SipPlugin* sip, m_plugins )
|
foreach( SipPlugin* sip, m_plugins )
|
||||||
sip->disconnect();
|
{
|
||||||
SourceList::instance()->removeAllRemote();
|
if ( pluginName.isEmpty() || ( !pluginName.isEmpty() && sip->name() == pluginName ) )
|
||||||
m_connected = false;
|
sip->disconnectPlugin();
|
||||||
|
}
|
||||||
|
if( pluginName.isEmpty() )
|
||||||
|
{
|
||||||
|
SourceList::instance()->removeAllRemote();
|
||||||
|
m_connected = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipHandler::toggleConnect()
|
SipHandler::toggleConnect()
|
||||||
{
|
{
|
||||||
if( m_connected )
|
if( m_connected )
|
||||||
disconnect();
|
disconnectPlugins();
|
||||||
else
|
else
|
||||||
connect();
|
connectPlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,8 +19,8 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void addContact( const QString& id ) { qDebug() << Q_FUNC_INFO << id; }
|
void addContact( const QString& id ) { qDebug() << Q_FUNC_INFO << id; }
|
||||||
|
|
||||||
void connect( bool startup = false );
|
void connectPlugins( bool startup = false, const QString &pluginName = QString() );
|
||||||
void disconnect();
|
void disconnectPlugins( const QString &pluginName = QString() );
|
||||||
void toggleConnect();
|
void toggleConnect();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@@ -12,9 +12,14 @@ JabberPlugin::setProxy( QNetworkProxy* proxy )
|
|||||||
p->setProxy( proxy );
|
p->setProxy( proxy );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString
|
||||||
|
JabberPlugin::name()
|
||||||
|
{
|
||||||
|
return QString( MYNAME );
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
JabberPlugin::connect( bool startup )
|
JabberPlugin::connectPlugin( bool startup )
|
||||||
{
|
{
|
||||||
qDebug() << "JabberPlugin::connect";
|
qDebug() << "JabberPlugin::connect";
|
||||||
if ( startup && !TomahawkSettings::instance()->jabberAutoConnect() )
|
if ( startup && !TomahawkSettings::instance()->jabberAutoConnect() )
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#include "../sipdllmacro.h"
|
#include "../sipdllmacro.h"
|
||||||
|
|
||||||
|
#define MYNAME "SIPJABBER"
|
||||||
|
|
||||||
class SIPDLLEXPORT JabberPlugin : public SipPlugin
|
class SIPDLLEXPORT JabberPlugin : public SipPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -20,13 +22,14 @@ public:
|
|||||||
|
|
||||||
//FIXME: Make this more correct
|
//FIXME: Make this more correct
|
||||||
virtual bool isValid() { return true; }
|
virtual bool isValid() { return true; }
|
||||||
|
virtual const QString name();
|
||||||
|
|
||||||
void setProxy( QNetworkProxy* proxy );
|
void setProxy( QNetworkProxy* proxy );
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool connect( bool startup );
|
virtual bool connectPlugin( bool startup );
|
||||||
|
|
||||||
void disconnect()
|
void disconnectPlugin()
|
||||||
{
|
{
|
||||||
QMetaObject::invokeMethod( p,
|
QMetaObject::invokeMethod( p,
|
||||||
"disconnect",
|
"disconnect",
|
||||||
|
@@ -1,28 +1,46 @@
|
|||||||
#include "twitter.h"
|
#include "twitter.h"
|
||||||
|
|
||||||
#include <tomahawksettings.h>
|
#include <QtPlugin>
|
||||||
|
#include <QRegExp>
|
||||||
|
|
||||||
#include <qtweetaccountverifycredentials.h>
|
#include <qtweetaccountverifycredentials.h>
|
||||||
#include <qtweetuser.h>
|
#include <qtweetuser.h>
|
||||||
|
#include <qtweetfriendstimeline.h>
|
||||||
|
#include <qtweetstatus.h>
|
||||||
|
|
||||||
#include <QtPlugin>
|
|
||||||
#include <utils/tomahawkutils.h>
|
#include <utils/tomahawkutils.h>
|
||||||
|
#include <tomahawksettings.h>
|
||||||
|
|
||||||
|
|
||||||
TwitterPlugin::TwitterPlugin()
|
TwitterPlugin::TwitterPlugin()
|
||||||
: m_twitterAuth( 0 )
|
: SipPlugin()
|
||||||
, m_isAuthed( false )
|
, m_isValid( false )
|
||||||
|
, m_checkTimer( this )
|
||||||
{
|
{
|
||||||
|
m_checkTimer.setInterval( 60000 );
|
||||||
|
m_checkTimer.setSingleShot( false );
|
||||||
|
QObject::connect( &m_checkTimer, SIGNAL( timeout() ), SLOT( checkTimerFired() ) );
|
||||||
|
m_checkTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TwitterPlugin::isValid()
|
TwitterPlugin::isValid()
|
||||||
{
|
{
|
||||||
return m_isAuthed;
|
return m_isValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString
|
||||||
|
TwitterPlugin::name()
|
||||||
|
{
|
||||||
|
qDebug() << "TwitterPlugin returning plugin name " << QString( MYNAME );
|
||||||
|
return QString( MYNAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TwitterPlugin::connect( bool /*startup*/ )
|
TwitterPlugin::connectPlugin( bool /*startup*/ )
|
||||||
{
|
{
|
||||||
|
qDebug() << "TwitterPlugin connectPlugin called";
|
||||||
|
|
||||||
TomahawkSettings *settings = TomahawkSettings::instance();
|
TomahawkSettings *settings = TomahawkSettings::instance();
|
||||||
|
|
||||||
if ( settings->twitterOAuthToken().isEmpty() || settings->twitterOAuthTokenSecret().isEmpty() )
|
if ( settings->twitterOAuthToken().isEmpty() || settings->twitterOAuthTokenSecret().isEmpty() )
|
||||||
@@ -31,13 +49,13 @@ TwitterPlugin::connect( bool /*startup*/ )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete m_twitterAuth;
|
delete m_twitterAuth.data();
|
||||||
m_twitterAuth = new TomahawkOAuthTwitter( this );
|
m_twitterAuth = QWeakPointer<TomahawkOAuthTwitter>( new TomahawkOAuthTwitter( this ) );
|
||||||
m_twitterAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
m_twitterAuth.data()->setNetworkAccessManager( TomahawkUtils::nam() );
|
||||||
m_twitterAuth->setOAuthToken( settings->twitterOAuthToken().toLatin1() );
|
m_twitterAuth.data()->setOAuthToken( settings->twitterOAuthToken().toLatin1() );
|
||||||
m_twitterAuth->setOAuthTokenSecret( settings->twitterOAuthTokenSecret().toLatin1() );
|
m_twitterAuth.data()->setOAuthTokenSecret( settings->twitterOAuthTokenSecret().toLatin1() );
|
||||||
|
|
||||||
QTweetAccountVerifyCredentials *credVerifier = new QTweetAccountVerifyCredentials( m_twitterAuth, this );
|
QTweetAccountVerifyCredentials *credVerifier = new QTweetAccountVerifyCredentials( m_twitterAuth.data(), this );
|
||||||
QObject::connect( credVerifier, SIGNAL( parsedUser(const QTweetUser &) ), SLOT( connectAuthVerifyReply(const QTweetUser &) ) );
|
QObject::connect( credVerifier, SIGNAL( parsedUser(const QTweetUser &) ), SLOT( connectAuthVerifyReply(const QTweetUser &) ) );
|
||||||
credVerifier->verify();
|
credVerifier->verify();
|
||||||
/*
|
/*
|
||||||
@@ -48,18 +66,66 @@ TwitterPlugin::connect( bool /*startup*/ )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TwitterPlugin::disconnectPlugin()
|
||||||
|
{
|
||||||
|
if( !m_friendsTimeline.isNull() )
|
||||||
|
m_friendsTimeline.data()->deleteLater();
|
||||||
|
if( !m_twitterAuth.isNull() )
|
||||||
|
m_twitterAuth.data()->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TwitterPlugin::connectAuthVerifyReply( const QTweetUser &user )
|
TwitterPlugin::connectAuthVerifyReply( const QTweetUser &user )
|
||||||
{
|
{
|
||||||
if ( user.id() == 0 )
|
if ( user.id() == 0 )
|
||||||
{
|
{
|
||||||
qDebug() << "Could not authenticate to Twitter";
|
qDebug() << "Could not authenticate to Twitter";
|
||||||
m_isAuthed = false;
|
m_isValid = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "Successfully authenticated to Twitter as user " << user.screenName();
|
qDebug() << "TwitterPlugin successfully authenticated to Twitter as user " << user.screenName();
|
||||||
m_isAuthed = true;
|
m_isValid = true;
|
||||||
|
if ( !m_twitterAuth.isNull() )
|
||||||
|
{
|
||||||
|
m_friendsTimeline = QWeakPointer<QTweetFriendsTimeline>( new QTweetFriendsTimeline( m_twitterAuth.data(), this ) );
|
||||||
|
QObject::connect( m_friendsTimeline.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( friendsTimelineStatuses(const QList<QTweetStatus> &) ) );
|
||||||
|
QMetaObject::invokeMethod( this, "checkTimerFired", Qt::DirectConnection );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug() << "Twitter auth pointer was null!";
|
||||||
|
m_isValid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TwitterPlugin::checkTimerFired()
|
||||||
|
{
|
||||||
|
if ( isValid() )
|
||||||
|
{
|
||||||
|
qint64 cachedfriendssinceid = TomahawkSettings::instance()->twitterCachedFriendsSinceId();
|
||||||
|
if ( !m_friendsTimeline.isNull() )
|
||||||
|
m_friendsTimeline.data()->fetch( cachedfriendssinceid, 0, 800 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TwitterPlugin::friendsTimelineStatuses( const QList< QTweetStatus >& statuses )
|
||||||
|
{
|
||||||
|
QRegExp regex( QString( "^(@[a-zA-Z0-9]+ )?Got Tomahawk\\?(.*)$" ) );
|
||||||
|
foreach( QTweetStatus status, statuses )
|
||||||
|
{
|
||||||
|
QString statusText = status.text();
|
||||||
|
qDebug() << "Performing matching on status text " << statusText;
|
||||||
|
if ( regex.exactMatch( statusText ) )
|
||||||
|
{
|
||||||
|
qDebug() << "Found an exact matching Tweet from user " << status.user().screenName();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
qDebug() << "No match, matched length is " << regex.matchedLength();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,31 +1,36 @@
|
|||||||
#ifndef ZEROCONF_H
|
#ifndef TWITTER_H
|
||||||
#define ZEROCONF_H
|
#define TWITTER_H
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QWeakPointer>
|
||||||
|
|
||||||
#include "sip/SipPlugin.h"
|
|
||||||
#include "tomahawkoauthtwitter.h"
|
|
||||||
#include <qtweetuser.h>
|
#include <qtweetuser.h>
|
||||||
#include <qtweetnetbase.h>
|
#include <qtweetnetbase.h>
|
||||||
|
#include <qtweetfriendstimeline.h>
|
||||||
|
|
||||||
#include "../sipdllmacro.h"
|
#include "../sipdllmacro.h"
|
||||||
|
#include "sip/SipPlugin.h"
|
||||||
|
#include "tomahawkoauthtwitter.h"
|
||||||
|
|
||||||
|
#define MYNAME "SIPTWITTER"
|
||||||
|
|
||||||
class SIPDLLEXPORT TwitterPlugin : public SipPlugin
|
class SIPDLLEXPORT TwitterPlugin : public SipPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES( SipPlugin )
|
Q_INTERFACES( SipPlugin )
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TwitterPlugin();
|
TwitterPlugin();
|
||||||
|
|
||||||
virtual ~TwitterPlugin() {}
|
virtual ~TwitterPlugin() {}
|
||||||
|
|
||||||
virtual bool isValid();
|
virtual bool isValid();
|
||||||
|
virtual const QString name();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool connect( bool startup );
|
virtual bool connectPlugin( bool startup );
|
||||||
|
|
||||||
void disconnect()
|
void disconnectPlugin();
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void sendMsg( const QString& to, const QString& msg )
|
void sendMsg( const QString& to, const QString& msg )
|
||||||
{
|
{
|
||||||
@@ -42,11 +47,14 @@ public slots:
|
|||||||
private slots:
|
private slots:
|
||||||
void lanHostFound( const QString& host, int port, const QString& name, const QString& nodeid );
|
void lanHostFound( const QString& host, int port, const QString& name, const QString& nodeid );
|
||||||
void connectAuthVerifyReply( const QTweetUser &user );
|
void connectAuthVerifyReply( const QTweetUser &user );
|
||||||
void connectAuthVerifyError( QTweetNetBase::ErrorCode errorCode, const QString& errorMsg );
|
void checkTimerFired();
|
||||||
|
void friendsTimelineStatuses( const QList< QTweetStatus > &statuses );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TomahawkOAuthTwitter *m_twitterAuth;
|
QWeakPointer<TomahawkOAuthTwitter> m_twitterAuth;
|
||||||
bool m_isAuthed;
|
bool m_isValid;
|
||||||
|
QTimer m_checkTimer;
|
||||||
|
QWeakPointer<QTweetFriendsTimeline> m_friendsTimeline;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2,9 +2,14 @@
|
|||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
|
const QString
|
||||||
|
ZeroconfPlugin::name()
|
||||||
|
{
|
||||||
|
return QString( MYNAME );
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ZeroconfPlugin::connect( bool /*startup*/ )
|
ZeroconfPlugin::connectPlugin( bool /*startup*/ )
|
||||||
{
|
{
|
||||||
delete m_zeroconf;
|
delete m_zeroconf;
|
||||||
m_zeroconf = new TomahawkZeroconf( Servent::instance()->port(), this );
|
m_zeroconf = new TomahawkZeroconf( Servent::instance()->port(), this );
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#include "../sipdllmacro.h"
|
#include "../sipdllmacro.h"
|
||||||
|
|
||||||
|
#define MYNAME "SIPZEROCONF"
|
||||||
|
|
||||||
class SIPDLLEXPORT ZeroconfPlugin : public SipPlugin
|
class SIPDLLEXPORT ZeroconfPlugin : public SipPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -19,11 +21,12 @@ public:
|
|||||||
virtual ~ZeroconfPlugin() {}
|
virtual ~ZeroconfPlugin() {}
|
||||||
|
|
||||||
virtual bool isValid() { return true; }
|
virtual bool isValid() { return true; }
|
||||||
|
virtual const QString name();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool connect( bool startup );
|
virtual bool connectPlugin( bool startup );
|
||||||
|
|
||||||
void disconnect()
|
void disconnectPlugin()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -422,7 +422,7 @@ TomahawkApp::setupSIP()
|
|||||||
{
|
{
|
||||||
m_xmppBot = new XMPPBot( this );
|
m_xmppBot = new XMPPBot( this );
|
||||||
qDebug() << "Connecting SIP classes";
|
qDebug() << "Connecting SIP classes";
|
||||||
m_sipHandler->connect( true );
|
m_sipHandler->connectPlugins( true );
|
||||||
// m_sipHandler->setProxy( *TomahawkUtils::proxy() );
|
// m_sipHandler->setProxy( *TomahawkUtils::proxy() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user