## AgsLv2OptionManager

AgsLv2OptionManager — option manager

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_LV2_OPTION_MANAGER_GET_OBJ_MUTEX()
#define | AGS_LV2_OPTION_RESSOURCE()
#define | AGS_LV2_OPTIONS_OPTION()
AgsLv2OptionRessource * | ags_lv2_option_ressource_alloc ()
gboolean | ags_lv2_option_manager_ressource_insert ()
gboolean | ags_lv2_option_manager_ressource_remove ()
gpointer | ags_lv2_option_manager_ressource_lookup ()
gboolean | ags_lv2_option_manager_ressource_lookup_extended ()
void | ags_lv2_option_manager_get_option ()
void | ags_lv2_option_manager_set_option ()
uint32_t | ags_lv2_option_manager_lv2_options_get ()
uint32_t | ags_lv2_option_manager_lv2_options_set ()
AgsLv2OptionManager * | ags_lv2_option_manager_get_instance ()
AgsLv2OptionManager * | ags_lv2_option_manager_new ()

## Signals

void | get-option | Run Last
void | set-option | Run Last

## Types and Values

struct | AgsLv2OptionRessource

## Object Hierarchy

        GObject
        ╰── AgsLv2OptionManager

## Includes

    #include <ags/plugin/ags_lv2_option_manager.h>

## Description

The AgsLv2OptionManager gives you access to plugin instances global configuration. And stores instance related ressources.

## Functions

### AGS_LV2_OPTION_MANAGER_GET_OBJ_MUTEX()

    #define AGS_LV2_OPTION_MANAGER_GET_OBJ_MUTEX(obj) (&(((AgsLv2OptionManager *) obj)->obj_mutex))

### AGS_LV2_OPTION_RESSOURCE()

    #define AGS_LV2_OPTION_RESSOURCE(ptr) ((AgsLv2OptionRessource *)(ptr))

### AGS_LV2_OPTIONS_OPTION()

    #define AGS_LV2_OPTIONS_OPTION(ptr) ((LV2_Options_Option *)(ptr))

### ags_lv2_option_ressource_alloc ()

    AgsLv2OptionRessource *
    ags_lv2_option_ressource_alloc ();

Allocate an AgsLv2OptionRessource.

#### Returns

the newly created AgsLv2OptionRessource.

[type gpointer][transfer none]

Since: 3.0.0

### ags_lv2_option_manager_ressource_insert ()

    gboolean
    ags_lv2_option_manager_ressource_insert
                                   (AgsLv2OptionManager *lv2_option_manager,
                                    AgsLv2OptionRessource *lv2_option_ressource,
                                    gpointer data);

Inserts a data into hash associated with `lv2_option_ressource` .

#### Parameters

lv2_option_manager | the AgsLv2OptionManager |
lv2_option_ressource | the AgsLv2OptionRessource as key. | [type gpointer][transfer none]
data | the data |

#### Returns

`TRUE` on success, otherwise `FALSE`

Since: 3.0.0

### ags_lv2_option_manager_ressource_remove ()

    gboolean
    ags_lv2_option_manager_ressource_remove
                                   (AgsLv2OptionManager *lv2_option_manager,
                                    AgsLv2OptionRessource *lv2_option_ressource);

Removes an entry associated with `lv2_option_ressource` .

#### Parameters

lv2_option_manager | the AgsLv2OptionManager |
lv2_option_ressource | the struct to remove. | [type gpointer][transfer none]

#### Returns

`TRUE` as successfully removed, otherwise `FALSE`

Since: 3.0.0

### ags_lv2_option_manager_ressource_lookup ()

    gpointer
    ags_lv2_option_manager_ressource_lookup
                                   (AgsLv2OptionManager *lv2_option_manager,
                                    AgsLv2OptionRessource *lv2_option_ressource);

Lookup a ressource associated with `lv2_option_ressource` in `lv2_option_manager` .

#### Parameters

