fhq-server  v0.2.33
Documentation for fhq-server. FreeHackQuest is an open source platform for competitions of computer security.
employ_notify.h
Go to the documentation of this file.
1 #ifndef EMPLOY_NOTIFY_H
2 #define EMPLOY_NOTIFY_H
3 
4 #include <employees.h>
5 #include <model_notification.h>
6 
7 class EmployNotify : public WsjcppEmployBase {
8  public:
9 
10  EmployNotify();
11  static std::string name() { return "EmployNotify"; }
12  virtual bool init();
13  virtual bool deinit();
14 
15  static std::string GAMES;
16  static std::string QUESTS;
17  static std::string USERS;
18  static std::string SCOREBOARD;
19  static std::string LEAKS;
20 
21  void sendNotification(ModelNotification &modelNotification); // TODO wrong
22 
23  void notifyWarning(const std::string &sSection, const std::string &sMessage);
24  void notifyDanger(const std::string &sSection, const std::string &sMessage);
25  void notifyInfo(const std::string &sSection, const std::string &sMessage); // TODO deprated
26  void notifyInfo(const std::string &sSection, const std::string &sMessage, const nlohmann::json &jsonMeta);
27  void notifySuccess(const std::string &sSection, const std::string &sMessage);
28 
29  private:
30  void sendNotification(
31  const std::string &sType,
32  const std::string &sSection,
33  const std::string &sMessage
34  );
35  void sendNotification(
36  const std::string &sType,
37  const std::string &sSection,
38  const std::string &sMessage,
39  const nlohmann::json &jsonMeta
40  );
41  std::string TAG;
42 
43 };
44 
45 #endif // EMPLOY_NOTIFY_H
void notifyInfo(const std::string &sSection, const std::string &sMessage)
Definition: employ_notify.cpp:78
virtual bool deinit()
Definition: employ_notify.cpp:37
void notifyWarning(const std::string &sSection, const std::string &sMessage)
Definition: employ_notify.cpp:60
static std::string name()
Definition: employ_notify.h:11
static std::string GAMES
Definition: employ_notify.h:15
Definition: model_notification.h:7
std::string TAG
Definition: employ_notify.h:41
static std::string QUESTS
Definition: employ_notify.h:16
virtual bool init()
Definition: employ_notify.cpp:30
Definition: wsjcpp_employees.h:13
EmployNotify()
Definition: employ_notify.cpp:23
void notifySuccess(const std::string &sSection, const std::string &sMessage)
Definition: employ_notify.cpp:84
static std::string LEAKS
Definition: employ_notify.h:19
static std::string SCOREBOARD
Definition: employ_notify.h:18
void notifyDanger(const std::string &sSection, const std::string &sMessage)
Definition: employ_notify.cpp:66
void sendNotification(ModelNotification &modelNotification)
Definition: employ_notify.cpp:44
Definition: employ_notify.h:7
static std::string USERS
Definition: employ_notify.h:17