This is the Linux Audio Developer's Configuration and Connection API Reference Manual, Edition 0.4.0, October 2003 for LADCCA version 0.2.

Copyright © 2002, 2003 Robert Ham (rah@bash.sh)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''.

This is the Linux Audio Developer's Configuration and Connection API Reference Manual, edition 0.4.0, October 2003 for LADCCA version 0.4.0.

http://pkl.net/~node/ladcca.html

Introduction
************

LADCCA stands for Linux Audio Developer's Configuration and Connection API. It is a session management system for audio applications on GNU/Linux.  It understands the JACK low latency audio API and the ALSA MIDI sequencer interface. The system is comprised of a server program, ladccad, an application library, libladcca, and a command line control program, laddca_control.  The server and clients communicate over TCP sockets.  There are three kinds of clients: normal clients (audio applications), user interfaces for the server, and connection patchbays.

Nomenclature
============

In order to describe the system, we should introduce some terminology. First of all, the server is the ladccad server program, an omni-present marshaller and database for storing arbitrary application data. The library is the libladcca shared library.  It contains all the functions that an application uses to communicate with the server and take part in the system.  Such an application is called a client.

The server deals with things in terms of collections of clients, called projects.  A project has a unique string name, a current directory and a list of clients that are in that project.  The server can have one client that is a server interface that allows the user to control the server.  There is one server interface included with the system, the ladcca_control program.

Copying LADCCA
**************

LADCCA is distributed under the GNU General Public License.  A copy of the license text is provided in the file COPYING along with the software source code, or you can get a copy by writing to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

In plain english, the GPL basically restricts you from restricting other people's use of the LADCCA source code (ie, all of LADCCA), and any additions you make to the code, including linking with the LADCCA library.  If you use code from this software, your software must be relased under the GPL.  If you modify this software and release it, your modifications must be released under the GPL. If you release software linked against the LADCCA library, your software must be released under the GPL.

Note that this in no way restricts those people who want to release non-free LADCCA clients.  LADCCA operates using a well defined protocol over TCP sockets.  The high-level protocol is described within this document and the lower-level bit-wise protocol can be garnered from the source itself.

Installation
************

This chapter describes how to get LADCCA installed on your system.

Dependencies
============

LADCCA depends on the ALSA library, the JACK library, a unique ID library called libuuid and the XML library libxml2.  You need these installed before attempting to install LADCCA.

ALSA is available from http://www.alsa-project.org/.

JACK is available from http://jackit.sf.net/.

The libuuid library is included with the ubiquitous e2fsprogs package, but if this is not installed on your system, it is available from http://e2fsprogs.sf.net/. The libxml2 library is available from http://www.xmlsoft.org/.

The LADCCA Control client depends on the GNU Readline library, available from ftp://ftp.gnu.org/pub/gnu/readline/.

The LADCCA GTK Test Client and the LADCCA Save Button 2 client both depend on the GTK+ 2 toolkit, available from ftp://ftp.gtk.org/pub/gtk/v2.0/. The LADCCA Synth client has an optional GUI which also uses the GTK+ 2 toolkit.

The LADCCA Save Button client depends on the GTK+ 1.2 toolkit, also available from ftp://ftp.gtk.org/pub/gtk/v1.2/.

Installation
============

First off, you need to download the package.  It is available from the LADCCA webpage, http://pkl.net/~node/ladcca.html.  After you have downloaded it, unpack the tarball into a directory using tar xzf /where/ever/you/put/ladcca-0.4.0.tar.gz and change into the source directory with cd ladcca-0.4.0.

The package uses the GNU autotools for configuration and makefile creation. In order to install the package, you must complete three steps: configuration; building; and installing.

Configuration
-------------

To configure the package, there is a shell script named configure in the top source directory.  It is a standard GNU autoconf configure script, and so accepts the standard GNU configuration options (such as --prefix, --datadir, etc.)  To run it type ./configure and add any options.  The non-standard options that the script recognises are described below. Running the script with the --help option will also provide a quick summary of the recognised options.

Configure script options
........................

--disable-gtk2
     Prevents the configure script from checking for the presence of the GTK+ 2 toolkit and disables the building of any code that relies on it.  The LADCCA Save Button 2 and LADCCA GTK Test Client both rely on GTK+ 2.

--disable-gtk
     Prevents the configure script from checking for the presence of the GTK+ 1.2 toolkit and disables the building of any code that relies on it. The LADCCA Save Button client relies on GTK+ 1.2.

