1 /* -*- Mode: C ; c-basic-offset: 4 -*- */
3 Copyright (C) 2007,2008 Nedko Arnaudov
4 Copyright (C) 2007-2008 Juuso Alasuutari
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef CONTROLLER_INTERNAL_H__04D54D51_3D79_49A2_A1DA_F8587E9E7F42__INCLUDED
22 #define CONTROLLER_INTERNAL_H__04D54D51_3D79_49A2_A1DA_F8587E9E7F42__INCLUDED
26 #include "jack/control.h"
27 #include "jack/jack.h"
30 struct jack_controller
32 jackctl_server_t
*server
;
34 void *patchbay_context
;
37 jack_client_t
*client
;
40 const char **driver_names
;
41 unsigned int drivers_count
;
43 const char **internal_names
;
44 unsigned int internals_count
;
46 jackctl_driver_t
*driver
;
47 bool driver_set
; /* whether driver is manually set, if false - DEFAULT_DRIVER is auto set */
49 struct jack_dbus_object_descriptor dbus_descriptor
;
52 #define DEFAULT_DRIVER "dummy"
54 #define JACK_CONF_HEADER_TEXT \
55 "JACK settings, as persisted by D-Bus object.\n" \
56 "You probably don't want to edit this because\n" \
57 "it will be overwritten next time jackdbus saves.\n"
60 jack_controller_find_driver(
61 jackctl_server_t
*server
,
62 const char *driver_name
);
65 jack_controller_find_internal(
66 jackctl_server_t
*server
,
67 const char *internal_name
);
70 jack_controller_find_parameter(
71 const JSList
*parameters_list
,
72 const char *parameter_name
);
75 jack_controller_start_server(
76 struct jack_controller
*controller_ptr
,
77 void *dbus_call_context_ptr
);
80 jack_controller_stop_server(
81 struct jack_controller
*controller_ptr
,
82 void *dbus_call_context_ptr
);
85 jack_controller_select_driver(
86 struct jack_controller
*controller_ptr
,
87 const char * driver_name
);
90 jack_controller_load_internal(
91 struct jack_controller
*controller_ptr
,
92 const char * internal_name
);
95 jack_controller_unload_internal(
96 struct jack_controller
*controller_ptr
,
97 const char * internal_name
);
100 jack_controller_settings_set_driver_option(
101 jackctl_driver_t
*driver
,
102 const char *option_name
,
103 const char *option_value
);
106 jack_controller_settings_set_internal_option(
107 jackctl_internal_t
*internal
,
108 const char *option_name
,
109 const char *option_value
);
112 jack_controller_settings_set_engine_option(
113 struct jack_controller
*controller_ptr
,
114 const char *option_name
,
115 const char *option_value
);
118 jack_controller_settings_save_engine_options(
120 struct jack_controller
*controller_ptr
,
121 void *dbus_call_context_ptr
);
124 jack_controller_settings_write_option(
128 void *dbus_call_context_ptr
);
131 jack_controller_settings_save_driver_options(
133 jackctl_driver_t
*driver
,
134 void *dbus_call_context_ptr
);
137 jack_controller_settings_save_internal_options(
139 jackctl_internal_t
*internal
,
140 void *dbus_call_context_ptr
);
143 jack_controller_patchbay_init(
144 struct jack_controller
*controller_ptr
);
147 jack_controller_patchbay_uninit(
148 struct jack_controller
*controller_ptr
);
151 jack_controller_patchbay_client_appeared_callback(
152 void * server_context
,
154 const char *client_name
);
157 jack_controller_patchbay_client_disappeared_callback(
158 void *server_context
,
160 void *client_context
);
163 jack_controller_patchbay_port_appeared_callback(
164 void *server_context
,
166 void *client_context
,
168 const char *port_name
,
173 jack_controller_patchbay_port_disappeared_callback(
174 void *server_context
,
176 void *client_context
,
181 jack_controller_patchbay_ports_connected_callback(
182 void *server_context
,
184 void *client1_context
,
188 void *client2_context
,
191 uint64_t connection_id
);
194 jack_controller_patchbay_ports_disconnected_callback(
195 void *server_context
,
197 void *client1_context
,
201 void *client2_context
,
204 uint64_t connection_id
,
205 void *connection_context
);
207 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_introspectable
;
208 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_control
;
209 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_configure
;
210 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_patchbay
;
211 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_transport
;
213 #endif /* #ifndef CONTROLLER_INTERNAL_H__04D54D51_3D79_49A2_A1DA_F8587E9E7F42__INCLUDED */