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.
18 * @file common_dao_types.h
19 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
21 * @brief This file contains the declaration of common data types for ace database.
23 #ifndef ACE_SRC_CONFIGURATION_COMMON_DAO_TYPES_H_
24 #define ACE_SRC_CONFIGURATION_COMMON_DAO_TYPES_H_
27 #include <dpl/optional_typedefs.h>
28 #include <dpl/string.h>
31 typedef int WidgetHandle;
32 typedef std::list<WidgetHandle> WidgetHandleList;
37 INVALID_PLUGIN_HANDLE = -1
39 typedef int DbPluginHandle;
41 enum CertificateSource {
42 SIGNATURE_DISTRIBUTOR = 0,
46 struct WidgetRegisterInfo {
48 DPL::OptionalString widget_id;
49 DPL::OptionalString authorName;
50 DPL::OptionalString version;
51 DPL::OptionalString shareHref;
54 typedef std::list <std::string> WidgetCertificateCNList;
56 struct WidgetCertificateData {
57 enum Owner { AUTHOR, DISTRIBUTOR, UNKNOWN };
58 enum Type { ROOT, ENDENTITY };
64 std::string strMD5Fingerprint;
65 std::string strSHA1Fingerprint;
66 DPL::String strCommonName;
68 bool operator== (const WidgetCertificateData& certData) const {
69 return certData.chainId == chainId &&
70 certData.owner == owner &&
71 certData.strCommonName == strCommonName &&
72 certData.strMD5Fingerprint == strMD5Fingerprint &&
73 certData.strSHA1Fingerprint == strSHA1Fingerprint;
76 typedef std::list<WidgetCertificateData> WidgetCertificateDataList;
78 typedef std::list<std::string> FingerPrintList;
80 typedef std::list<std::string> CertificateChainList;
83 virtual ~IWacSecurity() {}
84 virtual const WidgetCertificateDataList& getCertificateList() const = 0;
85 virtual bool isRecognized() const = 0;
86 virtual bool isDistributorSigned() const = 0;
87 virtual bool isWacSigned() const = 0;
88 virtual void getCertificateChainList(CertificateChainList& list) const = 0;
93 #endif /* ACE_SRC_CONFIGURATION_COMMON_DAO_TYPES_H_ */