Wp.Settings¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The metadata object to look after |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Wp.Settings(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Wp.Settings
loads and parses the “sm-settings” (default value) metadata, which contains wireplumber settings, and provides APIs to its clients (modules, lua scripts etc) to access them. Being aWp.Object
subclass, the settings inheritsWp.Object
's activation system.- classmethod find(core, metadata_name)¶
- Parameters:
- Returns:
the
Wp.Settings
object, orNone
if not found- Return type:
Wp.Settings
orNone
Finds a registered
Wp.Settings
object by its metadata name.
- classmethod new(core, metadata_name)¶
- Parameters:
- Returns:
a new
Wp.Settings
object- Return type:
Creates a new
Wp.Settings
object.
- delete(name)¶
- Parameters:
name (
str
) – the name of the saved setting to be deleted- Returns:
- Return type:
Deletes a saved setting to not make it persistent after reboot.
- delete_all()¶
Deletes all saved setting to not make them persistent after reboot.
- get(name)¶
- Parameters:
name (
str
) – the name of the setting- Returns:
The
Wp.SpaJson
value of the setting, orNone
if the setting does not exist- Return type:
Wp.SpaJson
orNone
Gets the
Wp.SpaJson
value of a setting.
- get_saved(name)¶
- Parameters:
name (
str
) – the name of the setting- Returns:
The
Wp.SpaJson
saved value of the setting, orNone
if the setting does not exist- Return type:
Wp.SpaJson
orNone
Gets the
Wp.SpaJson
saved value of a setting.
- get_spec(name)¶
- Parameters:
name (
str
) – the name of the setting- Returns:
the specification of the setting
- Return type:
Gets the specification of a setting.
- new_iterator()¶
- Returns:
an iterator that iterates over the settings.
- Return type:
Iterates over settings.
- reset(name)¶
- Parameters:
name (
str
) – the name of the setting to reset- Returns:
- Return type:
Resets the setting to its default value.
- reset_all()¶
Resets all the settings to their default value.
- save(name)¶
- Parameters:
name (
str
) – the name of the setting to be saved- Returns:
- Return type:
Saves a setting to make it persistent after reboot.
- save_all()¶
Saves all the settings to make them persistent after reboot.
- set(name, value)¶
- Parameters:
name (
str
) – the name of the settingvalue (
Wp.SpaJson
) – the JSON value of the setting
- Returns:
- Return type:
Sets a new setting value.
- subscribe(pattern, callback, *user_data)¶
- Parameters:
pattern (
str
) – name of the pattern to match the settings withcallback (
Wp.SettingsChangedCallback
) – the callback triggered when the settings change.
- Returns:
the subscription ID (always greater than 0 for successful subscriptions)
- Return type:
Subscribes callback for a given setting pattern(a glob-style pattern matched using
GLib.pattern_match_simple
), this allows clients to look for any changes made in settings through metadata.
- subscribe_closure(pattern, closure)¶
- Parameters:
pattern (
str
) – name of the pattern to match the settings withclosure (
GObject.Closure
orNone
) – aGio.AsyncReadyCallback
wrapped in aGObject.Closure
- Returns:
the subscription ID (always greater than 0 for success)
- Return type:
Subscribes callback for a given setting pattern(a glob-style pattern matched using
GLib.pattern_match_simple
), this allows clients to look for any changes made in settings through metadata.