Organize initial source structure
[platform/core/security/ode.git] / server / internal-encryption.cpp
1 /*
2  *  Copyright (c) 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 #include <klay/filesystem.h>
17 #include <klay/audit/logger.h>
18
19 #include "engine/dmcrypt-engine.h"
20 #include "key-manager/keystore.h"
21 #include "key-manager/key-generator.h"
22
23 #include "rmi/internal-encryption.h"
24
25 namespace ode {
26
27 InternalEncryption::InternalEncryption(ODEControlContext& ctx) :
28         context(ctx)
29 {
30         context.registerParametricMethod(this, "", (int)(InternalEncryption::mount)(std::string));
31         context.registerNonparametricMethod(this, "", (int)(InternalEncryption::umount));
32         context.registerParametricMethod(this, "", (int)(InternalEncryption::encrypt)(std::string));
33         context.registerParametricMethod(this, "", (int)(InternalEncryption::decrypt)(std::string));
34         context.registerParametricMethod(this, "", (int)(InternalEncryption::changePassword)(std::string, std::string));
35         context.registerNonparametricMethod(this, "", (int)(InternalEncryption::getState));
36 }
37
38
39 InternalEncryption::~InternalEncryption()
40 {
41 }
42
43 int InternalEncryption::mount(const std::string& password)
44 {
45         //TODO
46         return 0;
47 }
48
49 int InternalEncryption::umount()
50 {
51         //TODO
52         return 0;
53 }
54
55 int InternalEncryption::encrypt(const std::string& password)
56 {
57         //TODO
58         return 0;
59 }
60
61 int InternalEncryption::decrypt(const std::string& password)
62 {
63         //TODO
64         return 0;
65 }
66
67 int InternalEncryption::changePassword(const std::string& oldPassword,
68                                                                                 const std::string& newPassword)
69 {
70         //TODO
71         return 0;
72 }
73
74 int InternalEncryption::getState()
75 {
76         //TODO
77         return 0;
78 }
79
80 } // namespace ode