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 DeveloperModeValidator.h
18 * @author Bartosz Janiak (b.janiak@samsung.com)
20 * @brief DeveloperModeValidatorValidator - implementing WAC 2.0 spec, including TargetRestriction
24 WRT_ENGINE_SRC_INSTALLER_CORE_VALIDATION_CORE_DEVELOPER_MODE_VALIDATOR_H
26 WRT_ENGINE_SRC_INSTALLER_CORE_VALIDATION_CORE_DEVELOPER_MODE_VALIDATOR_H
29 #include <dpl/exception.h>
30 #include "SignatureData.h"
32 namespace ValidationCore {
34 class DeveloperModeValidator
37 explicit DeveloperModeValidator(
38 bool complianceMode = false,
39 const std::string &fakeIMEI = "",
40 const std::string &fakeMEID = "") __attribute__((deprecated));
42 explicit DeveloperModeValidator(bool complianceMode = false,
43 bool developerMode = false,
44 const std::string &fakeIMEI = "",
45 const std::string &fakeMEID = "",
46 const std::string &realMEID = "");
51 DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
52 DECLARE_EXCEPTION_TYPE(Base, UnableToLoadTestCertificate)
53 DECLARE_EXCEPTION_TYPE(Base, NoTargetRestrictionSatisfied)
56 void check(const SignatureData &data);
58 bool m_complianceModeEnabled;
59 bool m_developerModeEnabled;
60 std::string m_fakeIMEI;
61 std::string m_fakeMEID;
62 std::string m_realMEID;
66 #endif /* WRT_ENGINE_SRC_INSTALLER_CORE_VALIDATION_CORE_DEVELOPER_MODE_VALIDATOR_H */