--enable-debug
     Causes the library, server and clients to be built with debugging output. This is not very useful and only recommended for developers working on the LADCCA code itself.

--with-default-dir=DIR
     Specifies the default directory, relative to \$HOME under which the server will create new project directories.  Without this option, the value defaults to audio-projects.

--disable-serv-inst
     The LADCCA server and library look up port addresses for the LADCCA service using standard system calls that refer to the /etc/services database. If /etc/services does not contain a valid entry, an error will result. By default, the installation routine will install a service entry if one does not exist.  This flag disables that action.

Building
--------

To build the package, simply type make in the top source directory.  This will build the server, the library and the clients that are compatible with the resources found by the configure script.

Installing
----------

To install the package, type make install in the top source directory.  By default the package installation prefix is /usr/local but the --prefix option to the configure script will change this.  The ladccad server and the clients that were built are installed in PREFIX/bin.  The libladcca client library is installed in PREFIX/lib.  The C header files for the client library are installed under PREFIX/include.  This manual is installed under PREFIX/info.

With make install, the package is installed with debugging symbols in the object files.  To save space, you can install with make install-strip to install the object files without debugging symbols.

Server
******

The LADCCA server is called ladccad.

Server interface
****************

Run the ladccad_control.  There is a help command.

Client reference
****************

This chapter provides a programming guide and library reference for programmers of LADCCA clients.

Operational overview
====================

In this section we give an overview of how the LADCCA system operates, describing the server and client objects and operations that make it work.  The ladccad server must be running in order for clients to participate in the system; clients cannot interoperate soley between themselves.  The server maintains a list of connected clients and a list of projects with which these clients are associated.

The server and clients exchange events and configs over their connections.  There is one, and only one, bi-directional connection between a client and the server.  The transport for this connection is currently TCP.

An event is a very simple object having two relevant properties: a type and an optional arbitrary character string.  The type defines what the event means to the recipient, and the string allows additional information to be included with it.  For example, if a client wishes the server to save the current project, it sends a CCA_Save event to the server.  While saving the project, the server may wish to tell a client to save its data in a certain directory.  To so, it sends a CCA_Save_File event to the client with a string containing the name of a directory into which the client should save its data files.

Clients can save data on the server if they wish.  To do this, the client declares that it wants to save data on the server when it initialises the server connection and then later sends one or more configs to the server.  A config is also a very simple object.  It has a client-unique character string key, and a value of arbitrary size and type (well, almost arbitrary; its size must be able to be described by a uint32_t integer due to byte-order conversions done when sending data over the network.)

Session example
---------------

In this section we will examine a typical session in some detail, describing the server and client operations that take place.  In the session, the server is started, a number of clients connect, the session is saved and then restored.

Starting up the server
......................

Before all else, the user starts the server.  It starts up and begins listening for connections from clients.  It doesn't do much else.

A client connection
...................

The user then starts a JACK client program.  It opens a connection to the server and provides it with all information that the server will need to run the application again.  This information includes: the current directory that the user was in when they ran the program, the command line that started the application and the class of the client (a character string that the client application provides the initialisation routine that will never change over all initialisations.)

With this information is included a set of flags that describe the client to the server.  This particular client saves data to files and wants the server to tell it where to save files when the project is saved, so it has the CCA_Config_File flag set.

The client library starts two threads for communication with the server, one for sending data and the other for recieving.  It also sends, along with the client supplied data, a number of parameters that were extracted from the client's command line options before it checked them.  This optionally includes the name of the project that the client should initially be associated with and a 128-bit, world-unique identifier for this particular client instance (the LADCCCA ID.)

