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_TYPES_H__
22 #define __LASH_TYPES_H__
23 
24 #define LASH_DEFAULT_PORT 14541
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 
31 enum LASH_Client_Flag
32 {
33   LASH_Config_Data_Set    =  0x00000001,  /* wants to save data on the server */
34   LASH_Config_File        =  0x00000002,  /* wants to save data in files */
35 
36   LASH_Server_Interface   =  0x00000004,  /* is a server interface */
37   LASH_No_Autoresume      =  0x00000008,  /* server shouldn't try to resume a lost client with this one */
38   LASH_Terminal           =  0x00000010,   /* runs in a terminal */
39 
40   LASH_No_Start_Server    =  0x00000020   /* do not attempt to automatically start server */
41 };
42 
43 
44 enum LASH_Event_Type
45 {
46   /* for normal clients */
47   LASH_Client_Name = 1,  /* set the client's user-visible name */
48   LASH_Jack_Client_Name, /* tell the server what name the client is connected to jack with */
49   LASH_Alsa_Client_ID,   /* tell the server what id the client is connected to the alsa sequencer with */
50   LASH_Save_File,        /* tell clients to save to files */
51   LASH_Restore_File,     /* tell clients to restore from files */
52   LASH_Save_Data_Set,    /* tell clients to send the server a data set */
53   LASH_Restore_Data_Set, /* tell clients a data set will be arriving */
54   LASH_Save,             /* save the project */
55   LASH_Quit,             /* tell the server to close the connection */
56   LASH_Server_Lost,      /* the server disconnected */
57 
58   /* for the server interface */
59   LASH_Project_Add,             /* new project has been created */
60   LASH_Project_Remove,          /* existing project has been lost */
61   LASH_Project_Dir,             /* change project dir */
62   LASH_Project_Name,            /* change project name */
63   LASH_Client_Add,              /* a new client has been added to a project */
64   LASH_Client_Remove,           /* a client has been lost from a project */
65   LASH_Percentage               /* display a percentage of an action to the user */
66 };
67 
68 
69 /* the set of lash-specific arguments that are extracted from argc/argv */
70 typedef struct _lash_args lash_args_t;
71 
72 /* the main client-side handle for the server connection */
73 typedef struct _lash_client lash_client_t;
74 
75 /* an event */
76 typedef struct _lash_event lash_event_t;
77 
78 /* a bit of key-indexed data */
79 typedef struct _lash_config lash_config_t;
80 
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 
87 #endif /* __LASH_TYPES_H__ */
88