JACK-AUDIO-CONNECTION-KIT 0.120.1
|
00001 /* 00002 Copyright (C) 2001 Paul Davis 00003 Copyright (C) 2004 Jack O'Quin 00004 Copyright (C) 2010 Torben Hohn 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU Lesser General Public License as published by 00008 the Free Software Foundation; either version 2.1 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 */ 00021 00022 #ifndef __jack_session_h__ 00023 #define __jack_session_h__ 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 #include <jack/types.h> 00030 #include <jack/weakmacros.h> 00031 00053 enum JackSessionEventType { 00054 JackSessionSave = 1, 00055 JackSessionSaveAndQuit = 2, 00056 JackSessionSaveTemplate = 3 00057 }; 00058 00059 typedef enum JackSessionEventType jack_session_event_type_t; 00060 00061 enum JackSessionFlags { 00065 JackSessionSaveError = 0x01, 00069 JackSessionNeedTerminal = 0x02 00070 }; 00071 00072 typedef enum JackSessionFlags jack_session_flags_t; 00073 00074 struct _jack_session_event { 00078 jack_session_event_type_t type; 00079 00084 const char *session_dir; 00085 00091 const char *client_uuid; 00092 00103 char *command_line; 00104 00108 jack_session_flags_t flags; 00109 00113 uint32_t future; 00114 }; 00115 00116 typedef struct _jack_session_event jack_session_event_t; 00117 00132 typedef void (*JackSessionCallback)(jack_session_event_t *event, void *arg); 00133 00144 int jack_set_session_callback(jack_client_t *client, 00145 JackSessionCallback session_callback, 00146 void *arg) JACK_WEAK_EXPORT; 00147 00158 int jack_session_reply( jack_client_t *client, jack_session_event_t *event ) JACK_WEAK_EXPORT; 00159 00160 00167 void jack_session_event_free (jack_session_event_t *event) JACK_WEAK_EXPORT; 00168 00169 00176 char *jack_client_get_uuid (jack_client_t *client) JACK_WEAK_EXPORT; 00177 00190 typedef struct { 00191 const char *uuid; 00192 const char *client_name; 00193 const char *command; 00194 jack_session_flags_t flags; 00195 } jack_session_command_t; 00196 00205 jack_session_command_t *jack_session_notify (jack_client_t* client, 00206 const char *target, 00207 jack_session_event_type_t type, 00208 const char *path ) JACK_WEAK_EXPORT; 00209 00214 void jack_session_commands_free (jack_session_command_t *cmds) JACK_WEAK_EXPORT; 00215 00221 char *jack_get_uuid_for_client_name( jack_client_t *client, const char *client_name ) JACK_WEAK_EXPORT; 00222 00229 char *jack_get_client_name_by_uuid( jack_client_t *client, const char *client_uuid ) JACK_WEAK_EXPORT; 00230 00241 int 00242 jack_reserve_client_name( jack_client_t *client, const char *name, const char *uuid ) JACK_WEAK_EXPORT; 00243 00250 int 00251 jack_client_has_session_callback (jack_client_t *client, const char *client_name) JACK_WEAK_EXPORT; 00252 00253 #ifdef __cplusplus 00254 } 00255 #endif 00256 #endif 00257