blob: 5921972484c2f82d4dd493abfe2c43d65007e53f [file] [log] [blame]
Yifan Hongd5b5b2e2016-10-06 13:50:49 -07001#ifndef HIDL_GENERATED_android_hardware_tests_foo_V1_0_FooCallback_H_
2#define HIDL_GENERATED_android_hardware_tests_foo_V1_0_FooCallback_H_
3
4#include <android/hardware/tests/foo/1.0/IFooCallback.h>
5#include <hidl/Status.h>
6#include <hidl/MQDescriptor.h>
7
8#include <utils/Condition.h>
9#include <utils/Timers.h>
10namespace android {
11namespace hardware {
12namespace tests {
13namespace foo {
14namespace V1_0 {
15namespace implementation {
16
17using ::android::hardware::tests::foo::V1_0::IFooCallback;
18using ::android::hardware::Return;
19using ::android::hardware::Void;
20using ::android::hardware::hidl_vec;
21using ::android::hardware::hidl_string;
22using ::android::sp;
23
24struct FooCallback : public IFooCallback {
Yifan Hong9517f9c2016-10-13 11:21:56 -070025 FooCallback();
Yifan Hongd5b5b2e2016-10-06 13:50:49 -070026 // Methods from ::android::hardware::tests::foo::V1_0::IFooCallback follow.
27 Return<void> heyItsYou(const sp<IFooCallback>& cb) override;
28 Return<bool> heyItsYouIsntIt(const sp<IFooCallback>& cb) override;
29 Return<void> heyItsTheMeaningOfLife(uint8_t tmol) override;
30 Return<void> reportResults(int64_t ns, reportResults_cb _hidl_cb) override;
31 Return<void> youBlockedMeFor(const hidl_array<int64_t, 3 /* 3 */>& callerBlockedInfo) override;
32
33 static constexpr nsecs_t DELAY_S = 1;
34 static constexpr nsecs_t DELAY_NS = seconds_to_nanoseconds(DELAY_S);
35 static constexpr nsecs_t TOLERANCE_NS = milliseconds_to_nanoseconds(10);
36 static constexpr nsecs_t ONEWAY_TOLERANCE_NS = milliseconds_to_nanoseconds(1);
37
38 hidl_array<InvokeInfo, 3> invokeInfo;
39 Mutex mLock;
40 Condition mCond;
41};
42
43extern "C" IFooCallback* HIDL_FETCH_IFooCallback(const char* name);
44
45} // namespace implementation
46} // namespace V1_0
47} // namespace foo
48} // namespace tests
49} // namespace hardware
50} // namespace android
51
52#endif // HIDL_GENERATED_android_hardware_tests_foo_V1_0_FooCallback_H_