GDataDocumentsPresentation

GDataDocumentsPresentation — GData documents presentation object

Stability Level

Unstable, unless otherwise indicated

Synopsis


#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);

Object Hierarchy

  GObject
   +----GDataParsable
         +----GDataEntry
               +----GDataDocumentsEntry
                     +----GDataDocumentsPresentation

Implemented Interfaces

GDataDocumentsPresentation implements GDataAccessHandler.

Description

GDataDocumentsPresentation is a subclass of GDataDocumentsEntry to represent a Google Documents presentation.

For more details of Google Documents' GData API, see the online documentation.

Details

GDataDocumentsPresentation

typedef struct _GDataDocumentsPresentation GDataDocumentsPresentation;

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

Since 0.4.0


GDataDocumentsPresentationClass

typedef struct {
} GDataDocumentsPresentationClass;

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

Since 0.4.0


enum GDataDocumentsPresentationFormat

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.

GDATA_DOCUMENTS_PRESENTATION_PDF

the document in PDF format

GDATA_DOCUMENTS_PRESENTATION_PNG

the document in PNG image format

GDATA_DOCUMENTS_PRESENTATION_PPT

the document in Microsoft PowerPoint PPT format

GDATA_DOCUMENTS_PRESENTATION_SWF

the document in Adobe Flash SWF format

GDATA_DOCUMENTS_PRESENTATION_TXT

the document in text format

Since 0.4.0


gdata_documents_presentation_new ()

GDataDocumentsPresentation * gdata_documents_presentation_new
                                                        (const gchar *id);

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


gdata_documents_presentation_download_document ()

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.

self :

a GDataDocumentsPresentation

service :

a GDataDocumentsService

content_type :

return location for the document's content type, or NULL; free with g_free()

export_format :

the format in which the presentation should be exported

destination_file :

the GFile into which the presentation file should be saved

replace_file_if_exists :

TRUE if the file should be replaced if it already exists, FALSE otherwise

cancellable :

optional GCancellable object, or NULL

error :

a GError, or NULL

Returns :

the document's data, or NULL; unref with g_object_unref()

Since 0.4.0


gdata_documents_presentation_get_download_uri ()

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.

self :

a GDataDocumentsPresentation

export_format :

the format in which the presentation should be exported when downloaded

Returns :

the download URI; free with g_free()

Since 0.5.0