/*
- * 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.
#include <vector>
#include <security-manager.h>
+#include <app_def_privilege.h>
namespace SecurityManagerTest {
class InstallRequest;
void prepare_request(InstallRequest &request,
- const char *const app_id,
- const char *const pkg_id,
+ const std::string &app_id,
+ const std::string &pkg_id,
app_install_path_type pathType,
- const char *const path,
+ const std::string &path,
uid_t uid);
class InstallRequest
{
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 char *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);
void setAuthorId(std::string authorId, lib_retcode expectedResult= SECURITY_MANAGER_SUCCESS);
void setInstallType(const enum app_install_type &type, lib_retcode expectedResult = SECURITY_MANAGER_SUCCESS);
-
+ void setHybrid(lib_retcode expectedResult = SECURITY_MANAGER_SUCCESS);
std::string getAppTizenVersion() const { return m_tizenVer; }
app_inst_req *get() { return m_req; }
const app_inst_req *get() const { return m_req; }
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;
};