WpProperties

WpProperties is a data structure that contains string key-value pairs, which are used to send/receive/attach arbitrary properties to PipeWire objects.

This could be thought of as a hash table with strings as both keys and values. However, the reason that this class exists instead of using GHashTable directly is that in reality it wraps the PipeWire native struct spa_dict and struct pw_properties and therefore it can be easily passed to PipeWire function calls that require a struct spa_dict * or a struct pw_properties * as arguments. Or alternatively, it can easily wrap a struct spa_dict * or a struct pw_properties * that was given from the PipeWire API without necessarily doing an expensive copy operation.

WpProperties normally wraps a struct pw_properties, unless it was created with wp_properties_new_wrap_dict, in which case it wraps a struct spa_dict and it is immutable (you cannot add/remove/modify any key-value pair).

In most cases, it actually owns the struct pw_properties internally and manages its lifetime. The exception to that rule is when WpProperties is constructed with wp_properties_new_wrap, in which case the ownership of the struct pw_properties remains outside. This must be used with care, as the struct pw_properties may be free'ed externally.

WpProperties is reference-counted with wp_properties_ref and wp_properties_unref.

WpProperties


Wp.Properties


Wp.Properties


Constructors

wp_properties_new

WpProperties *
wp_properties_new (const gchar * key,
                   ... ...)

Constructs a new properties set that contains the given properties

Parameters:

key

a property name

...

a property value, followed by any number of further property key-value pairs, followed by NULL

Returns ( [transfer: full] ) –

the newly constructed properties set


wp_properties_new_copy

WpProperties *
wp_properties_new_copy (const pw_properties* props)

Constructs a new WpProperties that contains a copy of all the properties contained in the given props structure.

Parameters:

props

a native pw_properties structure to copy

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_copy

def Wp.Properties.new_copy (props):
    #python wrapper for 'wp_properties_new_copy'

Constructs a new Wp.Properties that contains a copy of all the properties contained in the given props structure.

Parameters:

props ( object ) –

a native pw_properties structure to copy

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_copy

function Wp.Properties.prototype.new_copy(props: Object): {
    // javascript wrapper for 'wp_properties_new_copy'
}

Constructs a new Wp.Properties that contains a copy of all the properties contained in the given props structure.

Parameters:

props ( Object ) –

a native pw_properties structure to copy

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_new_copy_dict

WpProperties *
wp_properties_new_copy_dict (const spa_dict* dict)

Constructs a new WpProperties that contains a copy of all the properties contained in the given dict structure.

Parameters:

dict

a native spa_dict structure to copy

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_copy_dict

def Wp.Properties.new_copy_dict (dict):
    #python wrapper for 'wp_properties_new_copy_dict'

Constructs a new Wp.Properties that contains a copy of all the properties contained in the given dict structure.

Parameters:

dict ( object ) –

a native spa_dict structure to copy

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_copy_dict

function Wp.Properties.prototype.new_copy_dict(dict: Object): {
    // javascript wrapper for 'wp_properties_new_copy_dict'
}

Constructs a new Wp.Properties that contains a copy of all the properties contained in the given dict structure.

Parameters:

dict ( Object ) –

a native spa_dict structure to copy

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_new_empty

WpProperties *
wp_properties_new_empty ()

Creates a new empty properties set

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_empty

def Wp.Properties.new_empty ():
    #python wrapper for 'wp_properties_new_empty'

Creates a new empty properties set

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_empty

function Wp.Properties.prototype.new_empty(): {
    // javascript wrapper for 'wp_properties_new_empty'
}

Creates a new empty properties set

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_new_string

WpProperties *
wp_properties_new_string (const gchar * str)

Constructs a new properties set that contains the properties that can be parsed from the given string

Parameters:

str

a string containing a whitespace separated list of key=value pairs (ex. "key1=value1 key2=value2")

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_string

def Wp.Properties.new_string (str):
    #python wrapper for 'wp_properties_new_string'

Constructs a new properties set that contains the properties that can be parsed from the given string

Parameters:

str ( str ) –

a string containing a whitespace separated list of key=value pairs (ex. "key1=value1 key2=value2")

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_string

function Wp.Properties.prototype.new_string(str: String): {
    // javascript wrapper for 'wp_properties_new_string'
}

Constructs a new properties set that contains the properties that can be parsed from the given string

Parameters:

str ( String ) –

a string containing a whitespace separated list of key=value pairs (ex. "key1=value1 key2=value2")

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_new_take

WpProperties *
wp_properties_new_take (pw_properties* props)

Constructs a new WpProperties that wraps the given props structure, allowing reading & writing properties on that props structure through the WpProperties API.

In constrast with wp_properties_new_wrap, this function assumes ownership of the props structure, so it will try to free props when it is destroyed.

Parameters:

props

a native pw_properties structure to wrap

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_take

def Wp.Properties.new_take (props):
    #python wrapper for 'wp_properties_new_take'

Constructs a new Wp.Properties that wraps the given props structure, allowing reading & writing properties on that props structure through the Wp.Properties API.

In constrast with Wp.Properties.new_wrap, this function assumes ownership of the props structure, so it will try to free props when it is destroyed.

Parameters:

props ( object ) –

a native pw_properties structure to wrap

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_take

function Wp.Properties.prototype.new_take(props: Object): {
    // javascript wrapper for 'wp_properties_new_take'
}

Constructs a new Wp.Properties that wraps the given props structure, allowing reading & writing properties on that props structure through the Wp.Properties API.

In constrast with Wp.Properties.prototype.new_wrap, this function assumes ownership of the props structure, so it will try to free props when it is destroyed.

Parameters:

props ( Object ) –

a native pw_properties structure to wrap

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_new_valist

WpProperties *
wp_properties_new_valist (const gchar * key,
                          va_list args)

This is the va_list version of wp_properties_new

Parameters:

key

a property name

args

the variable arguments passed to wp_properties_new

Returns ( [transfer: full] ) –

the newly constructed properties set


wp_properties_new_wrap

WpProperties *
wp_properties_new_wrap (pw_properties* props)

Constructs a new WpProperties that wraps the given props structure, allowing reading & writing properties on that props structure through the WpProperties API.

Care must be taken when using this function, since the returned WpProperties object does not own the props structure. Therefore, if the owner decides to free props, the returned WpProperties will crash when used. In addition, the returned WpProperties object will not try to free props when destroyed.

Parameters:

props

a native pw_properties structure to wrap

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_wrap

def Wp.Properties.new_wrap (props):
    #python wrapper for 'wp_properties_new_wrap'

Constructs a new Wp.Properties that wraps the given props structure, allowing reading & writing properties on that props structure through the Wp.Properties API.

Care must be taken when using this function, since the returned Wp.Properties object does not own the props structure. Therefore, if the owner decides to free props, the returned Wp.Properties will crash when used. In addition, the returned Wp.Properties object will not try to free props when destroyed.

Parameters:

props ( object ) –

a native pw_properties structure to wrap

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_wrap

function Wp.Properties.prototype.new_wrap(props: Object): {
    // javascript wrapper for 'wp_properties_new_wrap'
}

Constructs a new Wp.Properties that wraps the given props structure, allowing reading & writing properties on that props structure through the Wp.Properties API.

Care must be taken when using this function, since the returned Wp.Properties object does not own the props structure. Therefore, if the owner decides to free props, the returned Wp.Properties will crash when used. In addition, the returned Wp.Properties object will not try to free props when destroyed.

Parameters:

props ( Object ) –

a native pw_properties structure to wrap

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_new_wrap_dict

WpProperties *
wp_properties_new_wrap_dict (const spa_dict* dict)

Constructs a new WpProperties that wraps the given dict structure, allowing reading properties from that dict through the WpProperties API.

Note that the returned object does not own the dict, so care must be taken not to free it externally while this WpProperties object is alive.

In addition, note that the returned WpProperties object is immutable. That means that you cannot add or modify any properties on it, since there is no defined method for modifying a struct spa_dict. If you need to change this properties set later, you should make a copy with wp_properties_copy.

Parameters:

dict

a native spa_dict structure to wrap

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.new_wrap_dict

