#include "OCPlatform.h"
#include "OCApi.h"
-#include "ThingsManager.h"
#pragma once
typedef std::function<
OCEntityHandlerResult(std::shared_ptr< OCResourceRequest > request) > ResourceEntityHandler;
-static std::string defaultURIPrefix = "/oic/con";
-static std::string defaultResourceTypePrefix = "oic.con";
+static std::string defaultConURI = "/oic/con";
+static std::string defaultConResourceType = "oic.wk.con";
+extern std::string defaultDeviceName;
extern std::string defaultLocation;
-extern std::string defaultSystemTime;
+extern std::string defaultLocationName;
extern std::string defaultCurrency;
extern std::string defaultRegion;
public:
// Configuration members
std::string m_configurationUri;
+ std::string m_deviceName;
std::string m_location;
- std::string m_systemTime;
+ std::string m_locationName;
std::string m_currency;
std::string m_region;
std::vector< std::string > m_configurationTypes;
public:
/// Constructor
ConfigurationResource() :
- m_location(defaultLocation), m_systemTime(defaultSystemTime), m_currency(
- defaultCurrency), m_region(defaultRegion)
+ m_deviceName(defaultDeviceName), m_location(defaultLocation),
+ m_locationName(defaultLocationName), m_currency(defaultCurrency),
+ m_region(defaultRegion)
{
- m_configurationUri = "/oic/con"; // URI of the resource
- m_configurationTypes.push_back("oic.con"); // resource type name.
+ m_configurationUri = defaultConURI; // URI of the resource
+ m_configurationTypes.push_back(defaultConResourceType); // resource type name.
m_configurationInterfaces.push_back(DEFAULT_INTERFACE); // resource interface.
- //m_configurationInterfaces.push_back(BATCH_INTERFACE); // resource interface.
- //m_configurationInterfaces.push_back(LINK_INTERFACE); // resource interface.
+ m_configurationRep.setValue("st", m_deviceName);
m_configurationRep.setValue("loc", m_location);
- m_configurationRep.setValue("st", m_systemTime);
+ m_configurationRep.setValue("locn", m_locationName);
m_configurationRep.setValue("c", m_currency);
m_configurationRep.setValue("r", m_region);
m_configurationRep.setUri(m_configurationUri);