| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes version 2.0 of the event protocol.
| 6.3.1 Normal clients | The protocol for normal LADCCA clients | |
| 6.3.2 Server interfaces | The protocol for server interfaces |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section deals with normal clients (as opposed to Server interfaces.)
CCA_Client_NameNULL stringSet the client's user-visible name.
NULL stringRequest the client's user-visible name.
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_NameNULL stringTell 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.
NULL stringRequest the client name that the server thinks the client is connected to JACK with.
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.)
NULL stringTell the server what ID the client is connected to ALSA with.
Clients should only ever send one non-NULL CCA_Alsa_Client_ID
event.
NULL stringRequest the client ID that the server thinks the client is connected to ALSA with.
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_FileTell 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.
Tell the server that the client has finished saving its data within the directory it was told to. The string is ignored.
CCA_Restore_FileTell 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.
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_SetTell 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.
Tell the server that the client has finished sending its configs to the server. The event string is ignored.
CCA_Restore_Data_SetTell 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.
Tell the server that the client has finished recieving its configs from the server. The event string is ignored.
CCA_SaveTell the server to save the project that the client is attached to.
Never occurs.
CCA_QuitTell the server to close all clients in the project that the client is attached to.
The client should immediately quit without saving. No more events will be sent by the server and the client's connection will be terminated.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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_AddRestore a project from an existing directory. The event string should contain the directory's name.
projectIgnored.
client_idIgnored.
A new project has been added. The event string will contain the project's name.
projectNULL
client_idUndefined.
CCA_Project_RemoveClose 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.
projectThe project to remove.
client_idIgnored.
A project has been removed.
projectThe project that has been removed.
client_idUndefined.
CCA_Project_DirNULL stringMove a project to a different directory. The directory name should be contained in the event's string.
projectThe project to move.
client_idUndefined.
NULL stringRequest a project's directory.
projectThe project whose directory is being requested.
client_idUndefined.
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.
projectThe project whose directory is being declared.
client IDUndefined.
CCA_Project_NameChange a project's name. The new project name should be contained in the event's string.
projectThe project name to change.
client_idUndefined.
A project's name has changed. The new project name is contained in the event's string.
projectThe project name that has changed.
client IDUndefined.
CCA_Client_AddShould not occur
A new client has been added.
projectThe project that the new client has been added to.
client IDThe new client's ID.
CCA_Client_NameNULL stringShould not occur.
NULL stringRequest a client's name.
projectThe client's project.
client IDThe client's ID.
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.
projectThe client's project.
client IDThe client's ID.
CCA_Jack_Client_NameNULL stringShould not occur.
NULL stringRequest a client's JACK client name.
projectThe client's project.
client IDThe client's ID.
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.
projectThe client's project.
client IDThe client's ID.
CCA_Alsa_Client_IDNULL stringShould not occur.
NULL stringRequest a client's ALSA client ID.
projectThe client's project.
client IDThe client's LADCCA ID.
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.
projectThe client's project.
client IDThe client's LADCCA ID.
CCA_PercentageThis 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.
Should not occur.
The percentage of completion of the current operation. The percentage
is sent as a string, derived from sprintfing an int.
projectThe project whose operation is being described.
client IDUndefined.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on April, 22 2011 using texi2html 1.78.