1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
3 * LADI Session Handler (ladish)
5 * Copyright (C) 2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
7 **************************************************************************
8 * This file contains interface of the room object
9 **************************************************************************
11 * LADI Session Handler is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * LADI Session Handler is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
23 * or write to the Free Software Foundation, Inc.,
24 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27 #ifndef ROOM_H__9A1CF253_0A17_402A_BDF8_9BD72B467118__INCLUDED
28 #define ROOM_H__9A1CF253_0A17_402A_BDF8_9BD72B467118__INCLUDED
32 #include "app_supervisor.h"
33 #include "virtualizer.h"
35 typedef struct ladish_room_tag
{ int unused
; } * ladish_room_handle
;
38 ladish_room_create_template(
39 const uuid_t uuid_ptr
,
41 ladish_room_handle
* room_handle_ptr
);
45 const uuid_t uuid_ptr
,
47 ladish_room_handle
template,
48 ladish_graph_handle owner
,
49 ladish_room_handle
* room_handle_ptr
);
53 ladish_room_handle room_handle
);
55 struct list_head
* ladish_room_get_list_node(ladish_room_handle room_handle
);
56 ladish_room_handle
ladish_room_from_list_node(struct list_head
* node_ptr
);
58 const char * ladish_room_get_name(ladish_room_handle room_handle
);
59 const char * ladish_room_get_opath(ladish_room_handle room_handle
);
60 bool ladish_room_get_template_uuid(ladish_room_handle room_handle
, uuid_t uuid_ptr
);
61 void ladish_room_get_uuid(ladish_room_handle room_handle
, uuid_t uuid_ptr
);
62 ladish_graph_handle
ladish_room_get_graph(ladish_room_handle room_handle
);
63 ladish_app_supervisor_handle
ladish_room_get_app_supervisor(ladish_room_handle room_handle
);
66 ladish_room_iterate_link_ports(
67 ladish_room_handle room_handle
,
68 void * callback_context
,
72 ladish_port_handle port_handle
,
73 const char * port_name
,
75 uint32_t port_flags
));
77 bool ladish_room_start(ladish_room_handle room_handle
, ladish_virtualizer_handle virtualizer
);
78 void ladish_room_initiate_stop(ladish_room_handle room_handle
, bool clear_persist
);
79 bool ladish_room_stopped(ladish_room_handle room_handle
);
83 ladish_room_handle room_handle
,
84 const uuid_t uuid_ptr
,
89 typedef void (* ladish_room_save_complete_callback
)(void * context
, bool success
);
92 ladish_room_save_project(
93 ladish_room_handle room_handle
,
94 const char * project_dir
,
95 const char * project_name
,
97 ladish_room_save_complete_callback callback
);
99 bool ladish_room_unload_project(ladish_room_handle room_handle
);
100 bool ladish_room_load_project(ladish_room_handle room_handle
, const char * project_dir
);
102 char * ladish_get_project_name(const char * project_dir
);
104 #endif /* #ifndef ROOM_H__9A1CF253_0A17_402A_BDF8_9BD72B467118__INCLUDED */