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

Bit more work

This commit is contained in:
Leo Franchi
2011-11-18 16:56:23 -05:00
parent e3785e50f2
commit eedf940e5f
5 changed files with 14 additions and 14 deletions

View File

@@ -59,7 +59,6 @@ public:
QIcon icon() const { return QIcon( ":/twitter-icon.png" ); }
bool canSelfAuthenticate() const { return true; }
void authenticate();
void deauthenticate();
bool isAuthenticated() const { return m_isAuthenticated; }

View File

@@ -59,7 +59,6 @@ public:
QIcon icon() const { return QIcon( ":/xmpp-icon.png" ); }
bool canSelfAuthenticate() const { return false; }
void authenticate();
void deauthenticate();
bool isAuthenticated() const { return m_isAuthenticated; }

View File

@@ -56,6 +56,9 @@ class DLLEXPORT Account : public QObject
Q_OBJECT
public:
enum AuthErrorCode { AuthError, ConnectionError };
enum ConnectionState { Disconnected, Connecting, Connected, Disconnecting };
explicit Account( const QString &accountId )
: QObject()
, m_enabled( false )
@@ -79,9 +82,9 @@ public:
virtual QIcon icon() const = 0;
virtual bool canSelfAuthenticate() const = 0;
virtual void authenticate() = 0;
virtual void deauthenticate() = 0;
virtual ConnectionState connectionState() = 0;s
virtual bool isAuthenticated() const = 0;
virtual Tomahawk::InfoSystem::InfoPlugin* infoPlugin() = 0;
@@ -133,6 +136,8 @@ public:
virtual void sync() { QMutexLocker locker( &m_mutex ); syncConfig(); };
signals:
void connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState state );
void configurationChanged();
void authenticated( bool );

View File

@@ -1,4 +1,4 @@
/*
4/*
Copyright (C) 2011 Leo Franchi <lfranchi@kde.org>
This program is free software: you can redistribute it and/or modify

View File

@@ -40,9 +40,6 @@ class DLLEXPORT SipPlugin : public QObject
Q_OBJECT
public:
enum SipErrorCode { AuthError, ConnectionError }; // Placeholder for errors, to be defined
enum ConnectionState { Disconnected, Connecting, Connected, Disconnecting };
SipPlugin();
explicit SipPlugin( Tomahawk::Accounts::Account *account, QObject* parent = 0 );
virtual ~SipPlugin();