EntangleSession

EntangleSession

Synopsis

struct              EntangleSession;
struct              EntangleSessionClass;
EntangleSession *   entangle_session_new                (const char *directory,
                                                         const char *filenamePattern);
const char *        entangle_session_directory          (EntangleSession *session);
const char *        entangle_session_filename_pattern   (EntangleSession *session);
char *              entangle_session_next_filename      (EntangleSession *session,
                                                         EntangleCameraFile *file);
gboolean            entangle_session_load               (EntangleSession *session);
void                entangle_session_add                (EntangleSession *session,
                                                         EntangleImage *image);
void                entangle_session_remove             (EntangleSession *session,
                                                         EntangleImage *image);
int                 entangle_session_image_count        (EntangleSession *session);
EntangleImage *     entangle_session_image_get          (EntangleSession *session,
                                                         int idx);

Object Hierarchy

  GObject
   +----EntangleSession

Properties

  "directory"                gchar*                : Read / Write / Construct Only
  "filename-pattern"         gchar*                : Read / Write / Construct Only

Signals

  "session-image-added"                            : Run First
  "session-image-removed"                          : Run First

Description

Details

struct EntangleSession

struct EntangleSession;

struct EntangleSessionClass

struct EntangleSessionClass {
    GObjectClass parent_class;

    void (*session_image_added)(EntangleSession *session, EntangleImage *image);
    void (*session_image_removed)(EntangleSession *session, EntangleImage *image);
};

entangle_session_new ()

EntangleSession *   entangle_session_new                (const char *directory,
                                                         const char *filenamePattern);

Create a new sesssion tracking images present in directory. The filenamePattern is used to generate filenames for newly created images

directory :

the directory associated witht session

filenamePattern :

the filename generator pattern

Returns :

the new session. [transfer full]

entangle_session_directory ()

const char *        entangle_session_directory          (EntangleSession *session);

Get the directory associated with the session

session :

the session instance. [transfer none]

Returns :

the session directory. [transfer none]

entangle_session_filename_pattern ()

const char *        entangle_session_filename_pattern   (EntangleSession *session);

Get the filename generator pattern

session :

the session instance. [transfer none]

Returns :

the filename pattern. [transfer none]

entangle_session_next_filename ()

char *              entangle_session_next_filename      (EntangleSession *session,
                                                         EntangleCameraFile *file);

Generate a new unique filename for file, taking into account its file extension and any previously generated filename.

session :

the session instance. [transfer none]

file :

the file to obtain a filename for. [transfer none]

Returns :

the new filename. [transfer full]

entangle_session_load ()

gboolean            entangle_session_load               (EntangleSession *session);

Load all the files present in the directory associated with the session

session :

the session instance. [transfer none]

Returns :

TRUE if the session was loaded

entangle_session_add ()

void                entangle_session_add                (EntangleSession *session,
                                                         EntangleImage *image);

Add image to the session

session :

the session instance. [transfer none]

image :

the image to add to the session. [transfer none]

entangle_session_remove ()

void                entangle_session_remove             (EntangleSession *session,
                                                         EntangleImage *image);

Remove image from the session

session :

the session instance. [transfer none]

image :

the image to remove from the session. [transfer none]

entangle_session_image_count ()

int                 entangle_session_image_count        (EntangleSession *session);

Get the total number of images in the session

session :

the session instance. [transfer none]

Returns :

the image count

entangle_session_image_get ()

EntangleImage *     entangle_session_image_get          (EntangleSession *session,
                                                         int idx);

Get the image located at idx in the array

session :

the session instance. [transfer none]

idx :

index of the image to fetch

Returns :

the image. [transfer none]

Property Details

The "directory" property

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

Full path to session file.

Default value: NULL


The "filename-pattern" property

  "filename-pattern"         gchar*                : Read / Write / Construct Only

Pattern for creating new filenames.

Default value: NULL

Signal Details

The "session-image-added" signal

void                user_function                      (EntangleSession *entanglesession,
                                                        EntangleImage   *arg1,
                                                        gpointer         user_data)            : Run First

The "session-image-removed" signal

void                user_function                      (EntangleSession *entanglesession,
                                                        EntangleImage   *arg1,
                                                        gpointer         user_data)            : Run First