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/external-encryption.h"
20 ExternalEncryption::ExternalEncryption(ODEControlContext& ctx) :
25 ExternalEncryption::~ExternalEncryption()
29 int ExternalEncryption::mount(const std::string& password)
32 return context->methodCall<int>("ExternalEncryption::mount", password);
33 } catch (runtime::Exception& e) {
38 int ExternalEncryption::umount()
41 return context->methodCall<int>("ExternalEncryption::umount");
42 } catch (runtime::Exception& e) {
47 int ExternalEncryption::encrypt(const std::string& password, unsigned int options)
50 return context->methodCall<int>("ExternalEncryption::encrypt", password, options);
51 } catch (runtime::Exception& e) {
56 int ExternalEncryption::decrypt(const std::string& password)
59 return context->methodCall<int>("ExternalEncryption::decrypt", password);
60 } catch (runtime::Exception& e) {
65 int ExternalEncryption::isPasswordInitialized()
68 return context->methodCall<int>("ExternalEncryption::isPasswordInitialized");
69 } catch (runtime::Exception& e) {
74 int ExternalEncryption::initPassword(const std::string& password)
77 return context->methodCall<int>("ExternalEncryption::initPassword",
79 } catch (runtime::Exception& e) {
84 int ExternalEncryption::cleanPassword(const std::string& password)
87 return context->methodCall<int>("ExternalEncryption::cleanPassword",
89 } catch (runtime::Exception& e) {
94 int ExternalEncryption::changePassword(const std::string& oldPassword,
95 const std::string& newPassword)
98 return context->methodCall<int>("ExternalEncryption::changePassword",
99 oldPassword, newPassword);
100 } catch (runtime::Exception& e) {
105 int ExternalEncryption::verifyPassword(const std::string& password)
108 return context->methodCall<int>("ExternalEncryption::verifyPassword",
110 } catch (runtime::Exception& e) {
115 int ExternalEncryption::getState()
118 return context->methodCall<int>("ExternalEncryption::getState");
119 } catch (runtime::Exception& e) {
124 unsigned int ExternalEncryption::getSupportedOptions()
127 return context->methodCall<unsigned int>("ExternalEncryption::getSupportedOptions");
128 } catch (runtime::Exception& e) {