/*! \file event.h This is the event definition. \author Jon A. Lambert \date 05/02/2003 \version 0.30 */ #ifndef EVENT_H #define EVENT_H /*! Enumeration of the types of legal events we support in this iteration. \todo Support some common Telnet commands. */ typedef enum { NONE_E = 0, //!< Invalid event - or a non-event? ignore it CONNECT_E, //!< A Connection event - issued only by network DISCONNECT_E, //!< A Disconnection event - can be issued both ways MESSAGE_E, //!< A Message event - can be issued both ways SHUTDOWN_E //!< A Shutdown event - can be issued both ways } Event_T; /*! The Event class implements a construct to pass messages between subsystems. \note All attributes are publically accessible. We will store these in the event queues as pointers so we can take advantage of specialization later. No copy constructor or assignment allowed. */ class Event { public: Event(Event_T etype, SOCKET eid, int elen, const char* edata); ~Event(); Event_T mEventType; //!< Type of event. unsigned int mClientId; //!< The id. Socket number. int mDataLen; //!< Optional length of message data. char* mpData; //!< Optional messsage data. private: Event(Event&); Event& operator=(Event&); }; #endif // EVENT_H