Official reference client implementation for Cumulocity SmartREST on u-blox C027.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
DeviceBootstrap.h
- Committer:
- xinlei
- Date:
- 2015-05-13
- Revision:
- 110:b7a403dbceb6
- Parent:
- 101:dbcd3bc51758
- Child:
- 113:3872569be2af
File content as of revision 110:b7a403dbceb6:
#ifndef DEVICEBOOTSTRAP_H #define DEVICEBOOTSTRAP_H #include <stddef.h> #include "AbstractSmartRest.h" #include "DeviceInfo.h" #define CREDENTIAL_LENGTH 256 class DeviceBootstrap { public: DeviceBootstrap(AbstractSmartRest&, DeviceInfo&); bool setUpCredentials(); const char* username() const { return _username; } const char* password() const { return _password; } protected: bool obtainFromPlatform(); private: void setCredentials(const char *, const char*, const char*); private: AbstractSmartRest& _client; DeviceInfo& _deviceInfo; char _username[CREDENTIAL_LENGTH]; char _password[CREDENTIAL_LENGTH]; }; #endif