def Wp.Properties.new_wrap_dict (dict):
    #python wrapper for 'wp_properties_new_wrap_dict'

Constructs a new Wp.Properties that wraps the given dict structure, allowing reading properties from that dict through the Wp.Properties API.

Note that the returned object does not own the dict, so care must be taken not to free it externally while this Wp.Properties object is alive.

In addition, note that the returned Wp.Properties object is immutable. That means that you cannot add or modify any properties on it, since there is no defined method for modifying a struct spa_dict. If you need to change this properties set later, you should make a copy with Wp.Properties.copy.

Parameters:

dict ( object ) –

a native spa_dict structure to wrap

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.new_wrap_dict

function Wp.Properties.prototype.new_wrap_dict(dict: Object): {
    // javascript wrapper for 'wp_properties_new_wrap_dict'
}

Constructs a new Wp.Properties that wraps the given dict structure, allowing reading properties from that dict through the Wp.Properties API.

Note that the returned object does not own the dict, so care must be taken not to free it externally while this Wp.Properties object is alive.

In addition, note that the returned Wp.Properties object is immutable. That means that you cannot add or modify any properties on it, since there is no defined method for modifying a struct spa_dict. If you need to change this properties set later, you should make a copy with Wp.Properties.prototype.copy.

Parameters:

dict ( Object ) –

a native spa_dict structure to wrap

Returns ( Wp.Properties ) –

the newly constructed properties set


Methods

wp_properties_add

gint
wp_properties_add (WpProperties * self,
                   WpProperties * props)

Adds new properties in self, using the given props as a source. Properties (keys) from props that are already contained in self are not modified, unlike what happens with wp_properties_update. Properties in self that are not contained in props are left untouched.

Parameters:

self

a properties object

props

a properties set that contains properties to add

Returns

the number of properties that were changed


Wp.Properties.add

def Wp.Properties.add (self, props):
    #python wrapper for 'wp_properties_add'

Adds new properties in self, using the given props as a source. Properties (keys) from props that are already contained in self are not modified, unlike what happens with Wp.Properties.update. Properties in self that are not contained in props are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

props ( Wp.Properties ) –

a properties set that contains properties to add

Returns ( int ) –

the number of properties that were changed


Wp.Properties.prototype.add

function Wp.Properties.prototype.add(props: Wp.Properties): {
    // javascript wrapper for 'wp_properties_add'
}

Adds new properties in self, using the given props as a source. Properties (keys) from props that are already contained in self are not modified, unlike what happens with Wp.Properties.prototype.update. Properties in self that are not contained in props are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

props ( Wp.Properties ) –

a properties set that contains properties to add

Returns ( Number ) –

the number of properties that were changed


wp_properties_add_from_dict

gint
wp_properties_add_from_dict (WpProperties * self,
                             const spa_dict* dict)

Adds new properties in self, using the given dict as a source. Properties (keys) from dict that are already contained in self are not modified, unlike what happens with wp_properties_update_from_dict. Properties in self that are not contained in dict are left untouched.

Parameters:

self

a properties object

dict

a spa_dict that contains properties to add

Returns

the number of properties that were changed


Wp.Properties.add_from_dict

def Wp.Properties.add_from_dict (self, dict):
    #python wrapper for 'wp_properties_add_from_dict'

Adds new properties in self, using the given dict as a source. Properties (keys) from dict that are already contained in self are not modified, unlike what happens with Wp.Properties.update_from_dict. Properties in self that are not contained in dict are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

dict ( object ) –

a spa_dict that contains properties to add

Returns ( int ) –

the number of properties that were changed


Wp.Properties.prototype.add_from_dict

function Wp.Properties.prototype.add_from_dict(dict: Object): {
    // javascript wrapper for 'wp_properties_add_from_dict'
}

Adds new properties in self, using the given dict as a source. Properties (keys) from dict that are already contained in self are not modified, unlike what happens with Wp.Properties.prototype.update_from_dict. Properties in self that are not contained in dict are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

dict ( Object ) –

a spa_dict that contains properties to add

Returns ( Number ) –

the number of properties that were changed


wp_properties_add_keys

