My Project
Classes | Typedefs | Functions
event.h File Reference
#include <stdbool.h>
#include "util.h"

Go to the source code of this file.

Classes

struct  Event
 

Typedefs

typedef struct Event Event
 

Functions

void event_init (Event *)
 Initialize a message event. More...
 
void event_free (Event *)
 Free a message event. More...
 
void event_clear_messages (Event *)
 Remove all unprocessed messages. More...
 
void event_add_message (Event *, char *)
 Add a new message at the bottom of the list. More...
 
char * event_peek_message (Event *)
 Peek the first message from the list. More...
 
bool event_exist (Event *)
 Check if there is a message. More...
 
void event_wait (Event *, char **, char **)
 Wait input. More...
 
void event_wait_enter (Event *)
 

Detailed Description

Event management.

Date
1998 - 2017
Author
Richard Delorme
Version
4.4

Typedef Documentation

◆ Event

typedef struct Event Event

Event management data messages

Function Documentation

◆ event_add_message()

void event_add_message ( Event event,
char *  message 
)

Add a new message at the bottom of the list.

Parameters
eventEvent.
messageNew message.

◆ event_clear_messages()

void event_clear_messages ( Event event)

Remove all unprocessed messages.

Parameters
eventEvent.

◆ event_exist()

bool event_exist ( Event event)

Check if there is a message.

This function is lockless, and should be used only when the event is locked.

Parameters
eventEvent;
Returns
true if a message exists.

◆ event_free()

void event_free ( Event event)

Free a message event.

Parameters
eventEvent.

◆ event_init()

void event_init ( Event event)

Initialize a message event.

Parameters
eventEvent.

◆ event_peek_message()

char * event_peek_message ( Event event)

Peek the first message from the list.

Parameters
eventEvent;
Returns
the message.

◆ event_wait()

void event_wait ( Event event,
char **  cmd,
char **  param 
)

Wait input.

Parameters
eventEvent.
cmdCommand.
paramCommand's parameters.

◆ event_wait_enter()

void event_wait_enter ( Event event)