blob: 60953051107d8efb4fbf5ba2f7409356d57b9ac1 [file] [log] [blame]
Martijn Coenen1b7297c2016-05-19 09:23:46 +02001// AUTO_GENERATED FILE - DO NOT EDIT
2// see system/tools/hidl/templates/ITemplate.h
Chris Phoenixe2b7eb22016-06-16 11:24:43 -07003#ifndef HIDL_GENERATED_android_hardware_tests_I_TestService_H_
4#define HIDL_GENERATED_android_hardware_tests_I_TestService_H_
Chris Phoenixdbd90442016-04-28 16:03:53 -07005
6#include <hwbinder/IBinder.h>
7#include <hwbinder/IInterface.h>
8#include <hwbinder/Status.h>
9#include <cstdint>
10#include <utils/StrongPointer.h>
11
12namespace android {
Chris Phoenixdbd90442016-04-28 16:03:53 -070013namespace hardware {
Chris Phoenixdbd90442016-04-28 16:03:53 -070014namespace tests {
15
Chris Phoenixa430bcd2016-06-06 15:59:17 -070016
17template<typename T>
18using hidl_ref = int;
19
Chris Phoenixf9eb9ca2016-06-16 15:29:59 -070020class ITestService : public ::android::hidl::IInterface {
21public:
Chris Phoenixb332f302016-06-14 15:04:35 -070022template<typename T>
Chris Phoenixf9eb9ca2016-06-16 15:29:59 -070023struct hidl_vec {
Chris Phoenixb332f302016-06-14 15:04:35 -070024 T *buffer;
25 size_t count;
26};
Chris Phoenix58419f12016-06-20 23:57:15 -070027struct hidl_string {
28 char *buffer;
29 ptrdiff_t length;
30};
Chris Phoenixb332f302016-06-14 15:04:35 -070031
Chris Phoenixa430bcd2016-06-06 15:59:17 -070032DECLARE_META_INTERFACE(TestService);
Chris Phoenix7b4419e2016-06-06 13:25:33 -070033typedef struct {
Chris Phoenixa430bcd2016-06-06 15:59:17 -070034uint32_t int1;
35uint32_t int2;
36
Chris Phoenix7b4419e2016-06-06 13:25:33 -070037} simple_t;
38
Chris Phoenixa430bcd2016-06-06 15:59:17 -070039typedef struct {
40uint8_t buffer[4096] ;
41
42} lots_of_data;
43
44
Chris Phoenixa430bcd2016-06-06 15:59:17 -070045 using echoInteger_cb = std::function<void(int32_t ret)>;
46 using shareBufferWithRef_cb = std::function<void(int32_t ret)>;
47
48
Chris Phoenixb332f302016-06-14 15:04:35 -070049 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 Phoenixa430bcd2016-06-06 15:59:17 -070051
Chris Phoenixdbd90442016-04-28 16:03:53 -070052enum Call {
Chris Phoenix7b4419e2016-06-06 13:25:33 -070053 ECHOINTEGER = ::android::hidl::IBinder::FIRST_CALL_TRANSACTION + 0,
Chris Phoenixa430bcd2016-06-06 15:59:17 -070054
55 SHAREBUFFERWITHREF,
Chris Phoenixdbd90442016-04-28 16:03:53 -070056};
57}; // class ITestService
58
59} // namespace tests
Chris Phoenixdbd90442016-04-28 16:03:53 -070060} // namespace hardware
Chris Phoenixdbd90442016-04-28 16:03:53 -070061} // namespace android
62
Martijn Coenen1b7297c2016-05-19 09:23:46 +020063
Chris Phoenixe2b7eb22016-06-16 11:24:43 -070064#endif // HIDL_GENERATED_android_hardware_tests_I_TestService_H_