digiKam
DigikamGenericUnifiedPlugin::WSTalker Class Reference
+ Inheritance diagram for DigikamGenericUnifiedPlugin::WSTalker:

Public Types

enum  State {
  DEFAULT = 0 , GETUSER , LISTALBUMS , CREATEALBUM ,
  ADDPHOTO
}
 

Signals

void signalAddPhotoDone (int errCode, const QString &errMsg)
 
void signalAuthenticationComplete (bool)
 
void signalBusy (bool val)
 
void signalCloseBrowser ()
 
void signalCreateAlbumDone (int errCode, const QString &errMsg, const QString &newAlbumId)
 
void signalListAlbumsDone (int errCode, const QString &errMsg, const QList< WSAlbum > &albumsList)
 
void signalOpenBrowser (const QUrl &url)
 

Public Member Functions

virtual void addPhoto (const QString &imgPath, const QString &albumID, const QString &caption)
 
virtual void authenticate ()
 
void cancel ()
 
virtual void createNewAlbum ()
 
virtual void getLoggedInUser ()
 
QString getUserID (const QString &userName)
 
virtual void link ()
 
virtual bool linked () const
 
virtual void listAlbums (long long userID=0)
 
void reauthenticate ()
 
virtual void unlink ()
 
 WSTalker (QWidget *const parent)
 
 ~WSTalker ()
 

Protected Slots

void slotCloseBrowser ()
 
void slotFinished (QNetworkReply *reply)
 
virtual void slotLinkingFailed ()
 
virtual void slotLinkingSucceeded ()
 
void slotOpenBrowser (const QUrl &url)
 
virtual void slotResponseTokenReceived (const QMap< QString, QString > &rep)
 

Protected Member Functions

virtual void authenticationDone (int errCode, const QString &errMsg)
 
QMap< QString, QVariant > getUserAccountInfo (const QString &userName)
 
bool loadUserAccount (const QString &userName)
 
virtual void parseResponseAddPhoto (const QByteArray &data)
 
virtual void parseResponseCreateAlbum (const QByteArray &data)
 
virtual void parseResponseGetLoggedInUser (const QByteArray &data)
 
virtual void parseResponseListAlbums (const QByteArray &data)
 
void removeAllAccounts ()
 
void removeUserAccount (const QString &userName)
 
virtual void resetTalker (const QString &expire, const QString &accessToken, const QString &refreshToken)
 
void saveUserAccount (const QString &userName, const QString &userID, long long int expire, const QString &accessToken, const QString &refreshToken=QString())
 
virtual void sortAlbumsList (QList< WSAlbum > &albumsList)
 

Protected Attributes

QNetworkAccessManager * m_netMngr
 
QNetworkReply * m_reply
 
QSettings * m_settings
 
State m_state
 
O0SettingsStore * m_store
 
QString m_userName
 
WSWizardm_wizard
 

Member Enumeration Documentation

◆ State

Enumerator
DEFAULT 
GETUSER 
LISTALBUMS 
CREATEALBUM 
ADDPHOTO 

Constructor & Destructor Documentation

◆ WSTalker()

◆ ~WSTalker()

WSTalker::~WSTalker ( )

Member Function Documentation

◆ addPhoto()

void WSTalker::addPhoto ( const QString &  imgPath,
const QString &  albumID,
const QString &  caption 
)
virtual

◆ authenticate()

void WSTalker::authenticate ( )
virtual

◆ authenticationDone()

void WSTalker::authenticationDone ( int  errCode,
const QString &  errMsg 
)
protectedvirtual

References signalBusy().

Referenced by slotFinished(), and slotLinkingFailed().

◆ cancel()

void WSTalker::cancel ( )

References m_reply, and signalBusy().

◆ createNewAlbum()

void WSTalker::createNewAlbum ( )
virtual

◆ getLoggedInUser()

void WSTalker::getLoggedInUser ( )
virtual

Referenced by slotLinkingSucceeded().

◆ getUserAccountInfo()

QMap< QString, QVariant > WSTalker::getUserAccountInfo ( const QString &  userName)
protected

References getUserID(), m_settings, m_store, and value.

Referenced by loadUserAccount().

◆ getUserID()

QString WSTalker::getUserID ( const QString &  userName)

References m_settings, and m_store.

Referenced by getUserAccountInfo(), and removeUserAccount().

◆ link()

void WSTalker::link ( )
virtual

Referenced by authenticate(), and reauthenticate().

◆ linked()

bool WSTalker::linked ( ) const
virtual

◆ listAlbums()

void WSTalker::listAlbums ( long long  userID = 0)
virtual

◆ loadUserAccount()

bool WSTalker::loadUserAccount ( const QString &  userName)
protected

References getUserAccountInfo(), and resetTalker().

Referenced by authenticate().

◆ parseResponseAddPhoto()

