| // Copyright 2020 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // This is the boilerplate implementation of the IAllocator HAL interface, |
| // generated by the hidl-gen tool and then modified for use on Chrome OS. |
| // Modifications include: |
| // - Removal of non boiler plate client and server related code. |
| // - Reformatting to meet the Chrome OS coding standards. |
| // |
| // Originally generated with the command: |
| // $ hidl-gen -o output -L c++ -r android.hidl:system/libhidl/transport \ |
| // android.hidl.allocator@1.0 |
| |
| #include <android/hidl/allocator/1.0/IAllocator.h> |
| |
| namespace android { |
| namespace hidl { |
| namespace allocator { |
| namespace V1_0 { |
| |
| using ::android::sp; |
| using ::android::hardware::hidl_death_recipient; |
| using ::android::hardware::hidl_handle; |
| using ::android::hardware::hidl_string; |
| using ::android::hardware::hidl_vec; |
| using ::android::hardware::Return; |
| using ::android::hardware::Void; |
| |
| const char* IAllocator::descriptor("android.hidl.allocator@1.0::IAllocator"); |
| |
| // Methods from ::android::hidl::base::V1_0::IBase follow. |
| Return<void> IAllocator::interfaceChain(interfaceChain_cb _hidl_cb) { |
| _hidl_cb({ |
| ::android::hidl::allocator::V1_0::IAllocator::descriptor, |
| ::android::hidl::base::V1_0::IBase::descriptor, |
| }); |
| return Void(); |
| } |
| |
| Return<void> IAllocator::debug(const hidl_handle&, |
| const hidl_vec<hidl_string>&) { |
| return Void(); |
| } |
| |
| Return<void> IAllocator::interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) { |
| _hidl_cb(::android::hidl::allocator::V1_0::IAllocator::descriptor); |
| return Void(); |
| } |
| |
| Return<void> IAllocator::getHashChain(getHashChain_cb _hidl_cb) { |
| _hidl_cb( |
| {/* fc6cbbc8a22edabd4b58f8949e591359d3138d16a82506052e25ac43e1dbda68 */ |
| (uint8_t[32]){252, 108, 187, 200, 162, 46, 218, 189, 75, 88, 248, |
| 148, 158, 89, 19, 89, 211, 19, 141, 22, 168, 37, |
| 6, 5, 46, 37, 172, 67, 225, 219, 218, 104}, |
| /* ec7fd79ed02dfa85bc499426adae3ebe23ef0524f3cd6957139324b83b18ca4c */ |
| (uint8_t[32]){236, 127, 215, 158, 208, 45, 250, 133, 188, 73, 148, |
| 38, 173, 174, 62, 190, 35, 239, 5, 36, 243, 205, |
| 105, 87, 19, 147, 36, 184, 59, 24, 202, 76}}); |
| return Void(); |
| } |
| |
| Return<void> IAllocator::setHALInstrumentation() { |
| return Void(); |
| } |
| |
| Return<bool> IAllocator::linkToDeath(const sp<hidl_death_recipient>& recipient, |
| uint64_t) { |
| return (recipient != nullptr); |
| } |
| |
| Return<void> IAllocator::ping() { |
| return Void(); |
| } |
| |
| Return<void> IAllocator::getDebugInfo(getDebugInfo_cb _hidl_cb) { |
| ::android::hidl::base::V1_0::DebugInfo info = {}; |
| info.pid = -1; |
| info.ptr = 0; |
| info.arch = |
| #if defined(__LP64__) |
| ::android::hidl::base::V1_0::DebugInfo::Architecture::IS_64BIT; |
| #else |
| ::android::hidl::base::V1_0::DebugInfo::Architecture::IS_32BIT; |
| #endif |
| |
| _hidl_cb(info); |
| return Void(); |
| } |
| |
| Return<void> IAllocator::notifySyspropsChanged() { |
| ::android::report_sysprop_change(); |
| return Void(); |
| } |
| |
| Return<bool> IAllocator::unlinkToDeath( |
| const sp<hidl_death_recipient>& recipient) { |
| return (recipient != nullptr); |
| } |
| |
| } // namespace V1_0 |
| } // namespace allocator |
| } // namespace hidl |
| } // namespace android |