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:
@@ -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; }
|
||||
|
@@ -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; }
|
||||
|
@@ -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 );
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user