SM : Don't add version by default in app install
[platform/core/test/security-tests.git] / src / security-manager-tests / common / app_install_helper.h
index 08d8126..1b6e690 100644 (file)
@@ -25,7 +25,6 @@
 #include <security-manager-types.h>
 
 const uid_t OWNER_UID = 5001;
-const std::string TIZEN_VERSION = "3.0";
 
 struct AppInstallHelper {
 
@@ -34,7 +33,7 @@ struct AppInstallHelper {
                      const std::string &pkgNamePrefix,
                      bool isLocal,
                      uid_t uid,
-                     std::string version,
+                     std::string version = std::string(),
                      bool isHybrid = false)
       : m_appName(appNamePrefix), m_pkgName(pkgNamePrefix), m_isLocal(isLocal), m_uidGid(uid), m_version(version),
         m_installType(SM_APP_INSTALL_NONE), m_isHybrid(isHybrid)
@@ -45,27 +44,28 @@ struct AppInstallHelper {
     AppInstallHelper(const std::string &appNamePrefix,
                      const std::string &pkgNamePrefix,
                      uid_t uid)
-      : AppInstallHelper(appNamePrefix, pkgNamePrefix, false, uid, TIZEN_VERSION)
+      : AppInstallHelper(appNamePrefix, pkgNamePrefix, false, uid)
     {}
 
     AppInstallHelper(const std::string &namePrefix)
-      : AppInstallHelper(namePrefix, namePrefix, false, geteuid(), TIZEN_VERSION)
+      : AppInstallHelper(namePrefix, namePrefix, false, geteuid())
     {}
 
     AppInstallHelper(const std::string &appNamePrefix, const std::string &pkgNamePrefix)
-      : AppInstallHelper(appNamePrefix, pkgNamePrefix, false, geteuid(), TIZEN_VERSION)
+      : AppInstallHelper(appNamePrefix, pkgNamePrefix, false, geteuid())
     {}
 
     AppInstallHelper(const std::string &namePrefix, uid_t uid)
-      : AppInstallHelper(namePrefix, namePrefix, true, uid, TIZEN_VERSION)
+      : AppInstallHelper(namePrefix, namePrefix, true, uid)
     {}
 
     // App info getters and setters
     std::string getAppId() const;
     std::string getPkgId() const;
-    std::string getVersion() const;
     int getUID() const;
     int getGID() const;
+    void setVersion(const std::string &version);
+    std::string getVersion() const;
     void setAuthor(const std::string &author);
     std::string getAuthor() const;
     void setInstallType(app_install_type type);