26 #ifndef PIPEWIRE_EXT_SESSION_MANAGER_INTERFACES_H
27 #define PIPEWIRE_EXT_SESSION_MANAGER_INTERFACES_H
43 #define PW_TYPE_INTERFACE_Session PW_TYPE_INFO_INTERFACE_BASE "Session"
44 #define PW_VERSION_SESSION 0
47 #define PW_TYPE_INTERFACE_Endpoint PW_TYPE_INFO_INTERFACE_BASE "Endpoint"
48 #define PW_VERSION_ENDPOINT 0
51 #define PW_TYPE_INTERFACE_EndpointStream PW_TYPE_INFO_INTERFACE_BASE "EndpointStream"
52 #define PW_VERSION_ENDPOINT_STREAM 0
55 #define PW_TYPE_INTERFACE_EndpointLink PW_TYPE_INFO_INTERFACE_BASE "EndpointLink"
56 #define PW_VERSION_ENDPOINT_LINK 0
61 #define PW_SESSION_EVENT_INFO 0
62 #define PW_SESSION_EVENT_PARAM 1
63 #define PW_SESSION_EVENT_NUM 2
66 #define PW_VERSION_SESSION_EVENTS 0
87 void (*
param) (
void *data,
int seq,
88 uint32_t
id, uint32_t index, uint32_t next,
92 #define PW_SESSION_METHOD_ADD_LISTENER 0
93 #define PW_SESSION_METHOD_SUBSCRIBE_PARAMS 1
94 #define PW_SESSION_METHOD_ENUM_PARAMS 2
95 #define PW_SESSION_METHOD_SET_PARAM 3
96 #define PW_SESSION_METHOD_CREATE_LINK 4
97 #define PW_SESSION_METHOD_NUM 5
100 #define PW_VERSION_SESSION_METHODS 0
132 uint32_t id, uint32_t start, uint32_t num,
142 int (*
set_param) (
void *object, uint32_t id, uint32_t flags,
146 #define pw_session_method(o,method,version,...) \
148 int _res = -ENOTSUP; \
149 spa_interface_call_res((struct spa_interface*)o, \
150 struct pw_session_methods, _res, \
151 method, version, ##__VA_ARGS__); \
155 #define pw_session_add_listener(c,...) pw_session_method(c,add_listener,0,__VA_ARGS__)
156 #define pw_session_subscribe_params(c,...) pw_session_method(c,subscribe_params,0,__VA_ARGS__)
157 #define pw_session_enum_params(c,...) pw_session_method(c,enum_params,0,__VA_ARGS__)
158 #define pw_session_set_param(c,...) pw_session_method(c,set_param,0,__VA_ARGS__)
163 #define PW_ENDPOINT_EVENT_INFO 0
164 #define PW_ENDPOINT_EVENT_PARAM 1
165 #define PW_ENDPOINT_EVENT_NUM 2
168 #define PW_VERSION_ENDPOINT_EVENTS 0
189 void (*
param) (
void *data,
int seq,
190 uint32_t
id, uint32_t index, uint32_t next,
194 #define PW_ENDPOINT_METHOD_ADD_LISTENER 0
195 #define PW_ENDPOINT_METHOD_SUBSCRIBE_PARAMS 1
196 #define PW_ENDPOINT_METHOD_ENUM_PARAMS 2
197 #define PW_ENDPOINT_METHOD_SET_PARAM 3
198 #define PW_ENDPOINT_METHOD_CREATE_LINK 4
199 #define PW_ENDPOINT_METHOD_NUM 5
202 #define PW_VERSION_ENDPOINT_METHODS 0
234 uint32_t id, uint32_t start, uint32_t num,
244 int (*
set_param) (
void *object, uint32_t id, uint32_t flags,
250 #define pw_endpoint_method(o,method,version,...) \
252 int _res = -ENOTSUP; \
253 spa_interface_call_res((struct spa_interface*)o, \
254 struct pw_endpoint_methods, _res, \
255 method, version, ##__VA_ARGS__); \
259 #define pw_endpoint_add_listener(c,...) pw_endpoint_method(c,add_listener,0,__VA_ARGS__)
260 #define pw_endpoint_subscribe_params(c,...) pw_endpoint_method(c,subscribe_params,0,__VA_ARGS__)
261 #define pw_endpoint_enum_params(c,...) pw_endpoint_method(c,enum_params,0,__VA_ARGS__)
262 #define pw_endpoint_set_param(c,...) pw_endpoint_method(c,set_param,0,__VA_ARGS__)
263 #define pw_endpoint_create_link(c,...) pw_endpoint_method(c,create_link,0,__VA_ARGS__)
267 #define PW_ENDPOINT_STREAM_EVENT_INFO 0
268 #define PW_ENDPOINT_STREAM_EVENT_PARAM 1
269 #define PW_ENDPOINT_STREAM_EVENT_NUM 2
272 #define PW_VERSION_ENDPOINT_STREAM_EVENTS 0
294 uint32_t
id, uint32_t index, uint32_t next,
298 #define PW_ENDPOINT_STREAM_METHOD_ADD_LISTENER 0
299 #define PW_ENDPOINT_STREAM_METHOD_SUBSCRIBE_PARAMS 1
300 #define PW_ENDPOINT_STREAM_METHOD_ENUM_PARAMS 2
301 #define PW_ENDPOINT_STREAM_METHOD_SET_PARAM 3
302 #define PW_ENDPOINT_STREAM_METHOD_NUM 4
305 #define PW_VERSION_ENDPOINT_STREAM_METHODS 0
337 uint32_t id, uint32_t start, uint32_t num,
347 int (*
set_param) (
void *object, uint32_t id, uint32_t flags,
351 #define pw_endpoint_stream_method(o,method,version,...) \
353 int _res = -ENOTSUP; \
354 spa_interface_call_res((struct spa_interface*)o, \
355 struct pw_endpoint_stream_methods, _res, \
356 method, version, ##__VA_ARGS__); \
360 #define pw_endpoint_stream_add_listener(c,...) pw_endpoint_stream_method(c,add_listener,0,__VA_ARGS__)
361 #define pw_endpoint_stream_subscribe_params(c,...) pw_endpoint_stream_method(c,subscribe_params,0,__VA_ARGS__)
362 #define pw_endpoint_stream_enum_params(c,...) pw_endpoint_stream_method(c,enum_params,0,__VA_ARGS__)
363 #define pw_endpoint_stream_set_param(c,...) pw_endpoint_stream_method(c,set_param,0,__VA_ARGS__)
367 #define PW_ENDPOINT_LINK_EVENT_INFO 0
368 #define PW_ENDPOINT_LINK_EVENT_PARAM 1
369 #define PW_ENDPOINT_LINK_EVENT_NUM 2
372 #define PW_VERSION_ENDPOINT_LINK_EVENTS 0
393 void (*
param) (
void *data,
int seq,
394 uint32_t
id, uint32_t index, uint32_t next,
398 #define PW_ENDPOINT_LINK_METHOD_ADD_LISTENER 0
399 #define PW_ENDPOINT_LINK_METHOD_SUBSCRIBE_PARAMS 1
400 #define PW_ENDPOINT_LINK_METHOD_ENUM_PARAMS 2
401 #define PW_ENDPOINT_LINK_METHOD_SET_PARAM 3
402 #define PW_ENDPOINT_LINK_METHOD_REQUEST_STATE 4
403 #define PW_ENDPOINT_LINK_METHOD_DESTROY 5
404 #define PW_ENDPOINT_LINK_METHOD_NUM 6
407 #define PW_VERSION_ENDPOINT_LINK_METHODS 0
439 uint32_t id, uint32_t start, uint32_t num,
449 int (*
set_param) (
void *object, uint32_t id, uint32_t flags,
455 #define pw_endpoint_link_method(o,method,version,...) \
457 int _res = -ENOTSUP; \
458 spa_interface_call_res((struct spa_interface*)o, \
459 struct pw_endpoint_link_methods, _res, \
460 method, version, ##__VA_ARGS__); \
464 #define pw_endpoint_link_add_listener(c,...) pw_endpoint_link_method(c,add_listener,0,__VA_ARGS__)
465 #define pw_endpoint_link_subscribe_params(c,...) pw_endpoint_link_method(c,subscribe_params,0,__VA_ARGS__)
466 #define pw_endpoint_link_enum_params(c,...) pw_endpoint_link_method(c,enum_params,0,__VA_ARGS__)
467 #define pw_endpoint_link_set_param(c,...) pw_endpoint_link_method(c,set_param,0,__VA_ARGS__)
468 #define pw_endpoint_link_request_state(c,...) pw_endpoint_link_method(c,request_state,0,__VA_ARGS__)
pw_endpoint_link_state
Definition: introspect.h:46
pipewire/extensions/session-manager/introspect.h
Definition: interfaces.h:205
void(* info)(void *data, const struct pw_endpoint_info *info)
Notify endpoint info.
Definition: interfaces.h:215
void(* param)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a endpoint param.
Definition: interfaces.h:228
uint32_t version
version of this structure
Definition: interfaces.h:208
Definition: introspect.h:70
uint32_t id
the endpoint id (global)
Definition: introspect.h:74
Definition: interfaces.h:448
void(* info)(void *data, const struct pw_endpoint_link_info *info)
Notify endpoint link info.
Definition: interfaces.h:458
uint32_t version
version of this structure
Definition: interfaces.h:451
void(* param)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a endpoint link param.
Definition: interfaces.h:471
Definition: introspect.h:121
uint32_t id
the link id (global)
Definition: introspect.h:125
Definition: interfaces.h:491
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the link.
Definition: interfaces.h:535
int(* request_state)(void *object, enum pw_endpoint_link_state state)
Definition: interfaces.h:538
uint32_t version
version of this structure
Definition: interfaces.h:494
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_endpoint_link_events *events, void *data)
Definition: interfaces.h:496
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: interfaces.h:510
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate link parameters.
Definition: interfaces.h:524
Definition: interfaces.h:246
uint32_t version
version of this structure
Definition: interfaces.h:249
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_endpoint_events *events, void *data)
Definition: interfaces.h:251
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: interfaces.h:265
int(* create_link)(void *object, const struct spa_dict *props)
Definition: interfaces.h:293
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the endpoint.
Definition: interfaces.h:290
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate endpoint parameters.
Definition: interfaces.h:279
Definition: interfaces.h:330
uint32_t version
version of this structure
Definition: interfaces.h:333
void(* param)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a endpoint stream param.
Definition: interfaces.h:353
void(* info)(void *data, const struct pw_endpoint_stream_info *info)
Notify endpoint stream info.
Definition: interfaces.h:340
Definition: introspect.h:99
uint32_t id
the stream id (local or global)
Definition: introspect.h:103
Definition: interfaces.h:369
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_endpoint_stream_events *events, void *data)
Definition: interfaces.h:374
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the stream.
Definition: interfaces.h:413
uint32_t version
version of this structure
Definition: interfaces.h:372
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate stream parameters.
Definition: interfaces.h:402
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: interfaces.h:388
Definition: interfaces.h:84
void(* info)(void *data, const struct pw_session_info *info)
Notify session info.
Definition: interfaces.h:94
void(* param)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a session param.
Definition: interfaces.h:107
uint32_t version
version of this structure
Definition: interfaces.h:87
Definition: introspect.h:53
uint32_t id
the session id (global)
Definition: introspect.h:57
Definition: interfaces.h:125
uint32_t version
version of this structure
Definition: interfaces.h:128
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the session.
Definition: interfaces.h:169
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: interfaces.h:144
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate session parameters.
Definition: interfaces.h:158
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_session_events *events, void *data)
Definition: interfaces.h:130
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:351