1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
|
/* -*- Mode: C ; c-basic-offset: 2 -*- */
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009, 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* This file contains interface to the D-Bus patchbay interface helpers
**************************************************************************
*
* LADI Session Handler is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LADI Session Handler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
* or write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PATCHBAY_H__30334B9A_8847_4E8C_AFF9_73DB13406C8E__INCLUDED
#define PATCHBAY_H__30334B9A_8847_4E8C_AFF9_73DB13406C8E__INCLUDED
#include "client.h"
#include "port.h"
typedef struct ladish_graph_tag { int unused; } * ladish_graph_handle;
typedef
bool
(* ladish_graph_connect_request_handler)(
void * context,
ladish_graph_handle graph_handle,
ladish_port_handle port1,
ladish_port_handle port2);
typedef
bool
(* ladish_graph_disconnect_request_handler)(
void * context,
ladish_graph_handle graph_handle,
uint64_t connection_id);
typedef void (* ladish_graph_simple_port_callback)(ladish_port_handle port_handle);
bool ladish_graph_create(ladish_graph_handle * graph_handle_ptr, const char * opath);
bool ladish_graph_copy(ladish_graph_handle src, ladish_graph_handle dest);
void ladish_graph_destroy(ladish_graph_handle graph_handle);
const char * ladish_graph_get_opath(ladish_graph_handle graph_handle);
const char * ladish_graph_get_description(ladish_graph_handle graph_handle);
void
ladish_graph_set_connection_handlers(
ladish_graph_handle graph_handle,
void * graph_context,
ladish_graph_connect_request_handler connect_handler,
ladish_graph_disconnect_request_handler disconnect_handler);
void ladish_graph_clear(ladish_graph_handle graph_handle, ladish_graph_simple_port_callback port_callback);
void * ladish_graph_get_dbus_context(ladish_graph_handle graph_handle);
ladish_dict_handle ladish_graph_get_dict(ladish_graph_handle graph_handle);
ladish_dict_handle ladish_graph_get_connection_dict(ladish_graph_handle graph_handle, uint64_t connection_id);
bool ladish_graph_add_client(ladish_graph_handle graph_handle, ladish_client_handle client_handle, const char * name, bool hidden);
void
ladish_graph_remove_client(
ladish_graph_handle graph_handle,
ladish_client_handle client_handle);
bool
ladish_graph_rename_client(
ladish_graph_handle graph_handle,
ladish_client_handle client_handle,
const char * new_client_name);
bool
ladish_graph_add_port(
ladish_graph_handle graph_handle,
ladish_client_handle client_handle,
ladish_port_handle port_handle,
const char * name,
uint32_t type,
uint32_t flags,
bool hidden);
ladish_client_handle
ladish_graph_remove_port(
ladish_graph_handle graph_handle,
ladish_port_handle port_handle);
ladish_client_handle
ladish_graph_remove_port_by_jack_id(
ladish_graph_handle graph_handle,
uint64_t jack_port_id,
bool room,
bool studio);
void
ladish_graph_move_port(
ladish_graph_handle graph_handle,
ladish_port_handle port_handle,
ladish_client_handle client_handle);
bool
ladish_graph_rename_port(
ladish_graph_handle graph_handle,
ladish_port_handle port_handle,
const char * new_port_name);
uint64_t
ladish_graph_add_connection(
ladish_graph_handle graph_handle,
ladish_port_handle port1_handle,
ladish_port_handle port2_handle,
bool hidden);
void
ladish_graph_remove_connection(
ladish_graph_handle graph_handle,
uint64_t connection_id,
bool force);
bool
ladish_graph_get_connection_ports(
ladish_graph_handle graph_handle,
uint64_t connection_id,
ladish_port_handle * port1_handle_ptr,
ladish_port_handle * port2_handle_ptr);
bool
ladish_graph_find_connection(
ladish_graph_handle graph_handle,
ladish_port_handle port1_handle,
ladish_port_handle port2_handle,
uint64_t * connection_id_ptr);
ladish_client_handle ladish_graph_find_client_by_id(ladish_graph_handle graph_handle, uint64_t client_id);
ladish_port_handle ladish_graph_find_port_by_id(ladish_graph_handle graph_handle, uint64_t port_id);
ladish_client_handle ladish_graph_find_client_by_jack_id(ladish_graph_handle graph_handle, uint64_t client_id);
ladish_port_handle ladish_graph_find_port_by_jack_id(ladish_graph_handle graph_handle, uint64_t port_id, bool room, bool studio);
ladish_client_handle ladish_graph_find_client_by_name(ladish_graph_handle graph_handle, const char * name, bool appless);
ladish_client_handle ladish_graph_find_client_by_app(ladish_graph_handle graph_handle, const uuid_t app_uuid);
ladish_port_handle ladish_graph_find_port_by_name(ladish_graph_handle graph_handle, ladish_client_handle client_handle, const char * name, void * vgraph_filter);
ladish_client_handle ladish_graph_find_client_by_uuid(ladish_graph_handle graph_handle, const uuid_t uuid);
ladish_port_handle ladish_graph_find_port_by_uuid(ladish_graph_handle graph_handle, const uuid_t uuid, bool use_link_override_uuids, void * vgraph_filter);
ladish_port_handle
ladish_graph_find_client_port_by_uuid(
ladish_graph_handle graph,
ladish_client_handle client,
const uuid_t uuid,
bool use_link_override_uuids);
void
ladish_graph_set_link_port_override_uuid(
ladish_graph_handle graph,
ladish_port_handle port,
const uuid_t override_uuid);
ladish_client_handle ladish_graph_get_port_client(ladish_graph_handle graph_handle, ladish_port_handle port_handle);
uint64_t ladish_graph_get_client_id(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
const char * ladish_graph_get_client_name(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
const char * ladish_graph_get_port_name(ladish_graph_handle graph, ladish_port_handle port);
bool ladish_graph_client_is_empty(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
bool ladish_graph_client_looks_empty(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
bool ladish_graph_client_is_hidden(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
bool ladish_graph_is_port_present(ladish_graph_handle graph_handle, ladish_port_handle port_handle);
void ladish_graph_show_port(ladish_graph_handle graph_handle, ladish_port_handle port_handle);
void ladish_graph_hide_port(ladish_graph_handle graph_handle, ladish_port_handle port_handle);
void ladish_graph_show_client(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
void ladish_graph_hide_client(ladish_graph_handle graph_handle, ladish_client_handle client_handle);
void ladish_graph_adjust_port(ladish_graph_handle graph_handle, ladish_port_handle port_handle, uint32_t type, uint32_t flags);
void ladish_graph_show_connection(ladish_graph_handle graph_handle, uint64_t connection_id);
void ladish_try_connect_hidden_connections(ladish_graph_handle graph_handle);
bool ladish_disconnect_visible_connections(ladish_graph_handle graph_handle);
void ladish_graph_hide_non_virtual(ladish_graph_handle graph_handle);
void ladish_graph_get_port_uuid(ladish_graph_handle graph, ladish_port_handle port, uuid_t uuid_ptr);
bool ladish_graph_client_has_visible_app_port(ladish_graph_handle graph, ladish_client_handle client, const uuid_t app_uuid);
bool ladish_graph_client_has_visible_ports(ladish_graph_handle graph, ladish_client_handle client);
void ladish_graph_dump(ladish_graph_handle graph_handle);
bool
ladish_graph_iterate_nodes(
ladish_graph_handle graph_handle,
void * callback_context,
bool
(* client_begin_callback)(
void * context,
ladish_graph_handle graph_handle,
bool hidden,
ladish_client_handle client_handle,
const char * client_name,
void ** client_iteration_context_ptr_ptr),
bool
(* port_callback)(
void * context,
ladish_graph_handle graph_handle,
bool hidden,
void * client_iteration_context_ptr,
ladish_client_handle client_handle,
const char * client_name,
ladish_port_handle port_handle,
const char * port_name,
uint32_t port_type,
uint32_t port_flags),
bool
(* client_end_callback)(
void * context,
ladish_graph_handle graph_handle,
bool hidden,
ladish_client_handle client_handle,
const char * client_name,
void * client_iteration_context_ptr));
bool
ladish_graph_iterate_connections(
ladish_graph_handle graph_handle,
void * callback_context,
bool (* callback)(
void * context,
ladish_graph_handle graph_handle,
bool connection_hidden,
ladish_client_handle client1_handle,
ladish_port_handle port1_handle,
bool port1_hidden,
ladish_client_handle client2_handle,
ladish_port_handle port2_handle,
bool port2_hidden,
ladish_dict_handle dict));
bool
ladish_graph_interate_client_ports(
ladish_graph_handle graph_handle,
ladish_client_handle client_handle,
void * callback_context,
bool
(* port_callback)(
void * context,
ladish_graph_handle graph_handle,
bool hidden,
ladish_client_handle client_handle,
const char * client_name,
ladish_port_handle port_handle,
const char * port_name,
uint32_t port_type,
uint32_t port_flags));
void ladish_graph_clear_persist(ladish_graph_handle graph_handle);
void ladish_graph_set_persist(ladish_graph_handle graph_handle);
bool ladish_graph_is_persist(ladish_graph_handle graph_handle);
bool ladish_graph_looks_empty(ladish_graph_handle graph_handle);
bool ladish_graph_has_visible_connections(ladish_graph_handle graph_handle);
void ladish_graph_remove_hidden_objects(ladish_graph_handle graph_handle);
void ladish_graph_trick_dicts(ladish_graph_handle graph_handle);
extern const struct cdbus_interface_descriptor g_interface_patchbay;
#endif /* #ifndef PATCHBAY_H__30334B9A_8847_4E8C_AFF9_73DB13406C8E__INCLUDED */
|