Server-side, the server wakes up to the fact that a new connection has arrived and immediately adds it to a list of open connections and then goes back to waiting.  When the client sends the requisite information, the server looks at it and decides what to do with the client.  This client has not requested a specific project to which it should be connected.  However, there are no existing projects so the server creates a new project with the name project-1 in the directory /home/USER/audio-projects/project-1 (assuming the user didn't specify a different default directory when running configure.)  It also generates a new LADCCA ID for the client.  It then adds the client to the new project and goes back to listening.

The client then connects up to the JACK server and, after having done this, sends a CCA_Jack_Client_Name event to the server with the name that it registered to JACK with as the string.  This notifies the server that it is a JACK client and needs its JACK port connections saved and restored. The server will now pay attention to any activity regarding the client (ie, port creation and destruction and port connection and disconnection.)

Another client
..............

The user then starts a second client that uses the ALSA sequencer interface and wishes to save data on the server.  It connects to the server with a different class to the JACK client and with the CCA_Config_Data_Set flag set.

The server sees that this client also didn't specify a project, and so adds it to the first available project; the same one as the previous project, project-1.  It also sees that the client wants to store data on the server, and so it creates a directory within the project directory for this data to be stored in and creates a database-style object to manage the client's data.

The client then connects to the ALSA sequencer and sends its client ID to the server in the first character of the string of a CCA_Alsa_Client_Name event.  The server regards this similarly to the other client's JACK client name.

Saving the project
..................

After the user has done some work in the two clients, they want to save their work.  They click a button on one of the clients (or something similar) and the client sends a CCA_Save event to server.  The server recieves this and then iterates through each client in the project and checks its flags.  The JACK client saves data by itself (it has the CCA_Config_File flag set,) so the server creates a directory under the project directory for it to save in and then sends a CCA_Save_File event to the client with a string containing the name of the directory it made.  The client recieves the event and saves its data into the specified directory.

Next, the server examines the ALSA client.  It wishes to save data on the server, so the server sends a CCA_Save_Data_Set to the client.  With all of the clients iterated through, it now saves all the information it needs to be able to restore them; their working directory, command line options, etc.  In order to do this, it asks the JACK server to find the connections for the JACK client, and asks the ALSA sequencer to find the connections for the ALSA client.  It uses the client name and ID that both clients sent to the server after opening their connections to the respective systems.  All of this information is stored in a file under the project's directory.  When this is done, the server goes back to listening for events and configs.

The client, meanwhile, has recieved the CCA_Save_Data_Set event and sends back a number of configs to the server.  When it has sent all the data it wishes to be saved, it sends back a CCA_Save_Data_Set event.  The server passes all of the configs to the object managing the data store for the ALSA client. When the server recieves the CCA_Save_Data_Set event from the client, it tells the data store to write the data to disk.  The save is now complete.

Client resumption
.................

Unfortunately for the user, the ALSA client crashes.  The server detects that the client has disconnected, and puts the client on a list of lost clients for the project.  The user then starts another copy of the client, which connects to the server in the same way it did before.  This time, however, the server checks through the list of lost clients and finds that the class of the new client matches the class of the lost client and so it resumes the lost client using the new one.  It gives it the 128-bit ID of the lost client, adds it to the project, and then sends a CCA_Restore_Data_Set event to the client.  The client then cleans itself up, ready to recieve the data set.  The server sends the client the configs, and then another CCA_Restore_Data_Set event.  The client recieves this data and its state has been restored that of the client that crashed.

The user can stop this behaviour by specifying the --ladcca-no-autoresume option on the client's command line.

Restoring the project
.....................

The user has to go off and do other things, and so they close down the clients and the server.  Some time later, the user comes back and wants to start working again so first, as always, they start up the server. They then start the ladcca_control program.  This is a text interface command program for controlling the server.  They get a command prompt and into it type restore /home/USER/audio-projects/project-1.  The ladcca_control client sends a CCA_Restore event to the server with the specified directory as the string.  The server opens the file that it saved before, and reads in all the information about the project and its clients.  It creates a new project with this information.  The clients are created as lost clients, however.

The server then iterates through each client and starts a new copy of it using the information provided when the original client connected.  It also adds some command line options that are extracted by the client library. These specify the LADCCA ID of the client, the project name that it should be connecting to and the server's hostname and port.  It then goes back to waiting.

The new JACK client then connects to the server as normal.  When the server recieves it connection, it checks the client against the project's list of lost clients.  This time, however, it has its ID specified, so the server will only resume a client with a matching ID.  Lo and behold, such a client exists.  The server resumes the old JACK client, telling it to load its state from the files in the project directory that the client previously stored.  It does so with a CCA_Restore_File event with the string as the directory name.  The ALSA client does exactly the same, except having its data restored through CCA_Restore_Data_Set as described above.

Only one thing remains for the clients to be fully restored: the JACK and ALSA sequencer connections.  This happens when the clients send their CCA_Jack_Client_Name and CCA_Alsa_Client_ID events.  The connections are stored with the LADCCA ID rather than the JACK client name or ALSA client ID.  When the client registers its name or ID, the connections are converted from the LADCCA ID to the JACK client name or ALSA client ID, and the connections are restored.  It also pays attention to connections to other clients within the same project, converting between JACK client names, ALSA client IDs and LADCCA IDs as appropriate.

Types and functions
===================

Server interaction
------------------

 -- 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.

     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 Event protocol.

     CCA_Server_Interface
          The client is a server interface.  See 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.

 -- Function: cca_args_t * cca_extract_args (int * ARGC, char *** ARGV)
     Extract LADCCA-specific arguments from argc/argv for use in cca_init.  This should be done before the client checks the arguments, obviously.

 -- 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.

 -- 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: 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.  This is a convenience function that just sends a CCA_Jack_Client_Name event to the server.  See Normal CCA_Jack_Client_Name.

 -- Function: void cca_alsa_client_id (cca_client_t * CLIENT, unsigned char ID);
     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.

Protocol versioning
-------------------

The event protocol (see 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.

 -- 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''.

Events
------

 -- Function: cca_event_t * cca_event_new (VOID)

 -- Function: cca_event_t * cca_event_new_with_type (enum CCA_Event_Type TYPE)

 -- Function: void cca_event_destroy (cca_event_t * EVENT)

 -- Function: enum CCA_Event_Type 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_Type TYPE)

 -- Function: void cca_event_set_string (cca_event_t * EVENT, const char * STRING);

Server interface events
.......................

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.)

 -- Function: void cca_event_get_client_id (const cca_event_t * EVENT, uuid_t ID)
     The event's client ID property will be copied into ID.

 -- Function: const char * cca_event_get_string (const cca_event_t * EVENT)

 -- Function: void cca_event_set_client_id (cca_event_t * EVENT, enum uuid_t ID)

 -- Function: void cca_event_set_project (cca_event_t * EVENT, const char * PROJECT_NAME);

