Statistics
| Branch: | Revision:

root / mainbox / event.h @ 38df0012

History | View | Annotate | Download (574 Bytes)

1
#ifndef EVENT_H
2
#define EVENT_H
3

    
4
#include <time.h>
5

    
6
struct event_t {
7
  unsigned int user;
8
  int tool_id;
9
  int succ;
10
  time_t tstart;
11
  time_t tend;
12
  struct event_t *next;
13
};
14

    
15
/*
16
 * After event_alloc, you must call either event_free or event_q_push.
17
 * Periodically call event_q_process to send events in the queue to the server.
18
 * When an event is successfully sent, the event will be removed from the queue
19
 * and freed.
20
 */
21
struct event_t *event_alloc();
22
void event_free(struct event_t *event);
23
void event_q_push(struct event_t *event);
24
void event_q_process();
25

    
26
#endif