return getPath(SECURITY_MANAGER_PATH_OWNER_RW_OTHER_RO, PathType::FILE, i, type);
}
-std::string AppInstallHelper::getAppId() const {
- return m_appName + "_app_id";
+const std::string& AppInstallHelper::getAppId() const {
+ return m_appName;
}
-std::string AppInstallHelper::getPkgId() const {
- return m_pkgName + "_pkg_id";
+const std::string& AppInstallHelper::getPkgId() const {
+ return m_pkgName;
}
void AppInstallHelper::setVersion(const std::string &version) {
app_install_type AppInstallHelper::getInstallType() const {
return m_installType;
}
-
bool isLocal,
uid_t uid,
std::string version = std::string())
- : m_appName(appNamePrefix), m_pkgName(pkgNamePrefix), m_isLocal(isLocal), m_uidGid(uid), m_version(version),
+ : m_appName(appNamePrefix + "_app_id"), m_pkgName(pkgNamePrefix + "_pkg_id"), m_isLocal(isLocal), m_uidGid(uid), m_version(version),
m_installType(SM_APP_INSTALL_NONE), m_isHybrid(false), m_creatorPid(getpid())
{}
AppInstallHelper(AppInstallHelper &&other);
// App info getters and setters
- std::string getAppId() const;
- std::string getPkgId() const;
+ const std::string& getAppId() const;
+ const std::string& getPkgId() const;
int getUID() const;
int getGID() const;
void setVersion(const std::string &version);
RootType rType = RootType::BASE);
void createInstallDir(RootType type);
- std::string m_appName;
- std::string m_pkgName;
+ const std::string m_appName;
+ const std::string m_pkgName;
bool m_isLocal;
int m_uidGid;
std::string m_version;