mbed Connector Interface simplification API on top of mbed-client

Fork of mbedConnectorInterfaceV3 by Doug Anson

NOTE:

This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!

Revision:
71:5069a202e892
Parent:
54:dfee8691c83a
Child:
73:f12a767bc300
--- a/mbed-connector-interface/ConnectorEndpoint.h	Mon Aug 22 19:51:07 2016 +0000
+++ b/mbed-connector-interface/ConnectorEndpoint.h	Fri Nov 04 16:29:17 2016 +0000
@@ -23,6 +23,9 @@
 #ifndef __CONNECTOR_ENDPOINT_H__
 #define __CONNECTOR_ENDPOINT_H__
 
+// Support for Logging/Debug output
+#include "mbed-connector-interface/Logger.h"
+
 // mbed-client support
 #include "mbed-client/m2minterfacefactory.h"
 #include "mbed-client/m2minterfaceobserver.h"
@@ -32,9 +35,6 @@
 #include "mbed-client/m2mdevice.h"
 #include "mbed-client/m2mfirmware.h"
 
-// Support for Logging/Debug output
-#include "mbed-connector-interface/Logger.h"
-
 // Options support
 #include "mbed-connector-interface/Options.h"
 
@@ -174,8 +174,12 @@
     bool			   			 m_registered;
     
     // mbed-client support
+#ifdef ENABLE_MBED_CLOUD_SUPPORT
+	MbedCloudClient				*m_endpoint_interface;
+#else
     M2MInterface      			*m_endpoint_interface;
     M2MSecurity       			*m_endpoint_security;
+#endif
     M2MObjectList      			 m_endpoint_object_list;
     
     // Device Manager
@@ -186,10 +190,18 @@
 	
 	// ObjectInstanceManager
 	ObjectInstanceManager		*m_oim;
+
+	// create our endpoint interface
+	void 			 createEndpointInterface();
 	
+#ifdef ENABLE_MBED_CLOUD_SUPPORT
 	// mbed-client methods
-    void 			 createEndpointInterface();
+    void 			 createCloudEndpointInterface();
+#else
+	// mbed-client methods
+    void 			 createConnectorEndpointInterface();
     M2MSecurity 	*createEndpointInstance();
+#endif
     
 	// DynamicResource Lookup
 	DynamicResource *lookupDynamicResource(M2MBase *base);