mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
Add doxygen docs
This commit is contained in:
parent
f6ca32cdcf
commit
e7327d1316
68 changed files with 4569 additions and 937 deletions
|
|
@ -31,81 +31,80 @@ extern "C" {
|
|||
#include <pipewire/client/proxy.h>
|
||||
#include <pipewire/client/type.h>
|
||||
|
||||
/**
|
||||
* pw_context_state:
|
||||
* @PW_CONTEXT_STATE_ERROR: context is in error
|
||||
* @PW_CONTEXT_STATE_UNCONNECTED: not connected
|
||||
* @PW_CONTEXT_STATE_CONNECTING: connecting to daemon
|
||||
* @PW_CONTEXT_STATE_CONNECTED: context is connected and ready
|
||||
*
|
||||
* The state of a pw_context
|
||||
*/
|
||||
/** \enum pw_context_state The state of a \ref pw_context \memberof pw_context */
|
||||
enum pw_context_state {
|
||||
PW_CONTEXT_STATE_ERROR = -1,
|
||||
PW_CONTEXT_STATE_UNCONNECTED = 0,
|
||||
PW_CONTEXT_STATE_CONNECTING = 1,
|
||||
PW_CONTEXT_STATE_CONNECTED = 2,
|
||||
PW_CONTEXT_STATE_ERROR = -1, /**< context is in error */
|
||||
PW_CONTEXT_STATE_UNCONNECTED = 0, /**< not connected */
|
||||
PW_CONTEXT_STATE_CONNECTING = 1, /**< connecting to PipeWire daemon */
|
||||
PW_CONTEXT_STATE_CONNECTED = 2, /**< context is connected and ready */
|
||||
};
|
||||
|
||||
/** Convert a \ref pw_context_state to a readable string \memberof pw_context */
|
||||
const char *pw_context_state_as_string(enum pw_context_state state);
|
||||
|
||||
/** \enum pw_context_flags Extra flags passed to \ref pw_context_connect() \memberof pw_context */
|
||||
enum pw_context_flags {
|
||||
PW_CONTEXT_FLAG_NONE = 0,
|
||||
PW_CONTEXT_FLAG_NO_REGISTRY = (1 << 0),
|
||||
PW_CONTEXT_FLAG_NO_PROXY = (1 << 1),
|
||||
PW_CONTEXT_FLAG_NONE = 0, /**< no flags */
|
||||
PW_CONTEXT_FLAG_NO_REGISTRY = (1 << 0), /**< don't create the registry object */
|
||||
PW_CONTEXT_FLAG_NO_PROXY = (1 << 1), /**< don't automatically create proxies for
|
||||
* server side objects */
|
||||
};
|
||||
|
||||
/**
|
||||
* pw_context:
|
||||
/** \class pw_context
|
||||
*
|
||||
* PipeWire context object class.
|
||||
* \brief Represents a connection with the PipeWire server
|
||||
*
|
||||
* a \ref pw_context is created and used to connect to the server.
|
||||
* A \ref pw_proxy for the core object will automatically be created
|
||||
* when connecting.
|
||||
*/
|
||||
struct pw_context {
|
||||
char *name;
|
||||
struct pw_properties *properties;
|
||||
char *name; /**< the application name */
|
||||
struct pw_properties *properties; /**< extra properties */
|
||||
|
||||
struct pw_type type;
|
||||
struct pw_type type; /**< the type map */
|
||||
|
||||
struct pw_loop *loop;
|
||||
struct pw_loop *loop; /**< the main loop */
|
||||
|
||||
struct pw_proxy *core_proxy;
|
||||
struct pw_proxy *registry_proxy;
|
||||
struct pw_proxy *core_proxy; /**< proxy for the core object */
|
||||
struct pw_proxy *registry_proxy; /**< proxy for the registry object. Can
|
||||
* be NULL when \ref PW_CONTEXT_FLAG_NO_PROXY
|
||||
* was specified */
|
||||
struct pw_map objects; /**< map of client side proxy objects
|
||||
* indexed with the client id */
|
||||
uint32_t n_types; /**< number of client types */
|
||||
struct pw_map types; /**< client types */
|
||||
|
||||
struct pw_map objects;
|
||||
uint32_t n_types;
|
||||
struct pw_map types;
|
||||
struct spa_list stream_list; /**< list of \ref pw_stream objects */
|
||||
struct spa_list proxy_list; /**< list of \ref pw_proxy objects */
|
||||
|
||||
struct spa_list global_list;
|
||||
struct spa_list stream_list;
|
||||
struct spa_list proxy_list;
|
||||
void *protocol_private; /**< private data for the protocol */
|
||||
|
||||
void *protocol_private;
|
||||
|
||||
enum pw_context_state state;
|
||||
char *error;
|
||||
enum pw_context_state state; /**< context state */
|
||||
char *error; /**< error string */
|
||||
/** Signal emited when the state changes */
|
||||
PW_SIGNAL(state_changed, (struct pw_listener *listener, struct pw_context *context));
|
||||
|
||||
/** Signal emited when a global is added/changed/removed */
|
||||
PW_SIGNAL(subscription, (struct pw_listener *listener,
|
||||
struct pw_context *context,
|
||||
enum pw_subscription_event event, uint32_t type, uint32_t id));
|
||||
|
||||
/** Signal emited when the context is destroyed */
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_context *context));
|
||||
};
|
||||
|
||||
struct pw_context *
|
||||
pw_context_new(struct pw_loop *loop,
|
||||
const char *name, struct pw_properties *properties);
|
||||
void
|
||||
pw_context_destroy(struct pw_context *context);
|
||||
|
||||
bool
|
||||
pw_context_connect(struct pw_context *context, enum pw_context_flags flags);
|
||||
void pw_context_destroy(struct pw_context *context);
|
||||
|
||||
bool
|
||||
pw_context_connect_fd(struct pw_context *context, enum pw_context_flags flags, int fd);
|
||||
bool pw_context_connect(struct pw_context *context, enum pw_context_flags flags);
|
||||
|
||||
bool
|
||||
pw_context_disconnect(struct pw_context *context);
|
||||
bool pw_context_connect_fd(struct pw_context *context, enum pw_context_flags flags, int fd);
|
||||
|
||||
bool pw_context_disconnect(struct pw_context *context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue