| GData Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
#include <gdata/services/documents/gdata-documents-folder.h>
GDataDocumentsFolder;
GDataDocumentsFolderClass;
GDataDocumentsFolder * gdata_documents_folder_new (const gchar *id);
GObject +----GDataParsable +----GDataEntry +----GDataDocumentsEntry +----GDataDocumentsFolder
GDataDocumentsFolder is a subclass of GDataDocumentsEntry to represent a folder from Google Documents.
For more details of Google Documents' GData API, see the online documentation.
Example 36. Adding a Folder
GDataDocumentsService *service;
GDataDocumentsFolder *folder, *new_folder;
gchar *upload_uri;
GError *error = NULL;
/* Create a service */
service = create_documents_service ();
/* Create the new folder */
folder = gdata_documents_folder_new (NULL);
gdata_entry_set_title (GDATA_ENTRY (folder), "Folder Name");
/* Insert the folder */
upload_uri = gdata_documents_service_get_upload_uri (NULL);
new_folder = GDATA_DOCUMENTS_FOLDER (gdata_service_insert_entry (GDATA_SERVICE (service), upload_uri, GDATA_ENTRY (folder), NULL, &error));
g_free (upload_uri);
g_object_unref (folder);
g_object_unref (service);
if (error != NULL) {
g_error ("Error inserting new folder: %s", error->message);
g_error_free (error);
return;
}
/* Do something with the new folder, such as store its ID for future use */
g_object_unref (new_folder);
typedef struct _GDataDocumentsFolder GDataDocumentsFolder;
All the fields in the GDataDocumentsFolder structure are private and should never be accessed directly.
Since 0.4.0
typedef struct {
} GDataDocumentsFolderClass;
All the fields in the GDataDocumentsFolderClass structure are private and should never be accessed directly.
Since 0.4.0
GDataDocumentsFolder * gdata_documents_folder_new (const gchar *id);
Creates a new GDataDocumentsFolder with the given entry ID ("id").
|
the entry's ID (not the document ID of the folder), or NULL. [allow-none]
|
Returns : |
a new GDataDocumentsFolder, or NULL; unref with g_object_unref()
|
Since 0.4.0