XMMS2
Functions
xmmsv_service.h File Reference

Functions

xmmsv_txmmsv_sc_argument_new (const char *name, const char *docstring, xmmsv_type_t type, xmmsv_t *default_value) XMMS_PUBLIC
 Create a new argument for a method. More...
 
const char * xmmsv_sc_argument_get_name (xmmsv_t *arg) XMMS_PUBLIC
 Extract the name of an argument. More...
 
const char * xmmsv_sc_argument_get_docstring (xmmsv_t *arg) XMMS_PUBLIC
 Extract the docstring of an argument. More...
 
int64_t xmmsv_sc_argument_get_type (xmmsv_t *arg) XMMS_PUBLIC
 Extract the type of an argument. More...
 
xmmsv_txmmsv_sc_argument_get_default_value (xmmsv_t *arg) XMMS_PUBLIC
 Extract the default value of an argument. More...
 

Function Documentation

xmmsv_t* xmmsv_sc_argument_get_default_value ( xmmsv_t arg)

Extract the default value of an argument.

Parameters
argThe argument.
Returns
The default value or NULL upon error.
const char* xmmsv_sc_argument_get_docstring ( xmmsv_t arg)

Extract the docstring of an argument.

Parameters
argThe argument.
Returns
The docstring upon success, NULL upon failure.
const char* xmmsv_sc_argument_get_name ( xmmsv_t arg)

Extract the name of an argument.

Parameters
argThe argument.
Returns
The name upon success, NULL upon failure.
int64_t xmmsv_sc_argument_get_type ( xmmsv_t arg)

Extract the type of an argument.

Parameters
argThe argument.
Returns
The type, or XMMSV_TYPE_ERROR upon error.
xmmsv_t* xmmsv_sc_argument_new ( const char *  name,
const char *  docstring,
xmmsv_type_t  type,
xmmsv_t default_value 
)

Create a new argument for a method.

Parameters
nameThe name of the argument. Must not be NULL.
docstringThe docstring of the argument.
typeThe expected type of the argument. Use XMMSV_TYPE_NONE to accept any type. XMMSV_TYPE_ERROR is reserved and should not be used.
default_valueValue to set this argument to if it's missing in the method call. Implies that the argument is optional. If NULL, the argument is not optional.