/******************************************************/
/* Copyright (C) 2008 Arch Rock Corporation 2008      */
/* License Agreement: refer to LICENSE.txt            */
/*                                                    */
/******************************************************/

#ifndef _EVENT_H
#define _EVENT_H    1

#include <platform.h>

/*! Enumerations for type in event_t for callbacks.
 *  The name of the enumerations exactly
 *  matches the original calls that regsiter
 *  the callbacks.
 */
enum EventsEnum{
  MAIN=1,
  IWCONFIG,
  UDPBIND,
  TCPBIND,
  PING,
  SCH_CONTINUATION,
  SVCCNTL,
  SETITIMER,
  NOTIFYWRITE,
  ASYNC_IRQBIND,
};


typedef struct event
{
  /*! See #EventsEnum.*/
  uint8_t type;
  /*! More type information.
   *  This is call specific.
   */
  int16_t subtype;
  /*! Notifications may entail flag information.
   *  This is call specific.
   */
  int16_t flags;
  /*! Notifications may entail error information
   *  defined in #ErrnoEnum.
   */
  int8_t error;
}event_t;


#endif //_EVENT_H
