Wp.Conf¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
The name of the configuration file |
||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Wp.Conf(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Wp.Confallows accessing the different sections of the wireplumber configuration.- classmethod new(name, properties)¶
- Parameters:
name (
str) – the name of the configuration fileproperties (
Wp.PropertiesorNone) – aWp.Propertieswith keys specifying how to load theWp.Confobject
- Returns:
a new
Wp.Confobject- Return type:
Creates a new
Wp.Confobject.This does not open the files, it only creates the object. For most use cases, you should use
Wp.Conf.new_open() instead.
- classmethod new_open(name, properties)¶
- Parameters:
name (
str) – the name of the configuration fileproperties (
Wp.PropertiesorNone) – aWp.Propertieswith keys specifying how to load theWp.Confobject
- Raises:
- Returns:
- Return type:
Creates a new
Wp.Confobject and opens the configuration file and its fragments, keeping them mapped in memory for further access.
- close()¶
Closes the configuration file and its fragments.
- get_name()¶
- Returns:
the name of the configuration file
- Return type:
Gets the name of the configuration file.
- get_section(section)¶
- Parameters:
section (
str) – the section name- Returns:
the JSON value of the section or
Noneif the section does not exist- Return type:
Wp.SpaJsonorNone
This method will get the JSON value of a specific section from the configuration. If the same section is defined in multiple locations, the sections with the same name will be either merged in case of arrays and objects, or overridden in case of boolean, int, double and strings.
- is_open()¶
-
Tests if the configuration files are open.
- open()¶
- Raises:
- Returns:
- Return type:
Opens the configuration file and its fragments and keeps them mapped in memory for further access.
- parse_pw_context_sections(context)¶
-
Parses standard pw_context sections from conf.
- section_update_props(section, props)¶
- Parameters:
section (
str) – the section nameprops (
Wp.Properties) – the properties to update
- Returns:
the number of properties updated
- Return type:
Updates the given properties with the values of a specific section from the configuration.
Property Details¶
- Wp.Conf.props.name¶
- Name:
name- Type:
- Default Value:
- Flags:
The name of the configuration file
- Wp.Conf.props.properties¶
- Name:
properties- Type:
- Default Value:
- Flags: