EntangleCameraFile

EntangleCameraFile

Synopsis

struct              EntangleCameraFile;
struct              EntangleCameraFileClass;
EntangleCameraFile * entangle_camera_file_new           (const char *folder,
                                                         const char *name);
const char *        entangle_camera_file_get_folder     (EntangleCameraFile *file);
const char *        entangle_camera_file_get_name       (EntangleCameraFile *file);
gboolean            entangle_camera_file_save_path      (EntangleCameraFile *file,
                                                         const char *localpath,
                                                         GError **err);
gboolean            entangle_camera_file_save_uri       (EntangleCameraFile *file,
                                                         const char *uri,
                                                         GError **err);
GByteArray *        entangle_camera_file_get_data       (EntangleCameraFile *file);
void                entangle_camera_file_set_data       (EntangleCameraFile *file,
                                                         GByteArray *data);
const gchar *       entangle_camera_file_get_mimetype   (EntangleCameraFile *file);
void                entangle_camera_file_set_mimetype   (EntangleCameraFile *file,
                                                         const gchar *mimetype);

Object Hierarchy

  GObject
   +----EntangleCameraFile

Properties

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

Description

Details

struct EntangleCameraFile

struct EntangleCameraFile;

struct EntangleCameraFileClass

struct EntangleCameraFileClass {
    GObjectClass parent_class;
};

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

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

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

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.

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

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

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

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.

file :

the camera file instance. [transfer none]

mimetype :

the new mime type. [transfer none][allow-none]

Property Details

The "data" property

  "data"                     GByteArray*           : Read / Write

Raw data for the file.


The "folder" property

  "folder"                   gchar*                : Read / Write / Construct Only

Folder name on the camera.

Default value: NULL


The "mimetype" property

  "mimetype"                 gchar*                : Read / Write

File mimetype on the camera.

Default value: NULL


The "name" property

  "name"                     gchar*                : Read / Write / Construct Only

File name on the camera.

Default value: NULL