23 #ifndef DIGIKAM_WS_TALKER_H
24 #define DIGIKAM_WS_TALKER_H
35 #include <QNetworkReply>
36 #include <QNetworkAccessManager>
41 #include "o0settingsstore.h"
67 explicit WSTalker(QWidget*
const parent);
74 QString getUserID(
const QString& userName);
84 virtual void unlink();
89 virtual bool linked()
const;
95 virtual void authenticate();
100 void reauthenticate();
112 QMap<QString, QVariant> getUserAccountInfo(
const QString& userName);
118 void saveUserAccount(
const QString& userName,
119 const QString& userID,
120 long long int expire,
121 const QString& accessToken,
122 const QString& refreshToken = QString());
128 void removeUserAccount(
const QString& userName);
133 void removeAllAccounts();
139 bool loadUserAccount(
const QString& userName);
148 virtual void resetTalker(
const QString& expire,
const QString& accessToken,
const QString& refreshToken);
160 virtual void parseResponseGetLoggedInUser(
const QByteArray& data);
161 virtual void parseResponseListAlbums(
const QByteArray& data);
162 virtual void parseResponseCreateAlbum(
const QByteArray& data);
163 virtual void parseResponseAddPhoto(
const QByteArray& data);
170 virtual void authenticationDone(
int errCode,
const QString& errMsg);
178 virtual void getLoggedInUser();
179 virtual void listAlbums(
long long userID = 0);
180 virtual void createNewAlbum();
181 virtual void addPhoto(
const QString& imgPath,
const QString& albumID,
const QString& caption);
198 void slotFinished(QNetworkReply* reply);
199 void slotOpenBrowser(
const QUrl& url);
200 void slotCloseBrowser();
201 virtual void slotLinkingFailed();
202 virtual void slotLinkingSucceeded();
213 virtual void slotResponseTokenReceived(
const QMap<QString, QString>& rep);
Definition: wstalker.h:51
State m_state
Definition: wstalker.h:220
O0SettingsStore * m_store
Definition: wstalker.h:223
void signalCreateAlbumDone(int errCode, const QString &errMsg, const QString &newAlbumId)
void signalAddPhotoDone(int errCode, const QString &errMsg)
void signalAuthenticationComplete(bool)
QNetworkReply * m_reply
Definition: wstalker.h:218
void signalOpenBrowser(const QUrl &url)
void signalCloseBrowser()
void signalBusy(bool val)
QSettings * m_settings
Definition: wstalker.h:222
WSWizard * m_wizard
Definition: wstalker.h:227
State
Definition: wstalker.h:57
@ CREATEALBUM
Definition: wstalker.h:61
@ GETUSER
Definition: wstalker.h:59
@ LISTALBUMS
Definition: wstalker.h:60
void signalListAlbumsDone(int errCode, const QString &errMsg, const QList< WSAlbum > &albumsList)
QNetworkAccessManager * m_netMngr
Definition: wstalker.h:217
QString m_userName
Definition: wstalker.h:225
Definition: wswizard.h:47
Definition: piwigotalker.h:48
Definition: wsauthentication.cpp:56
Definition: datefolderview.cpp:43
#define DEFAULT(c)
Definition: thememanager_p.cpp:781