| GData Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
#include <gdata/services/documents/gdata-documents-text.h>
GDataDocumentsText;
GDataDocumentsTextClass;
enum GDataDocumentsTextFormat;
GDataDocumentsText * gdata_documents_text_new (const gchar *id);
GFile * gdata_documents_text_download_document
(GDataDocumentsText *self,
GDataDocumentsService *service,
gchar **content_type,
GDataDocumentsTextFormat export_format,
GFile *destination_directory,
gboolean replace_file_if_exists,
GCancellable *cancellable,
GError **error);
GObject +----GDataParsable +----GDataEntry +----GDataDocumentsEntry +----GDataDocumentsText
GDataDocumentsText is a subclass of GDataDocumentsEntry to represent a text document from Google Documents.
For more details of Google Documents' GData API, see the online documentation.
typedef struct _GDataDocumentsText GDataDocumentsText;
All the fields in the GDataDocumentsText structure are private and should never be accessed directly.
Since 0.4.0
typedef struct {
} GDataDocumentsTextClass;
All the fields in the GDataDocumentsTextClass structure are private and should never be accessed directly.
Since 0.4.0
typedef enum {
GDATA_DOCUMENTS_TEXT_DOC = 0,
GDATA_DOCUMENTS_TEXT_HTML,
GDATA_DOCUMENTS_TEXT_ODT,
GDATA_DOCUMENTS_TEXT_PDF,
GDATA_DOCUMENTS_TEXT_PNG,
GDATA_DOCUMENTS_TEXT_RTF,
GDATA_DOCUMENTS_TEXT_TXT,
GDATA_DOCUMENTS_TEXT_ZIP,
} GDataDocumentsTextFormat;
The different available download formats for text documents.
| Microsoft Word (DOC) format | |
| HyperText Markup Language (HTML) format | |
| OpenDocument Text (ODT) format | |
| Portable Document Format (PDF) | |
| Portable Network Graphics (PNG) image format | |
| Rich Text Format (RTF) | |
| plain text format | |
| ZIP archive containing images and exported HTML |
Since 0.4.0
GDataDocumentsText * gdata_documents_text_new (const gchar *id);
Creates a new GDataDocumentsText with the given entry ID ("id").
|
the entry's ID (not the document ID of the text document), or NULL
|
Returns : |
a new GDataDocumentsText, or NULL; unref with g_object_unref()
|
Since 0.4.0
GFile * gdata_documents_text_download_document
(GDataDocumentsText *self,
GDataDocumentsService *service,
gchar **content_type,
GDataDocumentsTextFormat export_format,
GFile *destination_directory,
gboolean replace_file_if_exists,
GCancellable *cancellable,
GError **error);
Downloads and returns the text document file represented by the GDataDocumentsText. If the document doesn't exist,
NULL is returned, but no error is set in error. TODO: What?
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread.
If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
If there is an error getting the document, a GDATA_SERVICE_ERROR_WITH_QUERY error will be returned.
|
a GDataDocumentsText |
|
a GDataDocumentsService |
|
return location for the document's content type, or NULL; free with g_free()
|
|
the format in which the text document should be exported |
|
the directory into which the text document file should be saved |
|
TRUE if the file should be replaced if it already exists, FALSE otherwise
|
|
optional GCancellable object, or NULL
|
|
a GError, or NULL
|
Returns : |
the document's data, or NULL; unref with g_object_unref()
|
Since 0.4.0