## EntangleSession EntangleSession |

## Functions

EntangleSession * | entangle_session_new ()
const char * | entangle_session_directory ()
const char * | entangle_session_filename_pattern ()
char * | entangle_session_next_filename ()
gboolean | entangle_session_load ()
void | entangle_session_add ()
void | entangle_session_remove ()
int | entangle_session_image_count ()
EntangleImage * | entangle_session_image_get ()

## Properties

gchar * | directory | Read / Write / Construct Only
gchar * | filename-pattern | Read / Write / Construct Only

## Signals

void | session-image-added | Run First
void | session-image-removed | Run First

## Object Hierarchy

        GObject
        ╰── EntangleSession

## Description

## Functions

### 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

#### Parameters

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

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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`

#### Parameters

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`

#### Parameters

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

#### Parameters

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

#### Parameters

session | the session instance. | [transfer none]
idx | index of the image to fetch |

#### Returns

the image.

[transfer none]

## Types and Values

## Property Details

### The `“directory”` property

      “directory”                gchar *

Full path to session file.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“filename-pattern”` property

      “filename-pattern”         gchar *

Pattern for creating new filenames.

Flags: Read / Write / Construct Only

Default value: NULL

## Signal Details

### The `“session-image-added”` signal

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

Flags: Run First

### The `“session-image-removed”` signal

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

Flags: Run First