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 #ifndef _SRC_VALIDATION_CORE_VALIDATION_CORE_CONFIG_H_
18 #define _SRC_VALIDATION_CORE_VALIDATION_CORE_CONFIG_H_
22 #include <dpl/singleton.h>
24 namespace ValidationCore {
28 * Set path to config file with certificate description.
30 bool setXMLConfigPath(const std::string& path) {
31 if (!m_certificateXMLConfigPath.empty()) {
34 m_certificateXMLConfigPath = path;
39 * Set path to schema of config file.
41 bool setXMLSchemaPath(const std::string& path) {
42 if (!m_certificateXMLSchemaPath.empty()) {
45 m_certificateXMLSchemaPath = path;
50 * Set path to database with OCSP/CRL Cache.
52 bool setDatabasePath(const std::string& path) {
53 if (!m_databasePath.empty()) {
56 m_databasePath = path;
61 * Get path to config file with certificate description.
63 std::string getXMLConfigPath() {
64 return m_certificateXMLConfigPath;
68 * Get path to schema of config file.
70 std::string getXMLSchemaPath() {
71 return m_certificateXMLSchemaPath;
75 * Get path to database with OCSP/CRL Cache.
77 std::string getDatabasePath() {
78 return m_databasePath;
82 std::string m_certificateXMLConfigPath;
83 std::string m_certificateXMLSchemaPath;
84 std::string m_databasePath;
87 typedef DPL::Singleton<Config> ConfigSingleton;
89 } // namespace ValidationCore
91 #endif // _SRC_VALIDATION_CORE_VALIDATION_CORE_CONFIG_H_