GCF LOGO VCL LOGO
GCF::IGDriveLite Class Referenceabstract

This interface gives access to all GDriveLite component functionalities.

#include <GCF3/IGDriveLite>
. More...

Public Member Functions

virtual
GCF::IGDriveLiteAuthenticator
authenticator () const =0
 
virtual bool isAuthenticated () const =0
 
virtual
GCF::GDriveContent::AuthenticatedUser 
authenticatedUser () const =0
 
virtual QString accessToken () const =0
 
virtual QString refreshToken () const =0
 
virtual QString errorMessage () const =0
 
virtual
GCF::IGDriveLiteContentModel
contentModel () const =0
 
virtual
GCF::IGDriveLiteFileDownloader
createFileDownloader (const QString &id)=0
 
GCF::IGDriveLiteFileDownloadercreateFileDownloader (const GCF::GDriveContent::Item &item)
 
virtual
GCF::IGDriveLiteFileDownloaderListModel
downloaders () const =0
 
virtual
GCF::IGDriveLiteFileUploader
createFileUploader (const QString &localFileName)=0
 
virtual
GCF::IGDriveLiteFileUploaderListModel
uploaders () const =0
 
virtual Q_SIGNAL void authenticationChanged ()=0
 
virtual Q_SIGNAL void authenticatedUserChanged ()=0
 
virtual
GCF::IGDriveLiteContentSharingModel
createSharingModel (const QString &itemId) const =0
 
virtual GCF::Result trash (const QString &itemId)=0
 
virtual GCF::Result deletePermanently (const QString &itemId)=0
 
virtual GCF::Result restore (const QString &itemId)=0
 
virtual GCF::Result rename (const QString &itemId, const QString &newName)=0
 
virtual GCF::Result describe (const QString &itemId, const QString &description)=0
 
virtual GCF::Result move (const QString &itemId, const QString &folderId=QString())=0
 
virtual GCF::Result star (const QString &itemId)=0
 
virtual GCF::Result unstar (const QString &itemId)=0
 
virtual GCF::Result mkdir (const QString &folderName, const QString &parentId=QString())=0
 
- Public Member Functions inherited from GCF::Component
 Component (QObject *parent=0)
 
virtual QString name () const
 
virtual QString organization () const
 
virtual GCF::Version version () const
 
virtual QString buildTimestamp () const
 
const QSettings * settings () const
 
bool isLoaded () const
 
bool isActive () const
 
void load ()
 
void unload ()
 
void activate ()
 
void deactivate ()
 
void addContentObject (const QString &name, QObject *object, const QVariantMap &info=QVariantMap())
 
void addContentObject (QObject *object, const QVariantMap &info=QVariantMap())
 
void removeContentObject (QObject *object)
 
void removeContentObject (const QString &name)
 

Additional Inherited Members

- Protected Member Functions inherited from GCF::Component
 ~Component ()
 
virtual void finalizeEvent (GCF::FinalizeEvent *e)
 
virtual void initializeEvent (GCF::InitializeEvent *e)
 
virtual void activationEvent (GCF::ActivationEvent *e)
 
virtual void contentLoadEvent (GCF::ContentLoadEvent *e)
 
virtual void deactivationEvent (GCF::DeactivationEvent *e)
 
virtual void settingsLoadEvent (GCF::SettingsLoadEvent *e)
 
virtual void contentUnloadEvent (GCF::ContentUnloadEvent *e)
 
virtual void settingsUnloadEvent (GCF::SettingsUnloadEvent *e)
 
virtual void contentObjectLoadEvent (GCF::ContentObjectLoadEvent *e)
 
virtual void contentObjectMergeEvent (GCF::ContentObjectMergeEvent *e)
 
virtual void contentObjectUnloadEvent (GCF::ContentObjectUnloadEvent *e)
 
virtual void contentObjectUnmergeEvent (GCF::ContentObjectUnmergeEvent *e)
 
virtual void activateContentObjectEvent (GCF::ActivateContentObjectEvent *e)
 
virtual void deactivateContentObjectEvent (GCF::DeactivateContentObjectEvent *e)
 
virtual QObject * loadObject (const QString &name, const QVariantMap &info)
 
virtual bool unloadObject (const QString &name, QObject *object, const QVariantMap &info)
 
virtual bool mergeObject (QObject *parent, QObject *child, const QVariantMap &parentInfo, const QVariantMap &childInfo)
 
virtual bool unmergeObject (QObject *parent, QObject *child, const QVariantMap &parentInfo, const QVariantMap &childInfo)
 
virtual bool activateObject (QObject *parent, QObject *child, const QVariantMap &parentInfo, const QVariantMap &childInfo)
 
virtual bool deactivateObject (QObject *parent, QObject *child, const QVariantMap &parentInfo, const QVariantMap &childInfo)
 

Detailed Description

There will be only one instance of GDriveLite per GDrive component and it will handle only information about one active account. All google drive(GDrive) functionality access for that account will be provided through this interface.

Once logged in using the GCF::IGDriveLiteAuthenticator , this class will automatically refresh the token for accessing google drive till the end of application lifetime.

See Also
Loading GDriveLite component in your GCF applications, Authorising GDriveLite to access drive data

Member Function Documentation

GCF::IGDriveLite::authenticator ( ) const
pure virtual

Returns the GCF::IGDriveLiteAuthenticator which can authenticate user and fetch the access token for further GDrive API access.

