Yifan Hong | d5b5b2e | 2016-10-06 13:50:49 -0700 | [diff] [blame] | 1 | |
| 2 | #define LOG_TAG "hidl_test" |
| 3 | |
| 4 | #include "Bar.h" |
| 5 | #include <android-base/logging.h> |
| 6 | #include <inttypes.h> |
| 7 | |
| 8 | namespace android { |
| 9 | namespace hardware { |
| 10 | namespace tests { |
| 11 | namespace bar { |
| 12 | namespace V1_0 { |
| 13 | namespace implementation { |
| 14 | |
| 15 | Bar::Bar() { |
| 16 | mFoo = IFoo::getService("", true); |
| 17 | } |
| 18 | |
| 19 | // Methods from ::android::hardware::tests::foo::V1_0::IFoo follow. |
| 20 | Return<void> Bar::doThis(float param) { |
| 21 | return mFoo->doThis(param); |
| 22 | } |
| 23 | |
| 24 | Return<void> Bar::doThis(uint32_t param) { |
| 25 | return mFoo->doThis(param); |
| 26 | } |
| 27 | |
| 28 | Return<int32_t> Bar::doThatAndReturnSomething( |
| 29 | int64_t param) { |
| 30 | return mFoo->doThatAndReturnSomething(param); |
| 31 | } |
| 32 | |
| 33 | Return<double> Bar::doQuiteABit( |
| 34 | int32_t a, |
| 35 | int64_t b, |
| 36 | float c, |
| 37 | double d) { |
| 38 | return mFoo->doQuiteABit(a, b, c, d); |
| 39 | } |
| 40 | |
| 41 | Return<void> Bar::doSomethingElse( |
| 42 | const hidl_array<int32_t, 15> ¶m, doSomethingElse_cb _cb) { |
| 43 | return mFoo->doSomethingElse(param, _cb); |
| 44 | } |
| 45 | |
| 46 | Return<void> Bar::doStuffAndReturnAString( |
| 47 | doStuffAndReturnAString_cb _cb) { |
| 48 | return mFoo->doStuffAndReturnAString(_cb); |
| 49 | } |
| 50 | |
| 51 | Return<void> Bar::mapThisVector( |
| 52 | const hidl_vec<int32_t> ¶m, mapThisVector_cb _cb) { |
| 53 | return mFoo->mapThisVector(param, _cb); |
| 54 | } |
| 55 | |
| 56 | Return<void> Bar::callMe( |
| 57 | const sp<IFooCallback> &cb) { |
| 58 | return mFoo->callMe(cb); |
| 59 | } |
| 60 | |
| 61 | Return<Bar::SomeEnum> Bar::useAnEnum(SomeEnum param) { |
| 62 | return mFoo->useAnEnum(param); |
| 63 | } |
| 64 | |
| 65 | Return<void> Bar::haveAGooberVec(const hidl_vec<Goober>& param) { |
| 66 | return mFoo->haveAGooberVec(param); |
| 67 | } |
| 68 | |
| 69 | Return<void> Bar::haveAGoober(const Goober &g) { |
| 70 | return mFoo->haveAGoober(g); |
| 71 | } |
| 72 | |
| 73 | Return<void> Bar::haveAGooberArray(const hidl_array<Goober, 20> &lots) { |
| 74 | return mFoo->haveAGooberArray(lots); |
| 75 | } |
| 76 | |
| 77 | Return<void> Bar::haveATypeFromAnotherFile(const Abc &def) { |
| 78 | return mFoo->haveATypeFromAnotherFile(def); |
| 79 | } |
| 80 | |
| 81 | Return<void> Bar::haveSomeStrings( |
| 82 | const hidl_array<hidl_string, 3> &array, |
| 83 | haveSomeStrings_cb _cb) { |
| 84 | return mFoo->haveSomeStrings(array, _cb); |
| 85 | } |
| 86 | |
| 87 | Return<void> Bar::haveAStringVec( |
| 88 | const hidl_vec<hidl_string> &vector, |
| 89 | haveAStringVec_cb _cb) { |
| 90 | return mFoo->haveAStringVec(vector, _cb); |
| 91 | } |
| 92 | |
| 93 | Return<void> Bar::transposeMe( |
| 94 | const hidl_array<float, 3, 5> &in, transposeMe_cb _cb) { |
| 95 | return mFoo->transposeMe(in, _cb); |
| 96 | } |
| 97 | |
| 98 | Return<void> Bar::callingDrWho( |
| 99 | const MultiDimensional &in, callingDrWho_cb _hidl_cb) { |
| 100 | return mFoo->callingDrWho(in, _hidl_cb); |
| 101 | } |
| 102 | |
| 103 | Return<void> Bar::transpose(const StringMatrix5x3 &in, transpose_cb _hidl_cb) { |
| 104 | return mFoo->transpose(in, _hidl_cb); |
| 105 | } |
| 106 | |
| 107 | Return<void> Bar::transpose2( |
| 108 | const hidl_array<hidl_string, 5, 3> &in, transpose2_cb _hidl_cb) { |
| 109 | return mFoo->transpose2(in, _hidl_cb); |
| 110 | } |
| 111 | |
| 112 | Return<void> Bar::sendVec( |
| 113 | const hidl_vec<uint8_t> &data, sendVec_cb _hidl_cb) { |
| 114 | return mFoo->sendVec(data, _hidl_cb); |
| 115 | } |
| 116 | |
| 117 | Return<void> Bar::sendVecVec(sendVecVec_cb _hidl_cb) { |
| 118 | return mFoo->sendVecVec(_hidl_cb); |
| 119 | } |
| 120 | |
| 121 | // Methods from ::android::hardware::tests::bar::V1_0::IBar follow. |
| 122 | Return<void> Bar::thisIsNew() { |
| 123 | ALOGI("SERVER(Bar) thisIsNew"); |
| 124 | |
| 125 | return Void(); |
| 126 | } |
| 127 | |
| 128 | IBar* HIDL_FETCH_IBar(const char* /* name */) { |
| 129 | return new Bar(); |
| 130 | } |
| 131 | |
| 132 | } // namespace implementation |
| 133 | } // namespace V1_0 |
| 134 | } // namespace bar |
| 135 | } // namespace tests |
| 136 | } // namespace hardware |
| 137 | } // namespace android |