blob: 44338028d0f312a5578b8b7dd193e2227a00e7c4 [file] [log] [blame]
Yifan Hongd5b5b2e2016-10-06 13:50:49 -07001
2#define LOG_TAG "hidl_test"
3
4#include "Bar.h"
5#include <android-base/logging.h>
6#include <inttypes.h>
7
8namespace android {
9namespace hardware {
10namespace tests {
11namespace bar {
12namespace V1_0 {
13namespace implementation {
14
15Bar::Bar() {
16 mFoo = IFoo::getService("", true);
17}
18
19// Methods from ::android::hardware::tests::foo::V1_0::IFoo follow.
20Return<void> Bar::doThis(float param) {
21 return mFoo->doThis(param);
22}
23
24Return<void> Bar::doThis(uint32_t param) {
25 return mFoo->doThis(param);
26}
27
28Return<int32_t> Bar::doThatAndReturnSomething(
29 int64_t param) {
30 return mFoo->doThatAndReturnSomething(param);
31}
32
33Return<double> Bar::doQuiteABit(
34 int32_t a,
35 int64_t b,
36 float c,
37 double d) {
38 return mFoo->doQuiteABit(a, b, c, d);
39}
40
41Return<void> Bar::doSomethingElse(
42 const hidl_array<int32_t, 15> &param, doSomethingElse_cb _cb) {
43 return mFoo->doSomethingElse(param, _cb);
44}
45
46Return<void> Bar::doStuffAndReturnAString(
47 doStuffAndReturnAString_cb _cb) {
48 return mFoo->doStuffAndReturnAString(_cb);
49}
50
51Return<void> Bar::mapThisVector(
52 const hidl_vec<int32_t> &param, mapThisVector_cb _cb) {
53 return mFoo->mapThisVector(param, _cb);
54}
55
56Return<void> Bar::callMe(
57 const sp<IFooCallback> &cb) {
58 return mFoo->callMe(cb);
59}
60
61Return<Bar::SomeEnum> Bar::useAnEnum(SomeEnum param) {
62 return mFoo->useAnEnum(param);
63}
64
65Return<void> Bar::haveAGooberVec(const hidl_vec<Goober>& param) {
66 return mFoo->haveAGooberVec(param);
67}
68
69Return<void> Bar::haveAGoober(const Goober &g) {
70 return mFoo->haveAGoober(g);
71}
72
73Return<void> Bar::haveAGooberArray(const hidl_array<Goober, 20> &lots) {
74 return mFoo->haveAGooberArray(lots);
75}
76
77Return<void> Bar::haveATypeFromAnotherFile(const Abc &def) {
78 return mFoo->haveATypeFromAnotherFile(def);
79}
80
81Return<void> Bar::haveSomeStrings(
82 const hidl_array<hidl_string, 3> &array,
83 haveSomeStrings_cb _cb) {
84 return mFoo->haveSomeStrings(array, _cb);
85}
86
87Return<void> Bar::haveAStringVec(
88 const hidl_vec<hidl_string> &vector,
89 haveAStringVec_cb _cb) {
90 return mFoo->haveAStringVec(vector, _cb);
91}
92
93Return<void> Bar::transposeMe(
94 const hidl_array<float, 3, 5> &in, transposeMe_cb _cb) {
95 return mFoo->transposeMe(in, _cb);
96}
97
98Return<void> Bar::callingDrWho(
99 const MultiDimensional &in, callingDrWho_cb _hidl_cb) {
100 return mFoo->callingDrWho(in, _hidl_cb);
101}
102
103Return<void> Bar::transpose(const StringMatrix5x3 &in, transpose_cb _hidl_cb) {
104 return mFoo->transpose(in, _hidl_cb);
105}
106
107Return<void> Bar::transpose2(
108 const hidl_array<hidl_string, 5, 3> &in, transpose2_cb _hidl_cb) {
109 return mFoo->transpose2(in, _hidl_cb);
110}
111
112Return<void> Bar::sendVec(
113 const hidl_vec<uint8_t> &data, sendVec_cb _hidl_cb) {
114 return mFoo->sendVec(data, _hidl_cb);
115}
116
117Return<void> Bar::sendVecVec(sendVecVec_cb _hidl_cb) {
118 return mFoo->sendVecVec(_hidl_cb);
119}
120
121// Methods from ::android::hardware::tests::bar::V1_0::IBar follow.
122Return<void> Bar::thisIsNew() {
123 ALOGI("SERVER(Bar) thisIsNew");
124
125 return Void();
126}
127
128IBar* HIDL_FETCH_IBar(const char* /* name */) {
129 return new Bar();
130}
131
132} // namespace implementation
133} // namespace V1_0
134} // namespace bar
135} // namespace tests
136} // namespace hardware
137} // namespace android