## GDataMediaThumbnail

GDataMediaThumbnail — Media RSS thumbnail element

## Stability Level

Stable, unless otherwise indicated

## Functions

const gchar * | gdata_media_thumbnail_get_uri ()
guint | gdata_media_thumbnail_get_height ()
guint | gdata_media_thumbnail_get_width ()
gint64 | gdata_media_thumbnail_get_time ()
GDataDownloadStream * | gdata_media_thumbnail_download ()

## Properties

guint | height | Read
gint64 | time | Read
char * | uri | Read
guint | width | Read

## Types and Values

| GDataMediaThumbnail
| GDataMediaThumbnailClass

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataMediaThumbnail

## Includes

    #include <gdata/media/gdata-media-thumbnail.h>

## Description

GDataMediaThumbnail represents a "thumbnail" element from the

Media RSS specification.

The class only implements parsing, not XML output, at the moment.

## Functions

### gdata_media_thumbnail_get_uri ()

    const gchar *
    gdata_media_thumbnail_get_uri (GDataMediaThumbnail *self);

Gets the “uri” property.

#### Parameters

self | a GDataMediaThumbnail |

#### Returns

the thumbnail's URI

Since: 0.4.0

### gdata_media_thumbnail_get_height ()

    guint
    gdata_media_thumbnail_get_height (GDataMediaThumbnail *self);

Gets the “height” property.

#### Parameters

self | a GDataMediaThumbnail |

#### Returns

the thumbnail's height in pixels, or `0`

Since: 0.4.0

### gdata_media_thumbnail_get_width ()

    guint
    gdata_media_thumbnail_get_width (GDataMediaThumbnail *self);

Gets the “width” property.

#### Parameters

self | a GDataMediaThumbnail |

#### Returns

the thumbnail's width in pixels, or `0`

Since: 0.4.0

### gdata_media_thumbnail_get_time ()

    gint64
    gdata_media_thumbnail_get_time (GDataMediaThumbnail *self);

Gets the “time” property.

#### Parameters

self | a GDataMediaThumbnail |

#### Returns

the thumbnail's time offset in the media, or `-1`

Since: 0.4.0

### gdata_media_thumbnail_download ()

    GDataDownloadStream *
    gdata_media_thumbnail_download (GDataMediaThumbnail *self,
                                    GDataService *service,
                                    GCancellable *cancellable,
                                    GError **error);

Downloads and returns a GDataDownloadStream allowing the thumbnail data represented by `self` to be read.

To get the content type of the downloaded data, `gdata_download_stream_get_content_type()` can be called on the returned GDataDownloadStream. Calling `gdata_download_stream_get_content_length()` on the stream will not return a meaningful result, however, as the stream is encoded in chunks, rather than by content length.

In order to cancel the download, a GCancellable passed in to `cancellable` must be cancelled using `g_cancellable_cancel()`. Cancelling the individual GInputStream operations on the GDataDownloadStream will not cancel the entire download; merely the read or close operation in question. See the “cancellable” for more details.

#### Parameters

self | a GDataMediaThumbnail |
service | the GDataService |
cancellable | a GCancellable for the entire download stream, or `NULL`. | [allow-none]
error | a GError, or `NULL` |

#### Returns

a GDataDownloadStream to download the thumbnail with, or `NULL`; unref with `g_object_unref()`.

[transfer full]

Since: 0.8.0

## Types and Values

### GDataMediaThumbnail

    typedef struct _GDataMediaThumbnail GDataMediaThumbnail;

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

### GDataMediaThumbnailClass

    typedef struct {
    } GDataMediaThumbnailClass;

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

Since: 0.4.0

## Property Details

### The `“height”` property

      “height”                   guint

The height of the thumbnail, in pixels.

For more information, see the Media RSS specification.

Owner: GDataMediaThumbnail

Flags: Read

Default value: 0

Since: 0.4.0

### The `“time”` property

      “time”                     gint64

The time offset of the thumbnail in relation to the media object, in milliseconds.

For more information, see the Media RSS specification.

Owner: GDataMediaThumbnail

Flags: Read

Allowed values: >= -1

Default value: -1

Since: 0.4.0

### The `“uri”` property

      “uri”                      char *

The URI of the thumbnail.

For more information, see the Media RSS specification.

Owner: GDataMediaThumbnail

Flags: Read

Default value: NULL

Since: 0.4.0

### The `“width”` property

      “width”                    guint

The width of the thumbnail, in pixels.

For more information, see the Media RSS specification.

Owner: GDataMediaThumbnail

Flags: Read

Default value: 0

Since: 0.4.0