1 /* -*- Mode: C ; c-basic-offset: 4 -*- */
3 Copyright (C) 2007,2008,2011 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"
28 #include "jack/session.h"
33 struct jack_controller_slave_driver
35 struct list_head siblings
;
37 jackctl_driver_t
* handle
;
41 struct jack_session_pending_command
43 struct list_head siblings
;
44 DBusConnection
* connection
;
45 DBusMessage
* message
;
46 jack_session_event_type_t type
;
51 struct jack_controller
53 jackctl_server_t
*server
;
54 jack_params_handle params
;
56 void *patchbay_context
;
59 jack_client_t
*client
;
62 struct list_head slave_drivers
;
63 bool slave_drivers_set
;
64 struct jack_parameter slave_drivers_vparam
;
65 union jackctl_parameter_value slave_drivers_vparam_value
;
67 struct jack_dbus_object_descriptor dbus_descriptor
;
70 struct list_head session_pending_commands
;
73 #define DEFAULT_DRIVER "dummy"
75 #define JACK_CONF_HEADER_TEXT \
76 "JACK settings, as persisted by D-Bus object.\n" \
77 "You probably don't want to edit this because\n" \
78 "it will be overwritten next time jackdbus saves.\n"
81 jack_controller_start_server(
82 struct jack_controller
*controller_ptr
,
83 void *dbus_call_context_ptr
);
86 jack_controller_stop_server(
87 struct jack_controller
*controller_ptr
,
88 void *dbus_call_context_ptr
);
91 jack_controller_switch_master(
92 struct jack_controller
*controller_ptr
,
93 void *dbus_call_context_ptr
);
96 jack_controller_add_slave_driver(
97 struct jack_controller
*controller_ptr
,
98 const char * driver_name
);
101 jack_controller_remove_slave_driver(
102 struct jack_controller
*controller_ptr
,
103 const char * driver_name
);
106 jack_controller_select_driver(
107 struct jack_controller
*controller_ptr
,
108 const char * driver_name
);
111 jack_controller_load_internal(
112 struct jack_controller
*controller_ptr
,
113 const char * internal_name
);
116 jack_controller_unload_internal(
117 struct jack_controller
*controller_ptr
,
118 const char * internal_name
);
121 jack_controller_deserialize_parameter_value(
122 struct jack_controller
*controller_ptr
,
123 const char * const * address
,
127 jack_controller_serialize_parameter_value(
128 const struct jack_parameter
* param_ptr
,
129 char * value_buffer
);
132 jack_controller_patchbay_init(
133 struct jack_controller
*controller_ptr
);
136 jack_controller_patchbay_uninit(
137 struct jack_controller
*controller_ptr
);
140 jack_controller_patchbay_client_appeared_callback(
141 void * server_context
,
143 const char *client_name
);
146 jack_controller_patchbay_client_disappeared_callback(
147 void *server_context
,
149 void *client_context
);
152 jack_controller_patchbay_port_appeared_callback(
153 void *server_context
,
155 void *client_context
,
157 const char *port_name
,
162 jack_controller_patchbay_port_disappeared_callback(
163 void *server_context
,
165 void *client_context
,
170 jack_controller_patchbay_ports_connected_callback(
171 void *server_context
,
173 void *client1_context
,
177 void *client2_context
,
180 uint64_t connection_id
);
183 jack_controller_patchbay_ports_disconnected_callback(
184 void *server_context
,
186 void *client1_context
,
190 void *client2_context
,
193 uint64_t connection_id
,
194 void *connection_context
);
196 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_introspectable
;
197 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_control
;
198 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_configure
;
199 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_patchbay
;
200 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_session_manager
;
201 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_transport
;
203 #endif /* #ifndef CONTROLLER_INTERNAL_H__04D54D51_3D79_49A2_A1DA_F8587E9E7F42__INCLUDED */