void WSTalker::parseResponseAddPhoto ( const QByteArray &  data)
protectedvirtual

Referenced by slotFinished().

◆ parseResponseCreateAlbum()

void WSTalker::parseResponseCreateAlbum ( const QByteArray &  data)
protectedvirtual

Referenced by slotFinished().

◆ parseResponseGetLoggedInUser()

void WSTalker::parseResponseGetLoggedInUser ( const QByteArray &  data)
protectedvirtual

Referenced by slotFinished().

◆ parseResponseListAlbums()

void WSTalker::parseResponseListAlbums ( const QByteArray &  data)
protectedvirtual

Referenced by slotFinished().

◆ reauthenticate()

void WSTalker::reauthenticate ( )

References link(), linked(), and unlink().

Referenced by authenticate().

◆ removeAllAccounts()

void WSTalker::removeAllAccounts ( )
protected

References m_settings, and m_store.

◆ removeUserAccount()

void WSTalker::removeUserAccount ( const QString &  userName)
protected

References getUserID(), m_settings, and m_store.

◆ resetTalker()

void WSTalker::resetTalker ( const QString &  expire,
const QString &  accessToken,
const QString &  refreshToken 
)
protectedvirtual

Referenced by loadUserAccount().

◆ saveUserAccount()

void WSTalker::saveUserAccount ( const QString &  userName,
const QString &  userID,
long long int  expire,
const QString &  accessToken,
const QString &  refreshToken = QString() 
)
protected

References m_settings, and m_store.

◆ signalAddPhotoDone

void DigikamGenericUnifiedPlugin::WSTalker::signalAddPhotoDone ( int  errCode,
const QString &  errMsg 
)
signal

◆ signalAuthenticationComplete

void DigikamGenericUnifiedPlugin::WSTalker::signalAuthenticationComplete ( bool  )
signal

◆ signalBusy

void DigikamGenericUnifiedPlugin::WSTalker::signalBusy ( bool  val)
signal

◆ signalCloseBrowser

void DigikamGenericUnifiedPlugin::WSTalker::signalCloseBrowser ( )
signal

Referenced by slotCloseBrowser().

◆ signalCreateAlbumDone

void DigikamGenericUnifiedPlugin::WSTalker::signalCreateAlbumDone ( int  errCode,
const QString &  errMsg,
const QString &  newAlbumId 
)
signal

◆ signalListAlbumsDone

void DigikamGenericUnifiedPlugin::WSTalker::signalListAlbumsDone ( int  errCode,
const QString &  errMsg,
const QList< WSAlbum > &  albumsList 
)
signal

◆ signalOpenBrowser

void DigikamGenericUnifiedPlugin::WSTalker::signalOpenBrowser ( const QUrl &  url)
signal

Referenced by slotOpenBrowser().

◆ slotCloseBrowser

void WSTalker::slotCloseBrowser ( )
protectedslot

References signalCloseBrowser().

◆ slotFinished

◆ slotLinkingFailed

void WSTalker::slotLinkingFailed ( )
protectedvirtualslot

◆ slotLinkingSucceeded

void WSTalker::slotLinkingSucceeded ( )
protectedvirtualslot

◆ slotOpenBrowser

void WSTalker::slotOpenBrowser ( const QUrl &  url)
protectedslot

References signalOpenBrowser().

◆ slotResponseTokenReceived

void WSTalker::slotResponseTokenReceived ( const QMap< QString, QString > &  rep)
protectedvirtualslot

◆ sortAlbumsList()

void WSTalker::sortAlbumsList ( QList< WSAlbum > &  albumsList)
protectedvirtual

◆ unlink()

void WSTalker::unlink ( )
virtual

Referenced by reauthenticate().

Member Data Documentation

◆ m_netMngr

QNetworkAccessManager* DigikamGenericUnifiedPlugin::WSTalker::m_netMngr
protected

Referenced by WSTalker(), and ~WSTalker().

◆ m_reply

QNetworkReply* DigikamGenericUnifiedPlugin::WSTalker::m_reply
protected

Referenced by cancel(), slotFinished(), and ~WSTalker().

◆ m_settings

QSettings* DigikamGenericUnifiedPlugin::WSTalker::m_settings
protected

◆ m_state

State DigikamGenericUnifiedPlugin::WSTalker::m_state
protected

Referenced by slotFinished().

◆ m_store

O0SettingsStore* DigikamGenericUnifiedPlugin::WSTalker::m_store
protected

◆ m_userName

QString DigikamGenericUnifiedPlugin::WSTalker::m_userName
protected

Referenced by authenticate(), and WSTalker().

◆ m_wizard

WSWizard* DigikamGenericUnifiedPlugin::WSTalker::m_wizard
protected

Referenced by WSTalker(), and ~WSTalker().


The documentation for this class was generated from the following files: