• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 **
3 ** Copyright 2017, The Android Open Source Project
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 **     http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17 
18 #include "include/keystore/KeymasterArguments.h"
19 #include "keystore_aidl_hidl_marshalling_utils.h"
20 
21 #include <binder/Parcel.h>
22 
23 namespace android {
24 namespace security {
25 namespace keymaster {
26 
27 using ::android::status_t;
readFromParcel(const android::Parcel * in)28 status_t KeymasterArguments::readFromParcel(const android::Parcel* in) {
29     data_ = keystore::readParamSetFromParcel(*in);
30     return OK;
31 };
32 
writeToParcel(android::Parcel * out) const33 status_t KeymasterArguments::writeToParcel(android::Parcel* out) const {
34     return keystore::writeParamSetToParcel(data_, out);
35 };
36 
KeymasterArguments(hardware::hidl_vec<keystore::KeyParameter> && other)37 KeymasterArguments::KeymasterArguments(hardware::hidl_vec<keystore::KeyParameter>&& other)
38     : data_(std::move(other)) {}
39 
KeymasterArguments(const hardware::hidl_vec<keystore::KeyParameter> & other)40 KeymasterArguments::KeymasterArguments(const hardware::hidl_vec<keystore::KeyParameter>& other)
41     : data_(other) {}
42 
43 }  // namespace keymaster
44 }  // namespace security
45 }  // namespace android
46