1 #ifndef ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
2 #define ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
3 
4 #include <android/hardware/tests/baz/1.0/IBaz.h>
5 #include <hidl/MQDescriptor.h>
6 #include <hidl/Status.h>
7 
8 namespace android {
9 namespace hardware {
10 namespace tests {
11 namespace baz {
12 namespace V1_0 {
13 namespace implementation {
14 
15 // using ::android::hardware::tests::baz::V1_0::IBase;
16 using ::android::hardware::tests::baz::V1_0::IBaz;
17 using ::android::hardware::tests::baz::V1_0::IBazCallback;
18 using ::android::hidl::base::V1_0::DebugInfo;
19 using ::android::hidl::base::V1_0::IBase;
20 using ::android::hardware::hidl_array;
21 using ::android::hardware::hidl_memory;
22 using ::android::hardware::hidl_string;
23 using ::android::hardware::hidl_vec;
24 using ::android::hardware::Return;
25 using ::android::hardware::Void;
26 using ::android::sp;
27 
28 struct Baz : public IBaz {
29     // Methods from ::android::hardware::tests::baz::V1_0::IBase follow.
30     Return<void> someBaseMethod() override;
31     Return<bool> someBoolMethod(bool x) override;
32     Return<void> someBoolArrayMethod(const hidl_array<bool, 3>& x,
33                                      someBoolArrayMethod_cb _hidl_cb) override;
34     Return<void> someBoolVectorMethod(const hidl_vec<bool>& x,
35                                       someBoolVectorMethod_cb _hidl_cb) override;
36     Return<void> someOtherBaseMethod(const IBase::Foo& foo,
37                                      someOtherBaseMethod_cb _hidl_cb) override;
38     Return<void> someMethodWithFooArrays(const hidl_array<IBase::Foo, 2>& fooInput,
39                                          someMethodWithFooArrays_cb _hidl_cb) override;
40     Return<void> someMethodWithFooVectors(const hidl_vec<IBase::Foo>& fooInput,
41                                           someMethodWithFooVectors_cb _hidl_cb) override;
42     Return<void> someMethodWithVectorOfArray(const IBase::VectorOfArray& in,
43                                              someMethodWithVectorOfArray_cb _hidl_cb) override;
44     Return<void> someMethodTakingAVectorOfArray(const hidl_vec<hidl_array<uint8_t, 6>>& in,
45                                                 someMethodTakingAVectorOfArray_cb _hidl_cb) override;
46     Return<void> transpose(const IBase::StringMatrix5x3& in,
47                            transpose_cb _hidl_cb) override;
48     Return<void> transpose2(const hidl_array<hidl_string, 5, 3>& in,
49                             transpose2_cb _hidl_cb) override;
50     Return<void> takeAMask(IBase::BitField bf,
51                            uint8_t first,
52                            const IBase::MyMask& second,
53                            uint8_t third,
54                            takeAMask_cb _hidl_cb) override;
55 
56     Return<void> testArrays(
57             const IBase::LotsOfPrimitiveArrays &in,
58             testArrays_cb _hidl_cb) override;
59 
60     Return<void> testByteVecs(
61             const hidl_vec<IBase::ByteOneDim> &in,
62             testByteVecs_cb _hidl_cb) override;
63 
64     Return<void> testBooleanVecs(
65             const hidl_vec<IBase::BooleanOneDim> &in,
66             testBooleanVecs_cb _hidl_cb) override;
67 
68     Return<void> testDoubleVecs(
69             const hidl_vec<IBase::DoubleOneDim> &in,
70             testDoubleVecs_cb _hidl_cb) override;
71 
72     // Methods from ::android::hardware::tests::baz::V1_0::IBaz follow.
73     Return<void> doThis(float param) override;
74     Return<int32_t> doThatAndReturnSomething(int64_t param) override;
75     Return<double> doQuiteABit(int32_t a, int64_t b, float c, double d) override;
76     Return<void> doSomethingElse(const hidl_array<int32_t, 15>& param,
77                                  doSomethingElse_cb _hidl_cb) override;
78     Return<void> doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb) override;
79     Return<void> mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb) override;
80     Return<void> callMe(const sp<IBazCallback>& cb) override;
81     Return<void> callMeLater(const sp<IBazCallback>& cb) override;
82     Return<void> iAmFreeNow() override;
83     Return<void> dieNow() override;
84     Return<IBaz::SomeEnum> useAnEnum(IBaz::SomeEnum zzz) override;
85     Return<void> haveSomeStrings(const hidl_array<hidl_string, 3>& array,
86                                  haveSomeStrings_cb _hidl_cb) override;
87     Return<void> haveAStringVec(const hidl_vec<hidl_string>& vector,
88                                 haveAStringVec_cb _hidl_cb) override;
89     Return<void> repeatBitfieldVec(const hidl_vec<uint8_t>& vector,
90                                    repeatBitfieldVec_cb _hidl_cb) override;
91     Return<void> returnABunchOfStrings(returnABunchOfStrings_cb _hidl_cb) override;
92     Return<uint8_t> returnABitField() override;
93     Return<uint32_t> size(uint32_t size) override;
94     Return<void> getNestedStructs(getNestedStructs_cb _hidl_cb) override;
95 
96     Return<void> haveSomeStructWithInterface(const StructWithInterface& swi,
97                                              haveSomeStructWithInterface_cb _hidl_cb) override;
98     // Methods from ::android::hidl::base::V1_0::IBase follow.
99  private:
100     sp<IBazCallback> mStoredCallback;
101 };
102 
103 extern "C" IBaz* HIDL_FETCH_IBaz(const char* name);
104 
105 }  // namespace implementation
106 }  // namespace V1_0
107 }  // namespace baz
108 }  // namespace tests
109 }  // namespace hardware
110 }  // namespace android
111 
112 #endif  // ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
113