From f74165424ff3000db380cabe3e112c681339120d Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sun, 18 Dec 2011 13:31:36 -0500 Subject: [PATCH] Port zeroconf plugin --- src/CMakeLists.txt | 2 +- src/accounts/CMakeLists.txt | 2 +- src/accounts/twitter/twitteraccount.cpp | 4 + src/accounts/twitter/twitteraccount.h | 3 +- src/{sip => accounts}/zeroconf/CMakeLists.txt | 8 +- .../zeroconf/configwidget.ui | 0 src/{sip => accounts}/zeroconf/resources.qrc | 0 .../zeroconf/tomahawkzeroconf.h | 6 +- .../zeroconf/zeroconf-icon.png | Bin src/{sip => accounts}/zeroconf/zeroconf.cpp | 41 ++---- src/{sip => accounts}/zeroconf/zeroconf.h | 38 +++--- src/accounts/zeroconf/zeroconfaccount.cpp | 126 ++++++++++++++++++ src/accounts/zeroconf/zeroconfaccount.h | 78 +++++++++++ src/sip/CMakeLists.txt | 0 .../jabber/googlewrapper/googlewrapper.cpp | 86 ------------ src/sip/xmpp/CMakeLists.txt | 86 ------------ 16 files changed, 248 insertions(+), 232 deletions(-) rename src/{sip => accounts}/zeroconf/CMakeLists.txt (74%) rename src/{sip => accounts}/zeroconf/configwidget.ui (100%) rename src/{sip => accounts}/zeroconf/resources.qrc (100%) rename src/{sip => accounts}/zeroconf/tomahawkzeroconf.h (97%) rename src/{sip => accounts}/zeroconf/zeroconf-icon.png (100%) rename src/{sip => accounts}/zeroconf/zeroconf.cpp (82%) rename src/{sip => accounts}/zeroconf/zeroconf.h (69%) create mode 100644 src/accounts/zeroconf/zeroconfaccount.cpp create mode 100644 src/accounts/zeroconf/zeroconfaccount.h delete mode 100644 src/sip/CMakeLists.txt delete mode 100644 src/sip/jabber/googlewrapper/googlewrapper.cpp delete mode 100644 src/sip/xmpp/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 66d305325..088236165 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -198,8 +198,8 @@ IF(GLOOX_FOUND) SET( tomahawkHeaders ${tomahawkHeaders} xmppbot/xmppbot.h ) SET( tomahawkSources ${tomahawkSources} xmppbot/xmppbot.cpp ) ENDIF(GLOOX_FOUND) + ADD_SUBDIRECTORY( accounts ) -ADD_SUBDIRECTORY( sip ) IF(QCA2_FOUND) INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} ) diff --git a/src/accounts/CMakeLists.txt b/src/accounts/CMakeLists.txt index f345a75fc..8b61be457 100644 --- a/src/accounts/CMakeLists.txt +++ b/src/accounts/CMakeLists.txt @@ -7,4 +7,4 @@ IF( QTWEETLIB_FOUND AND BUILD_GUI ) #ADD_SUBDIRECTORY( twitter ) ENDIF() -#ADD_SUBDIRECTORY( zeroconf ) \ No newline at end of file +ADD_SUBDIRECTORY( zeroconf ) \ No newline at end of file diff --git a/src/accounts/twitter/twitteraccount.cpp b/src/accounts/twitter/twitteraccount.cpp index 74990e3b7..64eed5dcf 100644 --- a/src/accounts/twitter/twitteraccount.cpp +++ b/src/accounts/twitter/twitteraccount.cpp @@ -162,6 +162,10 @@ TwitterAccount::connectAuthVerifyReply( const QTweetUser &user ) emit nowAuthenticated( m_twitterAuth, user ); } } +QIcon +TwitterAccount::icon() const { + return QIcon( ":/twitter-icon.png" ); +} } diff --git a/src/accounts/twitter/twitteraccount.h b/src/accounts/twitter/twitteraccount.h index 0d45a893d..a0bfeae80 100644 --- a/src/accounts/twitter/twitteraccount.h +++ b/src/accounts/twitter/twitteraccount.h @@ -58,7 +58,7 @@ public: TwitterAccount( const QString &accountId ); virtual ~TwitterAccount(); - QIcon icon() const { return QIcon( ":/twitter-icon.png" ); } + QIcon icon() const; void authenticate(); void deauthenticate(); @@ -82,6 +82,7 @@ private slots: void connectAuthVerifyReply( const QTweetUser &user ); private: + QIcon m_icon; bool m_isAuthenticated; QWeakPointer< TomahawkOAuthTwitter > m_twitterAuth; QWeakPointer< TwitterConfigWidget > m_configWidget; diff --git a/src/sip/zeroconf/CMakeLists.txt b/src/accounts/zeroconf/CMakeLists.txt similarity index 74% rename from src/sip/zeroconf/CMakeLists.txt rename to src/accounts/zeroconf/CMakeLists.txt index c346cfa22..657a41b53 100644 --- a/src/sip/zeroconf/CMakeLists.txt +++ b/src/accounts/zeroconf/CMakeLists.txt @@ -8,11 +8,13 @@ add_definitions( -DSIPDLLEXPORT_PRO ) set( zeroconfSources zeroconf.cpp + zeroconfaccount.cpp ) set( zeroconfHeaders zeroconf.h tomahawkzeroconf.h + zeroconfaccount.h ) include_directories( . ${CMAKE_CURRENT_BINARY_DIR} .. @@ -22,7 +24,7 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} .. qt4_wrap_ui( UI_SRCS configwidget.ui ) qt4_add_resources( RC_SRCS "resources.qrc" ) qt4_wrap_cpp( zeroconfMoc ${zeroconfHeaders} ) -add_library( tomahawk_sipzeroconf SHARED ${zeroconfSources} ${zeroconfMoc} ${RC_SRCS} ${UI_SRCS} ) +add_library( tomahawk_account_zeroconf SHARED ${zeroconfSources} ${zeroconfMoc} ${RC_SRCS} ${UI_SRCS} ) IF( WIN32 ) SET( OS_SPECIFIC_LINK_LIBRARIES @@ -32,7 +34,7 @@ SET( OS_SPECIFIC_LINK_LIBRARIES ) ENDIF( WIN32 ) -target_link_libraries( tomahawk_sipzeroconf +target_link_libraries( tomahawk_account_zeroconf ${QT_LIBRARIES} ${OS_SPECIFIC_LINK_LIBRARIES} ${TOMAHAWK_LIBRARIES} @@ -42,4 +44,4 @@ IF( APPLE ) # SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" ) ENDIF( APPLE ) -install( TARGETS tomahawk_sipzeroconf DESTINATION lib${LIB_SUFFIX} ) +install( TARGETS tomahawk_account_zeroconf DESTINATION lib${LIB_SUFFIX} ) diff --git a/src/sip/zeroconf/configwidget.ui b/src/accounts/zeroconf/configwidget.ui similarity index 100% rename from src/sip/zeroconf/configwidget.ui rename to src/accounts/zeroconf/configwidget.ui diff --git a/src/sip/zeroconf/resources.qrc b/src/accounts/zeroconf/resources.qrc similarity index 100% rename from src/sip/zeroconf/resources.qrc rename to src/accounts/zeroconf/resources.qrc diff --git a/src/sip/zeroconf/tomahawkzeroconf.h b/src/accounts/zeroconf/tomahawkzeroconf.h similarity index 97% rename from src/sip/zeroconf/tomahawkzeroconf.h rename to src/accounts/zeroconf/tomahawkzeroconf.h index 2eaf6ef10..efc309e51 100644 --- a/src/sip/zeroconf/tomahawkzeroconf.h +++ b/src/accounts/zeroconf/tomahawkzeroconf.h @@ -31,9 +31,7 @@ #include "database/database.h" #include "network/servent.h" -#include "../sipdllmacro.h" - -class SIPDLLEXPORT Node : public QObject +class Node : public QObject { Q_OBJECT @@ -71,7 +69,7 @@ private: }; -class SIPDLLEXPORT TomahawkZeroconf : public QObject +class TomahawkZeroconf : public QObject { Q_OBJECT diff --git a/src/sip/zeroconf/zeroconf-icon.png b/src/accounts/zeroconf/zeroconf-icon.png similarity index 100% rename from src/sip/zeroconf/zeroconf-icon.png rename to src/accounts/zeroconf/zeroconf-icon.png diff --git a/src/sip/zeroconf/zeroconf.cpp b/src/accounts/zeroconf/zeroconf.cpp similarity index 82% rename from src/sip/zeroconf/zeroconf.cpp rename to src/accounts/zeroconf/zeroconf.cpp index 1f88f4fe0..88fdf6016 100644 --- a/src/sip/zeroconf/zeroconf.cpp +++ b/src/accounts/zeroconf/zeroconf.cpp @@ -1,6 +1,7 @@ /* === This file is part of Tomahawk Player - === * * Copyright 2010-2011, Christian Muehlhaeuser + * Copyright 2011, Leo Franchi * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,20 +25,15 @@ #include "tomahawksettings.h" #include "utils/logger.h" +#include "zeroconfaccount.h" +using namespace Tomahawk; +using namespace Accounts; -SipPlugin* -ZeroconfFactory::createPlugin( const QString& pluginId ) -{ - return new ZeroconfPlugin( pluginId.isEmpty() ? generateId() : pluginId ); -} - -ZeroconfPlugin::ZeroconfPlugin() : SipPlugin( "") {} - -ZeroconfPlugin::ZeroconfPlugin ( const QString& pluginId ) - : SipPlugin( pluginId ) +ZeroconfPlugin::ZeroconfPlugin ( ZeroconfAccount* parent ) + : SipPlugin( parent ) , m_zeroconf( 0 ) - , m_state( Disconnected ) + , m_state( Account::Disconnected ) , m_cachedNodes() { qDebug() << Q_FUNC_INFO; @@ -66,21 +62,14 @@ ZeroconfPlugin::friendlyName() const return QString( MYNAME ); } -SipPlugin::ConnectionState +Account::ConnectionState ZeroconfPlugin::connectionState() const { return m_state; } -#ifndef ENABLE_HEADLESS -QIcon -ZeroconfFactory::icon() const -{ - return QIcon( ":/zeroconf-icon.png" ); -} -#endif -bool +void ZeroconfPlugin::connectPlugin() { delete m_zeroconf; @@ -89,7 +78,7 @@ ZeroconfPlugin::connectPlugin() SLOT( lanHostFound( QString, int, QString, QString ) ) ); advertise(); - m_state = Connected; + m_state = Account::Connected; foreach( const QStringList& nodeSet, m_cachedNodes ) { @@ -99,15 +88,13 @@ ZeroconfPlugin::connectPlugin() m_cachedNodes.clear(); m_advertisementTimer.start(); - - return true; } void ZeroconfPlugin::disconnectPlugin() { m_advertisementTimer.stop(); - m_state = Disconnected; + m_state = Account::Disconnected; delete m_zeroconf; m_zeroconf = 0; @@ -118,7 +105,7 @@ ZeroconfPlugin::disconnectPlugin() QIcon ZeroconfPlugin::icon() const { - return QIcon( ":/zeroconf-icon.png" ); + return account()->icon(); } #endif @@ -138,7 +125,7 @@ ZeroconfPlugin::lanHostFound( const QString& host, int port, const QString& name qDebug() << "Found LAN host:" << host << port << nodeid; - if ( m_state != Connected ) + if ( m_state != Account::Connected ) { qDebug() << "Not online, so not connecting."; QStringList nodeSet; @@ -153,5 +140,3 @@ ZeroconfPlugin::lanHostFound( const QString& host, int port, const QString& name qDebug() << "Already connected to" << host; } - -Q_EXPORT_PLUGIN2( sipfactory, ZeroconfFactory ) diff --git a/src/sip/zeroconf/zeroconf.h b/src/accounts/zeroconf/zeroconf.h similarity index 69% rename from src/sip/zeroconf/zeroconf.h rename to src/accounts/zeroconf/zeroconf.h index c9d33a7c3..98e8a865c 100644 --- a/src/sip/zeroconf/zeroconf.h +++ b/src/accounts/zeroconf/zeroconf.h @@ -1,6 +1,7 @@ /* === This file is part of Tomahawk Player - === * * Copyright 2010-2011, Christian Muehlhaeuser + * Copyright 2011, Leo Franchi * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,55 +21,45 @@ #define ZEROCONF_H #include "sip/SipPlugin.h" +#include "accounts/Account.h" #include "tomahawkzeroconf.h" -#include "../sipdllmacro.h" +#include "../accountdllmacro.h" #include #define MYNAME "Local Network" -class SIPDLLEXPORT ZeroconfFactory : public SipPluginFactory +namespace Tomahawk +{ +namespace Accounts { - Q_OBJECT - Q_INTERFACES( SipPluginFactory ) -public: - ZeroconfFactory() {} - virtual ~ZeroconfFactory() {} - virtual QString factoryId() const { return "sipzeroconf"; } - virtual QString prettyName() const { return "Local Network"; } - virtual bool isUnique() const { return true; } -#ifndef ENABLE_HEADLESS - virtual QIcon icon() const; -#endif +class ZeroconfAccount; - virtual SipPlugin* createPlugin ( const QString& pluginId = QString() ); -}; - -class SIPDLLEXPORT ZeroconfPlugin : public SipPlugin +class ACCOUNTDLLEXPORT ZeroconfPlugin : public SipPlugin { Q_OBJECT public: - ZeroconfPlugin(); - ZeroconfPlugin( const QString& pluginId ); + ZeroconfPlugin( ZeroconfAccount* acc ); virtual ~ZeroconfPlugin(); virtual const QString name() const; virtual const QString friendlyName() const; virtual const QString accountName() const; - virtual ConnectionState connectionState() const; + virtual Account::ConnectionState connectionState() const; virtual bool isValid() const { return true; } #ifndef ENABLE_HEADLESS virtual QIcon icon() const; #endif virtual void checkSettings() {} + virtual void configurationChanged() {} public slots: - virtual bool connectPlugin(); + void connectPlugin(); void disconnectPlugin(); void advertise(); @@ -82,9 +73,12 @@ private slots: private: TomahawkZeroconf* m_zeroconf; - ConnectionState m_state; + Account::ConnectionState m_state; QVector m_cachedNodes; QTimer m_advertisementTimer; }; +} +} + #endif diff --git a/src/accounts/zeroconf/zeroconfaccount.cpp b/src/accounts/zeroconf/zeroconfaccount.cpp new file mode 100644 index 000000000..06578f7ee --- /dev/null +++ b/src/accounts/zeroconf/zeroconfaccount.cpp @@ -0,0 +1,126 @@ +/* === This file is part of Tomahawk Player - === + * + * Copyright 2011, Leo Franchi + * + * Tomahawk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tomahawk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tomahawk. If not, see . + */ + +#include "zeroconfaccount.h" + +#include "sip/SipPlugin.h" +#include "zeroconf.h" + +#include + +using namespace Tomahawk; +using namespace Accounts; + +QIcon* s_icon = 0; + +ZeroconfFactory::ZeroconfFactory() +{ +#ifndef ENABLE_HEADLESS + if ( s_icon == 0 ) + s_icon = new QIcon( ":/zeroconf-icon.png" ); +#endif +} + + +ZeroconfFactory::~ZeroconfFactory() +{ + if ( s_icon ) + { + delete s_icon; + s_icon = 0; + } +} + + +Account* +ZeroconfFactory::createAccount( const QString& pluginId ) +{ + return new ZeroconfAccount( pluginId.isEmpty() ? generateId( factoryId() ) : pluginId ); +} + +QIcon +ZeroconfFactory::icon() const +{ + return *s_icon; +} + + +ZeroconfAccount::ZeroconfAccount( const QString& accountId ) + : Account( accountId ) +{ + setAccountServiceName( "Local Network" ); + setAccountFriendlyName( "Local Network" ); +} + +ZeroconfAccount::~ZeroconfAccount() +{ + +} + +QIcon +ZeroconfAccount::icon() const +{ + return *s_icon; +} + + +void +ZeroconfAccount::authenticate() +{ + if ( !isAuthenticated() ) + static_cast< ZeroconfPlugin* >( m_sipPlugin.data() )->connectPlugin(); +} + + +void +ZeroconfAccount::deauthenticate() +{ + if ( isAuthenticated() ) + static_cast< ZeroconfPlugin* >( m_sipPlugin.data() )->disconnectPlugin(); +} + + +bool +ZeroconfAccount::isAuthenticated() const +{ + return connectionState() == Connected; +} + + +Account::ConnectionState +ZeroconfAccount::connectionState() const +{ + if ( m_sipPlugin.isNull() ) + return Disconnected; + + // TODO can we get called before sipPlugin()? + return static_cast< ZeroconfPlugin* >( m_sipPlugin.data() )->connectionState(); +} + + +SipPlugin* +ZeroconfAccount::sipPlugin() +{ + if ( m_sipPlugin.isNull() ) + m_sipPlugin = QWeakPointer< SipPlugin >( new ZeroconfPlugin( this ) ); + + return m_sipPlugin.data(); +} + + +Q_EXPORT_PLUGIN2( Tomahawk::Accounts::AccountFactory, Tomahawk::Accounts::ZeroconfFactory ) \ No newline at end of file diff --git a/src/accounts/zeroconf/zeroconfaccount.h b/src/accounts/zeroconf/zeroconfaccount.h new file mode 100644 index 000000000..74d3afcad --- /dev/null +++ b/src/accounts/zeroconf/zeroconfaccount.h @@ -0,0 +1,78 @@ +/* === This file is part of Tomahawk Player - === + * + * Copyright 2011, Leo Franchi + * + * Tomahawk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tomahawk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tomahawk. If not, see . + */ + +#ifndef ZEROCONF_ACCOUNTS_H +#define ZEROCONF_ACCOUNTS_H + +#include "accounts/Account.h" +#include "../accountdllmacro.h" + +class SipPlugin; + +namespace Tomahawk +{ +namespace Accounts +{ + +class ACCOUNTDLLEXPORT ZeroconfFactory : public AccountFactory +{ + Q_OBJECT + Q_INTERFACES( Tomahawk::Accounts::AccountFactory ) +public: + ZeroconfFactory(); + virtual ~ZeroconfFactory(); + + virtual QString factoryId() const { return "zeroconfaccount"; } + virtual QString prettyName() const { return "Local Network"; } + virtual bool isUnique() const { return true; } +#ifndef ENABLE_HEADLESS + virtual QIcon icon() const; +#endif + + + virtual Account* createAccount ( const QString& pluginId = QString() ); +}; + +class ACCOUNTDLLEXPORT ZeroconfAccount : public Account +{ + Q_OBJECT +public: + ZeroconfAccount( const QString &accountId ); + virtual ~ZeroconfAccount(); + + QIcon icon() const; + + void authenticate(); + void deauthenticate(); + bool isAuthenticated() const; + ConnectionState connectionState() const; + + Tomahawk::InfoSystem::InfoPlugin* infoPlugin() { return 0; } + SipPlugin* sipPlugin(); + + QWidget* configurationWidget() { return 0; } + QWidget* aclWidget() { return 0; } + +private: + QWeakPointer< SipPlugin > m_sipPlugin; +}; + +} +} + +#endif diff --git a/src/sip/CMakeLists.txt b/src/sip/CMakeLists.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/sip/jabber/googlewrapper/googlewrapper.cpp b/src/sip/jabber/googlewrapper/googlewrapper.cpp deleted file mode 100644 index b04d80ad7..000000000 --- a/src/sip/jabber/googlewrapper/googlewrapper.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - - Copyright (C) 2011 Leo Franchi - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - - -#include "googlewrapper.h" -#include "ui_configwidget.h" - -#include "utils/tomahawkutilsgui.h" - -#include -#include - - -SipPlugin* -GoogleWrapperFactory::createPlugin( const QString& pluginId ) -{ - return new GoogleWrapper( pluginId.isEmpty() ? generateId() : pluginId ); -} - - -QIcon -GoogleWrapperFactory::icon() const -{ - return QIcon( ":/gmail-logo.png" ); -} - - -GoogleWrapper::GoogleWrapper ( const QString& pluginID ) - : JabberPlugin ( pluginID ) -{ - m_ui->headerLabel->setText( tr( "Configure this Google Account" ) ); - m_ui->emailLabel->setText( tr( "Google Address" ) ); - m_ui->jabberBlurb->setText( tr( "Enter your Google login to connect with your friends using Tomahawk!" ) ); - m_ui->logoLabel->setPixmap( QPixmap( ":/gmail-logo.png" ) ); - m_ui->jabberServer->setText( "talk.google.com" ); - m_ui->jabberPort->setValue( 5222 ); - m_ui->groupBoxJabberAdvanced->hide(); -} - - -QIcon -GoogleWrapper::icon() const -{ - return QIcon( ":/gmail-logo.png" ); -} - - -QString -GoogleWrapper::defaultSuffix() const -{ - return "@gmail.com"; -} - - -void -GoogleWrapper::showAddFriendDialog() -{ - bool ok; - QString id = QInputDialog::getText( TomahawkUtils::tomahawkWindow(), tr( "Add Friend" ), - tr( "Enter Google Address:" ), QLineEdit::Normal, "", &ok ).trimmed(); - if ( !ok ) - return; - - qDebug() << "Attempting to add google contact to roster:" << id; - addContact( id ); -} - - -#ifdef GOOGLE_WRAPPER -Q_EXPORT_PLUGIN2( sipfactory, GoogleWrapperFactory ) -#endif diff --git a/src/sip/xmpp/CMakeLists.txt b/src/sip/xmpp/CMakeLists.txt deleted file mode 100644 index 6f4792bf9..000000000 --- a/src/sip/xmpp/CMakeLists.txt +++ /dev/null @@ -1,86 +0,0 @@ -project( tomahawk ) - -include( ${QT_USE_FILE} ) -add_definitions( ${QT_DEFINITIONS} ) -add_definitions( -DQT_PLUGIN ) -add_definitions( -DQT_SHARED ) -add_definitions( -DSIPDLLEXPORT_PRO ) - -<<<<<<< HEAD:src/sip/xmpp/CMakeLists.txt -set( xmppSipSources - xmppsip.cpp - tomahawkxmppmessage.cpp - tomahawkxmppmessagefactory.cpp -======= -set( jabberSources - jabber.cpp - tomahawksipmessage.cpp - tomahawksipmessagefactory.cpp -) -set( jabberSourcesGui ->>>>>>> origin/master:src/sip/jabber/CMakeLists.txt - avatarmanager.cpp - xmlconsole.cpp -) - -<<<<<<< HEAD:src/sip/xmpp/CMakeLists.txt -set( xmppSipHeaders - xmppsip.h -======= -set( jabberHeaders - jabber.h -) -set( jabberHeadersGui ->>>>>>> origin/master:src/sip/jabber/CMakeLists.txt - avatarmanager.h - xmlconsole.h -) - -set( xmppSipUI - xmlconsole.ui -) - -if(BUILD_GUI) - list(APPEND jabberSources ${jabberSourcesGui}) - list(APPEND jabberHeaders ${jabberHeadersGui}) -endif() - -include_directories( . ${CMAKE_CURRENT_BINARY_DIR} .. - ${QT_INCLUDE_DIR} - ${LIBJREEN_INCLUDE_DIR} -) - -qt4_wrap_ui( xmppSipUI_H ${xmppSipUI} ) -qt4_wrap_cpp( xmppSipMoc ${xmppSipHeaders} ) -add_library( tomahawk_sip_xmpp SHARED ${xmppSipSources} ${xmppSipMoc} ${xmppSipUI_H} ${RC_SRCS} ) - -IF( WIN32 ) -SET( OS_SPECIFIC_LINK_LIBRARIES - ${OS_SPECIFIC_LINK_LIBRARIES} - "secur32.dll" - "crypt32.dll" - ${TOMAHAWK_LIBRARIES} -) -ENDIF( WIN32 ) - -target_link_libraries( tomahawk_sip_xmpp - ${QT_LIBRARIES} - ${LIBJREEN_LIBRARY} - ${OS_SPECIFIC_LINK_LIBRARIES} - tomahawklib -) - -IF( APPLE ) -# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" ) -ENDIF( APPLE ) - -install( TARGETS tomahawk_sip_xmpp DESTINATION lib${LIB_SUFFIX} ) - -<<<<<<< HEAD:src/sip/xmpp/CMakeLists.txt - -#add_subdirectory(googlewrapper) -======= -if(BUILD_GUI) - add_subdirectory(googlewrapper) -endif() ->>>>>>> origin/master:src/sip/jabber/CMakeLists.txt