Prepare security-manager for master-slave mode
[platform/core/security/security-manager.git] / src / common / include / protocols.h
index 20902ba..8360a26 100644 (file)
 #define _SECURITY_MANAGER_PROTOCOLS_
 
 #include <sys/types.h>
+#include <unistd.h>
 #include <vector>
 #include <string>
 #include <dpl/serialization.h>
+#include <security-manager.h>
 
 /**
  * \name Return Codes
@@ -118,6 +120,8 @@ struct user_req {
 namespace SecurityManager {
 
 extern char const * const SERVICE_SOCKET;
+extern char const * const MASTER_SERVICE_SOCKET;
+extern char const * const SLAVE_SERVICE_SOCKET;
 
 enum class SecurityModuleCall
 {
@@ -131,6 +135,7 @@ enum class SecurityModuleCall
     GET_POLICY,
     GET_CONF_POLICY_ADMIN,
     GET_CONF_POLICY_SELF,
+    POLICY_GET_DESCRIPTIONS,
     NOOP = 0x90,
 };
 
@@ -145,7 +150,11 @@ struct policy_entry : ISerializable {
     std::string currentLevel;   // current level of privielege, or level asked to be set in privacy manager bucket
     std::string maxLevel;       // holds read maximum policy status or status to be set in admin bucket
 
-    policy_entry() : user(""), appId(""), privilege(""), currentLevel(""), maxLevel("")
+    policy_entry() : user(std::to_string(getuid())),
+                    appId(SECURITY_MANAGER_ANY),
+                    privilege(SECURITY_MANAGER_ANY),
+                    currentLevel(""),
+                    maxLevel("")
     {}
 
     policy_entry(IStream &stream) {