Configs
-------

 -- 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)

Semi-typed configs
..................

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)

Event protocol
==============

This section describes version 2.0 of the event protocol.

Normal clients
--------------

This section deals with normal clients (as opposed to Server interfaces.)

CCA_Client_Name

     To server, non-NULL string
          Set the client's user-visible name.

     To server, NULL string
          Request the client's user-visible name.

     From server
          This will only be sent in response to a CCA_Client_Name with a NULL string.  The string will be NULL if the client has not set a user-visible name, and the name itself if it has.

CCA_Jack_Client_Name

     To server, non-NULL string
          Tell the server what name the client is connected to JACK with. Clients should only ever send one non-NULL CCA_Jack_Client_Name event.  Note that you must send this event after calling jack_activate(); otherwise, the server will not be able to connect the client's ports.

     To server, NULL string
          Request the client name that the server thinks the client is connected to JACK with.

     From server
          This will only be sent in response to a CCA_Jack_Client_Name with a NULL string.  The string will be NULL if the client has not set a JACK client name, and the client name itself if it has.

CCA_Alsa_Client_ID
     To communicate ALSA client IDs within events, use the first character of a two character string of the form { ID, '\0' } as the event string.  A convenience function, cca_alsa_client_id, exists to do this for you (see cca_alsa_client_id.)

     To server, non-NULL string
          Tell the server what ID the client is connected to ALSA with. Clients should only ever send one non-NULL CCA_Alsa_Client_ID event.

     To server, NULL string
          Request the client ID that the server thinks the client is connected to ALSA with.

     From server
          This will only be sent in response to a CCA_Alsa_Client_ID with a NULL string.  The string will be NULL if the client has not set an ALSA client ID, and a string containing the ALSA client ID as described above if it has.

CCA_Save_File

     From server
          Tell the client to save all its data to files within a specific directory. The event string will never be NULL and will contain the name of the directory in which the client should save its data.  Clients must always send a CCA_Save_File event back to the server when they have finished saving their data.  The client should not rely on the directory existing after it has sent its CCA_Save_File event back.  It is valid behaviour for a client to save no files within the directory.  Files should always be overwritten (ie, using the "w" flag with fopen(),) preferably without user confirmation if you care for their sanity.

     From client
          Tell the server that the client has finished saving its data within the directory it was told to.  The string is ignored.

CCA_Restore_File

     From server
          Tell the client to load all its data from files within a specific directory. The event string will never be NULL and will contain the name of the directory from which the client should load its data.  Clients must always send a CCA_Restore_File event back to the server when they have finished restoring their data.  The client should not rely on the directory existing after it has sent its CCA_Restore_File event back.

     From client
          Tell the server that the client has finished restoring its data from within the directory it was told to.  The string is ignored.

CCA_Save_Data_Set

     From server
          Tell the client to send all its configuration data to the server with a number of configs.  The client must always send a CCA_Save_Data_Set event back to the server when it has finished sending its configs.  The event string will always be NULL.

     From client
          Tell the server that the client has finished sending its configs to the server.  The event string is ignored.

