Merge "Add a test method to test interface in struct"
This commit is contained in:
commit
c0204ee13d
3 changed files with 14 additions and 0 deletions
|
@ -68,6 +68,10 @@ interface IBaz extends IBase {
|
|||
bitfield<BitField> bf;
|
||||
};
|
||||
|
||||
struct StructWithInterface {
|
||||
int32_t number;
|
||||
IBase dummy;
|
||||
};
|
||||
oneway doThis(float param);
|
||||
|
||||
doThatAndReturnSomething(int64_t param) generates (int32_t result);
|
||||
|
@ -93,4 +97,6 @@ interface IBaz extends IBase {
|
|||
size(uint32_t size) generates (uint32_t size);
|
||||
|
||||
getNestedStructs() generates(vec<NestedStruct> data);
|
||||
|
||||
haveSomeStructWithInterface(StructWithInterface swi) generates(StructWithInterface swi);
|
||||
};
|
||||
|
|
|
@ -394,6 +394,12 @@ Return<void> Baz::getNestedStructs(getNestedStructs_cb _hidl_cb) {
|
|||
_hidl_cb(result);
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> Baz::haveSomeStructWithInterface(const StructWithInterface& swi,
|
||||
haveSomeStructWithInterface_cb _hidl_cb) {
|
||||
_hidl_cb(swi);
|
||||
return Void();
|
||||
}
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
|
||||
IBaz* HIDL_FETCH_IBaz(const char* /* name */) {
|
||||
|
|
|
@ -91,6 +91,8 @@ struct Baz : public IBaz {
|
|||
Return<uint32_t> size(uint32_t size) override;
|
||||
Return<void> getNestedStructs(getNestedStructs_cb _hidl_cb) override;
|
||||
|
||||
Return<void> haveSomeStructWithInterface(const StructWithInterface& swi,
|
||||
haveSomeStructWithInterface_cb _hidl_cb) override;
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
private:
|
||||
sp<IBazCallback> mStoredCallback;
|
||||
|
|
Loading…
Reference in a new issue