gint
wp_properties_add_keys (WpProperties * self,
                        WpProperties * props,
                        const gchar * key1,
                        ... ...)

Adds new properties in self, using the given props as a source. Unlike wp_properties_add, this function only adds properties that have one of the specified keys; the rest is left untouched.

Parameters:

self

a properties set

props

a properties set that contains properties to add

key1

a property to add

...

a list of additional properties to add, followed by NULL

Returns

the number of properties that were changed


wp_properties_add_keys_array

gint
wp_properties_add_keys_array (WpProperties * self,
                              WpProperties * props,
                              const gchar ** keys)

The same as wp_properties_add_keys, using a NULL-terminated array for specifying the keys to add

Parameters:

self

a properties set

props

a properties set that contains properties to add

keys ( [array zero-terminated=1] ) –

the properties to add

Returns

the number of properties that were changed


Wp.Properties.add_keys_array

def Wp.Properties.add_keys_array (self, props, keys):
    #python wrapper for 'wp_properties_add_keys_array'

The same as wp_properties_add_keys (not introspectable), using a NULL-terminated array for specifying the keys to add

Parameters:

self ( Wp.Properties ) –

a properties set

props ( Wp.Properties ) –

a properties set that contains properties to add

keys ( [ str ] ) –

the properties to add

Returns ( int ) –

the number of properties that were changed


Wp.Properties.prototype.add_keys_array

function Wp.Properties.prototype.add_keys_array(props: Wp.Properties, keys: [ String ]): {
    // javascript wrapper for 'wp_properties_add_keys_array'
}

The same as wp_properties_add_keys (not introspectable), using a NULL-terminated array for specifying the keys to add

Parameters:

self ( Wp.Properties ) –

a properties set

props ( Wp.Properties ) –

a properties set that contains properties to add

keys ( [ String ] ) –

the properties to add

Returns ( Number ) –

the number of properties that were changed


wp_properties_add_keys_from_dict

gint
wp_properties_add_keys_from_dict (WpProperties * self,
                                  const spa_dict* dict,
                                  const gchar * key1,
                                  ... ...)

Adds new properties in self, using the given dict as a source. Unlike wp_properties_add_from_dict, this function only adds properties that have one of the specified keys; the rest is left untouched.

Parameters:

self

a properties set

dict

a spa_dict that contains properties to add

key1

a property to add

...

a list of additional properties to add, followed by NULL

Returns

the number of properties that were changed


wp_properties_copy

WpProperties *
wp_properties_copy (WpProperties * other)

Constructs and returns a new WpProperties object that contains a copy of all the properties contained in other.

Parameters:

other

a properties object

Returns ( [transfer: full] ) –

the newly constructed properties set


Wp.Properties.copy

def Wp.Properties.copy (self):
    #python wrapper for 'wp_properties_copy'

Constructs and returns a new Wp.Properties object that contains a copy of all the properties contained in other.

Parameters:

other ( Wp.Properties ) –

a properties object

Returns ( Wp.Properties ) –

the newly constructed properties set


Wp.Properties.prototype.copy

function Wp.Properties.prototype.copy(): {
    // javascript wrapper for 'wp_properties_copy'
}

Constructs and returns a new Wp.Properties object that contains a copy of all the properties contained in other.

Parameters:

other ( Wp.Properties ) –

a properties object

Returns ( Wp.Properties ) –

the newly constructed properties set


wp_properties_ensure_unique_owner

WpProperties *
wp_properties_ensure_unique_owner (WpProperties * self)

Ensures that the given properties set is uniquely owned, which means:

  • its reference count is 1
  • it is not wrapping a native spa_dict or pw_properties object

If self is not uniquely owned already, then it is unrefed and a copy of it is returned instead. You should always consider self as unsafe to use after this call and you should use the returned object instead.

Parameters:

self ( [transfer: full] ) –

a properties object

Returns ( [transfer: full] ) –

the uniquely owned properties object


Wp.Properties.ensure_unique_owner

def Wp.Properties.ensure_unique_owner (self):
    #python wrapper for 'wp_properties_ensure_unique_owner'

Ensures that the given properties set is uniquely owned, which means:

  • its reference count is 1
  • it is not wrapping a native spa_dict or pw_properties object

