Jack2
1.9.10
|
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 #ifndef __jack_session_h__ 00022 #define __jack_session_h__ 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 #include <jack/types.h> 00029 #include <jack/weakmacros.h> 00030 00046 enum JackSessionEventType { 00057 JackSessionSave = 1, 00058 00064 JackSessionSaveAndQuit = 2, 00065 00075 JackSessionSaveTemplate = 3 00076 }; 00077 00078 typedef enum JackSessionEventType jack_session_event_type_t; 00079 00083 enum JackSessionFlags { 00087 JackSessionSaveError = 0x01, 00088 00092 JackSessionNeedTerminal = 0x02 00093 }; 00094 00098 typedef enum JackSessionFlags jack_session_flags_t; 00099 00100 struct _jack_session_event { 00104 jack_session_event_type_t type; 00105 00112 const char *session_dir; 00113 00120 const char *client_uuid; 00121 00135 char *command_line; 00136 00140 jack_session_flags_t flags; 00141 00145 uint32_t future; 00146 }; 00147 00148 typedef struct _jack_session_event jack_session_event_t; 00149 00162 typedef void (*JackSessionCallback)(jack_session_event_t *event, 00163 void *arg); 00164 00175 int jack_set_session_callback (jack_client_t *client, 00176 JackSessionCallback session_callback, 00177 void *arg) JACK_WEAK_EXPORT; 00178 00188 int jack_session_reply (jack_client_t *client, 00189 jack_session_event_t *event) JACK_WEAK_EXPORT; 00190 00191 00197 void jack_session_event_free (jack_session_event_t *event) JACK_WEAK_EXPORT; 00198 00199 00207 char *jack_client_get_uuid (jack_client_t *client) JACK_WEAK_EXPORT; 00208 00219 typedef struct { 00220 const char *uuid; 00221 const char *client_name; 00222 const char *command; 00223 jack_session_flags_t flags; 00224 } jack_session_command_t; 00225 00233 jack_session_command_t *jack_session_notify ( 00234 jack_client_t* client, 00235 const char *target, 00236 jack_session_event_type_t type, 00237 const char *path) JACK_WEAK_EXPORT; 00238 00242 void jack_session_commands_free (jack_session_command_t *cmds) JACK_WEAK_EXPORT; 00243 00253 int 00254 jack_reserve_client_name (jack_client_t *client, 00255 const char *name, 00256 const char *uuid) JACK_WEAK_EXPORT; 00257 00264 int 00265 jack_client_has_session_callback (jack_client_t *client, const char *client_name) JACK_WEAK_EXPORT; 00266 00267 #ifdef __cplusplus 00268 } 00269 #endif 00270 #endif