digiKam
DigikamGenericGoogleServicesPlugin::GPTalker Class Reference
+ Inheritance diagram for DigikamGenericGoogleServicesPlugin::GPTalker:

Signals

void signalAccessTokenObtained ()
 
void signalAddPhotoDone (int, const QString &)
 
void signalAuthenticationRefused ()
 
void signalBusy (bool val)
 
void signalCreateAlbumDone (int, const QString &, const QString &)
 
void signalError (const QString &msg)
 
void signalGetPhotoDone (int errCode, const QString &errMsg, const QByteArray &photoData, const QString &fileName)
 
void signalLinkingSucceeded ()
 
void signalListAlbumsDone (int, const QString &, const QList< GSFolder > &)
 
void signalListPhotosDone (int, const QString &, const QList< GSPhoto > &)
 
void signalReadyToUpload ()
 
void signalSetUserName (const QString &msg)
 
void signalUploadPhotoDone (int, const QString &, const QStringList &)
 

Public Member Functions

bool addPhoto (const QString &photoPath, GSPhoto &info, const QString &albumId, bool original, bool rescale, int maxDim, int imageQuality)
 
bool authenticated () const
 
void cancel ()
 
void createAlbum (const GSFolder &newAlbum)
 
void doOAuth ()
 
void getLoggedInUser ()
 
void getPhoto (const QString &imgPath)
 
QStringList getUploadTokenList ()
 
 GPTalker (QWidget *const parent)
 
void link ()
 
void listAlbums (const QString &nextPageToken=QString())
 
void listPhotos (const QString &albumId, const QString &nextPageToken=QString())
 
void unlink ()
 
bool updatePhoto (const QString &photoPath, GSPhoto &info, bool rescale, int maxDim, int imageQuality)
 
 ~GPTalker () override
 

Protected Attributes

QString m_accessToken
 
QString m_bearerAccessToken
 
QNetworkReply * m_reply
 
QStringList m_scope
 
QString m_serviceName
 

Constructor & Destructor Documentation

◆ GPTalker()

DigikamGenericGoogleServicesPlugin::GPTalker::GPTalker ( QWidget *const  parent)
explicit

◆ ~GPTalker()

DigikamGenericGoogleServicesPlugin::GPTalker::~GPTalker ( )
override

Member Function Documentation

◆ addPhoto()

bool DigikamGenericGoogleServicesPlugin::GPTalker::addPhoto ( const QString &  photoPath,
GSPhoto info,
const QString &  albumId,
bool  original,
bool  rescale,
int  maxDim,
int  imageQuality 
)

First a request is sent to the url below and then we will get an upload token Upload token then will be sent with url in GPTlaker::uploadPhoto to create real photos on user account

References DigikamGenericGoogleServicesPlugin::GSPhoto::description, DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_bearerAccessToken, DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_reply, and DigikamGenericGoogleServicesPlugin::GSTalkerBase::signalBusy().

◆ authenticated()

bool DigikamGenericGoogleServicesPlugin::GSTalkerBase::authenticated ( ) const
inherited

◆ cancel()

void DigikamGenericGoogleServicesPlugin::GPTalker::cancel ( )

◆ createAlbum()

◆ doOAuth()

void DigikamGenericGoogleServicesPlugin::GSTalkerBase::doOAuth ( )
inherited

If user has not logined yet (sessionExpires == 0), link If access token has expired yet, refresh TODO: Otherwise, provoke slotLinkingSucceeded

References DigikamGenericGoogleServicesPlugin::GSTalkerBase::link().

◆ getLoggedInUser()

void DigikamGenericGoogleServicesPlugin::GPTalker::getLoggedInUser ( )

◆ getPhoto()

void DigikamGenericGoogleServicesPlugin::GPTalker::getPhoto ( const QString &  imgPath)

◆ getUploadTokenList()

QStringList DigikamGenericGoogleServicesPlugin::GPTalker::getUploadTokenList ( )

◆ link()

void DigikamGenericGoogleServicesPlugin::GSTalkerBase::link ( )
inherited

◆ listAlbums()

void DigikamGenericGoogleServicesPlugin::GPTalker::listAlbums ( const QString &  nextPageToken = QString())

(Trung): Comments below are not valid anymore with google photos api Google Photo's Album listing request/response First a request is sent to the url below and then we might(?) get a redirect URL We then need to send the GET request to the Redirect url. This uses the authenticated album list fetching to get all the albums included the unlisted-albums which is not returned for an unauthorised request as done without the Authorization header.

References DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_bearerAccessToken, DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_reply, and DigikamGenericGoogleServicesPlugin::GSTalkerBase::signalBusy().

◆ listPhotos()

void DigikamGenericGoogleServicesPlugin::GPTalker::listPhotos ( const QString &  albumId,
const QString &  nextPageToken = QString() 
)

◆ signalAccessTokenObtained

void DigikamGenericGoogleServicesPlugin::GSTalkerBase::signalAccessTokenObtained ( )
signalinherited

◆ signalAddPhotoDone

void DigikamGenericGoogleServicesPlugin::GPTalker::signalAddPhotoDone ( int  ,
const QString &   
)
signal

◆ signalAuthenticationRefused

void DigikamGenericGoogleServicesPlugin::GSTalkerBase::signalAuthenticationRefused ( )
signalinherited

◆ signalBusy

◆ signalCreateAlbumDone

void DigikamGenericGoogleServicesPlugin::GPTalker::signalCreateAlbumDone ( int  ,
const QString &  ,
const QString &   
)
signal

◆ signalError

void DigikamGenericGoogleServicesPlugin::GPTalker::signalError ( const QString &  msg)
signal

Referenced by GPTalker().

◆ signalGetPhotoDone

void DigikamGenericGoogleServicesPlugin::GPTalker::signalGetPhotoDone ( int  errCode,
const QString &  errMsg,
const QByteArray &  photoData,
const QString &  fileName 
)
signal

◆ signalLinkingSucceeded

void DigikamGenericGoogleServicesPlugin::GSTalkerBase::signalLinkingSucceeded ( )
signalinherited

◆ signalListAlbumsDone

void DigikamGenericGoogleServicesPlugin::GPTalker::signalListAlbumsDone ( int  ,
const QString &  ,
const QList< GSFolder > &   
)
signal

◆ signalListPhotosDone

void DigikamGenericGoogleServicesPlugin::GPTalker::signalListPhotosDone ( int  ,
const QString &  ,
const QList< GSPhoto > &   
)
signal

◆ signalReadyToUpload

void DigikamGenericGoogleServicesPlugin::GPTalker::signalReadyToUpload ( )
signal

Referenced by GPTalker().

◆ signalSetUserName

void DigikamGenericGoogleServicesPlugin::GPTalker::signalSetUserName ( const QString &  msg)
signal

◆ signalUploadPhotoDone

void DigikamGenericGoogleServicesPlugin::GPTalker::signalUploadPhotoDone ( int  ,
const QString &  ,
const QStringList &   
)
signal

◆ unlink()

◆ updatePhoto()

bool DigikamGenericGoogleServicesPlugin::GPTalker::updatePhoto ( const QString &  photoPath,
GSPhoto info,
bool  rescale,
int  maxDim,
int  imageQuality 
)

Member Data Documentation

◆ m_accessToken

QString DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_accessToken
protectedinherited

◆ m_bearerAccessToken

◆ m_reply

◆ m_scope

QStringList DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_scope
protectedinherited

◆ m_serviceName

QString DigikamGenericGoogleServicesPlugin::GSTalkerBase::m_serviceName
protectedinherited

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