CCA_Restore_Data_Set

     From server
          Tell the client to immediately expect a stream of configs from the server. This event will only be sent if there are one or more configs to be sent. The event string will always be NULL.  The client must always send a CCA_Restore_Data_Set back to the server when it has recieved all of its configs.

     From client
          Tell the server that the client has finished recieving its configs from the server.  The event string is ignored.

CCA_Save

     From client
          Tell the server to save the project that the client is attached to.

     From server
          Never occurs.

CCA_Quit

     From client
          Tell the server to close all clients in the project that the client is attached to.

     From server
          The client should immediately quit without saving.  No more events will be sent by the server and the client's connection will be terminated.

Server interfaces
-----------------

Server interfaces are treated very differently to normal interfaces.  Events from and to server interfaces are, for the most part, in order to describe and manipulate existing projects and clients.  For this reason, the cca_event_t type has project and client_id properties which facilitate this.  See Server interface events.  The project property contains the name of the project.

A server interface should start up with the default assumption that there are no projects.  Upon connection, the server will send appropriate events (CCA_Project_Add, CCA_Client_Add, CCA_Client_Name, etc) that describe the current state of the system.  From then on, events will be sent to keep the interface up to date with the server's state.

CCA_Project_Add

     From interface
          Restore a project from an existing directory.  The event string should contain the directory's name.

          project
               Ignored.

          client_id
               Ignored.

     From server
          A new project has been added.  The event string will contain the project's name.

          project
               NULL

          client_id
               Undefined.

CCA_Project_Remove

     From interface
          Close an open project.  All of the project's clients will be told to quit and the project will be removed from the server's project list.

          project
               The project to remove.

          client_id
               Ignored.

     From server
          A project has been removed.

          project
               The project that has been removed.

          client_id
               Undefined.

CCA_Project_Dir

     From interface, non-NULL string
          Move a project to a different directory.  The directory name should be contained in the event's string.

          project
               The project to move.

          client_id
               Undefined.

     From interface, NULL string
          Request a project's directory.

          project
               The project whose directory is being requested.

          client_id
               Undefined.

     From server
          A declaration of the project's directory; either because it has been requested or because the project has been moved.  The directory name is contained in the event's string.

          project
               The project whose directory is being declared.

          client ID
               Undefined.

CCA_Project_Name

     From interface
          Change a project's name.  The new project name should be contained in the event's string.

          project
               The project name to change.

          client_id
               Undefined.

     From server
          A project's name has changed.  The new project name is contained in the event's string.

          project
               The project name that has changed.

          client ID
               Undefined.

CCA_Client_Add

     From interface
          Should not occur

     From server
          A new client has been added.

          project
               The project that the new client has been added to.

          client ID
               The new client's ID.

CCA_Client_Name

     From interface, non-NULL string
          Should not occur.

     From interface, NULL string
          Request a client's name.

          project
               The client's project.

          client ID
               The client's ID.

     From server
          A declaration of a client's name; either because it has been requested or because the client set the name.  The name is contained in the event's string.

          project
               The client's project.

          client ID
               The client's ID.

CCA_Jack_Client_Name

     From interface, non-NULL string
          Should not occur.

     From interface, NULL string
          Request a client's JACK client name.

          project
               The client's project.

          client ID
               The client's ID.

     From server
          A declaration of a client's JACK client name; either because it has been requested or because the client set the name.  The client name is contained in the event's string.

          project
               The client's project.

          client ID
               The client's ID.

CCA_Alsa_Client_ID

     From interface, non-NULL string
          Should not occur.

     From interface, NULL string
          Request a client's ALSA client ID.

          project
               The client's project.

          client ID
               The client's LADCCA ID.

     From server
          A declaration of a client's ALSA client ID; either because it has been requested or because the client set the ID.  The ALSA client ID is contained in the event's string, as desribed in Normal CCA_Alsa_Client_ID.

          project
               The client's project.

          client ID
               The client's LADCCA ID.

CCA_Percentage
     This event exists to provide user feedback on the status of save operations and perhaps other operations in future.  The server will first send a percentage of 0, then successive percentages up to and including 100.  When the operation is complete, the server will send a percentage of 0 again.

     From interface
          Should not occur.

     From server
          The percentage of completion of the current operation.  The percentage is sent as a string, derived from sprintfing an int.

          project
               The project whose operation is being described.

          client ID
               Undefined.

Copying restrictions
********************

     [file fdl.texi not included]