2 * Copyright (c) 2016-2017 Samsung Electronics Co.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
17 * @file src/agent/main/Policy.h
18 * @author Zofia Abramowska <z.abramowska@samsung.com>
19 * @brief Definition of Policy wrappers
28 struct policy_update_req;
32 void identifyApp(const std::string &client, std::string &appId, std::string &pkgLabel);
33 std::string getOwnAppId();
38 PolicyEntry(PolicyEntry &&other);
39 PolicyEntry(policy_entry *entry) { m_entry = entry; }
41 void setApp(const std::string &appId);
42 std::string getAppId();
43 void setUser(const std::string &user);
44 std::string getUser();
45 void setPrivilege(const std::string &privilege);
46 std::string getPrivilege();
47 void setLevel(const std::string &level);
48 std::string getLevel();
50 policy_entry *get() const { return m_entry; }
53 policy_entry *m_entry;
60 void addEntry(PolicyEntry &&entry);
64 policy_update_req *m_req;
65 std::vector<PolicyEntry> m_entries;
68 class PolicyFetchRequest {
70 PolicyFetchRequest(PolicyEntry &&filter) : m_filter(std::move(filter)) {}
71 ~PolicyFetchRequest() {}
72 std::vector<PolicyEntry> fetchPolicy();
77 } /* namespace AskUser */