Returns
GCF::IGDriveLiteAuthenticator for authentication.
GCF::IGDriveLite::isAuthenticated ( ) const
pure virtual
Returns
whether the user has authenticated using GCF::IGDriveLiteAuthenticator or not.
GCF::IGDriveLite::authenticatedUser ( ) const
pure virtual
Returns
the current authenticated user information.
GCF::IGDriveLite::accessToken ( ) const
pure virtual
Returns
current access token obtained using GCF::IGDriveLiteAuthenticator.
GCF::IGDriveLite::refreshToken ( ) const
pure virtual

Returns the refresh token obtained while authentication. The refresh token is used to get new access tokens when the old ones expire.

Returns
access token string.
GCF::IGDriveLite::errorMessage ( ) const
pure virtual
Returns
the error occurred while authenticating.
GCF::IGDriveLite::contentModel ( ) const
pure virtual
GCF::IGDriveLite::createFileDownloader ( const QString &  id)
pure virtual

Returns file downloader for provided GDrive file id id . If downloader already exists then returns it otherwise creates a new downloader and returns it. GDrive file id is the id assigned by google drive every time when a file is created or uploaded to the drive.

It is caller's responsibility to delete the downloader after usage. For more details about file downloader refer GCF::IGDriveLiteFileDownloader

Returns
GCF::IGDriveLiteFileDownloader which can download file with id id.
GCF::IGDriveLite::createFileDownloader ( const GCF::GDriveContent::Item item)

This is an overloaded function which will take GCF::GDriveContent::Item as parameter and create file downloader for the item.

Returns
GCF::IGDriveLiteFileDownloader which can download file with id id.
GCF::IGDriveLite::downloaders ( ) const
pure virtual

Returns the instance of GCF::IGDriveLiteFileDownloaderListModel. There will be only one instance of GCF::IGDriveLiteFileDownloaderListModel per GDriveCompoent. Caller should not delete downloader model. For more details about downloader model refer GCF::IGDriveLiteFileDownloaderListModel.

Returns
GCF::IGDriveLiteFileDownloaderListModel.
GCF::IGDriveLite::createFileUploader ( const QString &  localFileName)
pure virtual

Returns file uploader for file 'localFileName' if already exists, otherwise will create a new file uploader and returns. It is caller's responsibility to delete the uploader after usage.For more details about uploader refer to GCF::IGDriveLiteUploaderModel.

Parameters
localFileNamefull path of file with filename.
GCF::IGDriveLite::uploaders ( ) const
pure virtual

Returns the instance of GCF::IGDriveLiteFileUploaderListModel. There will be only one instance of GCF::IGDriveLiteFileUploaderListModel in GDriveCompoent. Caller should not delete the downloader model. For more detatils about uploader model refer GCF::IGDriveLiteFileDownloaderListModel.

Returns
GCF::IGDriveLiteFileDownloaderListModel.
GCF::IGDriveLite::authenticationChanged ( )
pure virtual

This signal will be emitted when the user login or logout using GCF::IGDriveLiteAuthenticator

GCF::IGDriveLite::authenticatedUserChanged ( )
pure virtual

This signal will be emitted when the user login or logout using GCF::IGDriveLiteAuthenticator and the user information is updated.

GCF::IGDriveLite::createSharingModel ( const QString &  itemId) const
pure virtual

Returns sharing model for the specified GDrive item id itemId if exists otherwise creates a sharing model for the specified GDrive item id and returns it.

Parameters
itemIdGDrive item Id of the item that needs to be shared.
GCF::IGDriveLite::trash ( const QString &  itemId)
pure virtual

Trashes GDrive item.

Parameters
itemIdGDrive item Id of the item that needs to be trashed.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::deletePermanently ( const QString &  itemId)
pure virtual

Deletes a GDrive item permanently without transferring it to trash. If item is a folder then all the files and folders inside will also be deleted permanently. You cannot retrieve the files after deleting using this method.

Parameters
itemIdGDrive item Id of the item that needs to be deleted.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::restore ( const QString &  itemId)
pure virtual

Restores a GDrive item if the item is already trashed. Item will be restored to the folder where it existed previously.

Parameters
itemIdGDrive item Id of the item that needs to be restored.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::rename ( const QString &  itemId,
const QString &  newName 
)
pure virtual

Renames the item with GDrive item id 'itemId' to newName.

Parameters
itemIdGDrive item Id of the item that needs to be renamed.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::describe ( const QString &  itemId,
const QString &  description 
)
pure virtual

Changes the description of the item with GDrive item id 'itemId' to description.

Parameters
itemIdGDrive item Id of the item that needs to be described.
descriptionnew description that needs to be set.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::move ( const QString &  itemId,
const QString &  folderId = QString() 
)
pure virtual

Moves the item with GDrive item id 'itemId' to the folder with folder id 'folderId'.

Parameters
itemIdGDrive item Id of the item that needs to be moved.
folderIdGDrive item Id of the folder to which item needs to be moved.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::star ( const QString &  itemId)
pure virtual

Stars the item with GDrive item id 'itemId'.

Parameters
itemIdGDrive item Id of the item that needs to be starred.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::unstar ( const QString &  itemId)
pure virtual

Unstars the item with GDrive item id 'itemId' if it is starred.

Parameters
itemIdGDrive item Id of the item that needs to be unstarred.
Returns
GCF::Result containing success or failure with error message if any.
GCF::IGDriveLite::mkdir ( const QString &  folderName,
const QString &  parentId = QString() 
)
pure virtual

Creates a folder with name 'folderName' inside parent folder 'parentId'.

Parameters
parentIdGDrive item Id of the folder item inside which folder needs to be created.
Returns
GCF::Result containing success or failure with error message if any.