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
|
/* -*- 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 graph object that is backed through D-Bus
**************************************************************************
*
* 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 GRAPH_PROXY_H__61D1ED56_E33B_4F50_B45B_F520979E8AA7__INCLUDED
#define GRAPH_PROXY_H__61D1ED56_E33B_4F50_B45B_F520979E8AA7__INCLUDED
#include "common.h"
typedef struct graph_proxy_tag { int unused; } * graph_proxy_handle;
#ifdef __cplusplus
extern "C" {
#endif
#if 0
} /* Adjust editor indent */
#endif
bool
graph_proxy_create(
const char * service,
const char * object,
bool graph_dict_supported,
bool graph_manager_supported,
graph_proxy_handle * graph_proxy_ptr);
void
graph_proxy_destroy(
graph_proxy_handle graph);
const char * graph_proxy_get_service(graph_proxy_handle graph);
const char * graph_proxy_get_object(graph_proxy_handle graph);
bool
graph_proxy_activate(
graph_proxy_handle graph);
bool
graph_proxy_attach(
graph_proxy_handle graph,
void * context,
void (* clear)(void * context),
void (* client_appeared)(void * context, uint64_t id, const char * name),
void (* client_renamed)(void * context, uint64_t client_id, const char * old_client_name, const char * new_client_name),
void (* client_disappeared)(void * context, uint64_t id),
void (* port_appeared)(void * context, uint64_t client_id, uint64_t port_id, const char * port_name, bool is_input, bool is_terminal, bool is_midi),
void (* port_renamed)(void * context, uint64_t client_id, uint64_t port_id, const char * old_port_name, const char * new_port_name),
void (* port_disappeared)(void * context, uint64_t client_id, uint64_t port_id),
void (* ports_connected)(void * context, uint64_t client1_id, uint64_t port1_id, uint64_t client2_id, uint64_t port2_id),
void (* ports_disconnected)(void * context, uint64_t client1_id, uint64_t port1_id, uint64_t client2_id, uint64_t port2_id));
void
graph_proxy_detach(
graph_proxy_handle graph,
void * context);
bool
graph_proxy_connect_ports(
graph_proxy_handle graph,
uint64_t port1_id,
uint64_t port2_id);
bool
graph_proxy_disconnect_ports(
graph_proxy_handle graph,
uint64_t port1_id,
uint64_t port2_id);
bool
graph_proxy_dict_entry_set(
graph_proxy_handle graph,
uint32_t object_type,
uint64_t object_id,
const char * key,
const char * value);
bool
graph_proxy_dict_entry_get(
graph_proxy_handle graph,
uint32_t object_type,
uint64_t object_id,
const char * key,
char ** value);
bool
graph_proxy_dict_entry_drop(
graph_proxy_handle graph,
uint32_t object_type,
uint64_t object_id,
const char * key);
bool graph_proxy_get_client_pid(graph_proxy_handle graph, uint64_t client_id, pid_t * pid_ptr);
bool
graph_proxy_split(
graph_proxy_handle graph,
uint64_t client_id);
bool
graph_proxy_join(
graph_proxy_handle graph,
uint64_t client1_id,
uint64_t client2_id);
bool
graph_proxy_rename_client(
graph_proxy_handle graph,
uint64_t client_id,
const char * newname);
bool
graph_proxy_rename_port(
graph_proxy_handle graph,
uint64_t port_id,
const char * newname);
bool
graph_proxy_move_port(
graph_proxy_handle graph,
uint64_t port_id,
uint64_t client_id);
bool
graph_proxy_new_client(
graph_proxy_handle graph,
const char * name,
uint64_t * client_id_ptr);
bool
graph_proxy_remove_client(
graph_proxy_handle graph,
uint64_t client_id);
#if 0
{ /* Adjust editor indent */
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* #ifndef GRAPH_PROXY_H__61D1ED56_E33B_4F50_B45B_F520979E8AA7__INCLUDED */
|