GDataDocumentsPresentation

## 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_directory,
                                                             gboolean replace_file_if_exists,
                                                             GCancellable *cancellable,
                                                             GError **error);

## 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_directory,
                                                             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.

`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_directory` : | the directory 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