2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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 feature_dao_read_only.h
18 * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
20 * @brief This file contains the declaration of feature dao read only
23 #ifndef WRT_SRC_CONFIGURATION_FEATURE_DAO_READ_ONLY_H_
24 #define WRT_SRC_CONFIGURATION_FEATURE_DAO_READ_ONLY_H_
28 #include <dpl/exception.h>
29 #include <dpl/wrt-dao-ro/common_dao_types.h>
30 #include "feature_model.h"
31 #include <dpl/wrt-dao-ro/common_dao_types.h>
32 #include <dpl/wrt-dao-ro/WrtDatabase.h>
36 class FeatureDAOReadOnly
45 DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
46 DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
47 DECLARE_EXCEPTION_TYPE(Base, FeatureNotExist)
50 typedef std::set<std::string> DeviceCapabilitiesList;
52 static bool isDeviceCapabilityInstalled(const std::string &deviceCapName);
54 FeatureDAOReadOnly(FeatureHandle);
55 FeatureDAOReadOnly(const std::string &featureName);
57 static FeatureHandleListPtr GetFeatureHandleListForPlugin(
58 DbPluginHandle pluginHandle);
60 static bool isFeatureInstalled(const std::string &featureName);
61 static bool isFeatureInstalled(FeatureHandle handle);
62 static FeatureHandleList GetHandleList();
64 std::string GetName() const;
65 std::string GetInstallURI() const;
66 std::string GetKeyCn() const;
67 std::string GetRootKey() const;
68 std::string GetRootKeyFingerprint() const;
69 FeatureHandle GetFeatureHandle() const;
70 std::string GetLibraryPath() const;
71 std::string GetLibraryName() const;
72 DeviceCapabilitiesList GetDeviceCapabilities() const;
73 DbPluginHandle GetPluginHandle() const;
76 FeatureHandle m_featureHandle;
81 #endif /* WRT_SRC_CONFIGURATION_FEATURE_DAO_READ_ONLY_H_ */