2 * Copyright (c) 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
16 #include "rmi/internal-encryption.h"
20 InternalEncryption::InternalEncryption(ODEControlContext& ctx) :
25 InternalEncryption::~InternalEncryption()
29 int InternalEncryption::mount(const std::string& password)
32 return context->methodCall<int>("InternalEncryption::mount", password);
33 } catch (runtime::Exception& e) {
38 int InternalEncryption::umount()
41 return context->methodCall<int>("InternalEncryption::umount");
42 } catch (runtime::Exception& e) {
47 int InternalEncryption::encrypt(const std::string& password, unsigned int options)
50 return context->methodCall<int>("InternalEncryption::encrypt", password, options);
51 } catch (runtime::Exception& e) {
56 int InternalEncryption::decrypt(const std::string& password)
59 return context->methodCall<int>("InternalEncryption::decrypt", password);
60 } catch (runtime::Exception& e) {
65 int InternalEncryption::recovery()
68 return context->methodCall<int>("InternalEncryption::recovery");
69 } catch (runtime::Exception& e) {
74 int InternalEncryption::isPasswordInitialized()
77 return context->methodCall<int>("InternalEncryption::isPasswordInitialized");
78 } catch (runtime::Exception& e) {
83 int InternalEncryption::initPassword(const std::string& password)
86 return context->methodCall<int>("InternalEncryption::initPassword",
88 } catch (runtime::Exception& e) {
93 int InternalEncryption::cleanPassword(const std::string& password)
96 return context->methodCall<int>("InternalEncryption::cleanPassword",
98 } catch (runtime::Exception& e) {
103 int InternalEncryption::changePassword(const std::string& oldPassword,
104 const std::string& newPassword)
107 return context->methodCall<int>("InternalEncryption::changePassword",
108 oldPassword, newPassword);
109 } catch (runtime::Exception& e) {
114 int InternalEncryption::verifyPassword(const std::string& password)
117 return context->methodCall<int>("InternalEncryption::verifyPassword",
119 } catch (runtime::Exception& e) {
124 int InternalEncryption::getState()
127 return context->methodCall<int>("InternalEncryption::getState");
128 } catch (runtime::Exception& e) {
133 unsigned int InternalEncryption::getSupportedOptions()
136 return context->methodCall<unsigned int>("InternalEncryption::getSupportedOptions");
137 } catch (runtime::Exception& e) {