mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Bit more work
This commit is contained in:
@@ -59,7 +59,6 @@ public:
|
|||||||
|
|
||||||
QIcon icon() const { return QIcon( ":/twitter-icon.png" ); }
|
QIcon icon() const { return QIcon( ":/twitter-icon.png" ); }
|
||||||
|
|
||||||
bool canSelfAuthenticate() const { return true; }
|
|
||||||
void authenticate();
|
void authenticate();
|
||||||
void deauthenticate();
|
void deauthenticate();
|
||||||
bool isAuthenticated() const { return m_isAuthenticated; }
|
bool isAuthenticated() const { return m_isAuthenticated; }
|
||||||
|
@@ -59,7 +59,6 @@ public:
|
|||||||
|
|
||||||
QIcon icon() const { return QIcon( ":/xmpp-icon.png" ); }
|
QIcon icon() const { return QIcon( ":/xmpp-icon.png" ); }
|
||||||
|
|
||||||
bool canSelfAuthenticate() const { return false; }
|
|
||||||
void authenticate();
|
void authenticate();
|
||||||
void deauthenticate();
|
void deauthenticate();
|
||||||
bool isAuthenticated() const { return m_isAuthenticated; }
|
bool isAuthenticated() const { return m_isAuthenticated; }
|
||||||
|
@@ -56,6 +56,9 @@ class DLLEXPORT Account : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum AuthErrorCode { AuthError, ConnectionError };
|
||||||
|
enum ConnectionState { Disconnected, Connecting, Connected, Disconnecting };
|
||||||
|
|
||||||
explicit Account( const QString &accountId )
|
explicit Account( const QString &accountId )
|
||||||
: QObject()
|
: QObject()
|
||||||
, m_enabled( false )
|
, m_enabled( false )
|
||||||
@@ -79,9 +82,9 @@ public:
|
|||||||
|
|
||||||
virtual QIcon icon() const = 0;
|
virtual QIcon icon() const = 0;
|
||||||
|
|
||||||
virtual bool canSelfAuthenticate() const = 0;
|
|
||||||
virtual void authenticate() = 0;
|
virtual void authenticate() = 0;
|
||||||
virtual void deauthenticate() = 0;
|
virtual void deauthenticate() = 0;
|
||||||
|
virtual ConnectionState connectionState() = 0;s
|
||||||
virtual bool isAuthenticated() const = 0;
|
virtual bool isAuthenticated() const = 0;
|
||||||
|
|
||||||
virtual Tomahawk::InfoSystem::InfoPlugin* infoPlugin() = 0;
|
virtual Tomahawk::InfoSystem::InfoPlugin* infoPlugin() = 0;
|
||||||
@@ -133,6 +136,8 @@ public:
|
|||||||
virtual void sync() { QMutexLocker locker( &m_mutex ); syncConfig(); };
|
virtual void sync() { QMutexLocker locker( &m_mutex ); syncConfig(); };
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState state );
|
||||||
|
|
||||||
void configurationChanged();
|
void configurationChanged();
|
||||||
void authenticated( bool );
|
void authenticated( bool );
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/*
|
4/*
|
||||||
Copyright (C) 2011 Leo Franchi <lfranchi@kde.org>
|
Copyright (C) 2011 Leo Franchi <lfranchi@kde.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
@@ -40,9 +40,6 @@ class DLLEXPORT SipPlugin : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum SipErrorCode { AuthError, ConnectionError }; // Placeholder for errors, to be defined
|
|
||||||
enum ConnectionState { Disconnected, Connecting, Connected, Disconnecting };
|
|
||||||
|
|
||||||
SipPlugin();
|
SipPlugin();
|
||||||
explicit SipPlugin( Tomahawk::Accounts::Account *account, QObject* parent = 0 );
|
explicit SipPlugin( Tomahawk::Accounts::Account *account, QObject* parent = 0 );
|
||||||
virtual ~SipPlugin();
|
virtual ~SipPlugin();
|
||||||
|
Reference in New Issue
Block a user