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
Class structure
Constructors
wp_impl_session_new
WpImplSession * wp_impl_session_new (WpCore * core)
Parameters:
core
–
the WpCore
the newly constructed session implementation
Wp.ImplSession.new
def Wp.ImplSession.new (core):
#python wrapper for 'wp_impl_session_new'
the newly constructed session implementation
Wp.ImplSession.prototype.new
function Wp.ImplSession.prototype.new(core: Wp.Core): {
// javascript wrapper for 'wp_impl_session_new'
}
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)
–
Class structure
WpSession
GObject ╰──WpProxy ╰──WpSession ╰──WpImplSession
Members
parent_instance
(WpProxy)
–
WpSession
GObject ╰──WpProxy ╰──WpSession ╰──WpImplSession
Members
parent_instance
(WpProxy)
–
Methods
wp_session_get_default_endpoint
guint32 wp_session_get_default_endpoint (WpSession * self, WpDirection direction)
Parameters:
self
–
the session
direction
–
the endpoint direction
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'
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'
}
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
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
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
the number of endpoints of this session
wp_session_get_n_links
guint wp_session_get_n_links (WpSession * self)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
the number of endpoint links of this session
Wp.Session.get_n_links
def Wp.Session.get_n_links (self):
#python wrapper for 'wp_session_get_n_links'
Requires Wp.SessionFeatures.LINKS
Parameters:
self
(
Wp.Session
)
–
the session
the number of endpoint links of this session
Wp.Session.prototype.get_n_links
function Wp.Session.prototype.get_n_links(): {
// javascript wrapper for 'wp_session_get_n_links'
}
Requires Wp.SessionFeatures.LINKS
Parameters:
self
(
Wp.Session
)
–
the session
the number of endpoint links of this session
wp_session_get_name
const gchar * wp_session_get_name (WpSession * self)
Parameters:
self
–
the session
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
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
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
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
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
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.
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
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
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
a Wp.Iterator that iterates over all the endpoints that belong to this session and match the interest
wp_session_iterate_links
WpIterator * wp_session_iterate_links (WpSession * self)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
a WpIterator that iterates over all the endpoint links that belong to this session
Wp.Session.iterate_links
def Wp.Session.iterate_links (self):
#python wrapper for 'wp_session_iterate_links'
Requires Wp.SessionFeatures.LINKS
Parameters:
self
(
Wp.Session
)
–
the session
a Wp.Iterator that iterates over all the endpoint links that belong to this session
Wp.Session.prototype.iterate_links
function Wp.Session.prototype.iterate_links(): {
// javascript wrapper for 'wp_session_iterate_links'
}
Requires Wp.SessionFeatures.LINKS
Parameters:
self
(
Wp.Session
)
–
the session
a Wp.Iterator that iterates over all the endpoint links that belong to this session
wp_session_iterate_links_filtered
WpIterator * wp_session_iterate_links_filtered (WpSession * self, ... ...)
Requires WP_SESSION_FEATURE_LINKS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
a WpIterator that iterates over all the links that belong to this session and match the constraints
wp_session_iterate_links_filtered_full
WpIterator * wp_session_iterate_links_filtered_full (WpSession * self, WpObjectInterest * interest)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
interest
(
[transfer: full]
)
–
the interest
a WpIterator that iterates over all the links that belong to this session and match the interest
Wp.Session.iterate_links_filtered_full
def Wp.Session.iterate_links_filtered_full (self, interest):
#python wrapper for 'wp_session_iterate_links_filtered_full'
Requires Wp.SessionFeatures.LINKS
a Wp.Iterator that iterates over all the links that belong to this session and match the interest
Wp.Session.prototype.iterate_links_filtered_full
function Wp.Session.prototype.iterate_links_filtered_full(interest: Wp.ObjectInterest): {
// javascript wrapper for 'wp_session_iterate_links_filtered_full'
}
Requires Wp.SessionFeatures.LINKS
a Wp.Iterator that iterates over all the links 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.
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
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
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
the first endpoint that matches the interest, or null if there is no such endpoint
wp_session_lookup_link
WpEndpointLink * wp_session_lookup_link (WpSession * self, ... ...)
Requires WP_SESSION_FEATURE_LINKS
The constraints specified in the variable arguments must follow the rules documented in wp_object_interest_new.
the first link that matches the constraints, or NULL if there is no such link
wp_session_lookup_link_full
WpEndpointLink * wp_session_lookup_link_full (WpSession * self, WpObjectInterest * interest)
Requires WP_SESSION_FEATURE_LINKS
Parameters:
self
–
the session
interest
(
[transfer: full]
)
–
the interest
the first link that matches the interest, or NULL if there is no such link
Wp.Session.lookup_link_full
def Wp.Session.lookup_link_full (self, interest):
#python wrapper for 'wp_session_lookup_link_full'
Requires Wp.SessionFeatures.LINKS
the first link that matches the interest, or None if there is no such link
Wp.Session.prototype.lookup_link_full
function Wp.Session.prototype.lookup_link_full(interest: Wp.ObjectInterest): {
// javascript wrapper for 'wp_session_lookup_link_full'
}
Requires Wp.SessionFeatures.LINKS
the first link that matches the interest, or null if there is no such link
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
–
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
)
–
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
)
–
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
–
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.
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.
Flags: Run Last
links-changed
links_changed_callback (WpSession * self, gpointer user_data)
Emitted when the session's links change. This is only emitted when WP_SESSION_FEATURE_LINKS is enabled.
Parameters:
self
–
the session
user_data
–
Flags: Run Last
links-changed
def links_changed_callback (self, *user_data):
#python callback for the 'links-changed' signal
Emitted when the session's links change. This is only emitted when Wp.SessionFeatures.LINKS is enabled.
Flags: Run Last
links-changed
function links_changed_callback(self: Wp.Session, user_data: Object): {
// javascript callback for the 'links-changed' signal
}
Emitted when the session's links change. This is only emitted when Wp.SessionFeatures.LINKS is enabled.
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
The results of the search are