LibSharing Manual | ||||
---|---|---|---|---|
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);
SharingEntryMedia is a single file (media element) in a SharingEntry. It holds methods to get and modify metadata of media elements.
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
|
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
|
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
|
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
|
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.
|
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. |
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
|
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
|
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 |
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 |