lv2_option_manager | the AgsLv2OptionManager |
lv2_option_ressource | the AgsLv2OptionRessource to lookup. | [type gpointer][transfer none]

#### Returns

the pointer on success, else NULL

Since: 3.0.0

### ags_lv2_option_manager_ressource_lookup_extended ()

    gboolean
    ags_lv2_option_manager_ressource_lookup_extended
                                   (AgsLv2OptionManager *lv2_option_manager,
                                    AgsLv2OptionRessource *lv2_option_ressource,
                                    gpointer *orig_key,
                                    gpointer *value);

Lookup a ressource associated with `lv2_option_ressource` in `lv2_option_manager` .

#### Parameters

lv2_option_manager | the AgsLv2OptionManager |
lv2_option_ressource | the AgsLv2OptionRessource to lookup |
orig_key | the original key found |
value | the matched value |

#### Returns

`TRUE` if ressource found, else `FALSE`

Since: 3.0.0

### ags_lv2_option_manager_get_option ()

    void
    ags_lv2_option_manager_get_option (AgsLv2OptionManager *lv2_option_manager,
                                       gpointer instance,
                                       gpointer option,
                                       gpointer retval);

Get option.

#### Parameters

lv2_option_manager | the AgsLv2OptionManager |
instance | the instance |
option | the option |
retval | return value for LV2_Options_Status |

Since: 3.0.0

### ags_lv2_option_manager_set_option ()

    void
    ags_lv2_option_manager_set_option (AgsLv2OptionManager *lv2_option_manager,
                                       gpointer instance,
                                       gpointer option,
                                       gpointer retval);

Set option.

#### Parameters

lv2_option_manager | the AgsLv2OptionManager |
instance | the instance |
option | the option |
retval | return value for LV2_Options_Status |

Since: 3.0.0

### ags_lv2_option_manager_lv2_options_get ()

    uint32_t
    ags_lv2_option_manager_lv2_options_get
                                   (LV2_Handle instance,
                                    LV2_Options_Option *options);

The LV2 options interface's get method.

#### Parameters

instance | the lv2 instance |
options | the LV2_Options |

Since: 3.0.0

### ags_lv2_option_manager_lv2_options_set ()

    uint32_t
    ags_lv2_option_manager_lv2_options_set
                                   (LV2_Handle instance,
                                    LV2_Options_Option *options);

The LV2 options interface's set method.

#### Parameters

instance | the lv2 instance |
options | the LV2_Options |

Since: 3.0.0

### ags_lv2_option_manager_get_instance ()

    AgsLv2OptionManager *
    ags_lv2_option_manager_get_instance ();

Singleton function to optain the id manager instance.

#### Returns

an instance of AgsLv2OptionManager.

[transfer none]

Since: 3.0.0

### ags_lv2_option_manager_new ()

    AgsLv2OptionManager *
    ags_lv2_option_manager_new ();

Instantiate a id manager.

#### Returns

a new AgsLv2OptionManager

Since: 3.0.0

## Types and Values

### struct AgsLv2OptionRessource

    struct AgsLv2OptionRessource {
      LV2_Handle instance;
      LV2_Options_Option *option;
    };

## Signal Details

### The `“get-option”` signal

    void
    user_function (AgsLv2OptionManager *lv2_option_manager,
                   gpointer             intstance,
                   gpointer             option,
                   gpointer             retval,
                   gpointer             user_data)

The ::get-option signal gets options of the manager.

#### Parameters

lv2_option_manager | the plugin to instantiate |
intstance | the LV2 plugin instance |
option | the LV2 option pointer |
retval | the location of the return value |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.0.0

### The `“set-option”` signal

    void
    user_function (AgsLv2OptionManager *lv2_option_manager,
                   gpointer             intstance,
                   gpointer             option,
                   gpointer             retval,
                   gpointer             user_data)

The ::set-option signal sets options for the manager.

#### Parameters

lv2_option_manager | the plugin to instantiate |
intstance | the LV2 plugin instance |
option | the LV2 option pointer |
retval | the location of the return value |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.0.0