/* -*- Mode: C ; c-basic-offset: 2 -*- */ /***************************************************************************** * * DESCRIPTION: * Abstraction of the API needed to implement jackdbus * *****************************************************************************/ #ifndef JACKCTL_H__2EEDAD78_DF4C_4B26_83B7_4FF1A446A47E__INCLUDED #define JACKCTL_H__2EEDAD78_DF4C_4B26_83B7_4FF1A446A47E__INCLUDED /** Parameter types, intentionally similar to jack_driver_param_type_t */ typedef enum { JackParamInt = 1, JackParamUInt, JackParamChar, JackParamString, JackParamBool, } jackctl_param_type_t; /** max length of string parameter value, excluding terminating nul char */ #define JACK_PARAM_STRING_MAX 63 /** Parameter value, intentionally similar to jack_driver_param_value_t */ union jackctl_parameter_value { uint32_t ui; int32_t i; char c; char str[JACK_PARAM_STRING_MAX + 1]; bool b; }; /** handle to server object */ typedef struct { int unused; } * jackctl_server; /** handle to driver object */ typedef struct { int unused; } * jackctl_driver; /** handle to parameter object */ typedef struct { int unused; } * jackctl_parameter; #ifdef __cplusplus extern "C" { #endif #if 0 } /* Adjust editor indent */ #endif /** * Create server object * */ jackctl_server jackctl_server_create(const char * name); void jackctl_server_destroy(jackctl_server server); const JSList * jackctl_server_get_drivers_list(jackctl_server server); bool jackctl_server_start(jackctl_server server, jackctl_driver driver); bool jackctl_server_stop(jackctl_server server); double jackctl_server_get_load(jackctl_server server); unsigned int jackctl_server_get_sample_rate(jackctl_server server); double jackctl_server_get_latency(jackctl_server server); bool jackctl_server_is_realtime(jackctl_server server); unsigned int jackctl_server_get_xruns(jackctl_server server); void jackctl_server_reset_xruns(jackctl_server server); const JSList * jackctl_server_get_parameters(jackctl_server server); const JSList * jackctl_driver_get_parameters(jackctl_driver driver); const char * jackctl_parameter_get_name(jackctl_parameter parameter); const char * jackctl_parameter_get_short_description(jackctl_parameter parameter); const char * jackctl_parameter_get_long_description(jackctl_parameter parameter); jackctl_param_type_t jackctl_parameter_get_type(jackctl_parameter parameter); bool jackctl_parameter_is_set(jackctl_parameter parameter); void jackctl_parameter_get_value(jackctl_parameter parameter, union jackctl_parameter_value * value_ptr); void jackctl_parameter_set_value(jackctl_parameter parameter, const union jackctl_parameter_value * value_ptr); void jackctl_parameter_get_default_value(jackctl_parameter parameter, union jackctl_parameter_value * value_ptr); #if 0 { /* Adjust editor indent */ #endif #ifdef __cplusplus } /* extern "C" */ #endif #endif /* #ifndef JACKCTL_H__2EEDAD78_DF4C_4B26_83B7_4FF1A446A47E__INCLUDED */