1 #define LOG_TAG "hidl_test"
2 
3 #include "Parent.h"
4 
5 #include <log/log.h>
6 
7 #include "Child.h"
8 
9 namespace android {
10 namespace hardware {
11 namespace tests {
12 namespace inheritance {
13 namespace V1_0 {
14 namespace implementation {
15 
16 // Methods from ::android::hardware::tests::inheritance::V1_0::IGrandparent follow.
doGrandparent()17 Return<void> Parent::doGrandparent()  {
18     ALOGI("SERVER(Bar) Parent::doGrandparent");
19     return Void();
20 }
21 
22 // Methods from ::android::hardware::tests::inheritance::V1_0::IParent follow.
doParent()23 Return<void> Parent::doParent()  {
24     ALOGI("SERVER(Bar) Parent::doParent");
25     return Void();
26 }
27 
HIDL_FETCH_IParent(const char * name)28 IParent* HIDL_FETCH_IParent(const char* name) {
29     if (name == std::string("child")) {
30         return new Child();
31     }
32 
33     return new Parent();
34 }
35 
36 } // namespace implementation
37 }  // namespace V1_0
38 }  // namespace inheritance
39 }  // namespace tests
40 }  // namespace hardware
41 }  // namespace android
42