Loading tests/bar/1.0/IBar.hal +2 −0 Original line number Diff line number Diff line Loading @@ -31,4 +31,6 @@ interface IBar extends android.hardware.tests.foo@1.0::IFoo { thisIsNew(); expectNullHandle(handle h, Abc xyz) generates (bool hIsNull, bool xyzHasNull); takeAMask(BitField bf, bitfield<BitField> first, MyMask second, Mask third) generates (BitField bf, uint8_t first, uint8_t second, uint8_t third); }; tests/bar/1.0/default/Bar.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,12 @@ Return<void> Bar::expectNullHandle(const hidl_handle& h, const Abc& xyz, expectN return Void(); } Return<void> 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(); } IBar* HIDL_FETCH_IBar(const char* /* name */) { return new Bar(); } Loading tests/bar/1.0/default/Bar.h +6 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ using ::android::hardware::hidl_vec; using ::android::hardware::hidl_string; using ::android::sp; using BitField = ::android::hardware::tests::foo::V1_0::IFoo::BitField; using MyMask = ::android::hardware::tests::foo::V1_0::IFoo::MyMask; struct Bar : public IBar { Bar(); Loading Loading @@ -66,6 +69,9 @@ struct Bar : public IBar { Return<void> thisIsNew() override; Return<void> expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb) override; Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) override; private: sp<IFoo> mFoo; }; Loading tests/baz/1.0/IBase.hal +16 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,19 @@ interface IBase { vec<MacAddress> addresses; }; enum BitField : uint8_t { V0 = 1 << 0, V1 = 1 << 1, V2 = 1 << 2, V3 = 1 << 3, }; struct MyMask { bitfield<BitField> value; }; typedef bitfield<BitField> Mask; someBaseMethod(); someBoolMethod(bool x) generates (bool y); Loading @@ -81,4 +94,7 @@ interface IBase { transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out); transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out); takeAMask(BitField bf, bitfield<BitField> first, MyMask second, Mask third) generates (BitField out, uint8_t f, uint8_t s, uint8_t t); }; tests/foo/1.0/IFoo.hal +13 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,13 @@ interface IFoo { blah = goober }; enum BitField : uint8_t { V0 = 1 << 0, V1 = 1 << 1, V2 = 1 << 2, V3 = 1 << 3, }; struct Fumble { Outer.Inner data; }; Loading Loading @@ -85,6 +92,12 @@ interface IFoo { int32_t guard; }; struct MyMask { bitfield<BitField> value; }; typedef bitfield<BitField> Mask; doThis(float param); doThatAndReturnSomething(int64_t param) generates (int32_t result); doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something); Loading Loading
tests/bar/1.0/IBar.hal +2 −0 Original line number Diff line number Diff line Loading @@ -31,4 +31,6 @@ interface IBar extends android.hardware.tests.foo@1.0::IFoo { thisIsNew(); expectNullHandle(handle h, Abc xyz) generates (bool hIsNull, bool xyzHasNull); takeAMask(BitField bf, bitfield<BitField> first, MyMask second, Mask third) generates (BitField bf, uint8_t first, uint8_t second, uint8_t third); };
tests/bar/1.0/default/Bar.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,12 @@ Return<void> Bar::expectNullHandle(const hidl_handle& h, const Abc& xyz, expectN return Void(); } Return<void> 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(); } IBar* HIDL_FETCH_IBar(const char* /* name */) { return new Bar(); } Loading
tests/bar/1.0/default/Bar.h +6 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ using ::android::hardware::hidl_vec; using ::android::hardware::hidl_string; using ::android::sp; using BitField = ::android::hardware::tests::foo::V1_0::IFoo::BitField; using MyMask = ::android::hardware::tests::foo::V1_0::IFoo::MyMask; struct Bar : public IBar { Bar(); Loading Loading @@ -66,6 +69,9 @@ struct Bar : public IBar { Return<void> thisIsNew() override; Return<void> expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb) override; Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) override; private: sp<IFoo> mFoo; }; Loading
tests/baz/1.0/IBase.hal +16 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,19 @@ interface IBase { vec<MacAddress> addresses; }; enum BitField : uint8_t { V0 = 1 << 0, V1 = 1 << 1, V2 = 1 << 2, V3 = 1 << 3, }; struct MyMask { bitfield<BitField> value; }; typedef bitfield<BitField> Mask; someBaseMethod(); someBoolMethod(bool x) generates (bool y); Loading @@ -81,4 +94,7 @@ interface IBase { transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out); transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out); takeAMask(BitField bf, bitfield<BitField> first, MyMask second, Mask third) generates (BitField out, uint8_t f, uint8_t s, uint8_t t); };
tests/foo/1.0/IFoo.hal +13 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,13 @@ interface IFoo { blah = goober }; enum BitField : uint8_t { V0 = 1 << 0, V1 = 1 << 1, V2 = 1 << 2, V3 = 1 << 3, }; struct Fumble { Outer.Inner data; }; Loading Loading @@ -85,6 +92,12 @@ interface IFoo { int32_t guard; }; struct MyMask { bitfield<BitField> value; }; typedef bitfield<BitField> Mask; doThis(float param); doThatAndReturnSomething(int64_t param) generates (int32_t result); doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something); Loading