MBED_DEMOS / Mbed 2 deprecated mbed_mqtt_endpoint_ublox_ethernet

Dependencies:   C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed

Revision:
138:6159f1940b1d
Parent:
115:7c8b958dfaa7
Child:
139:1eef48a644a0
--- a/MBEDEndpoint.cpp	Mon Mar 17 22:05:30 2014 +0000
+++ b/MBEDEndpoint.cpp	Tue Mar 18 21:53:24 2014 +0000
@@ -41,6 +41,7 @@
      bool success = true;
      for(int i=0;i<NUM_TRANSPORTS;++i) this->m_transports[i] = NULL;
      this->m_error_handler = error_handler;
+     if (success) this->initPreferences();
      if (success) this->initEndpointName();
      if (success) this->logger()->turnLEDBlue();
 #ifdef MAC_ADDRESS
@@ -74,6 +75,16 @@
  // get the IOC <--> MBED resource map
  MBEDToIOCResourceMap *MBEDEndpoint::getMap() { return this->m_map; }
  
+ // initialize our preferences
+ void MBEDEndpoint::initPreferences() {
+     if (this->m_preferences == NULL) {
+         this->m_preferences = new Preferences(this->logger());
+     }
+ }
+ 
+  // get our preferences
+ Preferences *MBEDEndpoint::preferences() { return this->m_preferences; }
+ 
  // initialize the Lights
  bool MBEDEndpoint::initializeLights() {
      this->logger()->log("Initializing Lights...");