![]() |
![]() |
![]() |
GData Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <gdata/services/picasaweb/gdata-picasaweb-service.h> GDataPicasaWebService; GDataPicasaWebServiceClass; GDataPicasaWebService * gdata_picasaweb_service_new (const gchar *client_id); GDataFeed * gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error); void gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback, gpointer user_data); GDataFeed * gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error); GDataPicasaWebFile * gdata_picasaweb_service_upload_file (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataPicasaWebFile *file_entry, GFile *file_data, GCancellable *cancellable, GError **error);
GDataPicasaWebService is a subclass of GDataService for communicating with the GData API of Google PicasaWeb. It supports querying for files and albums, and uploading files.
For more details of PicasaWeb's GData API, see the online documentation.
typedef struct _GDataPicasaWebService GDataPicasaWebService;
All the fields in the GDataPicasaWebService structure are private and should never be accessed directly.
Since 0.4.0
typedef struct { } GDataPicasaWebServiceClass;
All the fields in the GDataPicasaWebServiceClass structure are private and should never be accessed directly.
Since 0.4.0
GDataPicasaWebService * gdata_picasaweb_service_new (const gchar *client_id);
Creates a new GDataPicasaWebService. The client_id
must be unique for your application, and as registered with Google.
|
your application's client ID |
Returns : |
a new GDataPicasaWebService, or NULL
|
Since 0.4.0
GDataFeed * gdata_picasaweb_service_query_all_albums (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
Queries the service to return a list of all albums belonging to the specified username
which match the given
query
. If a user is authenticated with the service, username
can be set as NULL
to return a list of albums belonging
to the currently-authenticated user.
Note that the "q" query parameter cannot be set on query
for album queries.
For more details, see gdata_service_query()
.
|
a GDataPicasaWebService |
|
a GDataQuery with the query parameters, or NULL
|
|
the username of the user whose albums you wish to retrieve, or NULL
|
|
optional GCancellable object, or NULL
|
|
a GDataQueryProgressCallback to call when an entry is loaded, or NULL
|
|
data to pass to the progress_callback function
|
|
a GError, or NULL
|
Returns : |
a GDataFeed of query results; unref with g_object_unref()
|
Since 0.4.0
void gdata_picasaweb_service_query_all_albums_async (GDataPicasaWebService *self, GDataQuery *query, const gchar *username, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
Queries the service to return a list of all albums belonging to the specified username
which match the given
query
. self
, query
and username
are all reffed/copied when this function is called, so can safely be unreffed/freed after
this function returns.
For more details, see gdata_picasaweb_service_query_all_albums()
, which is the synchronous version of
this function, and gdata_service_query_async()
, which is the base asynchronous query function.
|
a GDataPicasaWebService |
|
a GDataQuery with the query parameters, or NULL
|
|
the username of the user whose albums you wish to retrieve, or NULL
|
|
optional GCancellable object, or NULL
|
|
a GDataQueryProgressCallback to call when an entry is loaded, or NULL
|
|
data to pass to the progress_callback function
|
|
a GAsyncReadyCallback to call when authentication is finished |
|
data to pass to the callback function
|
Since 0.4.0
GDataFeed * gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
Queries the specified album
for a list of the files which match the given query
. If album
is NULL
and a user is
authenticated with the service, the user's default album will be queried.
For more details, see gdata_service_query()
.
|
a GDataPicasaWebService |
|
a GDataPicasaWebAlbum from which to retrieve the files, or NULL
|
|
a GDataQuery with the query parameters, or NULL
|
|
optional GCancellable object, or NULL
|
|
a GDataQueryProgressCallback to call when an entry is loaded, or NULL
|
|
data to pass to the progress_callback function
|
|
a GError, or NULL
|
Returns : |
a GDataFeed of query results; unref with g_object_unref()
|
Since 0.4.0
GDataPicasaWebFile * gdata_picasaweb_service_upload_file (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataPicasaWebFile *file_entry, GFile *file_data, GCancellable *cancellable, GError **error);
Uploads a file (photo or video) to the given PicasaWeb album
, using the actual_file
from disk and the metadata from file
. If album
is
NULL
, the file will be uploaded to the currently-authenticated user's "Drop Box" album. A user must be authenticated to use this function.
If file
has already been inserted, a GDATA_SERVICE_ERROR_ENTRY_ALREADY_INSERTED
error will be returned. If no user is authenticated
with the service, GDATA_SERVICE_ERROR_AUTHENTICATION_REQUIRED
will be returned.
If there is a problem reading file_data
, an error from g_output_stream_splice()
or g_file_query_info()
will be returned. Other errors from
GDataServiceError can be returned for other exceptional conditions, as determined by the server.
|
a GDataPicasaWebService |
|
a GDataPicasaWebAlbum into which to insert the file, or NULL
|
|
a GDataPicasaWebFile to insert |
|
the actual file to upload |
|
optional GCancellable object, or NULL
|
|
a GError, or NULL
|
Returns : |
the inserted GDataPicasaWebFile with updated properties from file_entry ; unref with g_object_unref()
|
Since 0.4.0