move proxy implementations to new /proxies directory

This commit is contained in:
Nedko Arnaudov 2009-12-13 18:10:57 +02:00
parent 78f5665ac5
commit b5565fd398
22 changed files with 65 additions and 39 deletions

View File

@ -41,7 +41,7 @@
#include "../dbus_constants.h"
#include "../catdup.h"
#include "dirhelpers.h"
#include "a2j_proxy.h"
#include "../proxies/a2j_proxy.h"
bool g_quit;
const char * g_dbus_unique_name;

View File

@ -28,7 +28,7 @@
#ifndef STUDIO_INTERNAL_H__B4CB73EC_8E89_401A_9E49_F0AEEF361D09__INCLUDED
#define STUDIO_INTERNAL_H__B4CB73EC_8E89_401A_9E49_F0AEEF361D09__INCLUDED
#include "../jack_proxy.h"
#include "../../proxies/jack_proxy.h"
#include "../dbus/error.h"
#include "virtualizer.h"
#include "app_supervisor.h"

View File

@ -26,7 +26,7 @@
#include "virtualizer.h"
#include "../dbus_constants.h"
#include "a2j_proxy.h"
#include "../proxies/a2j_proxy.h"
#include "procfs.h"
#include "app_supervisor.h"
#include "studio_internal.h"

View File

@ -28,7 +28,7 @@
#define JACK_DISPATCH_H__C7566B66_081D_4D00_A702_7C18F7CC0735__INCLUDED
#include "common.h"
#include "../graph_proxy.h"
#include "../proxies/graph_proxy.h"
#include "graph.h"
typedef struct ladish_virtualizer { int unused; } * ladish_virtualizer_handle;

View File

@ -27,7 +27,7 @@
#ifndef GRAPH_CANVAS_H__F145C6FA_633C_4E64_9117_ED301618B587__INCLUDED
#define GRAPH_CANVAS_H__F145C6FA_633C_4E64_9117_ED301618B587__INCLUDED
#include "../graph_proxy.h"
#include "../proxies/graph_proxy.h"
#include "canvas.h"
typedef struct graph_canvas_tag { int unused; } * graph_canvas_handle;

View File

