Jack2 1.9.21

Classes | Typedefs | Enumerations | Functions
Session API for clients.

## Classes
struct | _jack_session_event

## Typedefs
typedef enum JackSessionEventType | jack_session_event_type_t
typedef enum JackSessionFlags | jack_session_flags_t
typedef struct _jack_session_event | jack_session_event_t
typedef void(* | JackSessionCallback) (jack_session_event_t *event, void *arg)

## Enumerations
enum | JackSessionEventType { JackSessionSave = 1 , JackSessionSaveAndQuit = 2 , JackSessionSaveTemplate = 3 }
enum | JackSessionFlags { JackSessionSaveError = 0x01 , JackSessionNeedTerminal = 0x02 }

## Functions
int | jack_set_session_callback (jack_client_t *client, JackSessionCallback session_callback, void *arg) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
int | jack_session_reply (jack_client_t *client, jack_session_event_t *event) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
void | jack_session_event_free (jack_session_event_t *event) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
char * | jack_client_get_uuid (jack_client_t *client) JACK_WEAK_EXPORT

## Detailed Description

Deprecated:
  Use of JACK-Session is currently deprecated and unsupported. JACK developers recommend the use of NSM instead. See https://github.com/linuxaudio/new-session-manager

## Typedef Documentation

## ◆ jack_session_event_type_t

typedef enum JackSessionEventType jack_session_event_type_t

Definition at line 82 of file session.h.

## ◆ jack_session_flags_t

typedef enum JackSessionFlags jack_session_flags_t

Session flags.

Definition at line 102 of file session.h.

## ◆ jack_session_event_t

typedef struct _jack_session_event jack_session_event_t

Definition at line 152 of file session.h.

## ◆ JackSessionCallback

typedef void(* JackSessionCallback) (jack_session_event_t *event, void *arg)

Prototype for the client supplied function that is called whenever a session notification is sent via jack_session_notify().

Ownership of the memory of event is passed to the application. It must be freed using jack_session_event_free when its not used anymore.

The client must promptly call jack_session_reply for this event.

Deprecated:
  Use of JACK-Session is currently deprecated and unsupported. JACK developers recommend the use of NSM instead. See https://github.com/linuxaudio/new-session-manager

Parameters

  event | The event structure.
  arg | Pointer to a client supplied structure.

Definition at line 170 of file session.h.

## Enumeration Type Documentation

## ◆ JackSessionEventType

enum JackSessionEventType

Session event type.

If a client can't save templates, i might just do a normal save.

There is no "quit without saving" event because a client might refuse to quit when it has unsaved data, but other clients may have already quit. This results in too much confusion, so it is unsupported.

Enumerator
JackSessionSave | Save the session completely. The client may save references to data outside the provided directory, but it must do so by creating a link inside the provided directory and referring to that in any save files. The client must not refer to data files outside the provided directory directly in save files, because this makes it impossible for the session manager to create a session archive for distribution or archival.
JackSessionSaveAndQuit | Save the session completely, then quit. The rules for saving are exactly the same as for JackSessionSave.
JackSessionSaveTemplate | Save a session template. A session template is a "skeleton" of the session, but without any data. Clients must save a session that, when restored, will create the same ports as a full save would have. However, the actual data contained in the session may not be saved (e.g. a DAW would create the necessary tracks, but not save the actual recorded data).

Definition at line 50 of file session.h.

## ◆ JackSessionFlags

enum JackSessionFlags

jack_session_flags_t bits

Enumerator
JackSessionSaveError | An error occurred while saving.
JackSessionNeedTerminal | Client needs to be run in a terminal.

Definition at line 87 of file session.h.

## Function Documentation

## ◆ jack_set_session_callback()

int jack_set_session_callback | ( | jack_client_t * | client,
|  | JackSessionCallback | session_callback,
|  | void * | arg
| ) |  |

Tell the JACK server to call session_callback when a session event is to be delivered.

setting more than one session_callback per process is probably a design error. if you have a multiclient application its more sensible to create a jack_client with only a session callback set.

Deprecated:
  Use of JACK-Session is currently deprecated and unsupported. JACK developers recommend the use of NSM instead. See https://github.com/linuxaudio/new-session-manager

Returns
  0 on success, otherwise a non-zero error code

## ◆ jack_session_reply()

int jack_session_reply | ( | jack_client_t * | client,
|  | jack_session_event_t * | event
| ) |  |

Reply to a session event.

This can either be called directly from the callback, or later from a different thread. For example, it is possible to push the event through a queue and execute the save code from the GUI thread.

Deprecated:
  Use of JACK-Session is currently deprecated and unsupported. JACK developers recommend the use of NSM instead. See https://github.com/linuxaudio/new-session-manager

Returns
  0 on success, otherwise a non-zero error code

## ◆ jack_session_event_free()

void jack_session_event_free | ( | jack_session_event_t * | event | ) |

Free memory used by a jack_session_event_t.

This also frees the memory used by the command_line pointer, if its non NULL.

Deprecated:
  Use of JACK-Session is currently deprecated and unsupported. JACK developers recommend the use of NSM instead. See https://github.com/linuxaudio/new-session-manager

## ◆ jack_client_get_uuid()

char * jack_client_get_uuid | ( | jack_client_t * | client | ) |

Get the assigned uuid for client. Safe to call from callback and all other threads.

The caller is responsible for calling jack_free(3) on any non-NULL returned value.