If self is not uniquely owned already, then it is unrefed and a copy of it is returned instead. You should always consider self as unsafe to use after this call and you should use the returned object instead.

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Wp.Properties ) –

the uniquely owned properties object


Wp.Properties.prototype.ensure_unique_owner

function Wp.Properties.prototype.ensure_unique_owner(): {
    // javascript wrapper for 'wp_properties_ensure_unique_owner'
}

Ensures that the given properties set is uniquely owned, which means:

  • its reference count is 1
  • it is not wrapping a native spa_dict or pw_properties object

If self is not uniquely owned already, then it is unrefed and a copy of it is returned instead. You should always consider self as unsafe to use after this call and you should use the returned object instead.

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Wp.Properties ) –

the uniquely owned properties object


wp_properties_get

const gchar *
wp_properties_get (WpProperties * self,
                   const gchar * key)

Parameters:

self

a properties object

key

a property key

Returns ( [transfer: none] [nullable] ) –

the value of the property identified with key, or NULL if this property is not contained in self


Wp.Properties.get

def Wp.Properties.get (self, key):
    #python wrapper for 'wp_properties_get'

Parameters:

self ( Wp.Properties ) –

a properties object

key ( str ) –

a property key

Returns ( str ) –

the value of the property identified with key, or None if this property is not contained in self


Wp.Properties.prototype.get

function Wp.Properties.prototype.get(key: String): {
    // javascript wrapper for 'wp_properties_get'
}

Parameters:

self ( Wp.Properties ) –

a properties object

key ( String ) –

a property key

Returns ( String ) –

the value of the property identified with key, or null if this property is not contained in self


wp_properties_iterate

WpIterator *
wp_properties_iterate (WpProperties * self)

Parameters:

self

a properties object

Returns ( [transfer: full] ) –

an iterator that iterates over the properties. Use wp_properties_iterator_item_get_key and wp_properties_iterator_item_get_value to parse the items returned by this iterator.


Wp.Properties.iterate

def Wp.Properties.iterate (self):
    #python wrapper for 'wp_properties_iterate'

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Wp.Iterator ) –

an iterator that iterates over the properties. Use Wp.Properties.iterator_item_get_key and Wp.Properties.iterator_item_get_value to parse the items returned by this iterator.


Wp.Properties.prototype.iterate

function Wp.Properties.prototype.iterate(): {
    // javascript wrapper for 'wp_properties_iterate'
}

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Wp.Iterator ) –

an iterator that iterates over the properties. Use Wp.Properties.prototype.iterator_item_get_key and Wp.Properties.prototype.iterator_item_get_value to parse the items returned by this iterator.


wp_properties_matches

gboolean
wp_properties_matches (WpProperties * self,
                       WpProperties * other)

Checks if the property values contained in other are matching with the values in self.

If a property is contained in one set and not the other, the result is not affected. If a property is contained in both sets, then the value of the property in other is interpreted as a glob-style pattern (using g_pattern_match_simple) and the value in self is checked to see if it matches with this pattern.

Parameters:

self

a properties object

other

a set of properties to match

Returns

TRUE if all matches were successfull, FALSE if at least one property value did not match


Wp.Properties.matches

def Wp.Properties.matches (self, other):
    #python wrapper for 'wp_properties_matches'

Checks if the property values contained in other are matching with the values in self.

If a property is contained in one set and not the other, the result is not affected. If a property is contained in both sets, then the value of the property in other is interpreted as a glob-style pattern (using GLib.pattern_match_simple) and the value in self is checked to see if it matches with this pattern.

Parameters:

self ( Wp.Properties ) –

a properties object

other ( Wp.Properties ) –

a set of properties to match

Returns ( bool ) –

True if all matches were successfull, False if at least one property value did not match


Wp.Properties.prototype.matches

function Wp.Properties.prototype.matches(other: Wp.Properties): {
    // javascript wrapper for 'wp_properties_matches'
}

Checks if the property values contained in other are matching with the values in self.

