SharingEntryMedia

SharingEntryMedia — Media element of a SharingEntry

Synopsis

gchar*              sharing_entry_media_get_name        (const SharingEntryMedia *self);
gchar*              sharing_entry_media_get_filename    (const SharingEntryMedia *self);
gchar*              sharing_entry_media_get_filename_without_extension
                                                        (const SharingEntryMedia *self);
gchar*              sharing_entry_media_get_title       (const SharingEntryMedia *self);
const gchar*        sharing_entry_media_get_desc        (const SharingEntryMedia *self);
const GSList*       sharing_entry_media_get_tags        (const SharingEntryMedia *self);
const gchar*        sharing_entry_media_get_localpath   (const SharingEntryMedia *self);
gchar*              sharing_entry_media_get_mime        (const SharingEntryMedia *self);
guint64             sharing_entry_media_get_size        (const SharingEntryMedia *self);
void                sharing_entry_media_set_sent        (SharingEntryMedia *self,
                                                         gboolean sent);
gboolean            sharing_entry_media_get_sent        (SharingEntryMedia *self);

Description

SharingEntryMedia is a single file (media element) in a SharingEntry. It holds methods to get and modify metadata of media elements.

Details

sharing_entry_media_get_name ()

gchar*              sharing_entry_media_get_name        (const SharingEntryMedia *self);

Get the name of a SharingEntryMedia. The name is the title if it is defined in the metadata, or otherwise the filename. This value can be used in UI or other places where media needs to be shown to user as text.

self : a SharingEntryMedia
Returns : a newly-allocated string on success, NULL otherwise. The string must be freed with g_free() when it is no longer needed

sharing_entry_media_get_filename ()

gchar*              sharing_entry_media_get_filename    (const SharingEntryMedia *self);

Get the filename of a SharingEntryMedia.

self : a SharingEntryMedia
Returns : a newly-allocated string on success, NULL otherwise. The string must be freed with g_free() when it is no longer needed

sharing_entry_media_get_filename_without_extension ()

gchar*              sharing_entry_media_get_filename_without_extension
                                                        (const SharingEntryMedia *self);

Get the filename of a SharingEntryMedia, excluding the file extension.

self : a SharingEntryMedia
Returns : a newly-allocated string on success, NULL otherwise. The string must be freed with g_free() when it is no longer needed

sharing_entry_media_get_title ()

gchar*              sharing_entry_media_get_title       (const SharingEntryMedia *self);

Get the title of a SharingEntryMedia.

self : a SharingEntryMedia
Returns : a newly-allocated string on success, NULL otherwise. The string must be freed with g_free() when it is no longer needed

sharing_entry_media_get_desc ()

const gchar*        sharing_entry_media_get_desc        (const SharingEntryMedia *self);

Get the description of a SharingEntryMedia.

self : a SharingEntryMedia
Returns : the description on success, or NULL otherwise. The string points to internally-allocated storage and must not be modified or freed.

sharing_entry_media_get_tags ()

const GSList*       sharing_entry_media_get_tags        (const SharingEntryMedia *self);

Get tags added to object.

self : a SharingEntryMedia
Returns : a GSList of SharingTag objects. The list is owned by the SharingEntryMedia and should not be modified or freed. The list is valid for the lifetime of the SharingEntryMedia.

sharing_entry_media_get_localpath ()

const gchar*        sharing_entry_media_get_localpath   (const SharingEntryMedia *self);

Get the local path of a SharingEntryMedia, if it is available.

self : a SharingEntryMedia
Returns : the local path of the SharingEntryMedia on success, or NULL otherwise

sharing_entry_media_get_mime ()

gchar*              sharing_entry_media_get_mime        (const SharingEntryMedia *self);

Get the MIME type of a SharingEntryMedia.

self : a SharingEntryMedia
Returns : the newly-allocated MIME type on success, or NULL otherwise. The string must be freed with g_free() when it is no longer needed

sharing_entry_media_get_size ()

guint64             sharing_entry_media_get_size        (const SharingEntryMedia *self);

Get the file size of a SharingEntryMedia.

self : a SharingEntryMedia
Returns : the size of the media file in bytes, or 0 if the file is not defined or the size cannot be determined

sharing_entry_media_set_sent ()

void                sharing_entry_media_set_sent        (SharingEntryMedia *self,
                                                         gboolean sent);

Marks whether a SharingEntryMedia has been sent.

self : a SharingEntryMedia
sent : whether the media has been sent

sharing_entry_media_get_sent ()

gboolean            sharing_entry_media_get_sent        (SharingEntryMedia *self);

Check if a SharingMediaEntry has been sent.

self : a SharingEntryMedia
Returns : TRUE if the media has been sent, FALSE otherwise