Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: Preferences.h
- Revision:
- 135:7f3f963cd159
- Parent:
- 120:edf33bd41e4f
- Child:
- 154:6e60f310ab78
--- a/Preferences.h Fri Mar 28 16:24:12 2014 +0000 +++ b/Preferences.h Fri Mar 28 17:49:10 2014 +0000 @@ -20,18 +20,17 @@ #define _PREFERENCES_H_ #include "mbed.h" -#include "ErrorHandler.h" +#include "BaseClass.h" -class Preferences { +class Preferences : public BaseClass { private: - ErrorHandler *m_error_handler; char m_names[MAX_NUM_PREFERENCES][PREFERENCE_NAME_LEN+1]; char m_values[MAX_NUM_PREFERENCES][PREFERENCE_VALUE_LEN+1]; int m_num_preferences; public: Preferences(ErrorHandler *error_handler); - ~Preferences(); + virtual ~Preferences(); int numPreferences(); char *getPreference(char *name,char *buffer,int buffer_length,char *def_value); @@ -42,8 +41,7 @@ private: bool initialize(); - ErrorHandler *logger(); - + int indexOfPreference(char *name); int min(int value1,int value2); };