[wscript] Even more -Wl,--as-needed fixes
[jack2.git] / dbus / controller_internal.h
blob9e9fb52f188b621042210897c85941deea7f4845
1 /* -*- Mode: C ; c-basic-offset: 4 -*- */
2 /*
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
24 #include <stdbool.h>
25 #include "jslist.h"
26 #include "jack/control.h"
27 #include "jack/jack.h"
28 #include "jack/session.h"
29 #include "jackdbus.h"
30 #include "list.h"
31 #include "params.h"
33 struct jack_controller_slave_driver
35 struct list_head siblings;
36 char * name;
37 jackctl_driver_t * handle;
38 bool loaded;
41 struct jack_session_pending_command
43 struct list_head siblings;
44 DBusConnection * connection;
45 DBusMessage * message;
46 jack_session_event_type_t type;
47 const char * target;
48 const char * path;
51 struct jack_controller
53 jackctl_server_t *server;
54 jack_params_handle params;
56 void *patchbay_context;
58 bool started;
59 jack_client_t *client;
60 unsigned int xruns;
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;
69 pthread_mutex_t lock;
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"
82 void
83 jack_controller_pending_save(
84 struct jack_controller *controller_ptr);
86 bool
87 jack_controller_start_server(
88 struct jack_controller *controller_ptr,
89 void *dbus_call_context_ptr);
91 bool
92 jack_controller_stop_server(
93 struct jack_controller *controller_ptr,
94 void *dbus_call_context_ptr);
96 bool
97 jack_controller_switch_master(
98 struct jack_controller *controller_ptr,
99 void *dbus_call_context_ptr);
101 bool
102 jack_controller_add_slave_driver(
103 struct jack_controller *controller_ptr,
104 const char * driver_name);
106 bool
107 jack_controller_remove_slave_driver(
108 struct jack_controller *controller_ptr,
109 const char * driver_name);
111 bool
112 jack_controller_select_driver(
113 struct jack_controller *controller_ptr,
114 const char * driver_name);
116 bool
117 jack_controller_load_internal(
118 struct jack_controller *controller_ptr,
119 const char * internal_name);
121 bool
122 jack_controller_unload_internal(
123 struct jack_controller *controller_ptr,
124 const char * internal_name);
126 void
127 jack_controller_deserialize_parameter_value(
128 struct jack_controller *controller_ptr,
129 const char * const * address,
130 const char * value);
132 void
133 jack_controller_serialize_parameter_value(
134 const struct jack_parameter * param_ptr,
135 char * value_buffer);
137 bool
138 jack_controller_patchbay_init(
139 struct jack_controller *controller_ptr);
141 void
142 jack_controller_patchbay_uninit(
143 struct jack_controller *controller_ptr);
145 void *
146 jack_controller_patchbay_client_appeared_callback(
147 void * server_context,
148 uint64_t client_id,
149 const char *client_name);
151 void
152 jack_controller_patchbay_client_disappeared_callback(
153 void *server_context,
154 uint64_t client_id,
155 void *client_context);
157 void *
158 jack_controller_patchbay_port_appeared_callback(
159 void *server_context,
160 uint64_t client_id,
161 void *client_context,
162 uint64_t port_id,
163 const char *port_name,
164 uint32_t port_flags,
165 uint32_t port_type);
167 void
168 jack_controller_patchbay_port_disappeared_callback(
169 void *server_context,
170 uint64_t client_id,
171 void *client_context,
172 uint64_t port_id,
173 void *port_context);
175 void *
176 jack_controller_patchbay_ports_connected_callback(
177 void *server_context,
178 uint64_t client1_id,
179 void *client1_context,
180 uint64_t port1_id,
181 void *port1_context,
182 uint64_t client2_id,
183 void *client2_context,
184 uint64_t port2_id,
185 void *port2_context,
186 uint64_t connection_id);
188 void
189 jack_controller_patchbay_ports_disconnected_callback(
190 void *server_context,
191 uint64_t client1_id,
192 void *client1_context,
193 uint64_t port1_id,
194 void *port1_context,
195 uint64_t client2_id,
196 void *client2_context,
197 uint64_t port2_id,
198 void *port2_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 */