aboutsummaryrefslogtreecommitdiffstats
path: root/src/policy_manager/policy_manager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/policy_manager/policy_manager.hpp')
-rw-r--r--src/policy_manager/policy_manager.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/policy_manager/policy_manager.hpp b/src/policy_manager/policy_manager.hpp
index 6926bc4..aa5f206 100644
--- a/src/policy_manager/policy_manager.hpp
+++ b/src/policy_manager/policy_manager.hpp
@@ -25,6 +25,7 @@
struct json_object;
struct sd_event;
+
class PolicyManager {
public:
@@ -33,8 +34,14 @@ public:
using Handler = std::function<void(json_object *)>;
+ typedef struct {
+ Handler onStateTransitioned;
+ Handler onError;
+ } CallbackTable;
+
int initialize();
- int inputEvent(json_object* json_in, PolicyManager::Handler notify_state);
+ void registerCallback(CallbackTable callback_table);
+ int inputEvent(json_object* json_in);
std::string roleToCategory(const char* role);
private: