PipeWire  0.1.4
pw_command Class Reference

A configuration command. More...

Public Member Functions

void pw_command_free (struct pw_command *command)
 Free command. More...
 
struct pw_commandpw_command_parse (const char *line, char **err)
 Parses a command line. More...
 
bool pw_command_run (struct pw_command *command, struct pw_core *core, char **err)
 Run a command. More...
 

Data Fields

struct spa_list link
 link in list of commands More...
 
const char * name
 command name More...
 

Detailed Description

A configuration command.

Member Function Documentation

◆ pw_command_free()

void pw_command_free ( struct pw_command command)

Free command.

Parameters
commanda command to free

Free all resources assicated with command.

References link, and pw_free_strv().

◆ pw_command_parse()

struct pw_command * pw_command_parse ( const char *  line,
char **  err 
)

Parses a command line.

Parameters
linecommand line to parse
[out]errReturn location for an error
Returns
The command or NULL when err is set.

Parses a command line, line, and return the parsed command. A command can later be executed with pw_command_run()

◆ pw_command_run()

bool pw_command_run ( struct pw_command command,
struct pw_core core,
char **  err 
)

Run a command.

Parameters
commandA pw_command
coreA pw_core
errReturn location for an error string, or NULL
Returns
true if command was executed successfully, false otherwise.

Field Documentation

◆ link

struct spa_list pw_command::link

link in list of commands

Referenced by pw_command_free().

◆ name

const char* pw_command::name

command name


The documentation for this class was generated from the following files: