2 * Copyright (c) 2000 - 2015 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 InitialValueHandler.h
18 * @author Maciej Karpiuk (m.karpiuk2@samsung.com)
20 * @brief InitialValueHandler class.
23 #ifndef INITIALVALUEHANDLER_H_
24 #define INITIALVALUEHANDLER_H_
27 #include <BufferHandler.h>
28 #include <PermissionHandler.h>
29 #include <EncodingType.h>
30 #include <ckm/ckm-type.h>
31 #include <ckm-logic.h>
32 #include <protocols.h>
35 namespace InitialValues {
37 class InitialValueHandler : public XML::Parser::ElementHandler
40 typedef std::shared_ptr<InitialValueHandler> InitialValueHandlerPtr;
42 explicit InitialValueHandler(CKMLogic & db_logic) : m_exportable(false),
43 m_db_logic(db_logic) {}
44 virtual ~InitialValueHandler() {};
46 BufferHandler::BufferHandlerPtr CreateBufferHandler(EncodingType type);
47 PermissionHandler::PermissionHandlerPtr CreatePermissionHandler();
48 virtual void Start(const XML::Parser::Attributes &);
49 virtual void Characters(const std::string & data);
53 virtual DataType getDataType() const = 0;
58 CKMLogic & m_db_logic;
60 BufferHandler::BufferHandlerPtr m_bufferHandler;
61 std::vector<PermissionHandler::PermissionHandlerPtr> m_permissions;
66 #endif /* INITIALVALUEHANDLER_H_ */