Go to the first, previous, next, last section, table of contents.
- Macro: cca_enabled (client)
-
Check whether the cca_client_t pointer client is not
NULL
, and if it
isn't, that the server is still connected.
- Function: cca_args_t * cca_extract_args (int * argc, char *** argv)
-
Extract LADCCA-specific arguments from argc/argv. This should be done before the
client checks the arguments, obviously.
- Function: cca_client_t * cca_init (cca_args_t * args, const char * client_class, int client_flags, cca_protocol_t protocol)
-
Open a connection to the server. Returns
NULL
on failure. See
@xref{Protocol versioning} for information on how to contruct a cca_protocol_t
variable.
- Function: const char * cca_get_server_name (cca_client_t * client)
-
Get the hostname of the server.
- Function: unsigned int cca_get_pending_event_count (cca_client_t * client)
-
Get the number of pending events.
- Function: cca_event_t * cca_get_event (cca_client_t * client)
-
Retrieve an event. The event must be freed using
cca_event_destroy
.
Returns NULL
if there are no events pending.
- Function: unsigned int cca_get_pending_config_count (cca_client_t * client)
-
Get the number of pending configs.
- Function: cca_config_t * cca_get_config (cca_client_t * client)
-
Retrieve a config. The config must be freed using
cca_config_destroy
.
Returns NULL
if there are no configs pending.
- Function: void cca_send_event (cca_client_t * client, cca_event_t * event)
-
Send an event to the server. The event must be created using
cca_event_new
or cca_event_new_with_type
. The library takes over
ownership of the memory and it should not be freed by the client.
- Function: void cca_send_config (cca_client_t * client, cca_config_t * config)
-
Send some configuration data to the server. The config must be created using
cca_config_new
, cca_config_new_with_key
or
cca_config_dup
. The library takes
over ownership of the memory and it should not be freed by the client.
- Function: int cca_server_connected (cca_client_t * client)
-
Check whether the server is connected. Returns 1 if the server is still
connected or 0 if it isn't
- Function: void cca_jack_client_name (cca_client_t * client, const char * name)
-
Tell the server the client's JACK client name.
@anchor{cca_alsa_client_id}
- Function: void cca_alsa_client_id (cca_client_t * client, unsigned char id);
-
Tell the server the client's ALSA client id.
@anchor{Protocol versioning}
The event protocol is versioned with a major and minor component.
The cca_protocol_t
type represents a version number
in an integer split 16:16. A protocol is comptible with the server's
protocol if the major numbers are the same and the minor number is less than,
or equal to, the server's minor number (ie, 1.0 is compatible with a server
using 1.0, 1.1 is compatible with a server using 1.3, but neither 2.0 or 1.6 are
compatible with a server using 1.4. The minor component may be dropped in
the future.
- Macro: CCA_PROTOCOL (major, minor)
-
Contruct a protocol version with a major component major and a minor
component minor.
- Macro: CCA_PROTOCOL_GET_MAJOR (protocol)
-
Obtain the major component of a
cca_protocol_t
protocol version.
- Macro: CCA_PROTOCOL_GET_MINOR (protocol)
-
Obtain the minor component of a
cca_protocol_t
protocol version.
- Function: const char * cca_protocol_string (cca_protocol_t protocol)
-
Obtain a string representation of the protocol version protocol.
String representations are of the form "major.minor".
- Function: cca_event_t * cca_event_new (void)
-
- Function: cca_event_t * cca_event_new_with_type (enum CCA_Event_Types type)
-
- Function: void cca_event_destroy (cca_event_t * event)
-
- Function: enum CCA_Event_Types cca_event_get_type (const cca_event_t * event)
-
- Function: const char * cca_event_get_string (const cca_event_t * event)
-
- Function: void cca_event_set_type (cca_event_t * event, enum CCA_Event_Types type)
-
- Function: void cca_event_set_string (cca_event_t * event, const char * string);
-
- Function: cca_config_t * cca_config_new (void)
-
- Function: cca_config_t * cca_config_dup (const cca_config_t * config)
-
- Function: cca_config_t * cca_config_new_with_key (const char * key)
-
- Function: void cca_config_destroy (cca_config_t * config)
-
- Function: const char * cca_config_get_key (const cca_config_t * config)
-
- Function: const void * cca_config_get_value (const cca_config_t * config)
-
- Function: size_t cca_config_get_value_size (const cca_config_t * config)
-
- Function: void cca_config_set_key (cca_config_t * config, const char * key)
-
- Function: void cca_config_set_value (cca_config_t * config, const void * value, size_t value_size)
-
With these functions, no type checking is done; you can do
cca_config_get_value_int
on a config that was set with
cca_config_set_value_float
. The integer values are converted
to and from network byte order as appropriate.
- Function: uint32_t cca_config_get_value_int (const cca_config_t * config)
-
- Function: float cca_config_get_value_float (const cca_config_t * config)
-
- Function: double cca_config_get_value_double (const cca_config_t * config)
-
- Function: const char * cca_config_get_value_string (const cca_config_t * config)
-
- Function: void cca_config_set_value_int (cca_config_t * config, uint32_t value)
-
- Function: void cca_config_set_value_float (cca_config_t * config, float value)
-
- Function: void cca_config_set_value_double (cca_config_t * config, double value)
-
- Function: void cca_config_set_value_string (cca_config_t * config, const char * value)
-
Go to the first, previous, next, last section, table of contents.