Home | History | Annotate | Download | only in default
      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> doThis(float param)  override;
     35     virtual Return<int32_t> doThatAndReturnSomething(int64_t param)  override;
     36     virtual Return<double> doQuiteABit(int32_t a, int64_t b, float c, double d)  override;
     37     virtual Return<void> doSomethingElse(const hidl_array<int32_t, 15 /* 15 */>& param, doSomethingElse_cb _hidl_cb)  override;
     38     virtual Return<void> doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb)  override;
     39     virtual Return<void> mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb)  override;
     40     virtual Return<void> callMe(const sp<IFooCallback>& cb)  override;
     41     virtual Return<IFoo::SomeEnum> useAnEnum(IFoo::SomeEnum zzz)  override;
     42     virtual Return<void> haveAGooberVec(const hidl_vec<IFoo::Goober>& param)  override;
     43     virtual Return<void> haveAGoober(const IFoo::Goober& g)  override;
     44     virtual Return<void> haveAGooberArray(const hidl_array<IFoo::Goober, 20 /* 20 */>& lots)  override;
     45     virtual Return<void> haveATypeFromAnotherFile(const Abc& def)  override;
     46     virtual Return<void> haveSomeStrings(const hidl_array<hidl_string, 3 /* 3 */>& array, haveSomeStrings_cb _hidl_cb)  override;
     47     virtual Return<void> haveAStringVec(const hidl_vec<hidl_string>& vector, haveAStringVec_cb _hidl_cb)  override;
     48     virtual Return<void> transposeMe(const hidl_array<float, 3 /* 3 */, 5 /* 5 */>& in, transposeMe_cb _hidl_cb)  override;
     49     virtual Return<void> callingDrWho(const IFoo::MultiDimensional& in, callingDrWho_cb _hidl_cb)  override;
     50     virtual Return<void> transpose(const IFoo::StringMatrix5x3& in, transpose_cb _hidl_cb)  override;
     51     virtual Return<void> transpose2(const hidl_array<hidl_string, 5 /* 5 */, 3 /* 3 */>& in, transpose2_cb _hidl_cb)  override;
     52     virtual Return<void> sendVec(const hidl_vec<uint8_t>& data, sendVec_cb _hidl_cb)  override;
     53     virtual Return<void> sendVecVec(sendVecVec_cb _hidl_cb)  override;
     54     virtual Return<void> createMyHandle(createMyHandle_cb _hidl_cb)  override;
     55     virtual Return<void> createHandles(uint32_t size, createHandles_cb _hidl_cb)  override;
     56     virtual Return<void> closeHandles()  override;
     57 
     58     Return<void> haveAVectorOfInterfaces(
     59             const hidl_vec<sp<ISimple> > &in,
     60             haveAVectorOfInterfaces_cb _hidl_cb) override;
     61 
     62     Return<void> haveAVectorOfGenericInterfaces(
     63             const hidl_vec<sp<android::hidl::base::V1_0::IBase> > &in,
     64             haveAVectorOfGenericInterfaces_cb _hidl_cb) override;
     65 
     66     Return<void> echoNullInterface(const sp<IFooCallback> &cb, echoNullInterface_cb _hidl_cb) override;
     67 
     68     // Methods from ::android::hardware::tests::bar::V1_0::IBar follow.
     69     Return<void> thisIsNew()  override;
     70     Return<void> expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb)  override;
     71 
     72     Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third,
     73             takeAMask_cb _hidl_cb) override;
     74     Return<sp<ISimple>> haveAInterface(const sp<ISimple> &in);
     75 
     76 private:
     77     sp<IFoo> mFoo;
     78 };
     79 
     80 extern "C" IBar* HIDL_FETCH_IBar(const char* name);
     81 
     82 }  // namespace implementation
     83 }  // namespace V1_0
     84 }  // namespace bar
     85 }  // namespace tests
     86 }  // namespace hardware
     87 }  // namespace android
     88 
     89 #endif  // ANDROID_HARDWARE_TESTS_BAR_V1_0_BAR_H
     90