From: Zofia Abramowska Date: Wed, 20 Apr 2016 14:47:47 +0000 (+0200) Subject: SM: Add const to proper AppInstallHelper methods X-Git-Tag: security-manager_5.5_testing~20^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b4d665e9397a928ffc08b156950bee467a17b8b;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git SM: Add const to proper AppInstallHelper methods Change-Id: Ia10c03b99381c9babd0d0eaa82b5aefa5644d9c0 --- diff --git a/src/security-manager-tests/common/app_install_helper.h b/src/security-manager-tests/common/app_install_helper.h index 2d401320..7bcca734 100644 --- a/src/security-manager-tests/common/app_install_helper.h +++ b/src/security-manager-tests/common/app_install_helper.h @@ -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(); }