Home | History | Annotate | Download | only in default
      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 
     26 struct Foo : public IFoo {
     27     // Methods from ::android::hardware::tests::foo::V1_0::IFoo follow.
     28     virtual Return<void> doThis(float param)  override;
     29     virtual Return<int32_t> doThatAndReturnSomething(int64_t param)  override;
     30     virtual Return<double> doQuiteABit(int32_t a, int64_t b, float c, double d)  override;
     31     virtual Return<void> doSomethingElse(const hidl_array<int32_t, 15 /* 15 */>& param, doSomethingElse_cb _hidl_cb)  override;
     32     virtual Return<void> doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb)  override;
     33     virtual Return<void> mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb)  override;
     34     virtual Return<void> callMe(const sp<IFooCallback>& cb)  override;
     35     virtual Return<IFoo::SomeEnum> useAnEnum(IFoo::SomeEnum zzz)  override;
     36     virtual Return<void> haveAGooberVec(const hidl_vec<IFoo::Goober>& param)  override;
     37     virtual Return<void> haveAGoober(const IFoo::Goober& g)  override;
     38     virtual Return<void> haveAGooberArray(const hidl_array<IFoo::Goober, 20 /* 20 */>& lots)  override;
     39     virtual Return<void> haveATypeFromAnotherFile(const Abc& def)  override;
     40     virtual Return<void> haveSomeStrings(const hidl_array<hidl_string, 3 /* 3 */>& array, haveSomeStrings_cb _hidl_cb)  override;
     41     virtual Return<void> haveAStringVec(const hidl_vec<hidl_string>& vector, haveAStringVec_cb _hidl_cb)  override;
     42     virtual Return<void> transposeMe(const hidl_array<float, 3 /* 3 */, 5 /* 5 */>& in, transposeMe_cb _hidl_cb)  override;
     43     virtual Return<void> callingDrWho(const IFoo::MultiDimensional& in, callingDrWho_cb _hidl_cb)  override;
     44     virtual Return<void> transpose(const IFoo::StringMatrix5x3& in, transpose_cb _hidl_cb)  override;
     45     virtual Return<void> transpose2(const hidl_array<hidl_string, 5 /* 5 */, 3 /* 3 */>& in, transpose2_cb _hidl_cb)  override;
     46     virtual Return<void> sendVec(const hidl_vec<uint8_t>& data, sendVec_cb _hidl_cb)  override;
     47     virtual Return<void> sendVecVec(sendVecVec_cb _hidl_cb)  override;
     48     virtual Return<void> createMyHandle(createMyHandle_cb _hidl_cb)  override;
     49     virtual Return<void> createHandles(uint32_t size, createHandles_cb _hidl_cb)  override;
     50     virtual Return<void> closeHandles()  override;
     51 
     52     Return<void> haveAVectorOfInterfaces(
     53             const hidl_vec<sp<ISimple> > &in,
     54             haveAVectorOfInterfaces_cb _hidl_cb) override;
     55 
     56     Return<void> haveAVectorOfGenericInterfaces(
     57             const hidl_vec<sp<android::hidl::base::V1_0::IBase> > &in,
     58             haveAVectorOfGenericInterfaces_cb _hidl_cb) override;
     59 
     60     Return<void> echoNullInterface(const sp<IFooCallback> &cb, echoNullInterface_cb _hidl_cb) override;
     61 private:
     62     std::vector<::native_handle_t *> mHandles;
     63 };
     64 
     65 extern "C" IFoo* HIDL_FETCH_IFoo(const char* name);
     66 
     67 }  // namespace implementation
     68 }  // namespace V1_0
     69 }  // namespace foo
     70 }  // namespace tests
     71 }  // namespace hardware
     72 }  // namespace android
     73 
     74 #endif  // ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
     75