Add initial values support - values to feed the shared database on first startup.
[platform/core/security/key-manager.git] / src / manager / initial-values / PermissionHandler.cpp
1 /*
2  *  Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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
15  *
16  *
17  * @file        PermissionHandler.cpp
18  * @author      Maciej Karpiuk (m.karpiuk2@samsung.com)
19  * @version     1.0
20  * @brief       PermissionHandler class implementation.
21  */
22
23 #include <ckm/ckm-type.h>
24 #include <PermissionHandler.h>
25
26 namespace
27 {
28 const char * const XML_ATTR_ACCESSOR    = "accessor";
29 }
30
31 namespace CKM {
32 namespace InitialValues {
33
34 PermissionHandler::~PermissionHandler() {}
35
36 void PermissionHandler::Start(const XML::Parser::Attributes & attr)
37 {
38     // get accessor label
39     if(attr.find(XML_ATTR_ACCESSOR) != attr.end())
40         m_accessor = Label(attr.at(XML_ATTR_ACCESSOR));
41 }
42 void PermissionHandler::Characters(const std::string &)
43 {
44     throw std::runtime_error("error: value handler detected raw data while none allowed");
45 }
46 void PermissionHandler::End()
47 {
48 }
49
50 }
51 }