20 #ifndef __PIPEWIRE_REMOTE_H__ 21 #define __PIPEWIRE_REMOTE_H__ 27 #include <spa/utils/hook.h> 127 #define PW_VERSION_REMOTE_EVENTS 0 142 #define PW_REMOTE_PROP_PROTOCOL "pipewire.protocol" 144 #define PW_REMOTE_PROP_REMOTE_NAME "pipewire.remote.name" 152 size_t user_data_size );
171 struct spa_hook *listener,
A collection of key/value pairs.
Definition: properties.h:38
void pw_remote_add_listener(struct pw_remote *remote, struct spa_hook *listener, const struct pw_remote_events *events, void *data)
Add listener for events.
Definition: remote.c:340
not connected
Definition: remote.h:117
void pw_remote_destroy(struct pw_remote *remote)
Destroy a remote.
Definition: remote.c:294
struct pw_proxy * pw_remote_find_proxy(struct pw_remote *remote, uint32_t id)
Get the proxy with the given id.
Definition: remote.c:383
const char * pw_remote_state_as_string(enum pw_remote_state state)
Convert a pw_remote_state to a readable string.
Definition: remote.c:107
struct pw_core * pw_remote_get_core(struct pw_remote *remote)
Get the core used to construct this remote.
Definition: remote.c:318
int pw_remote_update_state(struct pw_remote *remote, enum pw_remote_state state, const char *fmt,...)
Update the state of the remote, mostly used by protocols.
Definition: remote.c:123
uint32_t version
Definition: remote.h:128
connecting to remote PipeWire
Definition: remote.h:118
The core information.
Definition: introspect.h:76
struct pw_proxy * pw_remote_export(struct pw_remote *remote, struct pw_node *node)
run a local node in a remote graph
Definition: remote.c:1325
void(* destroy)(void *data)
The remote is destroyed.
Definition: remote.h:131
void(* sync_reply)(void *data, uint32_t seq)
emited when a reply to a sync was received
Definition: remote.h:135
Represents an object on the client side.
int pw_remote_connect(struct pw_remote *remote)
Connect to a remote PipeWire.
Definition: remote.c:400
remote is connected and ready
Definition: remote.h:119
const struct pw_properties * pw_remote_get_properties(struct pw_remote *remote)
Get the remote properties.
Definition: remote.c:323
Represents a connection with a remote PipeWire instance.
int pw_remote_steal_fd(struct pw_remote *remote)
Steal the fd of the remote connection or < 0 on error.
Definition: remote.c:429
enum pw_remote_state pw_remote_get_state(struct pw_remote *remote, const char **error)
Get the current state, error is set when state is PW_REMOTE_STATE_ERROR.
Definition: remote.c:333
void(* state_changed)(void *data, enum pw_remote_state old, enum pw_remote_state state, const char *error)
emited when the state changes
Definition: remote.h:137
int pw_remote_connect_fd(struct pw_remote *remote, int fd)
Connect to a remote PipeWire on the given socket.
Definition: remote.c:414
struct pw_core_proxy * pw_remote_get_core_proxy(struct pw_remote *remote)
Get the core proxy, can only be called when connected.
Definition: remote.c:373
void * pw_remote_get_user_data(struct pw_remote *remote)
Get the user_data.
Definition: remote.c:328
int pw_remote_disconnect(struct pw_remote *remote)
Disconnect from the remote PipeWire.
Definition: remote.c:439
void(* info_changed)(void *data, const struct pw_core_info *info)
emited when the remote core info changed
Definition: remote.h:133
Events for the remote.
Definition: remote.h:126
pw_remote_state
The state of a pw_remote.
Definition: remote.h:115
remote is in error
Definition: remote.h:116
const struct pw_core_info * pw_remote_get_core_info(struct pw_remote *remote)
Get the remote core info, can only be called when connected.
Definition: remote.c:378
struct pw_remote * pw_remote_new(struct pw_core *core, struct pw_properties *properties, size_t user_data_size)
Create a new unconnected remote.
Definition: remote.c:216