If a property is contained in one set and not the other, the result is not affected. If a property is contained in both sets, then the value of the property in other is interpreted as a glob-style pattern (using GLib.prototype.pattern_match_simple) and the value in self is checked to see if it matches with this pattern.

Parameters:

self ( Wp.Properties ) –

a properties object

other ( Wp.Properties ) –

a set of properties to match

Returns ( Number ) –

true if all matches were successfull, false if at least one property value did not match


wp_properties_peek_dict

const spa_dict*
wp_properties_peek_dict (WpProperties * self)

Parameters:

self

a properties object

Returns ( [transfer: none] ) –

the internal properties set as a struct spa_dict *


Wp.Properties.peek_dict

def Wp.Properties.peek_dict (self):
    #python wrapper for 'wp_properties_peek_dict'

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( object ) –

the internal properties set as a struct spa_dict *


Wp.Properties.prototype.peek_dict

function Wp.Properties.prototype.peek_dict(): {
    // javascript wrapper for 'wp_properties_peek_dict'
}

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Object ) –

the internal properties set as a struct spa_dict *


wp_properties_ref

WpProperties *
wp_properties_ref (WpProperties * self)

Parameters:

self

a properties object

Returns ( [transfer: full] ) –

self with an additional reference count on it


Wp.Properties.ref

def Wp.Properties.ref (self):
    #python wrapper for 'wp_properties_ref'

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Wp.Properties ) –

self with an additional reference count on it


Wp.Properties.prototype.ref

function Wp.Properties.prototype.ref(): {
    // javascript wrapper for 'wp_properties_ref'
}

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Wp.Properties ) –

self with an additional reference count on it


wp_properties_set

gint
wp_properties_set (WpProperties * self,
                   const gchar * key,
                   const gchar * value)

Sets the given property key - value pair on self. If the property already existed, the value is overwritten with the new one.

If the value is NULL, then the specified property is removed from self

Parameters:

self

a properties object

key

a property key

value ( [nullable] ) –

a property value

Returns

1 if the property was changed. 0 if nothing was changed because the property already existed with the same value or because the key to remove did not exist.


Wp.Properties.set

def Wp.Properties.set (self, key, value):
    #python wrapper for 'wp_properties_set'

Sets the given property key - value pair on self. If the property already existed, the value is overwritten with the new one.

If the value is None, then the specified property is removed from self

Parameters:

self ( Wp.Properties ) –

a properties object

key ( str ) –

a property key

value ( str ) –

a property value

Returns ( int ) –

1 if the property was changed. 0 if nothing was changed because the property already existed with the same value or because the key to remove did not exist.


Wp.Properties.prototype.set

function Wp.Properties.prototype.set(key: String, value: String): {
    // javascript wrapper for 'wp_properties_set'
}

Sets the given property key - value pair on self. If the property already existed, the value is overwritten with the new one.

If the value is null, then the specified property is removed from self

Parameters:

self ( Wp.Properties ) –

a properties object

key ( String ) –

a property key

value ( String ) –

a property value

Returns ( Number ) –

1 if the property was changed. 0 if nothing was changed because the property already existed with the same value or because the key to remove did not exist.


wp_properties_setf

gint
wp_properties_setf (WpProperties * self,
                    const gchar * key,
                    const gchar * format,
                    ... ...)

Formats the given format string with the specified arguments and sets the result as a value of the property specified with key

Parameters:

self

a properties object

key

a property key

format

a printf-style format to be formatted and set as a value for this property key

...

arguments for format

Returns

1 if the property was changed. 0 if nothing was changed because the property already existed with the same value


wp_properties_setf_valist

gint
wp_properties_setf_valist (WpProperties * self,
                           const gchar * key,
                           const gchar * format,
                           va_list args)

This is the va_list version of wp_properties_setf

Parameters:

self

a properties object

key

a property key

format

a printf-style format to be formatted and set as a value for this property key

args

the variable arguments passed to wp_properties_setf

Returns

1 if the property was changed. 0 if nothing was changed because the property already existed with the same value


wp_properties_to_pw_properties

pw_properties*
wp_properties_to_pw_properties (WpProperties * self)

Parameters:

self

a properties object

Returns ( [transfer: full] ) –

