Loading tests/bar/1.0/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -6,10 +6,12 @@ genrule { cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0", srcs: [ "IBar.hal", "IComplicated.hal", "IImportTypes.hal", ], out: [ "android/hardware/tests/bar/1.0/BarAll.cpp", "android/hardware/tests/bar/1.0/ComplicatedAll.cpp", "android/hardware/tests/bar/1.0/ImportTypesAll.cpp", ], } Loading @@ -20,6 +22,7 @@ genrule { cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0", srcs: [ "IBar.hal", "IComplicated.hal", "IImportTypes.hal", ], out: [ Loading @@ -28,6 +31,11 @@ genrule { "android/hardware/tests/bar/1.0/BnBar.h", "android/hardware/tests/bar/1.0/BpBar.h", "android/hardware/tests/bar/1.0/BsBar.h", "android/hardware/tests/bar/1.0/IComplicated.h", "android/hardware/tests/bar/1.0/IHwComplicated.h", "android/hardware/tests/bar/1.0/BnComplicated.h", "android/hardware/tests/bar/1.0/BpComplicated.h", "android/hardware/tests/bar/1.0/BsComplicated.h", "android/hardware/tests/bar/1.0/IImportTypes.h", "android/hardware/tests/bar/1.0/IHwImportTypes.h", "android/hardware/tests/bar/1.0/BnImportTypes.h", Loading tests/bar/1.0/IBar.hal +5 −0 Original line number Diff line number Diff line Loading @@ -17,9 +17,12 @@ package android.hardware.tests.bar@1.0; import android.hardware.tests.foo@1.0::IFoo; import android.hardware.tests.foo@1.0::ISimple; import android.hardware.tests.foo@1.0::Abc; import android.hardware.tests.foo@1.0::Unrelated; import IComplicated; interface IBar extends android.hardware.tests.foo@1.0::IFoo { typedef android.hardware.tests.foo@1.0::IFoo FunkyAlias; Loading @@ -33,4 +36,6 @@ interface IBar extends android.hardware.tests.foo@1.0::IFoo { 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); haveAInterface(ISimple i) generates (ISimple i); }; tests/bar/1.0/IComplicated.hal 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.tests.bar@1.0; import android.hardware.tests.foo@1.0::ISimple; interface IComplicated extends ISimple { }; tests/bar/1.0/default/Bar.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,13 @@ Return<void> Bar::takeAMask(BitField bf, uint8_t first, const MyMask& second, ui return Void(); } Return<void> Bar::haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) { _hidl_cb(in); return Void(); } IBar* HIDL_FETCH_IBar(const char* /* name */) { return new Bar(); } Loading tests/bar/1.0/default/Bar.h +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ struct Bar : public IBar { Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) override; Return<void> haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) override; private: sp<IFoo> mFoo; Loading Loading
tests/bar/1.0/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -6,10 +6,12 @@ genrule { cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0", srcs: [ "IBar.hal", "IComplicated.hal", "IImportTypes.hal", ], out: [ "android/hardware/tests/bar/1.0/BarAll.cpp", "android/hardware/tests/bar/1.0/ComplicatedAll.cpp", "android/hardware/tests/bar/1.0/ImportTypesAll.cpp", ], } Loading @@ -20,6 +22,7 @@ genrule { cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0", srcs: [ "IBar.hal", "IComplicated.hal", "IImportTypes.hal", ], out: [ Loading @@ -28,6 +31,11 @@ genrule { "android/hardware/tests/bar/1.0/BnBar.h", "android/hardware/tests/bar/1.0/BpBar.h", "android/hardware/tests/bar/1.0/BsBar.h", "android/hardware/tests/bar/1.0/IComplicated.h", "android/hardware/tests/bar/1.0/IHwComplicated.h", "android/hardware/tests/bar/1.0/BnComplicated.h", "android/hardware/tests/bar/1.0/BpComplicated.h", "android/hardware/tests/bar/1.0/BsComplicated.h", "android/hardware/tests/bar/1.0/IImportTypes.h", "android/hardware/tests/bar/1.0/IHwImportTypes.h", "android/hardware/tests/bar/1.0/BnImportTypes.h", Loading
tests/bar/1.0/IBar.hal +5 −0 Original line number Diff line number Diff line Loading @@ -17,9 +17,12 @@ package android.hardware.tests.bar@1.0; import android.hardware.tests.foo@1.0::IFoo; import android.hardware.tests.foo@1.0::ISimple; import android.hardware.tests.foo@1.0::Abc; import android.hardware.tests.foo@1.0::Unrelated; import IComplicated; interface IBar extends android.hardware.tests.foo@1.0::IFoo { typedef android.hardware.tests.foo@1.0::IFoo FunkyAlias; Loading @@ -33,4 +36,6 @@ interface IBar extends android.hardware.tests.foo@1.0::IFoo { 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); haveAInterface(ISimple i) generates (ISimple i); };
tests/bar/1.0/IComplicated.hal 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.tests.bar@1.0; import android.hardware.tests.foo@1.0::ISimple; interface IComplicated extends ISimple { };
tests/bar/1.0/default/Bar.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,13 @@ Return<void> Bar::takeAMask(BitField bf, uint8_t first, const MyMask& second, ui return Void(); } Return<void> Bar::haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) { _hidl_cb(in); return Void(); } IBar* HIDL_FETCH_IBar(const char* /* name */) { return new Bar(); } Loading
tests/bar/1.0/default/Bar.h +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ struct Bar : public IBar { Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) override; Return<void> haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) override; private: sp<IFoo> mFoo; Loading