ekg2  GIT master
events.h
Idź do dokumentacji tego pliku.
1 /* $Id$ */
2 
3 /*
4  * (C) Copyright 2004 Piotr Kupisiewicz <deli@rzepaknet.us>
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 Version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 #ifndef __EKG_EVENTS_H
21 #define __EKG_EVENTS_H
22 
23 #include "dynstuff.h"
24 #include "plugins.h"
25 #include "stuff.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 typedef struct event {
32  struct event *next;
33 
34  unsigned int id;/* identyficator */
35  char *name; /* name of the event */
36  char *target; /* uid(s), alias(es), group(s) */
37  char *action; /* action to do */
38  int prio; /* priority of this event */
39 } event_t;
40 
41 extern event_t *events;
42 extern char **events_all; /* it may be help for tab complete */
43 
44 int event_add(const char *name, int prio, const char *target, const char *action, int quiet);
45 
46 void event_free();
47 int events_init();
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif /* __EKG_EVENTS_H */
54 
55 
56 /*
57  * Local Variables:
58  * mode: c
59  * c-file-style: "k&r"
60  * c-basic-offset: 8
61  * indent-tabs-mode: t
62  * End:
63  */
int events_init()
Definition: events.c:411
char * action
Definition: events.h:37
char * target
Definition: events.h:36
Definition: events.h:31
struct event event_t
int prio
Definition: events.h:38
unsigned int id
Definition: events.h:34
int event_add(const char *name, int prio, const char *target, const char *action, int quiet)
Definition: events.c:127
char ** events_all
Definition: events.c:38
void event_free()
Definition: events.c:216
struct event * next
Definition: events.h:32
event_t * events
Definition: events.c:28
char * name
Definition: events.h:35