## EntangleMedia

EntangleMedia — a media file base object

## Functions

const char * | entangle_media_get_filename ()
time_t | entangle_media_get_last_modified ()
off_t | entangle_media_get_file_size ()
gboolean | entangle_media_delete ()
GExiv2Metadata * | entangle_media_get_metadata ()
void | entangle_media_set_metadata ()

## Properties

char * | filename | Read / Write / Construct Only
GExiv2Metadata * | metadata | Read / Write

## Types and Values

#define | ENTANGLE_TYPE_MEDIA
struct | EntangleMediaClass
| EntangleMedia

## Object Hierarchy

        GObject
        ╰── EntangleMedia
            ├── EntangleImage
            ╰── EntangleVideo

## Description

The EntangleMedia object is a base class providing common functionality for various types of media file

## Functions

### entangle_media_get_filename ()

    const char *
    entangle_media_get_filename (EntangleMedia *media);

Get the filename associated with the media, if it has one.

#### Parameters

media | the media instance. | [transfer none]

#### Returns

the filename or NULL.

[transfer none]

### entangle_media_get_last_modified ()

    time_t
    entangle_media_get_last_modified (EntangleMedia *media);

Get the time at which the media was last modified, if it is backed by a file on disk

#### Parameters

media | the media instance. | [transfer none]

#### Returns

the last modification time in seconds since epoch, or 0

### entangle_media_get_file_size ()

    off_t
    entangle_media_get_file_size (EntangleMedia *media);

Get the size of the media on disk, if it is backed by a file on disk

#### Parameters

media | the media instance. | [transfer none]

#### Returns

the size in bytes, or 0

### entangle_media_delete ()

    gboolean
    entangle_media_delete (EntangleMedia *media,
                           GError **error);

### entangle_media_get_metadata ()

    GExiv2Metadata *
    entangle_media_get_metadata (EntangleMedia *media);

Get the metadata associated with the media, if it is available

#### Parameters

media | the media instance. | [transfer none]

#### Returns

the media metadata or NULL.

[transfer none]

### entangle_media_set_metadata ()

    void
    entangle_media_set_metadata (EntangleMedia *media,
                                 GExiv2Metadata *metadata);

Set the metadata associated with the media

#### Parameters

media | the media instance. | [transfer none]
metadata | the new metadata. | [transfer none]

## Types and Values

### ENTANGLE_TYPE_MEDIA

    #define ENTANGLE_TYPE_MEDIA (entangle_media_get_type())

### struct EntangleMediaClass

    struct EntangleMediaClass {
    };

### EntangleMedia

    typedef struct _EntangleMedia EntangleMedia;

## Property Details

### The `“filename”` property

      “filename”                 char *

Full path to media file.

Owner: EntangleMedia

Flags: Read / Write / Construct Only

Default value: NULL

### The `“metadata”` property

      “metadata”                 GExiv2Metadata *

Media metadata.

Owner: EntangleMedia

Flags: Read / Write