unicapgtk 3 LIBUNICAPGTK Library
unicapgtk

## Synopsis

    enum                UnicapgtkDeviceStateFlags;
    gchar*              unicapgtk_get_user_config_path      (void);
    GKeyFile*           unicapgtk_save_device_state         (unicap_handle_t handle,
                                                             UnicapgtkDeviceStateFlags flags);
    gboolean            unicapgtk_load_device_state         (unicap_handle_t handle,
                                                             GKeyFile *keyfile,
                                                             UnicapgtkDeviceStateFlags flags);
    unicap_status_t     unicapgtk_check_version             (unsigned int major,
                                                             unsigned int minor,
                                                             unsigned int micro);

## Description

## Details

### enum UnicapgtkDeviceStateFlags

    typedef enum
    {
       UNICAPGTK_DEVICE_STATE_VIDEO_FORMAT = 1 << 0,
       UNICAPGTK_DEVICE_STATE_PROPERTIES   = 1 << 1,
    }UnicapgtkDeviceStateFlags;

UnicapgtkDeviceStateFlags

### unicapgtk_get_user_config_path ()

    gchar*              unicapgtk_get_user_config_path      (void);

Get path to the directory containing the configuration files

Returns :

  Path to configuration directory

unicapgtk_get_user_config_path

### unicapgtk_save_device_state ()

    GKeyFile*           unicapgtk_save_device_state         (unicap_handle_t handle,
                                                             UnicapgtkDeviceStateFlags flags);

Saves the current device state. If UNICAPGTK_DEVICE_STATE_VIDEO_FORMAT is set in the flags field, a section containing information about the current video format is added to the configuration file. If UNICAPGTK_DEVICE_STATE_PROPERTIES is set, a section containing the current state of the device properties is added to the configuration file.

handle :

  unicap handle

flags :

  flags

Returns :

  A newly allocated GKeyfile. Must be freed with `g_key_file_free()` by the application.

unicapgtk_save_device_state

### unicapgtk_load_device_state ()

    gboolean            unicapgtk_load_device_state         (unicap_handle_t handle,
                                                             GKeyFile *keyfile,
                                                             UnicapgtkDeviceStateFlags flags);

handle :

  handle of the device

keyfile :

  GKeyFile to load the device state information from

flags :

  UnicapgtkDeviceStateFlags specifying what parts to configure Reads device state information from a key-file and sets the parameters of a device accordingly.

Returns :

unicapgtk_load_device_state

### unicapgtk_check_version ()

    unicap_status_t     unicapgtk_check_version             (unsigned int major,
                                                             unsigned int minor,
                                                             unsigned int micro);

Checks whether the installed library version is newer or equal to the given version

major :

  Major version to check

minor :

  Minor version to check

micro :

  Micro version to check

Returns :

  STATUS_INCOMPATIBLE_MAJOR_VERSION if the given major version is too old STATUS_INCOMPATIBLE_MINOR_VERSION if the given minor version is too old STATUS_INCOMPATIBLE_MACRO_VERSION if the given macro version is too old STATUS_SUCCESS if the version is compatible

unicapgtk_check_version