SM: Add const to proper AppInstallHelper methods 43/66743/2
authorZofia Abramowska <z.abramowska@samsung.com>
Wed, 20 Apr 2016 14:47:47 +0000 (16:47 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 23 Jun 2016 10:00:03 +0000 (12:00 +0200)
Change-Id: Ia10c03b99381c9babd0d0eaa82b5aefa5644d9c0

src/security-manager-tests/common/app_install_helper.h

index 2d40132..7bcca73 100644 (file)
@@ -32,26 +32,26 @@ struct AppInstallHelper {
       : m_appName(appName), m_pkgName(pkgName)
     {}
 
-    std::string getInstallDir() {
+    std::string getInstallDir() const {
         return "/opt/usr/apps/" + getPkgId();
     }
 
-    std::string getTrustedDir(int i = 0) {
+    std::string getTrustedDir(int i = 0) const {
         return getInstallDir() + "/trustedDir" + std::to_string(i);
     }
 
-    std::string getPrivateDir() {
+    std::string getPrivateDir() const {
         return getInstallDir() + "/app_dir/";
     }
 
-    std::string getSharedPath(int i = 0) {
+    std::string getSharedPath(int i = 0) const {
         return getPrivateDir() + "shareme" + std::to_string(i);
     }
-    std::string getAppId() {
+    std::string getAppId() const {
         return m_appName + "_app_id";
     }
 
-    std::string getPkgId() {
+    std::string getPkgId() const {
         return m_pkgName + "_pkg_id";
     }
 
@@ -78,7 +78,7 @@ struct AppInstallHelper {
         }
     }
 
-    void revokeRules() {
+    void revokeRules() const {
         RUNNER_ASSERT_MSG(
             0 == smack_revoke_subject(generateAppLabel().c_str()),
             "Revoking smack subject failed");
@@ -87,11 +87,11 @@ struct AppInstallHelper {
             "Revoking smack subject failed");
     }
 
-    std::string generateAppLabel() {
+    std::string generateAppLabel() const {
         return "User::App::" + getAppId();
     }
 
-    std::string generatePkgLabel() {
+    std::string generatePkgLabel() const {
         return "User::Pkg::" + getPkgId();
     }