![]() |
![]() |
![]() |
GData Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#include <gdata/services/documents/gdata-documents-presentation.h> GDataDocumentsPresentation; GDataDocumentsPresentationClass; enum GDataDocumentsPresentationFormat; GDataDocumentsPresentation * gdata_documents_presentation_new (const gchar *id); GFile * gdata_documents_presentation_download_document (GDataDocumentsPresentation *self, GDataDocumentsService *service, gchar **content_type, GDataDocumentsPresentationFormat export_format, GFile *destination_file, gboolean replace_file_if_exists, GCancellable *cancellable, GError **error); gchar * gdata_documents_presentation_get_download_uri (GDataDocumentsPresentation *self, GDataDocumentsPresentationFormat export_format);
GObject +----GDataParsable +----GDataEntry +----GDataDocumentsEntry +----GDataDocumentsPresentation
GDataDocumentsPresentation is a subclass of GDataDocumentsEntry to represent a Google Documents presentation.
For more details of Google Documents' GData API, see the online documentation.
typedef struct _GDataDocumentsPresentation GDataDocumentsPresentation;
All the fields in the GDataDocumentsPresentation structure are private and should never be accessed directly.
Since 0.4.0
typedef struct { } GDataDocumentsPresentationClass;
All the fields in the GDataDocumentsPresentationClass structure are private and should never be accessed directly.
Since 0.4.0
typedef enum { GDATA_DOCUMENTS_PRESENTATION_PDF = 0, GDATA_DOCUMENTS_PRESENTATION_PNG, GDATA_DOCUMENTS_PRESENTATION_PPT, GDATA_DOCUMENTS_PRESENTATION_SWF, GDATA_DOCUMENTS_PRESENTATION_TXT, } GDataDocumentsPresentationFormat;
The various different file formats in which a presentation can be downloaded, with conversation happening on the server.
the document in PDF format | |
the document in PNG image format | |
the document in Microsoft PowerPoint PPT format | |
the document in Adobe Flash SWF format | |
the document in text format |
Since 0.4.0
GDataDocumentsPresentation * gdata_documents_presentation_new (const gchar *id);
Creates a new GDataDocumentsPresentation with the given entry ID ("id").
|
the entry's ID (not the document ID of the presentation), or NULL
|
Returns : |
a new GDataDocumentsPresentation, or NULL ; unref with g_object_unref()
|
Since 0.4.0
GFile * gdata_documents_presentation_download_document (GDataDocumentsPresentation *self, GDataDocumentsService *service, gchar **content_type, GDataDocumentsPresentationFormat export_format, GFile *destination_file, gboolean replace_file_if_exists, GCancellable *cancellable, GError **error);
Downloads and returns the presentation file represented by the GDataDocumentsPresentation. 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.
If destination_file
is a directory, then the file will be downloaded in this directory with the "title" with
the apropriate extension as name.
|
a GDataDocumentsPresentation |
|
a GDataDocumentsService |
|
return location for the document's content type, or NULL ; free with g_free()
|
|
the format in which the presentation should be exported |
|
the GFile into which the presentation 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
gchar * gdata_documents_presentation_get_download_uri (GDataDocumentsPresentation *self, GDataDocumentsPresentationFormat export_format);
Builds and returns the download URI for the given GDataDocumentsPresentation in the desired format. Note that directly downloading
the document using this URI isn't possible, as authentication is required. You should instead use gdata_download_stream_new()
with
the URI, and use the resulting GInputStream.
|
a GDataDocumentsPresentation |
|
the format in which the presentation should be exported when downloaded |
Returns : |
the download URI; free with g_free()
|
Since 0.5.0