GDataDocumentsFolder

GDataDocumentsFolder — GData documents folder object

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <gdata/services/documents/gdata-documents-folder.h>

                    GDataDocumentsFolder;
                    GDataDocumentsFolderClass;
GDataDocumentsFolder * gdata_documents_folder_new       (const gchar *id);

Object Hierarchy

  GObject
   +----GDataParsable
         +----GDataEntry
               +----GDataDocumentsEntry
                     +----GDataDocumentsFolder

Implemented Interfaces

GDataDocumentsFolder implements GDataAccessHandler.

Description

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 32. Adding a Folder

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);


Details

GDataDocumentsFolder

typedef struct _GDataDocumentsFolder GDataDocumentsFolder;

All the fields in the GDataDocumentsFolder structure are private and should never be accessed directly.

Since 0.4.0


GDataDocumentsFolderClass

typedef struct {
} GDataDocumentsFolderClass;

All the fields in the GDataDocumentsFolderClass structure are private and should never be accessed directly.

Since 0.4.0


gdata_documents_folder_new ()

GDataDocumentsFolder * gdata_documents_folder_new       (const gchar *id);

Creates a new GDataDocumentsFolder with the given entry ID ("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