WpSession

The WpSession class allows accessing the properties and methods of a PipeWire session object (struct pw_session from the session-manager extension).

A WpSession is constructed internally when a new session appears on the PipeWire registry and it is made available through the WpObjectManager API.

A WpImplSession allows implementing a session and exporting it to PipeWire, which is done by augmenting the WpImplSession with WP_PROXY_FEATURE_BOUND.

WpImplSession

GObject
    ╰──WpProxy
        ╰──WpSession
            ╰──WpImplSession

Class structure

WpImplSessionClass

Fields
parent_class (WpSessionClass) –
No description available

Wp.ImplSessionClass

Attributes
parent_class (Wp.SessionClass) –
No description available

Wp.ImplSessionClass

Attributes
parent_class (Wp.SessionClass) –
No description available

WpImplSession

GObject
    ╰──WpProxy
        ╰──WpSession
            ╰──WpImplSession

WpImplSession

GObject
    ╰──WpProxy
        ╰──WpSession
            ╰──WpImplSession

Constructors

wp_impl_session_new

WpImplSession *
wp_impl_session_new (WpCore * core)

Parameters:

core

the WpCore

Returns ( [transfer: full] ) –

the newly constructed session implementation


Wp.ImplSession.new

def Wp.ImplSession.new (core):
    #python wrapper for 'wp_impl_session_new'

Parameters:

core ( Wp.Core ) –

the Wp.Core

Returns ( Wp.ImplSession ) –

the newly constructed session implementation


Wp.ImplSession.prototype.new

function Wp.ImplSession.prototype.new(core: Wp.Core): {
    // javascript wrapper for 'wp_impl_session_new'
}

Parameters:

core ( Wp.Core ) –

the Wp.Core

Returns ( Wp.ImplSession ) –

the newly constructed session implementation


Methods

wp_impl_session_set_property

wp_impl_session_set_property (WpImplSession * self,
                              const gchar * key,
                              const gchar * value)

Sets the specified property on the PipeWire properties of the session.

If this property is set before exporting the session, then it is also used in the construction process of the session object and appears as a global property.

Parameters:

self

the session implementation

key

a property key

value

a property value


Wp.ImplSession.set_property

def Wp.ImplSession.set_property (self, key, value):
    #python wrapper for 'wp_impl_session_set_property'

Sets the specified property on the PipeWire properties of the session.

If this property is set before exporting the session, then it is also used in the construction process of the session object and appears as a global property.

Parameters:

self ( Wp.ImplSession ) –

the session implementation

key ( str ) –

a property key

value ( str ) –

a property value


Wp.ImplSession.prototype.set_property

function Wp.ImplSession.prototype.set_property(key: String, value: String): {
    // javascript wrapper for 'wp_impl_session_set_property'
}

Sets the specified property on the PipeWire properties of the session.

If this property is set before exporting the session, then it is also used in the construction process of the session object and appears as a global property.

Parameters:

self ( Wp.ImplSession ) –

the session implementation

key ( String ) –

a property key

value ( String ) –

a property value


wp_impl_session_update_properties

wp_impl_session_update_properties (WpImplSession * self,
                                   WpProperties * updates)

Adds or updates the values of the PipeWire properties of the session using the properties in updates as a source.

If the properties are set before exporting the session, then they are also used in the construction process of the session object and appear as global properties.

Parameters:

self

the session implementation

updates

a set of properties to add or update in the session's properties


Wp.ImplSession.update_properties

def Wp.ImplSession.update_properties (self, updates):
    #python wrapper for 'wp_impl_session_update_properties'

Adds or updates the values of the PipeWire properties of the session using the properties in updates as a source.

If the properties are set before exporting the session, then they are also used in the construction process of the session object and appear as global properties.

Parameters:

self ( Wp.ImplSession ) –

the session implementation

updates ( Wp.Properties ) –

a set of properties to add or update in the session's properties


Wp.ImplSession.prototype.update_properties

function Wp.ImplSession.prototype.update_properties(updates: Wp.Properties): {
    // javascript wrapper for 'wp_impl_session_update_properties'
}

Adds or updates the values of the PipeWire properties of the session using the properties in updates as a source.

If the properties are set before exporting the session, then they are also used in the construction process of the session object and appear as global properties.

Parameters:

self ( Wp.ImplSession ) –

the session implementation

updates ( Wp.Properties ) –

a set of properties to add or update in the session's properties


WpSession

GObject
    ╰──WpProxy
        ╰──WpSession
            ╰──WpImplSession