a copy of the properties in self as a struct pw_properties


Wp.Properties.to_pw_properties

def Wp.Properties.to_pw_properties (self):
    #python wrapper for 'wp_properties_to_pw_properties'

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( object ) –

a copy of the properties in self as a struct pw_properties


Wp.Properties.prototype.to_pw_properties

function Wp.Properties.prototype.to_pw_properties(): {
    // javascript wrapper for 'wp_properties_to_pw_properties'
}

Parameters:

self ( Wp.Properties ) –

a properties object

Returns ( Object ) –

a copy of the properties in self as a struct pw_properties


wp_properties_unref

wp_properties_unref (WpProperties * self)

Decreases the reference count on self and frees it when the ref count reaches zero.

Parameters:

self ( [transfer: full] ) –

a properties object


Wp.Properties.unref

def Wp.Properties.unref (self):
    #python wrapper for 'wp_properties_unref'

Decreases the reference count on self and frees it when the ref count reaches zero.

Parameters:

self ( Wp.Properties ) –

a properties object


Wp.Properties.prototype.unref

function Wp.Properties.prototype.unref(): {
    // javascript wrapper for 'wp_properties_unref'
}

Decreases the reference count on self and frees it when the ref count reaches zero.

Parameters:

self ( Wp.Properties ) –

a properties object


wp_properties_update

gint
wp_properties_update (WpProperties * self,
                      WpProperties * props)

Updates (adds new or modifies existing) properties in self, using the given props as a source. Any properties that are not contained in props are left untouched.

Parameters:

self

a properties object

props

a properties set that contains properties to update

Returns

the number of properties that were changed


Wp.Properties.update

def Wp.Properties.update (self, props):
    #python wrapper for 'wp_properties_update'

Updates (adds new or modifies existing) properties in self, using the given props as a source. Any properties that are not contained in props are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

props ( Wp.Properties ) –

a properties set that contains properties to update

Returns ( int ) –

the number of properties that were changed


Wp.Properties.prototype.update

function Wp.Properties.prototype.update(props: Wp.Properties): {
    // javascript wrapper for 'wp_properties_update'
}

Updates (adds new or modifies existing) properties in self, using the given props as a source. Any properties that are not contained in props are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

props ( Wp.Properties ) –

a properties set that contains properties to update

Returns ( Number ) –

the number of properties that were changed


wp_properties_update_from_dict

gint
wp_properties_update_from_dict (WpProperties * self,
                                const spa_dict* dict)

Updates (adds new or modifies existing) properties in self, using the given dict as a source. Any properties that are not contained in dict are left untouched.

Parameters:

self

a properties object

dict

a spa_dict that contains properties to update

Returns

the number of properties that were changed


Wp.Properties.update_from_dict

def Wp.Properties.update_from_dict (self, dict):
    #python wrapper for 'wp_properties_update_from_dict'

Updates (adds new or modifies existing) properties in self, using the given dict as a source. Any properties that are not contained in dict are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

dict ( object ) –

a spa_dict that contains properties to update

Returns ( int ) –

the number of properties that were changed


Wp.Properties.prototype.update_from_dict

function Wp.Properties.prototype.update_from_dict(dict: Object): {
    // javascript wrapper for 'wp_properties_update_from_dict'
}

Updates (adds new or modifies existing) properties in self, using the given dict as a source. Any properties that are not contained in dict are left untouched.

Parameters:

self ( Wp.Properties ) –

a properties object

dict ( Object ) –

a spa_dict that contains properties to update

Returns ( Number ) –

the number of properties that were changed


wp_properties_update_keys

gint
wp_properties_update_keys (WpProperties * self,
                           WpProperties * props,
                           const gchar * key1,
                           ... ...)

Updates (adds new or modifies existing) properties in self, using the given props as a source. Unlike wp_properties_update, this function only updates properties that have one of the specified keys; the rest is left untouched.

Parameters:

self

a properties set

props

a properties set that contains properties to update

key1

a property to update

...

a list of additional properties to update, followed by NULL

Returns

the number of properties that were changed


wp_properties_update_keys_array

