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