Update for service registration notifications.

- Test to ensure that service notifications are getting called.
- Add required includes.

Bug: 30804608
Test: hidl_test

Change-Id: I3f86c39d733f92d21c07b7b1bf4045fa4adb35ac
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 36dcad8..ba1d271 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -162,11 +162,15 @@
         out << "\n";
     }
 
+    if (isInterface) {
+        out << "#include <android/hidl/manager/1.0/IServiceNotification.h>\n\n";
+    }
+
     out << "#include <hidl/HidlSupport.h>\n";
-    out << "#include <hidl/ServiceManagement.h>\n";
     out << "#include <hidl/MQDescriptor.h>\n";
 
     if (isInterface) {
+        out << "#include <hidl/ServiceManagement.h>\n";
         out << "#include <hidl/Status.h>\n";
     }
 
@@ -282,7 +286,7 @@
 
         out << "\nstatic const ::android::String16 descriptor;\n\n";
 
-        out << "DECLARE_REGISTER_AND_GET_SERVICE(" << baseName << ")\n\n";
+        out << "DECLARE_SERVICE_MANAGER_INTERACTIONS(" << baseName << ")\n\n";
 
         out << "private: static int hidlStaticBlock;\n";
     }
@@ -798,7 +802,7 @@
     if (err == OK && isInterface) {
         const Interface *iface = mRootScope->getInterface();
 
-        out << "IMPLEMENT_REGISTER_AND_GET_SERVICE("
+        out << "IMPLEMENT_SERVICE_MANAGER_INTERACTIONS("
             << baseName << ", "
             << "\"" << iface->fqName().package()
             << iface->fqName().atVersion()