gint
wp_properties_update_keys_array (WpProperties * self,
                                 WpProperties * props,
                                 const gchar ** keys)

The same as wp_properties_update_keys, using a NULL-terminated array for specifying the keys to update

Parameters:

self

a properties set

props

a properties set that contains properties to update

keys ( [array zero-terminated=1] ) –

the properties to update

Returns

the number of properties that were changed


Wp.Properties.update_keys_array

def Wp.Properties.update_keys_array (self, props, keys):
    #python wrapper for 'wp_properties_update_keys_array'

The same as wp_properties_update_keys (not introspectable), using a NULL-terminated array for specifying the keys to update

Parameters:

self ( Wp.Properties ) –

a properties set

props ( Wp.Properties ) –

a properties set that contains properties to update

keys ( [ str ] ) –

the properties to update

Returns ( int ) –

the number of properties that were changed


Wp.Properties.prototype.update_keys_array

function Wp.Properties.prototype.update_keys_array(props: Wp.Properties, keys: [ String ]): {
    // javascript wrapper for 'wp_properties_update_keys_array'
}

The same as wp_properties_update_keys (not introspectable), using a NULL-terminated array for specifying the keys to update

Parameters:

self ( Wp.Properties ) –

a properties set

props ( Wp.Properties ) –

a properties set that contains properties to update

keys ( [ String ] ) –

the properties to update

Returns ( Number ) –

the number of properties that were changed


wp_properties_update_keys_from_dict

gint
wp_properties_update_keys_from_dict (WpProperties * self,
                                     const spa_dict* dict,
                                     const gchar * key1,
                                     ... ...)

Updates (adds new or modifies existing) properties in self, using the given dict as a source. Unlike wp_properties_update_from_dict, this function only updates properties that have one of the specified keys; the rest is left untouched.

Parameters:

self

a properties set

dict

a spa_dict that contains properties to update

key1

a property to update

...

a list of additional properties to update, followed by NULL

Returns

the number of properties that were changed


Functions

wp_properties_iterator_item_get_key

const gchar *
wp_properties_iterator_item_get_key (const GValue * item)

Parameters:

item

a GValue that was returned from the WpIterator of wp_properties_iterate

Returns ( [transfer: none] ) –

the property key of the item


Wp.Properties.iterator_item_get_key

def Wp.Properties.iterator_item_get_key (item):
    #python wrapper for 'wp_properties_iterator_item_get_key'

Parameters:

item ( GObject.Value ) –

a GObject.Value that was returned from the Wp.Iterator of Wp.Properties.iterate

Returns ( str ) –

the property key of the item


Wp.Properties.prototype.iterator_item_get_key

function Wp.Properties.prototype.iterator_item_get_key(item: GObject.Value): {
    // javascript wrapper for 'wp_properties_iterator_item_get_key'
}

Parameters:

item ( GObject.Value ) –

a GObject.Value that was returned from the Wp.Iterator of Wp.Properties.prototype.iterate

Returns ( String ) –

the property key of the item


wp_properties_iterator_item_get_value

const gchar *
wp_properties_iterator_item_get_value (const GValue * item)

Parameters:

item

a GValue that was returned from the WpIterator of wp_properties_iterate

Returns ( [transfer: none] ) –

the property value of the item


Wp.Properties.iterator_item_get_value

def Wp.Properties.iterator_item_get_value (item):
    #python wrapper for 'wp_properties_iterator_item_get_value'

Parameters:

item ( GObject.Value ) –

a GObject.Value that was returned from the Wp.Iterator of Wp.Properties.iterate

Returns ( str ) –

the property value of the item


Wp.Properties.prototype.iterator_item_get_value

function Wp.Properties.prototype.iterator_item_get_value(item: GObject.Value): {
    // javascript wrapper for 'wp_properties_iterator_item_get_value'
}

Parameters:

item ( GObject.Value ) –

a GObject.Value that was returned from the Wp.Iterator of Wp.Properties.prototype.iterate

Returns ( String ) –

the property value of the item


Constants

WP_TYPE_PROPERTIES

#define WP_TYPE_PROPERTIES (wp_properties_get_type ())

The WpProperties GType


The results of the search are