[ < ] | [ > ] | [ << ] | [ 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 lash_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:
LASH_Config_Data_Set
The client wishes to save its data use the LASH config system. See Configs and Event protocol.
LASH_Config_File
The client saves its data to a file. See section Event protocol.
LASH_Server_Interface
The client is a server interface. See section Server interfaces.
LASH_No_Autoresume
This flag is set by the --lash-no-autoresume
command line option and
should not normally be set by clients themselves.
LASH_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 lash_protocol_t
variable.
Extract LASH-specific arguments from argc/argv for use in lash_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 lash_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 lash_config_destroy
.
Returns NULL
if there are no configs pending.
Send an event to the server. The event must be created using
lash_event_new
or lash_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
lash_config_new
, lash_config_new_with_key
or
lash_config_dup
. The library takes
over ownership of the memory (including the key, etc) and it should not be freed by the client.
Check whether the lash_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 LASH_Jack_Client_Name event to the server. See Normal LASH_Jack_Client_Name.
Tell the server the client's ALSA client ID. This just is a convenience function that just sends a LASH_Alsa_Client_ID event to the server. See Normal LASH_Alsa_Client_ID.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The event protocol (See section Event protocol,) is versioned with a major and minor component.
The lash_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 lash_protocol_t
protocol version.
Obtain the minor component of a lash_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 LASH 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
lash_config_get_value_int
on a config that was set with
lash_config_set_value_float
. The integer values are converted
to and from network byte order as appropriate.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on October, 4 2006 using texi2html 1.76.