PipeWire: remote.c File Reference

PipeWire 0.2.4

Functions
remote.c File Reference
Include dependency graph for remote.c:

## Functions
const char * | pw_remote_state_as_string (enum pw_remote_state state)
struct pw_remote * | pw_remote_new (struct pw_core *core, struct pw_properties *properties, size_t user_data_size)
void | pw_remote_destroy (struct pw_remote *remote)
struct pw_core * | pw_remote_get_core (struct pw_remote *remote)
| Get the core used to construct this remote. More...
const struct pw_properties * | pw_remote_get_properties (struct pw_remote *remote)
| Get the remote properties. More...
void * | pw_remote_get_user_data (struct pw_remote *remote)
| Get the user_data. More...
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. More...
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. More...
struct pw_core_proxy * | pw_remote_get_core_proxy (struct pw_remote *remote)
| Get the core proxy, can only be called when connected. More...
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. More...
struct pw_proxy * | pw_remote_find_proxy (struct pw_remote *remote, uint32_t id)
| Get the proxy with the given id. More...
int | pw_remote_connect (struct pw_remote *remote)
int | pw_remote_connect_fd (struct pw_remote *remote, int fd)
int | pw_remote_steal_fd (struct pw_remote *remote)
| Steal the fd of the remote connection or < 0 on error. More...
int | pw_remote_disconnect (struct pw_remote *remote)
struct pw_proxy * | pw_remote_export (struct pw_remote *remote, struct pw_node *node)
| run a local node in a remote graph More...

## Function Documentation

## ◆ pw_remote_add_listener()

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.

## ◆ pw_remote_connect()

int pw_remote_connect | ( | struct pw_remote * | remote | ) |

## ◆ pw_remote_connect_fd()

int pw_remote_connect_fd | ( | struct pw_remote * | remote,
|  | int | fd
| ) |  |

## ◆ pw_remote_destroy()

void pw_remote_destroy | ( | struct pw_remote * | remote | ) |

References pw_log::pw_log_debug(), pw_properties::pw_properties_free(), pw_protocol_client_destroy, pw_remote::pw_remote_disconnect(), PW_REMOTE_STATE_UNCONNECTED, and pw_stream::pw_stream_destroy().

## ◆ pw_remote_disconnect()

int pw_remote_disconnect | ( | struct pw_remote * | remote | ) |

References pw_introspect::pw_core_info_free(), pw_log::pw_log_debug(), pw_map::pw_map_clear(), pw_protocol_client_disconnect, pw_proxy::pw_proxy_destroy(), and pw_stream::pw_stream_disconnect().

## ◆ pw_remote_export()

struct pw_proxy* pw_remote_export | ( | struct pw_remote * | remote,
|  | struct pw_node * | node
| ) |  |

run a local node in a remote graph

## ◆ pw_remote_find_proxy()

struct pw_proxy* pw_remote_find_proxy | ( | struct pw_remote * | remote,
|  | uint32_t | id
| ) |  |

Get the proxy with the given id.

References pw_map::pw_map_lookup().

## ◆ pw_remote_get_core()

struct pw_core* pw_remote_get_core | ( | struct pw_remote * | remote | ) |

Get the core used to construct this remote.

## ◆ pw_remote_get_core_info()

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.

## ◆ pw_remote_get_core_proxy()

struct pw_core_proxy* pw_remote_get_core_proxy | ( | struct pw_remote * | remote | ) |

Get the core proxy, can only be called when connected.

## ◆ pw_remote_get_properties()

const struct pw_properties* pw_remote_get_properties | ( | struct pw_remote * | remote | ) |

Get the remote properties.

## ◆ pw_remote_get_state()

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.

## ◆ pw_remote_get_user_data()

void* pw_remote_get_user_data | ( | struct pw_remote * | remote | ) |

Get the user_data.

The size was given in pw_remote_new

## ◆ pw_remote_new()

struct pw_remote* pw_remote_new | ( | struct pw_core * | core,
|  | struct pw_properties * | properties,
|  | size_t | user_data_size
| ) |  |

References pw_core_find_protocol(), pw_pipewire::pw_fill_remote_properties(), pw_log::pw_log_debug(), pw_log::pw_log_error(), pw_map::pw_map_init(), pw_module::pw_module_load(), pw_properties::pw_properties_free(), pw_properties::pw_properties_get(), pw_properties::pw_properties_new(), pw_protocol_new_client, PW_REMOTE_PROP_PROTOCOL, PW_REMOTE_STATE_UNCONNECTED, and impl::this.

## ◆ pw_remote_state_as_string()

const char* pw_remote_state_as_string | ( | enum pw_remote_state | state | ) |

References PW_REMOTE_STATE_CONNECTED, PW_REMOTE_STATE_CONNECTING, PW_REMOTE_STATE_ERROR, and PW_REMOTE_STATE_UNCONNECTED.

## ◆ pw_remote_steal_fd()

int pw_remote_steal_fd | ( | struct pw_remote * | remote | ) |

Steal the fd of the remote connection or < 0 on error.

The remote will be in the unconnected state after this call.

References pw_protocol_client_steal_fd, and pw_remote::pw_remote_disconnect().