Browse Source

add some docs...

tags/0.120.1
Torben Hohn 16 years ago
parent
commit
53c1b14599
2 changed files with 37 additions and 0 deletions
  1. +19
    -0
      jack/jack.h
  2. +18
    -0
      jack/types.h

+ 19
- 0
jack/jack.h View File

@@ -1019,16 +1019,35 @@ void jack_set_info_function (void (*func)(const char *));
*/
void jack_free(void* ptr);

/**
* 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[0]='\0'
*/

jack_session_command_t *jack_session_notify (jack_client_t* client,
jack_session_event_t code,
const char *path ) JACK_WEAK_EXPORT;

/**
* get the jack client name for a uuid
*/

char *jack_get_client_name_by_uuid( jack_client_t *client, const char *uuid ) JACK_WEAK_EXPORT;

/**
* get some metadata cookie for client with uuid
*/

char *jack_get_cookie_by_uuid( jack_client_t *client,
const char *uuid,
const char *key ) JACK_WEAK_EXPORT;

/**
* set metadata cookie on self
*/

int jack_client_set_cookie( jack_client_t *client,
const char *key,
const char *value ) JACK_WEAK_EXPORT;


+ 18
- 0
jack/types.h View File

@@ -372,6 +372,24 @@ typedef void (*JackShutdownCallback)(void *arg);
*/
typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);

/**
* Prototype for the client supplied function that is called
* whenever a session notification is sent via jack_session_notify().
* for a save event the client is required to save its state.
* it must save it into session_dir, and at least use prefix for the first
* part of the filename. (it is free to create a directory or create more
* files, as long as these start with prefix.)
* the prefix also acts as uuid, which the client needs to specify
* to jack_client_open() upon session reload.
*
* the return value is a commandline, which will restore the state.
*
* @param code the type of the Event (Save or Quit)
* @param session_dir with trailing separator.
* @param prefix for saved files.
* @param arg pointer to a client supplied structure
*/

typedef char *(*JackSessionCallback)(jack_session_event_t code, const char* session_dir, const char* prefix, void *arg);



Loading…
Cancel
Save