Replace std::string with Privilege class
[platform/core/test/security-tests.git] / src / security-manager-tests / common / sm_request.h
index ee72521..7d74f64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2017 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
 #include <vector>
 
 #include <security-manager.h>
+#include <app_def_privilege.h>
 
 namespace SecurityManagerTest {
 class InstallRequest;
@@ -58,7 +59,8 @@ public:
             lib_retcode expectedresult = SECURITY_MANAGER_SUCCESS);
     void setAppId(std::string appId, lib_retcode expectedresult = SECURITY_MANAGER_SUCCESS);
     void setPkgId(std::string pkgId, lib_retcode expectedresult = SECURITY_MANAGER_SUCCESS);
-    void addPrivilege(const std::string &privilege, lib_retcode expectedresult = SECURITY_MANAGER_SUCCESS);
+    void addPrivilege(Privilege privilege, lib_retcode expectedresult = SECURITY_MANAGER_SUCCESS);
+    void addAppDefinedPrivilege(Privilege privilege, lib_retcode expectedResult = SECURITY_MANAGER_SUCCESS);
     void addPath(std::string path, app_install_path_type pathType,
                  lib_retcode expectedResult = SECURITY_MANAGER_SUCCESS);
     void setUid(const uid_t uid, lib_retcode expectedresult = SECURITY_MANAGER_SUCCESS);
@@ -77,7 +79,8 @@ private:
     std::string m_appId;
     std::string m_pkgId;
     std::string m_authorId;
-    std::vector<std::string> m_privileges;
+    PrivilegeVector m_privileges;
+    PrivilegeVector m_appDefinedPrivileges;
     std::vector<std::pair<std::string, app_install_path_type> > m_paths;
     std::pair<bool, uid_t> m_uid;
 };