@ -28,7 +28,6 @@
#include "graph_view.h"
#include "glade.h"
#include "world_tree.h"
#include "app_supervisor_proxy.h"
struct graph_view
{

View File

@ -28,7 +28,7 @@
#define GRAPH_VIEW_H__05B5CE46_5239_43F1_9F31_79F13EBF0DFA__INCLUDED
#include "graph_canvas.h"
#include "app_supervisor_proxy.h"
#include "../proxies/app_supervisor_proxy.h"
typedef struct graph_view_tag { int unused; } * graph_view_handle;

View File

@ -32,16 +32,16 @@
#include "glade.h"
#include "canvas.h"
#include "graph_canvas.h"
#include "../jack_proxy.h"
#include "dbus_helpers.h"
#include "control_proxy.h"
#include "../proxies/jack_proxy.h"
#include "../proxies/control_proxy.h"
#include "../dbus_constants.h"
#include "world_tree.h"
#include "graph_view.h"
#include "../catdup.h"
#include "../studio_proxy.h"
#include "../proxies/studio_proxy.h"
#include "ask_dialog.h"
#include "app_supervisor_proxy.h"
#include "../proxies/app_supervisor_proxy.h"
#include "dbus_helpers.h"
GtkWidget * g_main_win;

View File

@ -24,9 +24,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "common.h"
#include "a2j_proxy.h"
#include "../dbus/helpers.h"
#define A2J_SERVICE "org.gna.home.a2jmidid"
#define A2J_OBJECT "/"

View File

@ -27,6 +27,8 @@
#ifndef A2J_PROXY_HPP__24525CB1_8AED_4697_8C56_5C57473839CC__INCLUDED
#define A2J_PROXY_HPP__24525CB1_8AED_4697_8C56_5C57473839CC__INCLUDED
#include "common.h"
typedef struct a2j_proxy_tag { int unused; } * a2j_proxy_handle;
bool a2j_proxy_init(void);

View File

@ -26,8 +26,6 @@
*/
#include "app_supervisor_proxy.h"
#include "../dbus/helpers.h"
#include "../dbus_constants.h"
struct ladish_app_supervisor_proxy
{

34
proxies/common.h Normal file
View File

@ -0,0 +1,34 @@
/* -*- Mode: C ; c-basic-offset: 2 -*- */
/*
* LADI Session Handler (ladish)
*
* Copyright (C) 2009 Nedko Arnaudov <nedko@arnaudov.name>
*
**************************************************************************
* This file contains stuff that is needed my almost every proxy
**************************************************************************
*
* 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 COMMON_H__0710E3D5_9B69_4C10_BDDB_80E0D92F44AF__INCLUDED
#define COMMON_H__0710E3D5_9B69_4C10_BDDB_80E0D92F44AF__INCLUDED
#include "../common.h"
#include "../dbus/helpers.h"
#include "../dbus_constants.h"
#endif /* #ifndef COMMON_H__0710E3D5_9B69_4C10_BDDB_80E0D92F44AF__INCLUDED */

View File

@ -26,8 +26,6 @@
*/
#include "control_proxy.h"
#include "../dbus/helpers.h"
#include "../dbus_constants.h"
static void on_studio_appeared(void * context, DBusMessage * message_ptr)
{

View File

@ -29,7 +29,6 @@
#define CONTROL_PROXY_H__8BC89E98_FE1B_4831_8B89_1A48F676E019__INCLUDED
#include "common.h"
#include "../common/klist.h"
bool control_proxy_init(void);
void control_proxy_uninit(void);

View File

@ -24,14 +24,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <dbus/dbus.h>
#include <stdlib.h>
#include "common.h"
#include "graph_proxy.h"
#include "common/klist.h"
#include "dbus/helpers.h"
#include "dbus_constants.h"
struct monitor
{

View File

@ -26,10 +26,7 @@
//#define LADISH_DEBUG
#include "common.h"
#include "jack_proxy.h"
#include "dbus/helpers.h"
#include "dbus_constants.h"
jack_proxy_callback_server_started g_on_server_started;
jack_proxy_callback_server_stopped g_on_server_stopped;

View File

@ -26,8 +26,6 @@
*/
#include "common.h"
#include "dbus_constants.h"
#include "dbus/helpers.h"
static void (* g_renamed_callback)(const char * new_studio_name) = NULL;
static void (* g_started_callback)(void) = NULL;

View File

@ -28,6 +28,8 @@
#ifndef STUDIO_PROXY_H__2CEC623F_C998_4618_A947_D1A0016DF978__INCLUDED
#define STUDIO_PROXY_H__2CEC623F_C998_4618_A947_D1A0016DF978__INCLUDED
#include "common.h"
bool studio_proxy_init(void);
void studio_proxy_uninit(void);
bool studio_proxy_get_name(char ** name);

24
wscript
View File

@ -199,8 +199,6 @@ def build(bld):
daemon.env.append_value("LINKFLAGS", ["-lutil", "-ldl", "-Wl,-E"])
daemon.source = [
'jack_proxy.c',
'graph_proxy.c',
'catdup.c',
]
@ -233,10 +231,16 @@ def build(bld):
'cmd_exit.c',
'cqueue.c',
'app_supervisor.c',
'a2j_proxy.c',
]:
daemon.source.append(os.path.join("daemon", source))
for source in [
'jack_proxy.c',
'graph_proxy.c',
'a2j_proxy.c',
]:
daemon.source.append(os.path.join("proxies", source))
for source in [
'signal.c',
'method.c',
@ -289,9 +293,6 @@ def build(bld):
gladish.uselib = 'DBUS-1 DBUS-GLIB-1 LIBGLADE-2.0 FLOWCANVAS'
gladish.source = [
'jack_proxy.c',
'graph_proxy.c',
'studio_proxy.c',
'catdup.c',
]
@ -309,12 +310,19 @@ def build(bld):
'canvas.cpp',
'graph_canvas.c',
'glade.c',
'control_proxy.c',
'app_supervisor_proxy.c',
'ask_dialog.c',
]:
gladish.source.append(os.path.join("gui", source))
for source in [
'jack_proxy.c',
'graph_proxy.c',
'studio_proxy.c',
'control_proxy.c',
'app_supervisor_proxy.c',
]:
gladish.source.append(os.path.join("proxies", source))
for source in [
'method.c',
'helpers.c',