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:
120:2a4b2664adf9
Parent:
117:f8103c66474a
Child:
121:dfe65a93f26b
--- a/source/ConnectorEndpoint.cpp	Wed May 24 16:43:21 2017 +0000
+++ b/source/ConnectorEndpoint.cpp	Thu Jun 01 17:19:50 2017 +0000
@@ -420,73 +420,43 @@
 void Endpoint::on_error(int error_code) {
 	char *error = (char *)"No Error";
 	switch(error_code) {
-        case 0x01:
-            error = (char *)"MbedCloudClient::IdentityError";
-            break;
-        case 0x02:
-            error = (char *)"MbedCloudClient::IdentityInvalidParameter";
-            break;
-        case 0x03:
-            error = (char *)"MbedCloudClient::IdentityOutofMemory";
-            break;
-        case 0x04:
-            error = (char *)"MbedCloudClient::IdentityProvisioningError";
-            break;
-        case 0x05:
-            error = (char *)"MbedCloudClient::IdentityInvalidSessionID";
-            break;
-        case 0x06:
-            error = (char *)"MbedCloudClient::IdentityNetworkError";
-            break;
-        case 0x07:
-            error = (char *)"MbedCloudClient::IdentityInvalidMessageType";
-            break;
-        case 0x08:
-            error = (char *)"MbedCloudClient::IdentityInvalidMessageSize";
-            break;
-        case 0x09:
-            error = (char *)"MbedCloudClient::IdentityCertOrKeyNotFound";
-            break;
-        case 0x0A:
-            error = (char *)"MbedCloudClient::IdentityRetransmissionError";
-            break;
-        case 0x30:
+        case MbedCloudClient::ConnectErrorNone:
             error = (char *)"MbedCloudClient::ConnectErrorNone";
             break;
-        case 0x31:
+        case MbedCloudClient::ConnectAlreadyExists:
             error = (char *)"MbedCloudClient::ConnectAlreadyExists";
             break;
-        case 0x32:
+        case MbedCloudClient::ConnectBootstrapFailed:
             error = (char *)"MbedCloudClient::ConnectBootstrapFailed";
-			break;
-        case 0x33:
+            break;
+        case MbedCloudClient::ConnectInvalidParameters:
             error = (char *)"MbedCloudClient::ConnectInvalidParameters";
             break;
-        case 0x34:
+        case MbedCloudClient::ConnectNotRegistered:
             error = (char *)"MbedCloudClient::ConnectNotRegistered";
             break;
-        case 0x35:
+        case MbedCloudClient::ConnectTimeout:
             error = (char *)"MbedCloudClient::ConnectTimeout";
             break;
-        case 0x36:
+        case MbedCloudClient::ConnectNetworkError:
             error = (char *)"MbedCloudClient::ConnectNetworkError";
             break;
-        case 0x37:
+        case MbedCloudClient::ConnectResponseParseFailed:
             error = (char *)"MbedCloudClient::ConnectResponseParseFailed";
             break;
-        case 0x38:
+        case MbedCloudClient::ConnectUnknownError:
             error = (char *)"MbedCloudClient::ConnectUnknownError";
             break;
-        case 0x39:
-            error = (char *)"MbedCloudClient::ConnectMemoryFail";
+        case MbedCloudClient::ConnectMemoryConnectFail:
+            error = (char *)"MbedCloudClient::ConnectMemoryConnectFail";
             break;
-        case 0x3A:
+        case MbedCloudClient::ConnectNotAllowed:
             error = (char *)"MbedCloudClient::ConnectNotAllowed";
             break;
-        case 0x3B:
+        case MbedCloudClient::ConnectSecureConnectionFailed:
             error = (char *)"MbedCloudClient::ConnectSecureConnectionFailed";
             break;
-        case 0x3C:
+        case MbedCloudClient::ConnectDnsResolvingFailed:
             error = (char *)"MbedCloudClient::ConnectDnsResolvingFailed";
             break;
 #ifdef MBED_CLOUD_CLIENT_SUPPORT_UPDATE