Classes | |
class | GCF::GDriveContent::Permission |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::User |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::Properties |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::ImageMediaMetaData |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::ItemParent |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::Item |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::AuthenticatedUser |
#include <GCF/GDriveContent.h>More... | |
class | GCF::GDriveContent::Child |
#include <GCF/GDriveContent.h>More... | |
class | GCF::IGDriveLite |
This interface gives access to all GDriveLite component functionalities.
#include <GCF3/IGDriveLite>. More... | |
class | GCF::IGDriveLiteAuthenticator |
This is class helps the user to authenticate..
#include <GCF3/IGDriveLiteAuthenticator>. More... | |
class | GCF::IGDriveLiteContentModel |
This interface provides access to the content-structure of Google Drive
#include <GCF3/IGDriveLiteContentModel>. More... | |
class | GCF::IGDriveLiteContentSharingModel |
This interface provides access to permissions of a file/folder item
#include <GCF3/IGDriveLiteContentSharingModel>. More... | |
class | GCF::IGDriveLiteFileDownloader |
An interface to download a file from Google Drive
#include <GCF3/IGDriveLiteFileDownloader>. More... | |
class | GCF::IGDriveLiteFileDownloaderListModel |
Provides access to all downloaders from this component as a model
#include <GCF3/IGDriveLiteFileDownloaderListModel>. More... | |
class | GCF::IGDriveLiteFileUploader |
An interface to upload a file into google-drive
#include <GCF3/IGDriveLiteFileUploader>. More... | |
class | GCF::IGDriveLiteFileUploaderListModel |
Helper class for accessing details of file uploaders as model.
#include <GCF3/IGDriveLiteFileUploaderListModel>. More... | |
Detailed Description
GDriveLite is an in-built component in GCF that makes it possible to bring Google Drive to your applications. With this component you can
- Authenticate a Google Account and access its Drive contents
- Access the content-structure of the drive (through a model)
- Upload / Download files
- Share / Unshare files and folders in the drive
- Star / Unstar files and folders in the drive
- Trash / Untrash / Permanently Delete files and folders in the drive
- Rename files and folders
- Create directories
- Move files and directories to other directories
GCF comes bundled with two example programs: GDriveLiteGui and GDriveLiteQml. These programs showcase how the component can be used to build a full-fledged drive-aware application using widgets and QML.
Registering your application with Google API Console
To work with Google Drive API, you will need to register your application with Google using its API Console.
Step 1: Visit Google API Console
Open https://code.google.com/apis/console/ in your web-browser.
Click on the "Create Project" button and switch to the "Services" tab.
From the list of services, switch on (or enable) Drive-API service access.
In the API-Access tab, create an OAuth Client-ID.
- Note
- Make sure that you selected "Installed Application" as application-type; and "Other" as installed application type.
Upon creation of Client-ID; you will notice a client-id
and client-secret
string in your API console. Make note of these strings, you will need to use them in your code for using the GDriveLite component.
Loading GDriveLite component in your GCF applications
Once you have the client-id
and client-secret
, you can load the GDriveLite component in your code as follows
- Note
- To load GDriveLite component in your application, you must ensure that GCF's
Binary
folder is available in PATH / LD_LIBRARY_PATH / DYLD_LIBRARY_PATH.
Authorising GDriveLite to access drive data
The first thing you will need to do is to authorize GDriveLite to access your drive content. For this, you can make use of the GCF::IGDriveLiteAuthenticator interface. The following code-snippet shows you how to do that
- See Also
- GCF::IGDriveLite
- GCF::IGDriveLiteAuthenticator
- GCF::IGDriveLiteContentModel
- GCF::IGDriveLiteContentSharingModel
- GCF::IGDriveLiteFileDownloader
- GCF::IGDriveLiteFileDownloaderListModel
- GCF::IGDriveLiteFileUploader
- GCF::IGDriveLiteFileUploaderListModel
- GDriveLiteGui - Example application for GCF's GDriveLite
- GDriveLiteQml - Example application for GCF's GDriveLite