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
;
72 long pending_save
; /* uptime seconds */
75 #define DEFAULT_DRIVER "dummy"
77 #define JACK_CONF_HEADER_TEXT \
78 "JACK settings, as persisted by D-Bus object.\n" \
79 "You probably don't want to edit this because\n" \
80 "it will be overwritten next time jackdbus saves.\n"
83 jack_controller_pending_save(
84 struct jack_controller
*controller_ptr
);
87 jack_controller_start_server(
88 struct jack_controller
*controller_ptr
,
89 void *dbus_call_context_ptr
);
92 jack_controller_stop_server(
93 struct jack_controller
*controller_ptr
,
94 void *dbus_call_context_ptr
);
97 jack_controller_switch_master(
98 struct jack_controller
*controller_ptr
,
99 void *dbus_call_context_ptr
);
102 jack_controller_add_slave_driver(
103 struct jack_controller
*controller_ptr
,
104 const char * driver_name
);
107 jack_controller_remove_slave_driver(
108 struct jack_controller
*controller_ptr
,
109 const char * driver_name
);
112 jack_controller_select_driver(
113 struct jack_controller
*controller_ptr
,
114 const char * driver_name
);
117 jack_controller_load_internal(
118 struct jack_controller
*controller_ptr
,
119 const char * internal_name
);
122 jack_controller_unload_internal(
123 struct jack_controller
*controller_ptr
,
124 const char * internal_name
);
127 jack_controller_deserialize_parameter_value(
128 struct jack_controller
*controller_ptr
,
129 const char * const * address
,
133 jack_controller_serialize_parameter_value(
134 const struct jack_parameter
* param_ptr
,
135 char * value_buffer
);
138 jack_controller_patchbay_init(
139 struct jack_controller
*controller_ptr
);
142 jack_controller_patchbay_uninit(
143 struct jack_controller
*controller_ptr
);
146 jack_controller_patchbay_client_appeared_callback(
147 void * server_context
,
149 const char *client_name
);
152 jack_controller_patchbay_client_disappeared_callback(
153 void *server_context
,
155 void *client_context
);
158 jack_controller_patchbay_port_appeared_callback(
159 void *server_context
,
161 void *client_context
,
163 const char *port_name
,
168 jack_controller_patchbay_port_disappeared_callback(
169 void *server_context
,
171 void *client_context
,
176 jack_controller_patchbay_ports_connected_callback(
177 void *server_context
,
179 void *client1_context
,
183 void *client2_context
,
186 uint64_t connection_id
);
189 jack_controller_patchbay_ports_disconnected_callback(
190 void *server_context
,
192 void *client1_context
,
196 void *client2_context
,
199 uint64_t connection_id
,
200 void *connection_context
);
202 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_introspectable
;
203 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_control
;
204 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_configure
;
205 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_patchbay
;
206 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_session_manager
;
207 extern struct jack_dbus_interface_descriptor g_jack_controller_iface_transport
;
209 #endif /* #ifndef CONTROLLER_INTERNAL_H__04D54D51_3D79_49A2_A1DA_F8587E9E7F42__INCLUDED */