## SnapdMedia SnapdMedia — Media information |

## Functions

const gchar * | snapd_media_get_media_type ()
const gchar * | snapd_media_get_url ()
guint | snapd_media_get_width ()
guint | snapd_media_get_height ()

## Properties

guint | height | Read / Write / Construct Only
char * | type | Read / Write / Construct Only
char * | url | Read / Write / Construct Only
guint | width | Read / Write / Construct Only

## Types and Values

| SnapdMedia

## Object Hierarchy

        GObject
        ╰── SnapdMedia

## Includes

    #include <snapd-glib/snapd-glib.h>

## Description

A SnapdMedia represents media (icons, screenshots etc) that are associated with a snap. Snap media can be queried using `snapd_snap_get_media()`.

## Functions

### snapd_media_get_media_type ()

    const gchar *
    snapd_media_get_media_type (SnapdMedia *media);

Get the type for this media, e.g. "icon" or "screenshot".

#### Parameters

media | a SnapdMedia. |

#### Returns

a type name

Since: 1.45

### snapd_media_get_url ()

    const gchar *
    snapd_media_get_url (SnapdMedia *media);

Get the URL for this media, e.g. "http://example.com/media.png"

#### Parameters

media | a SnapdMedia. |

#### Returns

a URL

Since: 1.45

### snapd_media_get_width ()

    guint
    snapd_media_get_width (SnapdMedia *media);

Get the width of the media in pixels or 0 if unknown.

Return: a width

#### Parameters

media | a SnapdMedia. |

Since: 1.45

### snapd_media_get_height ()

    guint
    snapd_media_get_height (SnapdMedia *media);

Get the height of the media in pixels or 0 if unknown.

Return: a height

#### Parameters

media | a SnapdMedia. |

Since: 1.45

## Types and Values

### SnapdMedia

    typedef struct _SnapdMedia SnapdMedia;

SnapdMedia contains media information.

Since: 1.45

## Property Details

### The `“height”` property

      “height”                   guint

Height of media in pixels.

Owner: SnapdMedia

Flags: Read / Write / Construct Only

Default value: 0

### The `“type”` property

      “type”                     char *

Type for this media.

Owner: SnapdMedia

Flags: Read / Write / Construct Only

Default value: NULL

### The `“url”` property

      “url”                      char *

URL for this media.

Owner: SnapdMedia

Flags: Read / Write / Construct Only

Default value: NULL

### The `“width”` property

      “width”                    guint

Width of media in pixels.

Owner: SnapdMedia

Flags: Read / Write / Construct Only

Default value: 0