Members

parent_instance (WpProxy) –
No description available

Class structure

WpSessionClass

Fields
parent_class (WpProxyClass) –
No description available

Wp.SessionClass

Attributes
parent_class (Wp.ProxyClass) –
No description available

Wp.SessionClass

Attributes
parent_class (Wp.ProxyClass) –
No description available

WpSession

GObject
    ╰──WpProxy
        ╰──WpSession
            ╰──WpImplSession

Members

parent_instance (WpProxy) –
No description available

WpSession

GObject
    ╰──WpProxy
        ╰──WpSession
            ╰──WpImplSession

Members

parent_instance (WpProxy) –
No description available

Methods

wp_session_get_default_endpoint

guint32
wp_session_get_default_endpoint (WpSession * self,
                                 WpDirection direction)

Parameters:

self

the session

direction

the endpoint direction

Returns

the bound id of the default endpoint of this direction


Wp.Session.get_default_endpoint

def Wp.Session.get_default_endpoint (self, direction):
    #python wrapper for 'wp_session_get_default_endpoint'

Parameters:

self ( Wp.Session ) –

the session

direction ( Wp.Direction ) –

the endpoint direction

Returns ( int ) –

the bound id of the default endpoint of this direction


Wp.Session.prototype.get_default_endpoint

function Wp.Session.prototype.get_default_endpoint(direction: Wp.Direction): {
    // javascript wrapper for 'wp_session_get_default_endpoint'
}

Parameters:

self ( Wp.Session ) –

the session

direction ( Wp.Direction ) –

the endpoint direction

Returns ( Number ) –

the bound id of the default endpoint of this direction


wp_session_get_n_endpoints

guint
wp_session_get_n_endpoints (WpSession * self)

Requires WP_SESSION_FEATURE_ENDPOINTS

Parameters:

self

the session

Returns

the number of endpoints of this session


Wp.Session.get_n_endpoints

def Wp.Session.get_n_endpoints (self):
    #python wrapper for 'wp_session_get_n_endpoints'

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

Returns ( int ) –

the number of endpoints of this session


Wp.Session.prototype.get_n_endpoints

function Wp.Session.prototype.get_n_endpoints(): {
    // javascript wrapper for 'wp_session_get_n_endpoints'
}

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

Returns ( Number ) –

the number of endpoints of this session


wp_session_get_name

const gchar *
wp_session_get_name (WpSession * self)

Parameters:

self

the session

Returns ( [transfer: none] ) –

the (unique) name of the session


Wp.Session.get_name

def Wp.Session.get_name (self):
    #python wrapper for 'wp_session_get_name'

Parameters:

self ( Wp.Session ) –

the session

Returns ( str ) –

the (unique) name of the session


Wp.Session.prototype.get_name

function Wp.Session.prototype.get_name(): {
    // javascript wrapper for 'wp_session_get_name'
}

Parameters:

self ( Wp.Session ) –

the session

Returns ( String ) –

the (unique) name of the session


wp_session_iterate_endpoints

WpIterator *
wp_session_iterate_endpoints (WpSession * self)

Requires WP_SESSION_FEATURE_ENDPOINTS

Parameters:

self

the session

Returns ( [transfer: full] ) –

a WpIterator that iterates over all the endpoints that belong to this session


Wp.Session.iterate_endpoints

def Wp.Session.iterate_endpoints (self):
    #python wrapper for 'wp_session_iterate_endpoints'

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

Returns ( Wp.Iterator ) –

a Wp.Iterator that iterates over all the endpoints that belong to this session


Wp.Session.prototype.iterate_endpoints

function Wp.Session.prototype.iterate_endpoints(): {
    // javascript wrapper for 'wp_session_iterate_endpoints'
}

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

Returns ( Wp.Iterator ) –

a Wp.Iterator that iterates over all the endpoints that belong to this session


wp_session_iterate_endpoints_filtered

WpIterator *
wp_session_iterate_endpoints_filtered (WpSession * self,
                                       ... ...)

Requires WP_SESSION_FEATURE_ENDPOINTS

The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.

Parameters:

self

the session

...

a list of constraints, terminated by NULL

Returns ( [transfer: full] ) –

a WpIterator that iterates over all the endpoints that belong to this session and match the constraints


wp_session_iterate_endpoints_filtered_full

WpIterator *
wp_session_iterate_endpoints_filtered_full (WpSession * self,
                                            WpObjectInterest * interest)

Requires WP_SESSION_FEATURE_ENDPOINTS

