2 * Copyright (c) 2017-2018 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/common/policy/AppInfo.h
18 * @author Zofia Abramowska <z.abramowska@samsung.com>
19 * @author Tomasz Swierczek <t.swierczek@samsung.com>
20 * @brief Definition of app-data wrapper/cache (sub)classes
26 #include <sys/types.h>
33 AppInfo() : m_uid(0) {};
35 virtual ~AppInfo() {};
37 virtual void purgeCache() {
44 virtual std::string type(const std::string &appId, uid_t uid) {
49 virtual std::string apiVersion(const std::string &appId, uid_t uid) {
55 virtual void fetch(const std::string &appId, uid_t uid) = 0;
57 virtual void update(const std::string &appId, uid_t uid) {
58 if (m_appId != appId || uid != m_uid) {
67 std::string m_version;
70 class AulAppInfo : public AppInfo {
72 virtual void fetch(const std::string &appId, uid_t uid);
75 class PkgMgrAppInfo : public AppInfo {
77 virtual void fetch(const std::string &appId, uid_t uid);
81 } // namespace AskUser