Cleanup includes for rs/cpp to not expose internal details.

Change-Id: Ib23f591f8418d3318f61ab1d3f6f2b684bf95692
diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp
index e2fd651..4474741 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -21,6 +21,7 @@
 #include "RenderScript.h"
 #include "rsCppStructs.h"
 #include "rsCppInternal.h"
+#include "rsDispatch.h"
 
 #include <dlfcn.h>
 #include <unistd.h>
diff --git a/cpp/Sampler.cpp b/cpp/Sampler.cpp
index bf99125..500651f 100644
--- a/cpp/Sampler.cpp
+++ b/cpp/Sampler.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "RenderScript.h"
+#include "rsCppInternal.h"
 
 using namespace android;
 using namespace RSC;
diff --git a/cpp/ScriptC.cpp b/cpp/ScriptC.cpp
index d431355..b107901 100644
--- a/cpp/ScriptC.cpp
+++ b/cpp/ScriptC.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "RenderScript.h"
+#include "rsCppInternal.h"
 
 using namespace android;
 using namespace RSC;
diff --git a/cpp/rsCppInternal.h b/cpp/rsCppInternal.h
index 81b690f..69857d7 100644
--- a/cpp/rsCppInternal.h
+++ b/cpp/rsCppInternal.h
@@ -17,8 +17,11 @@
 #ifndef ANDROID_RS_CPP_INTERNAL_H
 #define ANDROID_RS_CPP_INTERNAL_H
 
+
 #define LOG_TAG "rsC++"
 #include "rsCppUtils.h"
+#include "rsInternalDefines.h"
+#include "rsDispatch.h"
 
 #define tryDispatch(rs, dispatch)               \
     if (rs->getError() == RS_SUCCESS) {         \
diff --git a/cpp/rsCppStructs.h b/cpp/rsCppStructs.h
index 12dc186..cd7f29e 100644
--- a/cpp/rsCppStructs.h
+++ b/cpp/rsCppStructs.h
@@ -19,7 +19,6 @@
 
 #include "rsDefines.h"
 #include "util/RefBase.h"
-#include "rsDispatch.h"
 
 #include <vector>
 #include <string>
@@ -31,9 +30,12 @@
  */
 #define RS_CPU_ALLOCATION_ALIGNMENT 16
 
+struct dispatchTable;
+
 namespace android {
 namespace RSC {
 
+
 typedef void (*ErrorHandlerFunc_t)(uint32_t errorNum, const char *errorText);
 typedef void (*MessageHandlerFunc_t)(uint32_t msgNum, const void *msgData, size_t msgLen);
 
diff --git a/cpp/rsDispatch.h b/cpp/rsDispatch.h
index 614f5a4..394a6b1 100644
--- a/cpp/rsDispatch.h
+++ b/cpp/rsDispatch.h
@@ -17,7 +17,7 @@
 #ifndef ANDROID_RSDISPATCH_H
 #define ANDROID_RSDISPATCH_H
 
-#include "rsDefines.h"
+#include "rsInternalDefines.h"
 
 typedef const void* (*AllocationGetTypeFnPtr)(RsContext con, RsAllocation va);
 typedef void (*TypeGetNativeDataFnPtr)(RsContext, RsType, uintptr_t *typeData, uint32_t typeDataSize);
@@ -87,7 +87,7 @@
 typedef void (*AllocationIoReceiveFnPtr) (RsContext, RsAllocation);
 typedef void * (*AllocationGetPointerFnPtr) (RsContext, RsAllocation, uint32_t lod, RsAllocationCubemapFace face, uint32_t z, uint32_t array, size_t *stride);
 
-typedef struct {
+struct dispatchTable {
     // inserted by hand from rs.h
     AllocationGetTypeFnPtr AllocationGetType;
     TypeGetNativeDataFnPtr TypeGetNativeData;
@@ -158,6 +158,6 @@
     AllocationIoSendFnPtr AllocationIoSend;
     AllocationIoReceiveFnPtr AllocationIoReceive;
     AllocationGetPointerFnPtr AllocationGetPointer;
-} dispatchTable;
+};
 
 #endif