| Dmitry Dementyev | a447b3c | 2017-10-27 23:09:53 -0700 | [diff] [blame] | 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; | 
 | 28 | status_t KeymasterArguments::readFromParcel(const android::Parcel* in) { | 
 | 29 |     data_ = keystore::readParamSetFromParcel(*in); | 
 | 30 |     return OK; | 
 | 31 | }; | 
 | 32 |  | 
 | 33 | status_t KeymasterArguments::writeToParcel(android::Parcel* out) const { | 
 | 34 |     return keystore::writeParamSetToParcel(data_, out); | 
 | 35 | }; | 
 | 36 |  | 
| Janis Danisevskis | ff3d7f4 | 2018-10-08 07:15:09 -0700 | [diff] [blame] | 37 | KeymasterArguments::KeymasterArguments(hardware::hidl_vec<keystore::KeyParameter>&& other) | 
 | 38 |     : data_(std::move(other)) {} | 
 | 39 |  | 
| Shawn Willden | 0329a82 | 2017-12-04 13:55:14 -0700 | [diff] [blame] | 40 | KeymasterArguments::KeymasterArguments(const hardware::hidl_vec<keystore::KeyParameter>& other) | 
| Dmitry Dementyev | a447b3c | 2017-10-27 23:09:53 -0700 | [diff] [blame] | 41 |     : data_(other) {} | 
 | 42 |  | 
 | 43 | }  // namespace keymaster | 
 | 44 | }  // namespace security | 
 | 45 | }  // namespace android |