IFoo: send struct with fmq.
Bug: 117239572 Test: hidl_test Change-Id: I968916a9d62e1c8f7a237bd24e6b4267dd013366
This commit is contained in:
parent
999693e4e8
commit
2b01956dac
5 changed files with 20 additions and 0 deletions
|
@ -149,6 +149,10 @@ Return<void> Bar::closeHandles() {
|
|||
return mFoo->closeHandles();
|
||||
}
|
||||
|
||||
Return<void> Bar::repeatWithFmq(const IFoo::WithFmq& withFmq, repeatWithFmq_cb _hidl_cb) {
|
||||
return mFoo->repeatWithFmq(withFmq, _hidl_cb);
|
||||
}
|
||||
|
||||
Return<void> Bar::echoNullInterface(const sp<IFooCallback> &cb, echoNullInterface_cb _hidl_cb) {
|
||||
return mFoo->echoNullInterface(cb, _hidl_cb);
|
||||
}
|
||||
|
|
|
@ -56,6 +56,8 @@ struct Bar : public IBar {
|
|||
virtual Return<void> createMyHandle(createMyHandle_cb _hidl_cb) override;
|
||||
virtual Return<void> createHandles(uint32_t size, createHandles_cb _hidl_cb) override;
|
||||
virtual Return<void> closeHandles() override;
|
||||
virtual Return<void> repeatWithFmq(const IFoo::WithFmq& withFmq,
|
||||
repeatWithFmq_cb _hidl_cb) override;
|
||||
|
||||
Return<void> haveAVectorOfInterfaces(
|
||||
const hidl_vec<sp<ISimple> > &in,
|
||||
|
|
|
@ -121,6 +121,10 @@ interface IFoo {
|
|||
bitfield<BitField> bf;
|
||||
};
|
||||
|
||||
struct WithFmq {
|
||||
fmq_sync<uint8_t> descSync;
|
||||
};
|
||||
|
||||
enum Discriminator : uint8_t {
|
||||
BOOL,
|
||||
INT,
|
||||
|
@ -204,4 +208,6 @@ interface IFoo {
|
|||
createMyHandle() generates (MyHandle h);
|
||||
createHandles(uint32_t size) generates (vec<handle> handles);
|
||||
closeHandles();
|
||||
|
||||
repeatWithFmq(WithFmq withFmq) generates (WithFmq withFmq);
|
||||
};
|
||||
|
|
|
@ -379,6 +379,11 @@ Return<void> Foo::echoNullInterface(const sp<IFooCallback> &cb, echoNullInterfac
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> Foo::repeatWithFmq(const IFoo::WithFmq& withFmq, repeatWithFmq_cb _hidl_cb) {
|
||||
_hidl_cb(withFmq);
|
||||
return Void();
|
||||
}
|
||||
|
||||
IFoo* HIDL_FETCH_IFoo(const char* /* name */) {
|
||||
return new Foo();
|
||||
}
|
||||
|
|
|
@ -53,6 +53,8 @@ struct Foo : public IFoo {
|
|||
virtual Return<void> createMyHandle(createMyHandle_cb _hidl_cb) override;
|
||||
virtual Return<void> createHandles(uint32_t size, createHandles_cb _hidl_cb) override;
|
||||
virtual Return<void> closeHandles() override;
|
||||
virtual Return<void> repeatWithFmq(const IFoo::WithFmq& withFmq,
|
||||
repeatWithFmq_cb _hidl_cb) override;
|
||||
|
||||
Return<void> haveAVectorOfInterfaces(
|
||||
const hidl_vec<sp<ISimple> > &in,
|
||||
|
@ -63,6 +65,7 @@ struct Foo : public IFoo {
|
|||
haveAVectorOfGenericInterfaces_cb _hidl_cb) override;
|
||||
|
||||
Return<void> echoNullInterface(const sp<IFooCallback> &cb, echoNullInterface_cb _hidl_cb) override;
|
||||
|
||||
private:
|
||||
std::vector<::native_handle_t *> mHandles;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue