JACK-AUDIO-CONNECTION-KIT 0.120.1
Data Structures | Enumerator | Functions | Variables

this API is intended for a sessionmanager.

Data Structures

struct  jack_session_command_t

Functions

jack_session_command_tjack_session_notify (jack_client_t *client, const char *target, jack_session_event_type_t type, const char *path) JACK_WEAK_EXPORT
void jack_session_commands_free (jack_session_command_t *cmds) JACK_WEAK_EXPORT
char * jack_get_uuid_for_client_name (jack_client_t *client, const char *client_name) JACK_WEAK_EXPORT
char * jack_get_client_name_by_uuid (jack_client_t *client, const char *client_uuid) JACK_WEAK_EXPORT
int jack_reserve_client_name (jack_client_t *client, const char *name, const char *uuid) JACK_WEAK_EXPORT
int jack_client_has_session_callback (jack_client_t *client, const char *client_name) JACK_WEAK_EXPORT

Variables

const char * _jack_session_event::session_dir
const char * _jack_session_event::client_uuid
char * _jack_session_event::command_line
jack_session_flags_t _jack_session_event::flags
uint32_t _jack_session_event::future
const char * jack_session_command_t::client_name
const char * jack_session_command_t::command
jack_session_flags_t jack_session_command_t::flags

Detailed Description

this API could be server specific. if we dont reach consensus here, we can just drop it. i know its a bit clumsy. but this api isnt required to be as stable as the client api.


Function Documentation

int jack_client_has_session_callback ( jack_client_t client,
const char *  client_name 
)

find out whether a client has setup a session callback.

Returns:
0 when the client has no session callback, 1 when it has one. -1 on error.
char* jack_get_client_name_by_uuid ( jack_client_t client,
const char *  client_uuid 
)

get the client name for a session_id. in order to snapshot the graph connections, the sessionmanager needs to map session_ids to client names.

char* jack_get_uuid_for_client_name ( jack_client_t client,
const char *  client_name 
)

get the sessionid for a client name. the sessionmanager needs this to reassociate a client_name to the session_id.

int jack_reserve_client_name ( jack_client_t client,
const char *  name,
const char *  uuid 
)

reserve a client name and associate it to a uuid. when a client later call jack_client_open() and specifies the uuid, jackd will assign the reserved name. this allows a session manager to know in advance under which client name its managed clients will appear.

Returns:
0 on success, otherwise a non-zero error code
void jack_session_commands_free ( jack_session_command_t cmds)

free the memory allocated by a session command.

jack_session_command_t* jack_session_notify ( jack_client_t client,
const char *  target,
jack_session_event_type_t  type,
const char *  path 
)

send a save or quit event, to all clients listening for session callbacks. the returned strings of the clients are accumulated and returned as an array of jack_session_command_t. its terminated by ret[i].uuid == NULL target == NULL means send to all interested clients. otherwise a clientname


Variable Documentation

const char* jack_session_command_t::client_name [inherited]
const char* _jack_session_event::client_uuid [inherited]

client_uuid which must be specified to jack_client_open on session reload. client can specify it in the returned commandline as an option, or just save it with the state file.

const char* jack_session_command_t::command [inherited]

the command_line is the reply of the client. it specifies in a platform dependent way, how the client must be restarted upon session reload.

it should contain ${SESSION_DIR} instead of the actual session dir. this would basically make the session dir moveable.

memory will be freed along with jack_session_event_free() initially set to NULL by jack;

flags to be set by the client. normally left 0.

uint32_t _jack_session_event::future [inherited]

future flags. will be set to zero for now.

const char* _jack_session_event::session_dir [inherited]

session_directory with trailing separator this is per client. so the client can do whatever it likes in here.