EntangleCameraFile

EntangleCameraFile

Functions

Properties

GByteArray * data Read / Write
gchar * folder Read / Write / Construct Only
gchar * mimetype Read / Write
gchar * name Read / Write / Construct Only

Object Hierarchy

    GObject
    ╰── EntangleCameraFile

Description

Functions

entangle_camera_file_new ()

EntangleCameraFile *
entangle_camera_file_new (const char *folder,
                          const char *name);

entangle_camera_file_get_folder ()

const char *
entangle_camera_file_get_folder (EntangleCameraFile *file);

Get the path of the folder on the camera which stores the file

Parameters

file

the camera file instance.

[transfer none]

Returns

the folder path.

[transfer none]


entangle_camera_file_get_name ()

const char *
entangle_camera_file_get_name (EntangleCameraFile *file);

Gets the name of the camera file, without any folder component

Parameters

file

the camera file instance.

[transfer none]

Returns

the file name.

[transfer none]


entangle_camera_file_save_path ()

gboolean
entangle_camera_file_save_path (EntangleCameraFile *file,
                                const char *localpath,
                                GError **err);

Saves the content of the camera file to the local filesystem path identified by localpath

Parameters

file

the camera file.

[transfer none]

localpath

path on the local filesystem.

[transfer none]

Returns

TRUE if the file was saved, FALSE on error


entangle_camera_file_save_uri ()

gboolean
entangle_camera_file_save_uri (EntangleCameraFile *file,
                               const char *uri,
                               GError **err);

Saves the content of the camera file to the virtual filesystem location identified by uri . uri can be any scheme for which a GVFS handler is present.

Parameters

file

the camera file.

[transfer none]

uri

virtual filesystem URI.

[transfer none]

Returns

TRUE if the file was saved, FALSE on error


entangle_camera_file_get_data ()

GByteArray *
entangle_camera_file_get_data (EntangleCameraFile *file);

Get the raw data associated with the camera file

Parameters

file

the camera file instance.

[transfer none]

Returns

the camera data.

[transfer none]


entangle_camera_file_set_data ()

void
entangle_camera_file_set_data (EntangleCameraFile *file,
                               GByteArray *data);

Set the raw data for the camera file. If there was pre-existing data set this will be released. Passing NULL for data will clear the data completely. The contents of data will not be copied, instead a reference will be acquired. Thus any further changes to data by the caller will affect this object

Parameters

file

the camera file instance.

[transfer none]

data

the new data.

[transfer none][allow-none]

entangle_camera_file_get_mimetype ()

const gchar *
entangle_camera_file_get_mimetype (EntangleCameraFile *file);

Get the mimetype of the camera file, as a string

Parameters

file

the camera file instance.

[transfer none]

Returns

the mime type or NULL.

[transfer none]


entangle_camera_file_set_mimetype ()

void
entangle_camera_file_set_mimetype (EntangleCameraFile *file,
                                   const gchar *mimetype);

Set the mimetype of the data associated with the file. This replaces any previously set mime type. Passing in NULL for mimetype will clear the mime type information.

Parameters

file

the camera file instance.

[transfer none]

mimetype

the new mime type.

[transfer none][allow-none]

Types and Values

Property Details

The “data” property

  “data”                     GByteArray *

Raw data for the file.

Flags: Read / Write


The “folder” property

  “folder”                   gchar *

Folder name on the camera.

Flags: Read / Write / Construct Only

Default value: NULL


The “mimetype” property

  “mimetype”                 gchar *

File mimetype on the camera.

Flags: Read / Write

Default value: NULL


The “name” property

  “name”                     gchar *

File name on the camera.

Flags: Read / Write / Construct Only

Default value: NULL