1 #ifndef ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
2 #define ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
3 
4 #include <android/hardware/tests/foo/1.0/IFoo.h>
5 #include <hidl/Status.h>
6 
7 #include <hidl/MQDescriptor.h>
8 #include <vector>
9 namespace android {
10 namespace hardware {
11 namespace tests {
12 namespace foo {
13 namespace V1_0 {
14 namespace implementation {
15 
16 using ::android::hardware::tests::foo::V1_0::Abc;
17 using ::android::hardware::tests::foo::V1_0::IFoo;
18 using ::android::hardware::tests::foo::V1_0::IFooCallback;
19 using ::android::hardware::tests::foo::V1_0::ISimple;
20 using ::android::hardware::Return;
21 using ::android::hardware::Void;
22 using ::android::hardware::hidl_vec;
23 using ::android::hardware::hidl_string;
24 using ::android::sp;
25 using ContainsUnion = ::android::hardware::tests::foo::V1_0::IFoo::ContainsUnion;
26 using Discriminator = ::android::hardware::tests::foo::V1_0::IFoo::Discriminator;
27 using Union = ::android::hardware::tests::foo::V1_0::IFoo::Union;
28 
29 struct Foo : public IFoo {
30     // Methods from ::android::hardware::tests::foo::V1_0::IFoo follow.
31     virtual Return<void> convertToBoolIfSmall(Discriminator d, const hidl_vec<Union>& u,
32                                               convertToBoolIfSmall_cb _hidl_cb) override;
33     virtual Return<void> doThis(float param)  override;
34     virtual Return<int32_t> doThatAndReturnSomething(int64_t param)  override;
35     virtual Return<double> doQuiteABit(int32_t a, int64_t b, float c, double d)  override;
36     virtual Return<void> doSomethingElse(const hidl_array<int32_t, 15 /* 15 */>& param, doSomethingElse_cb _hidl_cb)  override;
37     virtual Return<void> doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb)  override;
38     virtual Return<void> mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb)  override;
39     virtual Return<void> callMe(const sp<IFooCallback>& cb)  override;
40     virtual Return<IFoo::SomeEnum> useAnEnum(IFoo::SomeEnum zzz)  override;
41     virtual Return<void> haveAGooberVec(const hidl_vec<IFoo::Goober>& param)  override;
42     virtual Return<void> haveAGoober(const IFoo::Goober& g)  override;
43     virtual Return<void> haveAGooberArray(const hidl_array<IFoo::Goober, 20 /* 20 */>& lots)  override;
44     virtual Return<void> haveATypeFromAnotherFile(const Abc& def)  override;
45     virtual Return<void> haveSomeStrings(const hidl_array<hidl_string, 3 /* 3 */>& array, haveSomeStrings_cb _hidl_cb)  override;
46     virtual Return<void> haveAStringVec(const hidl_vec<hidl_string>& vector, haveAStringVec_cb _hidl_cb)  override;
47     virtual Return<void> transposeMe(const hidl_array<float, 3 /* 3 */, 5 /* 5 */>& in, transposeMe_cb _hidl_cb)  override;
48     virtual Return<void> callingDrWho(const IFoo::MultiDimensional& in, callingDrWho_cb _hidl_cb)  override;
49     virtual Return<void> transpose(const IFoo::StringMatrix5x3& in, transpose_cb _hidl_cb)  override;
50     virtual Return<void> transpose2(const hidl_array<hidl_string, 5 /* 5 */, 3 /* 3 */>& in, transpose2_cb _hidl_cb)  override;
51     virtual Return<void> sendVec(const hidl_vec<uint8_t>& data, sendVec_cb _hidl_cb)  override;
52     virtual Return<void> sendVecVec(sendVecVec_cb _hidl_cb)  override;
53     virtual Return<void> createMyHandle(createMyHandle_cb _hidl_cb)  override;
54     virtual Return<void> createHandles(uint32_t size, createHandles_cb _hidl_cb)  override;
55     virtual Return<void> closeHandles()  override;
56     virtual Return<void> repeatWithFmq(const IFoo::WithFmq& withFmq,
57                                        repeatWithFmq_cb _hidl_cb) override;
58 
59     Return<void> haveAVectorOfInterfaces(
60             const hidl_vec<sp<ISimple> > &in,
61             haveAVectorOfInterfaces_cb _hidl_cb) override;
62 
63     Return<void> haveAVectorOfGenericInterfaces(
64             const hidl_vec<sp<android::hidl::base::V1_0::IBase> > &in,
65             haveAVectorOfGenericInterfaces_cb _hidl_cb) override;
66 
67     Return<void> echoNullInterface(const sp<IFooCallback> &cb, echoNullInterface_cb _hidl_cb) override;
68 
69 private:
70     std::vector<::native_handle_t *> mHandles;
71 };
72 
73 extern "C" IFoo* HIDL_FETCH_IFoo(const char* name);
74 
75 }  // namespace implementation
76 }  // namespace V1_0
77 }  // namespace foo
78 }  // namespace tests
79 }  // namespace hardware
80 }  // namespace android
81 
82 #endif  // ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
83