Parameters:

self

the session

interest ( [transfer: full] ) –

the interest

Returns ( [transfer: full] ) –

a WpIterator that iterates over all the endpoints that belong to this session and match the interest


Wp.Session.iterate_endpoints_filtered_full

def Wp.Session.iterate_endpoints_filtered_full (self, interest):
    #python wrapper for 'wp_session_iterate_endpoints_filtered_full'

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

interest ( Wp.ObjectInterest ) –

the interest

Returns ( Wp.Iterator ) –

a Wp.Iterator that iterates over all the endpoints that belong to this session and match the interest


Wp.Session.prototype.iterate_endpoints_filtered_full

function Wp.Session.prototype.iterate_endpoints_filtered_full(interest: Wp.ObjectInterest): {
    // javascript wrapper for 'wp_session_iterate_endpoints_filtered_full'
}

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

interest ( Wp.ObjectInterest ) –

the interest

Returns ( Wp.Iterator ) –

a Wp.Iterator that iterates over all the endpoints that belong to this session and match the interest


wp_session_lookup_endpoint

WpEndpoint *
wp_session_lookup_endpoint (WpSession * self,
                            ... ...)

Requires WP_SESSION_FEATURE_ENDPOINTS

The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.

Parameters:

self

the session

...

a list of constraints, terminated by NULL

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

the first endpoint that matches the constraints, or NULL if there is no such endpoint


wp_session_lookup_endpoint_full

WpEndpoint *
wp_session_lookup_endpoint_full (WpSession * self,
                                 WpObjectInterest * interest)

Requires WP_SESSION_FEATURE_ENDPOINTS

Parameters:

self

the session

interest ( [transfer: full] ) –

the interest

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

the first endpoint that matches the interest, or NULL if there is no such endpoint


Wp.Session.lookup_endpoint_full

def Wp.Session.lookup_endpoint_full (self, interest):
    #python wrapper for 'wp_session_lookup_endpoint_full'

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

interest ( Wp.ObjectInterest ) –

the interest

Returns ( Wp.Endpoint ) –

the first endpoint that matches the interest, or None if there is no such endpoint


Wp.Session.prototype.lookup_endpoint_full

function Wp.Session.prototype.lookup_endpoint_full(interest: Wp.ObjectInterest): {
    // javascript wrapper for 'wp_session_lookup_endpoint_full'
}

Requires Wp.SessionFeatures.ENDPOINTS

Parameters:

self ( Wp.Session ) –

the session

interest ( Wp.ObjectInterest ) –

the interest

Returns ( Wp.Endpoint ) –

the first endpoint that matches the interest, or null if there is no such endpoint


wp_session_set_default_endpoint

wp_session_set_default_endpoint (WpSession * self,
                                 WpDirection direction,
                                 guint32 id)

Sets the default endpoint for this direction to be the one identified with id

Parameters:

self

the session

direction

the endpoint direction

id

the bound id of the endpoint to set as the default for this direction


Wp.Session.set_default_endpoint

def Wp.Session.set_default_endpoint (self, direction, id):
    #python wrapper for 'wp_session_set_default_endpoint'

Sets the default endpoint for this direction to be the one identified with id

Parameters:

self ( Wp.Session ) –

the session

direction ( Wp.Direction ) –

the endpoint direction

id ( int ) –

the bound id of the endpoint to set as the default for this direction


Wp.Session.prototype.set_default_endpoint

function Wp.Session.prototype.set_default_endpoint(direction: Wp.Direction, id: Number): {
    // javascript wrapper for 'wp_session_set_default_endpoint'
}

Sets the default endpoint for this direction to be the one identified with id

Parameters:

self ( Wp.Session ) –

the session

direction ( Wp.Direction ) –

the endpoint direction

id ( Number ) –

the bound id of the endpoint to set as the default for this direction


Signals

default-endpoint-changed

default_endpoint_changed_callback (WpSession * self,
                                   WpDirection * direction,
                                   guint id,
                                   gpointer user_data)

Emitted when the default endpoint of a specific direction changes. The passed id is the bound id (wp_proxy_get_bound_id) of the new default endpoint.

Parameters:

self

the session

direction

the endpoint direction

id

the endpoint's bound id

user_data
No description available

Flags: Run Last


default-endpoint-changed

def default_endpoint_changed_callback (self, direction, id, *user_data):
    #python callback for the 'default-endpoint-changed' signal

Emitted when the default endpoint of a specific direction changes. The passed id is the bound id (Wp.Proxy.get_bound_id) of the new default endpoint.

