mqtt specific components for the impact mbed endpoint library

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_mqtt_endpoint_nxp

Revision:
7:8a4a61202b36
Parent:
0:a3fc1c6ef150
Child:
20:ee03f10c074e
diff -r 2db2c7e75ad9 -r 8a4a61202b36 MQTTTransport.cpp
--- a/MQTTTransport.cpp	Thu Mar 27 18:14:05 2014 +0000
+++ b/MQTTTransport.cpp	Fri Mar 28 16:24:22 2014 +0000
@@ -92,7 +92,7 @@
  // pull the endpoint name from the MQTT topic
  char *MQTTTransport::getEndpointNameFromTopic(char *topic) {
      if (topic != NULL) {
-         memset(this->m_endpoint_name,0,LIGHT_NAME_LEN+1);
+         memset(this->m_endpoint_name,0,PERSONALITY_NAME_LEN+1);
          char trash[MQTT_IOC_TOPIC_LEN+1];
          char ep[MQTT_IOC_TOPIC_LEN+1];
          memset(trash,0,MQTT_IOC_TOPIC_LEN+1);
@@ -168,30 +168,30 @@
              if (message_verb != NULL && strcmp(message_verb,IOC_REQUEST_LOAD_ALL_VERB) == 0) {     // load
                  if (message_value != NULL && strcmp(message_value,IOC_ENDPOINT_ALL_VERB) == 0) {   // all
                     // load up our endpoints
-                    endpoint->loadEndpoints();
-                    endpoint->updateEndpoints();
+                    endpoint->loadPersonalities();
+                    endpoint->updatePersonalities();
                  }
                  else if (message_value != NULL && strcmp(message_value,this->m_endpoint_name) == 0) {
                     // load up our endpoints (us only)
-                    endpoint->loadEndpoints();
-                    endpoint->updateEndpoints();
+                    endpoint->loadPersonalities();
+                    endpoint->updatePersonalities();
                  }
              }
              
              else if (message_verb != NULL && strcmp(message_verb,IOC_REQUEST_UPDATE_ALL_VERB) == 0) {  // update
                  if (message_value != NULL && strcmp(message_value,IOC_ENDPOINT_ALL_VERB) == 0) {       // all
                      // update our endpoints
-                     endpoint->updateEndpoints();
+                     endpoint->updatePersonalities();
                  }
                  else {
                      // update just our endpoint
                      int index = -1;
                      if (message_name != NULL) {
-                         index = endpoint->indexOfLight((char *)message_name);
+                         index = endpoint->indexOfPersonality((char *)message_name);
                          if (index >= 0) {
                              if (message_verb != NULL && strcmp(message_verb,IOC_REQUEST_UPDATE_ALL_VERB) == 0) {
                                 // update our endpoint
-                                endpoint->updateEndpoints(index);
+                                endpoint->updatePersonality(index);
                              }
                          }
                      }
@@ -203,7 +203,7 @@
          if (message_type != NULL && strcmp(message_type,IOC_CHANGE_VERB) == 0) {
               if (message_name != NULL) {
                  // destined for our lights?
-                 int index = endpoint->indexOfLight((char *)message_name);
+                 int index = endpoint->indexOfPersonality((char *)message_name);
                  if (index >= 0) {
                      if (message_verb != NULL) {
                          // map the parameter to one of ours
@@ -226,7 +226,7 @@
          if (message_type != NULL && strcmp(message_type,IOC_REQUEST_VALUE_VERB) == 0) {
              if (message_name != NULL) {
                  // destined for our lights?
-                 int index = endpoint->indexOfLight((char *)message_name);
+                 int index = endpoint->indexOfPersonality((char *)message_name);
                  if (index >= 0) {
                      if (message_verb != NULL) {
                          // map the parameter to one of ours