/* * serverProtocol.h * * Gouverneur Th. - Cuisinier Gi. * * Declaration of server-side protocol RMP * and his implementation. * */ #ifndef SERVER_PROTOCOL_H #define SERVER_PROTOCOL_H #include #include #include /* * this class is a sort-of "storing class" * containing the different method, called * when a message is received from network * by the server sideo. * * Also, this class cannot be in the librairy, * indeed, this class make the link between * the parser (general), and the protocol * that is implemented in THIS client/server. */ class ServerProtocol { public: static LLU listBook; static LLU listUser; static LLU listRoom; static bool suspended; static int shutdown; static void cleanClient(Sock_Base::sConn *); /* interface with MySQL database */ static void getRoomFromSql(void); static void getUserFromSql(void); static void refreshBooks(void); static void insertBook(const Reservation *); static void deleteBook(const Reservation *); static User * getUserFromSock(const Sock_Base::sConn &); /* char-oriented */ static void cmdLogin (Message *); static void cmdBRoom (Message *); static void cmdCRoom (Message *); static void cmdLRooms (Message *); static void sendSusp (Sock_Base::sConn *); /* bytes-oriented */ /* NOT YET IMPLEMENTED */ static void cleanUpAll(void); static void cleanUpBook(void); }; #endif