added README to dist
[lwes-python.git] / lwes.i
blob399e399fcf6452f7a73c78547cd7ad33a9d8bc91
1 %module lwes
3 %{
4 #define SWIG_FILE_WITH_INIT
5 #include "lwes.h"
6 %}
8 struct lwes_event_type_db *
9 lwes_event_type_db_create(char *filename);
11 int
12 lwes_event_type_db_destroy(struct lwes_event_type_db *db);
14 struct lwes_emitter *
15 lwes_emitter_create(char *address, char *iface, int port,
16 int emit_heartbeat, short freq);
18 struct lwes_emitter *
19 lwes_emitter_create_with_ttl(char *address, char *iface, int port,
20 int emit_heartbeat, short freq, int ttl);
22 int
23 lwes_emitter_emit(struct lwes_emitter *emitter, struct lwes_event *event);
25 int
26 lwes_emitter_emitto(char *address, char *iface, int port,
27 struct lwes_emitter *emitter, struct lwes_event *event);
29 int
30 lwes_emitter_destroy(struct lwes_emitter *emitter);
32 struct lwes_event *
33 lwes_event_create(struct lwes_event_type_db *db, char *event_name);
35 struct lwes_event *
36 lwes_event_create_with_encoding(struct lwes_event_type_db *db,
37 char *event_name, short encoding);
39 int
40 lwes_event_set_U_INT_16(struct lwes_event *event, char *attribute_name,
41 unsigned short a_uint16);
43 int
44 lwes_event_get_U_INT_16(struct lwes_event *event, char *attribute_name,
45 unsigned short *a_uint16);
47 int
48 lwes_event_set_INT_16(struct lwes_event *event, char *attribute_name,
49 short a_int16);
51 int
52 lwes_event_get_INT_16(struct lwes_event *event, char *attribute_name,
53 short *a_int16);
55 int
56 lwes_event_set_U_INT_32(struct lwes_event *event, char *attribute_name,
57 unsigned int a_uint32);
59 int
60 lwes_event_get_U_INT_32(struct lwes_event *event, char *attribute_name,
61 unsigned int *a_uint32);
63 int
64 lwes_event_set_INT_32(struct lwes_event *event, char *attribute_name,
65 int a_int32);
67 int
68 lwes_event_get_INT_32(struct lwes_event *event, char *attribute_name,
69 int *a_int32);
71 int
72 lwes_event_set_U_INT_64(struct lwes_event *event,
73 char *attribute_name, unsigned long long a_uint64);
75 int
76 lwes_event_get_U_INT_64(struct lwes_event *event, char *attribute_name,
77 unsigned long long *a_uint64);
79 int
80 lwes_event_set_INT_64(struct lwes_event *event, char *attribute_name,
81 long long an_int64);
83 int
84 lwes_event_get_INT_64(struct lwes_event *event, char *attribute_name,
85 long long *an_int64);
87 int
88 lwes_event_set_STRING(struct lwes_event *event, char *attribute_name,
89 char *a_string);
91 int
92 lwes_event_get_STRING(struct lwes_event *event, char *attribute_name,
93 char **a_string);
95 int
96 lwes_event_set_IP_ADDR_w_string(struct lwes_event *event, char *attribute_name,
97 char *an_ip_addr);
99 int
100 lwes_event_get_IP_ADDR(struct lwes_event *event, char *attribute_name,
101 struct in_addr *an_in_addr);
104 lwes_event_set_BOOLEAN(struct lwes_event *event, char *attribute_name,
105 int a_boolean);
108 lwes_event_get_BOOLEAN(struct lwes_event *event, char *attribute_name,
109 int *a_boolean);
112 lwes_event_destroy(struct lwes_event *event);