00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef OPCODEHANDLER_H
00024 #define OPCODEHANDLER_H
00025
00026 #include <QString>
00027
00028 class TcpServer;
00029 class Customer;
00030
00031 enum Opcodes
00032 {
00033 MSG_PING = 0,
00034 MSG_PONG,
00035 MSG_LOGIN,
00036 MSG_QUERY_MEDICINE_MODEL,
00037 MSG_QUERY_PATIENTS_MODEL,
00038 MSG_QUERY_BODY_PARTS,
00039 MSG_QUERY_PATIENT,
00040 MSG_NEW_PATIENT,
00041 MSG_MODIFY_PATIENT,
00042 MSG_NEW_DIAGNOSTIC,
00043 MSG_NEW_SYMPTOM,
00044 MSG_REMOVE_PRESCRIPTION,
00045 MSG_MODIFY_PRESCRIPTION,
00046 MSG_NEW_PRESCRIPTION,
00047 MSG_ENTER_CHAT,
00048 MSG_LEAVE_CHAT,
00049 MSG_SEND_CHAT_MESSAGE,
00050 MSG_QUERY_CHAT_USERS,
00051 MSG_START_ECG,
00052 MSG_STOP_ECG,
00053 MSG_ECG_DATA,
00054 MSG_QUERY_ANALYSIS_MODEL,
00055 MSG_QUERY_SCAN,
00056 MSG_QUERY_RADIO,
00057 MSG_MAX_OPCODES
00058 };
00059
00060 struct OpcodeHandler
00061 {
00063 QString name;
00065 void (TcpServer::*handler)(QDataStream*, Customer*);
00066 };
00067
00069 extern OpcodeHandler opcodes[MSG_MAX_OPCODES];
00070
00071 #endif // OPCODEHANDLER_H