11 changed files with 88 additions and 97 deletions
-
43appsrc/appbase/appevent/app_checkpoint_check_fail_event.hpp
-
3appsrc/appbase/appevent/app_event_type.hpp
-
3appsrc/appbase/appevent/app_events.hpp
-
21appsrc/appbase/appevent/app_login_event.hpp
-
19appsrc/appbase/appevent/app_login_out_event.hpp
-
46appsrc/service/app_core.cpp
-
5appsrc/service/app_core.hpp
-
12appsrc/service/debug_page_test_service.cpp
-
22appsrc/service/hardware/device_io_ctrl_service.cpp
-
8appsrc/service/user_mgr_service.cpp
-
3appsrc/service/user_mgr_service.hpp
@ -1,43 +0,0 @@ |
|||||
#pragma once
|
|
||||
#include "iapp_event.hpp"
|
|
||||
namespace iflytop { |
|
||||
|
|
||||
typedef enum { |
|
||||
kCheckPointCode_Unknown = 0, |
|
||||
kCheckPointCode_evaporationBinWSTrigger, |
|
||||
kCheckPointCode_deviceBottomWSTrigger, |
|
||||
} CheckPointCode_t; |
|
||||
|
|
||||
class CheckPoint { |
|
||||
public: |
|
||||
CheckPointCode_t index; |
|
||||
string name; |
|
||||
bool passed; |
|
||||
int ecode; |
|
||||
string ecodeInfo; |
|
||||
|
|
||||
CheckPoint(CheckPointCode_t index, const string& name, bool passed) : index(index), name(name), passed(passed) {} |
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(CheckPoint, index, ecode, ecodeInfo, name, passed); |
|
||||
}; |
|
||||
|
|
||||
class AppCheckPointCheckFailEvent : public IAppEvent { |
|
||||
public: |
|
||||
vector<CheckPoint> errCheckPoints; |
|
||||
|
|
||||
public: |
|
||||
AppCheckPointCheckFailEvent(vector<CheckPoint> checkpoint) : IAppEvent(AppEventType::AppCheckPointCheckFailEvent) { errCheckPoints = checkpoint; } |
|
||||
virtual ~AppCheckPointCheckFailEvent() {} |
|
||||
|
|
||||
// NLOHMANN_DEFINE_TYPE_INTRUSIVE(AppCheckPointCheckFailEvent, errCheckPoints, uuid, type);
|
|
||||
virtual json toJson() { |
|
||||
// return json(*this);
|
|
||||
json j; |
|
||||
j["uuid"] = uuid; |
|
||||
j["type"] = type; |
|
||||
j["errCheckPoints"] = errCheckPoints; |
|
||||
return j; |
|
||||
|
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
} // namespace iflytop
|
|
@ -0,0 +1,21 @@ |
|||||
|
#pragma once
|
||||
|
#include "iapp_event.hpp"
|
||||
|
namespace iflytop { |
||||
|
|
||||
|
class AppLoginEvent : public IAppEvent { |
||||
|
private: |
||||
|
string usr; |
||||
|
string role; |
||||
|
|
||||
|
public: |
||||
|
AppLoginEvent(string usr, string role) : IAppEvent(AppEventType::AppLoginEvent), usr(usr), role(role) {} |
||||
|
virtual ~AppLoginEvent() {} |
||||
|
|
||||
|
string getUsr() const { return usr; } |
||||
|
string getRole() const { return role; } |
||||
|
|
||||
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(AppLoginEvent, uuid, usr, role); |
||||
|
virtual json toJson() { return json(*this); } |
||||
|
}; |
||||
|
|
||||
|
} // namespace iflytop
|
@ -0,0 +1,19 @@ |
|||||
|
#pragma once
|
||||
|
#include "iapp_event.hpp"
|
||||
|
namespace iflytop { |
||||
|
|
||||
|
class AppLoginOutEvent : public IAppEvent { |
||||
|
private: |
||||
|
string usr; |
||||
|
|
||||
|
public: |
||||
|
AppLoginOutEvent(string usr) : IAppEvent(AppEventType::AppLoginOutEvent), usr(usr){} |
||||
|
virtual ~AppLoginOutEvent() {} |
||||
|
|
||||
|
string getUsr() const { return usr; } |
||||
|
|
||||
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(AppLoginOutEvent, uuid, usr); |
||||
|
virtual json toJson() { return json(*this); } |
||||
|
}; |
||||
|
|
||||
|
} // namespace iflytop
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue