73 return "OK:last_detected_time: " +
75 "OK:acknowledged_time: " + acknowledged +
"\n"
77 "OK:count: " + to_string(
m_Count) +
"\n"
79 "OK:user: " +
m_User +
"\n"
85 const string & message)
95 found->second.m_On =
true;
96 ++found->second.m_Count;
97 ++found->second.m_CountSinceAck;
98 found->second.m_Message = message;
131 if (!found->second.m_On)
135 found->second.m_On =
false;
136 found->second.m_User = user;
137 found->second.m_CountSinceAck = 0;
177 result += to_string(k->second.m_CountSinceAck) +
178 "/" + to_string(k->second.m_Count);
196 k->second.Serialize();
string GetURLEncoded(void) const
string Serialize(void) const
enum EAlertAckResult Acknowledge(const string &alert_id, const string &user)
enum EAlertType x_IdToType(const string &alert_id) const
string x_TypeToId(enum EAlertType type) const
void Register(enum EAlertType alert_type, const string &message)
map< enum EAlertType, SNSAlertAttributes > m_Alerts
static CNSPreciseTime Current(void)
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string PrintableString(const CTempString str, TPrintableMode mode=fNewLine_Quote|fNonAscii_Passthru)
Get a printable version of the specified string.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static const string BoolToString(bool value)
Convert bool to string.
const AlertToId alertToIdMap[]
const size_t alertToIdMapSize
const CNSPreciseTime kTimeZero
string NS_FormatPreciseTime(const CNSPreciseTime &t)
CNCAlerts::EAlertType type
string Serialize(void) const
CNSPreciseTime m_AcknowledgedTimestamp
CNSPreciseTime m_LastDetectedTimestamp