CCAFFEINE
0.8.8
|
00001 #ifdef CCAFE_THREADS 00002 #ifndef MessageData_seen 00003 #define MessageData_seen 00004 00016 class MessageData : public virtual JCPN(Object) { 00017 private: 00018 jcpp::StringJC message; 00019 jcpp::StringJC prefix; 00020 jcpp::StringJC idList; 00021 jcpp::StringJC formattedMessage; 00022 JCPN(GenericHashTable) clients; 00023 void makeFormattedMessage(); 00024 00025 public: 00026 MessageData(const char* fullMessage, Client* client); 00027 ~MessageData() {}; 00028 00029 char* getIdList() { return idList.getBuffer(); }; 00030 char* getPrefix() { return prefix.getBuffer(); }; 00031 char* getMessage(); 00032 char* getFormattedMessage() { 00033 return formattedMessage.getBuffer(); 00034 }; 00035 00036 void appendIds(const char* idList, Client* client); 00037 boolean hasClientData(Client* client) { return clients.contains(client); }; 00038 00039 boolean equals(JCPN(Object)* other); 00040 int hashValue(); 00041 00042 static const char* BEG_LIST;// = "<<"; 00043 static const char* END_LIST ;//= ">>"; 00044 // no client names in the list of client names can contain this string 00045 // b/c it is used as a separator by the plugins 00046 static const char* LIST_SEP ;//= ","; 00047 static const char* ERROR_TOKEN ;//= "!"; 00048 static const char* SERVER_ALERT_TOKEN ;//= "#"; 00049 00050 static const char* ALERT_BEG ;//= "#<<"; 00051 static const char* ERROR_BEG ;//= "!<<"; 00052 00053 static CFREE char* makeErrorMessage(const char* message, const char* idList); 00054 static CFREE char* makeOutOfBandMessage(const char* message, const char* idList); 00055 static CFREE char* makeNormalMessage(const char* message, const char* idList); 00056 }; 00057 #endif // seen 00058 #else // ccafethreads 00059 extern int ccafe_no_messagedata; 00060 #endif //CCAFE_THREADS