blob: 07d88d23b0674ed2d9cef6f2182c0c1038081ae9 [file] [log] [blame]
Nirav Atreb4186162018-06-08 16:51:29 -07001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef ANDROID_HARDWARE_TESTS_SAFEUNION_V1_0_SAFEUNION_H
18#define ANDROID_HARDWARE_TESTS_SAFEUNION_V1_0_SAFEUNION_H
19
20#include <android/hardware/tests/safeunion/1.0/ISafeUnion.h>
21#include <hidl/MQDescriptor.h>
22#include <hidl/Status.h>
23
24namespace android {
25namespace hardware {
26namespace tests {
27namespace safeunion {
28namespace V1_0 {
29namespace implementation {
30
31using ::android::hardware::Return;
32using ::android::hardware::Void;
Nirav Atre894556c2018-07-01 13:48:44 -070033using ::android::hardware::tests::safeunion::V1_0::ISafeUnion;
Nirav Atreb4186162018-06-08 16:51:29 -070034
35struct SafeUnion : public ISafeUnion {
36 // Methods from ::android::hardware::tests::safeunion::V1_0::ISafeUnion follow.
37 Return<void> newLargeSafeUnion(newLargeSafeUnion_cb _hidl_cb) override;
38 Return<void> setA(const LargeSafeUnion& myUnion, int8_t a, setA_cb _hidl_cb) override;
39 Return<void> setB(const LargeSafeUnion& myUnion, uint16_t b, setB_cb _hidl_cb) override;
40 Return<void> setC(const LargeSafeUnion& myUnion, int32_t c, setC_cb _hidl_cb) override;
41 Return<void> setD(const LargeSafeUnion& myUnion, uint64_t d, setD_cb _hidl_cb) override;
42 Return<void> setE(const LargeSafeUnion& myUnion, const hidl_array<int8_t, 13>& e, setE_cb _hidl_cb) override;
43 Return<void> setF(const LargeSafeUnion& myUnion, const hidl_array<int64_t, 5>& f, setF_cb _hidl_cb) override;
44 Return<void> setG(const LargeSafeUnion& myUnion, const hidl_string& g, setG_cb _hidl_cb) override;
45 Return<void> setH(const LargeSafeUnion& myUnion, const hidl_vec<bool>& h, setH_cb _hidl_cb) override;
46 Return<void> setI(const LargeSafeUnion& myUnion, const hidl_vec<uint64_t>& i, setI_cb _hidl_cb) override;
47 Return<void> setJ(const LargeSafeUnion& myUnion, const J& j, setJ_cb _hidl_cb) override;
48 Return<void> setK(const LargeSafeUnion& myUnion, const LargeSafeUnion::K& k, setK_cb _hidl_cb) override;
49 Return<void> setL(const LargeSafeUnion& myUnion, const SmallSafeUnion& l, setL_cb _hidl_cb) override;
50
Nirav Atre894556c2018-07-01 13:48:44 -070051 Return<void> newInterfaceTypeSafeUnion(newInterfaceTypeSafeUnion_cb _hidl_cb) override;
52 Return<void> setInterfaceA(const InterfaceTypeSafeUnion& myUnion, uint32_t a, setInterfaceA_cb _hidl_cb) override;
53 Return<void> setInterfaceB(const InterfaceTypeSafeUnion& myUnion, const hidl_array<int8_t, 7>& b, setInterfaceB_cb _hidl_cb) override;
54 Return<void> setInterfaceC(const InterfaceTypeSafeUnion& myUnion, const sp<::android::hardware::tests::safeunion::V1_0::IOtherInterface>& c, setInterfaceC_cb _hidl_cb) override;
Nirav Atreb4186162018-06-08 16:51:29 -070055};
56
57extern "C" ISafeUnion* HIDL_FETCH_ISafeUnion(const char* name);
58
59} // namespace implementation
60} // namespace V1_0
61} // namespace safeunion
62} // namespace tests
63} // namespace hardware
64} // namespace android
65
66#endif // ANDROID_HARDWARE_TESTS_SAFEUNION_V1_0_SAFEUNION_H