[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Open a connection to the server. Returns NULL
on failure.
The args argument must be obtained using cca_extract_args
.
The client_class argument must be a string that will never change over
invocations of the program. If using GNU automake, the best way to do this is to use
the PACKAGE_NAME
macro that is automatically defined.
The client_flags argument should be 0 or bitwise-OR'd values from this list:
CCA_Config_Data_Set
The client wishes to save its data use the LADCCA config system. See Configs and Event protocol.
CCA_Config_File
The client saves its data to a file. See section Event protocol.
CCA_Server_Interface
The client is a server interface. See section Server interfaces.
CCA_No_Autoresume
This flag is set by the --ladcca-no-autoresume
command line option and
should not normally be set by clients themselves.
CCA_Terminal
The client is dependant on being run in a terminal.
The protocol argument should be the version of the high-level protocol that the client
implements See Protocol versioning for information on how to contruct a cca_protocol_t
variable.
Extract LADCCA-specific arguments from argc/argv for use in cca_init
. This should be done before the
client checks the arguments, obviously.
Get the hostname of the server.
Get the number of pending events.
Retrieve an event. The event must be freed using cca_event_destroy
.
Returns NULL
if there are no events pending.
Get the number of pending configs.
Retrieve a config. The config must be freed using cca_config_destroy
.
Returns NULL
if there are no configs pending.
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.
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.
Check whether the cca_client_t pointer client is not NULL
, and if it
isn't, that the server is still connected.
Check whether the server is connected. Returns 1 if the server is still connected or 0 if it isn't
Tell the server the client's JACK client name. This is a convenience function that just sends a CCA_Jack_Client_Name event to the server. See Normal CCA_Jack_Client_Name.
Tell the server the client's ALSA client ID. This just is a convenience function that just sends a CCA_Alsa_Client_ID event to the server. See Normal CCA_Alsa_Client_ID.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The event protocol (See section Event protocol,) is versioned with a major and minor component.
The cca_protocol_t
type represents a version number
in a 32-bit unsigned 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.
Contruct a protocol version with a major component major and a minor component minor.
Obtain the major component of a cca_protocol_t
protocol version.
Obtain the minor component of a cca_protocol_t
protocol version.
Obtain a string representation of the protocol version protocol. String representations are of the form "major.minor".
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
All events have a LADCCA ID and project name property. They are only relevant to server interfaces, however, which need to refer to clients other than themselves and to projects (server interfaces are never assigned to a project.)
The event's client ID property will be copied into id.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on January, 3 2008 using texi2html 1.76.