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_EVENT_H__
22 #define __LASH_EVENT_H__
23 
24 #include <uuid/uuid.h>
25 
26 #include <lash/lash.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 lash_event_t * lash_event_new           (void);
33 lash_event_t * lash_event_new_with_type (enum LASH_Event_Type type);
34 lash_event_t * lash_event_new_with_all  (enum LASH_Event_Type type, const char * string);
35 void          lash_event_destroy       (lash_event_t * event);
36 
37 enum LASH_Event_Type  lash_event_get_type      (const lash_event_t * event);
38 const char *         lash_event_get_string    (const lash_event_t * event);
39 const char *         lash_event_get_project   (const lash_event_t * event);
40 void                 lash_event_get_client_id (const lash_event_t * event, uuid_t id);
41 
42 void lash_event_set_type      (lash_event_t * event, enum LASH_Event_Type type);
43 void lash_event_set_string    (lash_event_t * event, const char * string);
44 void lash_event_set_project   (lash_event_t * event, const char * project);
45 void lash_event_set_client_id (lash_event_t * event, uuid_t id);
46 
47 /* set the type to LASH_Alsa_Client_ID, and the string to { <id>, '\0' } */
48 void lash_event_set_alsa_client_id (lash_event_t * event, unsigned char alsa_id);
49 unsigned char lash_event_get_alsa_client_id (const lash_event_t * event);
50 
51 void lash_str_set_alsa_client_id (char * str, unsigned char alsa_id);
52 unsigned char lash_str_get_alsa_client_id (const char * str);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif /* __LASH_EVENT_H__ */
59