4 * Copyright (C) 2008 Juuso Alasuutari <juuso.alasuutari@gmail.com>
5 * Copyright (C) 2002 Robert Ham <rah@bash.sh>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef __LASH_TYPES_H__
23 #define __LASH_TYPES_H__
26 #include <uuid/uuid.h>
35 LASH_TYPE_DOUBLE
= 'd',
36 LASH_TYPE_INTEGER
= 'u',
37 LASH_TYPE_STRING
= 's',
44 LASH_Config_Data_Set
= 0x00000001, /* wants to save data on the server */
45 LASH_Config_File
= 0x00000002, /* wants to save data in files */
47 LASH_Server_Interface
= 0x00000004, /* is a server interface */
48 LASH_No_Autoresume
= 0x00000008, /* server shouldn't try to resume a lost client with this one */
49 LASH_Terminal
= 0x00000010, /* runs in a terminal */
51 LASH_No_Start_Server
= 0x00000020, /* do not attempt to automatically start server */
52 LASH_Restored
= 0x00000040 /* server adds this flag if the client is being restored */
58 LASH_Event_Unknown
= 0,
60 /* for normal clients */
61 LASH_Client_Name
= 1, /* set the client's user-visible name */
62 LASH_Jack_Client_Name
, /* tell the server what name the client is connected to jack with */
63 LASH_Alsa_Client_ID
, /* tell the server what id the client is connected to the alsa sequencer with */
64 LASH_Save_File
, /* tell clients to save to files */
65 LASH_Restore_File
, /* tell clients to restore from files */
66 LASH_Save_Data_Set
, /* tell clients to send the server a data set */
67 LASH_Restore_Data_Set
, /* tell clients a data set will be arriving */
68 LASH_Save
, /* save the project */
69 LASH_Quit
, /* tell the server to close the connection */
70 LASH_Server_Lost
, /* the server disconnected */
72 /* for the server interface */
73 LASH_Project_Add
, /* new project has been created */
74 LASH_Project_Remove
, /* existing project has been lost */
75 LASH_Project_Dir
, /* change project dir */
76 LASH_Project_Name
, /* change project name */
77 LASH_Client_Add
, /* a new client has been added to a project */
78 LASH_Client_Remove
, /* a client has been lost from a project */
79 LASH_Percentage
/* display a percentage of an action to the user */
83 /** LASH client handle */
84 typedef struct _lash_client lash_client_t
;
86 /** Opaque handle used for reading and writing configs. The functions
87 \ref lash_config_read, \ref lash_config_write, and
88 \ref lash_config_write_raw must always be supplied with the
89 lash_config_handle_t pointer provided by liblash as the first
90 parameter of a \ref LashConfigCallback function. */
91 typedef struct _lash_config_handle lash_config_handle_t
;
93 /** Client event callback function */
94 typedef bool (*LashEventCallback
) (void *user_data
);
96 /** Client config message callback function */
97 typedef bool (*LashConfigCallback
) (lash_config_handle_t
*config_handle
,
100 /** Controller event callback function type. */
101 typedef void (*LashControlCallback
) (enum LASH_Event_Type type
,
108 /* Types which belong entirely to the old API */
112 /* the set of lash-specific arguments that are extracted from argc/argv */
113 typedef struct _lash_args lash_args_t
;
116 typedef struct _lash_event lash_event_t
;
118 /* a bit of key-indexed data */
119 typedef struct _lash_config lash_config_t
;
121 typedef uint32_t lash_protocol_t
;
128 #endif /* __LASH_TYPES_H__ */