Martijn Coenen | 1b7297c | 2016-05-19 09:23:46 +0200 | [diff] [blame] | 1 | // AUTO_GENERATED FILE - DO NOT EDIT |
| 2 | // see system/tools/hidl/templates/ITemplate.h |
Chris Phoenix | e2b7eb2 | 2016-06-16 11:24:43 -0700 | [diff] [blame] | 3 | #ifndef HIDL_GENERATED_android_hardware_tests_I_TestService_H_ |
| 4 | #define HIDL_GENERATED_android_hardware_tests_I_TestService_H_ |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 5 | |
| 6 | #include <hwbinder/IBinder.h> |
| 7 | #include <hwbinder/IInterface.h> |
| 8 | #include <hwbinder/Status.h> |
| 9 | #include <cstdint> |
| 10 | #include <utils/StrongPointer.h> |
| 11 | |
| 12 | namespace android { |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 13 | namespace hardware { |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 14 | namespace tests { |
| 15 | |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 16 | |
| 17 | template<typename T> |
| 18 | using hidl_ref = int; |
| 19 | |
Chris Phoenix | f9eb9ca | 2016-06-16 15:29:59 -0700 | [diff] [blame] | 20 | class ITestService : public ::android::hidl::IInterface { |
| 21 | public: |
Chris Phoenix | b332f30 | 2016-06-14 15:04:35 -0700 | [diff] [blame] | 22 | template<typename T> |
Chris Phoenix | f9eb9ca | 2016-06-16 15:29:59 -0700 | [diff] [blame] | 23 | struct hidl_vec { |
Chris Phoenix | b332f30 | 2016-06-14 15:04:35 -0700 | [diff] [blame] | 24 | T *buffer; |
| 25 | size_t count; |
| 26 | }; |
Chris Phoenix | 58419f1 | 2016-06-20 23:57:15 -0700 | [diff] [blame^] | 27 | struct hidl_string { |
| 28 | char *buffer; |
| 29 | ptrdiff_t length; |
| 30 | }; |
Chris Phoenix | b332f30 | 2016-06-14 15:04:35 -0700 | [diff] [blame] | 31 | |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 32 | DECLARE_META_INTERFACE(TestService); |
Chris Phoenix | 7b4419e | 2016-06-06 13:25:33 -0700 | [diff] [blame] | 33 | typedef struct { |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 34 | uint32_t int1; |
| 35 | uint32_t int2; |
| 36 | |
Chris Phoenix | 7b4419e | 2016-06-06 13:25:33 -0700 | [diff] [blame] | 37 | } simple_t; |
| 38 | |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 39 | typedef struct { |
| 40 | uint8_t buffer[4096] ; |
| 41 | |
| 42 | } lots_of_data; |
| 43 | |
| 44 | |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 45 | using echoInteger_cb = std::function<void(int32_t ret)>; |
| 46 | using shareBufferWithRef_cb = std::function<void(int32_t ret)>; |
| 47 | |
| 48 | |
Chris Phoenix | b332f30 | 2016-06-14 15:04:35 -0700 | [diff] [blame] | 49 | virtual ::android::hidl::binder::Status echoInteger(int32_t echo_me, const ITestService::simple_t *my_struct , echoInteger_cb _cb = nullptr ) = 0; |
| 50 | virtual ::android::hidl::binder::Status shareBufferWithRef(hidl_ref<lots_of_data> buffer, shareBufferWithRef_cb _cb = nullptr ) = 0; |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 51 | |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 52 | enum Call { |
Chris Phoenix | 7b4419e | 2016-06-06 13:25:33 -0700 | [diff] [blame] | 53 | ECHOINTEGER = ::android::hidl::IBinder::FIRST_CALL_TRANSACTION + 0, |
Chris Phoenix | a430bcd | 2016-06-06 15:59:17 -0700 | [diff] [blame] | 54 | |
| 55 | SHAREBUFFERWITHREF, |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 56 | }; |
| 57 | }; // class ITestService |
| 58 | |
| 59 | } // namespace tests |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 60 | } // namespace hardware |
Chris Phoenix | dbd9044 | 2016-04-28 16:03:53 -0700 | [diff] [blame] | 61 | } // namespace android |
| 62 | |
Martijn Coenen | 1b7297c | 2016-05-19 09:23:46 +0200 | [diff] [blame] | 63 | |
Chris Phoenix | e2b7eb2 | 2016-06-16 11:24:43 -0700 | [diff] [blame] | 64 | #endif // HIDL_GENERATED_android_hardware_tests_I_TestService_H_ |