Parameters:

self ( Wp.Session ) –

the session

direction ( Wp.Direction ) –

the endpoint direction

id ( int ) –

the endpoint's bound id

user_data ( variadic ) –
No description available

Flags: Run Last


default-endpoint-changed

function default_endpoint_changed_callback(self: Wp.Session, direction: Wp.Direction, id: Number, user_data: Object): {
    // javascript callback for the 'default-endpoint-changed' signal
}

Emitted when the default endpoint of a specific direction changes. The passed id is the bound id (Wp.Proxy.prototype.get_bound_id) of the new default endpoint.

Parameters:

self ( Wp.Session ) –

the session

direction ( Wp.Direction ) –

the endpoint direction

id ( Number ) –

the endpoint's bound id

user_data ( Object ) –
No description available

Flags: Run Last


endpoints-changed

endpoints_changed_callback (WpSession * self,
                            gpointer user_data)

Emitted when the sessions's endpoints change. This is only emitted when WP_SESSION_FEATURE_ENDPOINTS is enabled.

Parameters:

self

the session

user_data
No description available

Flags: Run Last


endpoints-changed

def endpoints_changed_callback (self, *user_data):
    #python callback for the 'endpoints-changed' signal

Emitted when the sessions's endpoints change. This is only emitted when Wp.SessionFeatures.ENDPOINTS is enabled.

Parameters:

self ( Wp.Session ) –

the session

user_data ( variadic ) –
No description available

Flags: Run Last


endpoints-changed

function endpoints_changed_callback(self: Wp.Session, user_data: Object): {
    // javascript callback for the 'endpoints-changed' signal
}

Emitted when the sessions's endpoints change. This is only emitted when Wp.SessionFeatures.ENDPOINTS is enabled.

Parameters:

self ( Wp.Session ) –

the session

user_data ( Object ) –
No description available

Flags: Run Last


Enumerations

WpSessionFeatures

An extension of WpProxyFeatures

Members

WP_SESSION_FEATURE_ENDPOINTS (65536) –

caches information about endpoints, enabling the use of wp_session_get_n_endpoints, wp_session_lookup_endpoint, wp_session_iterate_endpoints and related methods

WP_SESSION_FEATURE_LINKS (131072) –

caches information about endpoint links, enabling the use of wp_session_get_n_links, wp_session_lookup_link, wp_session_iterate_links and related methods


Wp.SessionFeatures

An extension of Wp.ProxyFeatures

Members

Wp.SessionFeatures.ENDPOINTS (65536) –

caches information about endpoints, enabling the use of Wp.Session.get_n_endpoints, wp_session_lookup_endpoint (not introspectable), Wp.Session.iterate_endpoints and related methods

Wp.SessionFeatures.LINKS (131072) –

caches information about endpoint links, enabling the use of Wp.Session.get_n_links, wp_session_lookup_link (not introspectable), Wp.Session.iterate_links and related methods


Wp.SessionFeatures

An extension of Wp.ProxyFeatures

Members

Wp.SessionFeatures.ENDPOINTS (65536) –

caches information about endpoints, enabling the use of Wp.Session.prototype.get_n_endpoints, wp_session_lookup_endpoint (not introspectable), Wp.Session.prototype.iterate_endpoints and related methods

Wp.SessionFeatures.LINKS (131072) –

caches information about endpoint links, enabling the use of Wp.Session.prototype.get_n_links, wp_session_lookup_link (not introspectable), Wp.Session.prototype.iterate_links and related methods


Constants

WP_SESSION_FEATURES_STANDARD

#define WP_SESSION_FEATURES_STANDARD \
    (WP_PROXY_FEATURES_STANDARD | \
     WP_PROXY_FEATURE_PROPS | \
     WP_SESSION_FEATURE_ENDPOINTS | \
     WP_SESSION_FEATURE_LINKS)

A constant set of features that contains the standard features that are available in the WpSession class.


Wp.SESSION_FEATURES_STANDARD

A constant set of features that contains the standard features that are available in the Wp.Session class.


Wp.SESSION_FEATURES_STANDARD

A constant set of features that contains the standard features that are available in the Wp.Session class.


WP_TYPE_IMPL_SESSION

#define WP_TYPE_IMPL_SESSION (wp_impl_session_get_type ())

The WpImplSession GType


WP_TYPE_SESSION

#define WP_TYPE_SESSION (wp_session_get_type ())

The WpSession GType


The results of the search are