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> 8 namespace android { 9 namespace hardware { 10 namespace tests { 11 namespace bar { 12 namespace V1_0 { 13 namespace implementation { 14 15 using ::android::hardware::tests::bar::V1_0::IBar; 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 26 using BitField = ::android::hardware::tests::foo::V1_0::IFoo::BitField; 27 using MyMask = ::android::hardware::tests::foo::V1_0::IFoo::MyMask; 28 29 struct 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 virtual Return<void> repeatWithFmq(const IFoo::WithFmq& withFmq, 60 repeatWithFmq_cb _hidl_cb) override; 61 62 Return<void> haveAVectorOfInterfaces( 63 const hidl_vec<sp<ISimple> > &in, 64 haveAVectorOfInterfaces_cb _hidl_cb) override; 65 66 Return<void> haveAVectorOfGenericInterfaces( 67 const hidl_vec<sp<android::hidl::base::V1_0::IBase> > &in, 68 haveAVectorOfGenericInterfaces_cb _hidl_cb) override; 69 70 Return<void> echoNullInterface(const sp<IFooCallback> &cb, echoNullInterface_cb _hidl_cb) override; 71 72 // Methods from ::android::hardware::tests::bar::V1_0::IBar follow. 73 Return<void> thisIsNew() override; 74 Return<void> expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb) override; 75 76 Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, 77 takeAMask_cb _hidl_cb) override; 78 Return<sp<ISimple>> haveAInterface(const sp<ISimple> &in); 79 80 private: 81 sp<IFoo> mFoo; 82 }; 83 84 extern "C" IBar* HIDL_FETCH_IBar(const char* name); 85 86 } // namespace implementation 87 } // namespace V1_0 88 } // namespace bar 89 } // namespace tests 90 } // namespace hardware 91 } // namespace android 92 93 #endif // ANDROID_HARDWARE_TESTS_BAR_V1_0_BAR_H 94