#define LOG_TAG "hidl_test" #include "Bar.h" #include #include namespace android { namespace hardware { namespace tests { namespace bar { namespace V1_0 { namespace implementation { Bar::Bar() { mFoo = IFoo::getService("", true); } // Methods from ::android::hardware::tests::foo::V1_0::IFoo follow. Return Bar::doThis(float param) { return mFoo->doThis(param); } Return Bar::doThatAndReturnSomething( int64_t param) { return mFoo->doThatAndReturnSomething(param); } Return Bar::doQuiteABit( int32_t a, int64_t b, float c, double d) { return mFoo->doQuiteABit(a, b, c, d); } Return Bar::doSomethingElse( const hidl_array ¶m, doSomethingElse_cb _cb) { return mFoo->doSomethingElse(param, _cb); } Return Bar::doStuffAndReturnAString( doStuffAndReturnAString_cb _cb) { return mFoo->doStuffAndReturnAString(_cb); } Return Bar::mapThisVector( const hidl_vec ¶m, mapThisVector_cb _cb) { return mFoo->mapThisVector(param, _cb); } Return Bar::callMe( const sp &cb) { return mFoo->callMe(cb); } Return Bar::useAnEnum(SomeEnum param) { return mFoo->useAnEnum(param); } Return Bar::haveAGooberVec(const hidl_vec& param) { return mFoo->haveAGooberVec(param); } Return Bar::haveAGoober(const Goober &g) { return mFoo->haveAGoober(g); } Return Bar::haveAGooberArray(const hidl_array &lots) { return mFoo->haveAGooberArray(lots); } Return Bar::haveATypeFromAnotherFile(const Abc &def) { return mFoo->haveATypeFromAnotherFile(def); } Return Bar::haveSomeStrings( const hidl_array &array, haveSomeStrings_cb _cb) { return mFoo->haveSomeStrings(array, _cb); } Return Bar::haveAStringVec( const hidl_vec &vector, haveAStringVec_cb _cb) { return mFoo->haveAStringVec(vector, _cb); } Return Bar::transposeMe( const hidl_array &in, transposeMe_cb _cb) { return mFoo->transposeMe(in, _cb); } Return Bar::callingDrWho( const MultiDimensional &in, callingDrWho_cb _hidl_cb) { return mFoo->callingDrWho(in, _hidl_cb); } Return Bar::transpose(const StringMatrix5x3 &in, transpose_cb _hidl_cb) { return mFoo->transpose(in, _hidl_cb); } Return Bar::transpose2( const hidl_array &in, transpose2_cb _hidl_cb) { return mFoo->transpose2(in, _hidl_cb); } Return Bar::sendVec( const hidl_vec &data, sendVec_cb _hidl_cb) { return mFoo->sendVec(data, _hidl_cb); } Return Bar::sendVecVec(sendVecVec_cb _hidl_cb) { return mFoo->sendVecVec(_hidl_cb); } Return Bar::haveAVectorOfInterfaces( const hidl_vec > &in, haveAVectorOfInterfaces_cb _hidl_cb) { _hidl_cb(in); return Void(); } Return Bar::haveAVectorOfGenericInterfaces( const hidl_vec > &in, haveAVectorOfGenericInterfaces_cb _hidl_cb) { _hidl_cb(in); return Void(); } Return Bar::createMyHandle(createMyHandle_cb _hidl_cb) { return mFoo->createMyHandle(_hidl_cb); } Return Bar::createHandles(uint32_t size, createHandles_cb _hidl_cb) { return mFoo->createHandles(size, _hidl_cb); } Return Bar::closeHandles() { return mFoo->closeHandles(); } Return Bar::echoNullInterface(const sp &cb, echoNullInterface_cb _hidl_cb) { return mFoo->echoNullInterface(cb, _hidl_cb); } // Methods from ::android::hardware::tests::bar::V1_0::IBar follow. Return Bar::thisIsNew() { ALOGI("SERVER(Bar) thisIsNew"); return Void(); } Return Bar::expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb) { ALOGI("SERVER(Bar) h = %p, xyz.z = %p", h.getNativeHandle(), xyz.z.getNativeHandle()); _hidl_cb(h == nullptr, xyz.z == nullptr); return Void(); } Return Bar::takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) { _hidl_cb(bf, bf | first, second.value & bf, (bf | bf) & third); return Void(); } Return> Bar::haveAInterface(const sp &in) { return in; } IBar* HIDL_FETCH_IBar(const char* /* name */) { return new Bar(); } } // namespace implementation } // namespace V1_0 } // namespace bar } // namespace tests } // namespace hardware } // namespace android