1 /*
2  *   LASH
3  *
4  *   Copyright (C) 2002 Robert Ham <rah@bash.sh>
5  *
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, or
9  *   (at your option) any later version.
10  *
11  *   This program is distributed in the hope that it will be useful,
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *   GNU General Public License for more details.
15  *
16  *   You should have received a copy of the GNU General Public License
17  *   along with this program; if not, write to the Free Software
18  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __LASH_INTERNAL_H__
22 #define __LASH_INTERNAL_H__
23 
24 #include <uuid/uuid.h>
25 
26 #include <lash/types.h>
27 
28 #define set_string_property(property, value) \
29   \
30   if (property) \
31     free (property); \
32   \
33   if (value) \
34     (property) = lash_strdup (value); \
35   else \
36     (property) = NULL;
37 
38 
39 typedef struct _lash_comm_event lash_comm_event_t;
40 typedef struct _lash_comm lash_comm_t;
41 
42 enum LASH_Internal_Client_Flag
43   {
44     LASH_Saved              =  0x01000000  /* client has been saved */
45   };
46 
47 struct _lash_config
48 {
49   char * key;
50   void * value;
51   size_t value_size;
52 };
53 
54 struct _lash_event
55 {
56   enum LASH_Event_Type  type;
57   char                *string;
58   char                *project;
59   uuid_t               client_id;
60 };
61 
62 struct _lash_exec_params
63 {
64   int    flags;
65   int    argc;
66   char **argv;
67   char  *working_dir;
68   char  *server;
69   char  *project;
70   uuid_t id;
71 };
72 
73 struct _loader
74 {
75   int   server_socket;
76   int   loader_socket;
77   pid_t loader_pid;
78 };
79 
80 /*snd_seq_port_subscribe_t * lash_event_get_string_alsa_patch (lash_event_t * event);
81 lash_jack_patch_t *         lash_event_get_string_jack_patch (lash_event_t * event); */
82 
83 void lash_config_init (struct _lash_config * config);
84 void lash_config_free (struct _lash_config * config);
85 
86 void lash_event_init (struct _lash_event * event);
87 void lash_event_free (struct _lash_event * event);
88 
89 
90 
91 #endif /* __LASH_INTERNAL_H__ */
92