X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fthings-manager%2Fsampleapp%2Flinux%2Fconfiguration%2Fbootstrapserver.cpp;h=a1548e60f0179ea6076d4419537e7ef809e3bbfc;hb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;hp=e53f61ce062ad1c46b6a4042d9dd6da48fdfc106;hpb=00b3660e45c56cb3db35dc2596a054f801b5591a;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/things-manager/sampleapp/linux/configuration/bootstrapserver.cpp b/service/things-manager/sampleapp/linux/configuration/bootstrapserver.cpp index e53f61c..a1548e6 100644 --- a/service/things-manager/sampleapp/linux/configuration/bootstrapserver.cpp +++ b/service/things-manager/sampleapp/linux/configuration/bootstrapserver.cpp @@ -37,15 +37,11 @@ bool prepareResponse(std::shared_ptr< OCResourceRequest > request); OCStackResult sendResponse(std::shared_ptr< OCResourceRequest > pRequest); OCEntityHandlerResult entityHandlerBootstrap(std::shared_ptr< OCResourceRequest > request); -#define DefaultConfigurationValue "Configuration Collection" -#define DefaultRegionValue "Seoul, Korea" -#define DefaultTimeValue "Time Collection" -#define DefaultCurrentTimeValue "00:00:00" -#define DefaultNetworkValue "Network Collection" -#define DefaultIPAddressValue "192.168.0.2" -#define DefaultSecurityValue "SecurityValue" -#define DefaultModeValue "NoSec" -#define DefaultFactorySetValue "FactorySet Value" +#define DefaultRegion "Seoul, Korea" +#define DefaultSystemTime "00:00:00" +#define DefaultLocation "37.256616, 127.052806" +#define DefaultCurrency "Won" + class BootstrapResource { @@ -92,15 +88,10 @@ public: OCRepresentation getBootstrapRepresentation() { - m_bootstrapRep.setValue< std::string >("regionValue", DefaultRegionValue); - m_bootstrapRep.setValue< std::string >("timeValue", DefaultTimeValue); - m_bootstrapRep.setValue< std::string >("currentTimeValue", DefaultCurrentTimeValue); - m_bootstrapRep.setValue< std::string >("networkValue", DefaultNetworkValue); - m_bootstrapRep.setValue< std::string >("IPAddressValue", DefaultIPAddressValue); - m_bootstrapRep.setValue< std::string >("securityValue", DefaultSecurityValue); - m_bootstrapRep.setValue< std::string >("modeValue", DefaultModeValue); - m_bootstrapRep.setValue< std::string >("configurationValue", DefaultConfigurationValue); - m_bootstrapRep.setValue< std::string >("factorySetValue", DefaultFactorySetValue); + m_bootstrapRep.setValue< std::string >("r", DefaultRegion); + m_bootstrapRep.setValue< std::string >("st", DefaultSystemTime); + m_bootstrapRep.setValue< std::string >("loc", DefaultLocation); + m_bootstrapRep.setValue< std::string >("c", DefaultCurrency); return m_bootstrapRep; } @@ -120,13 +111,7 @@ bool prepareResponse(std::shared_ptr< OCResourceRequest > request) std::string requestType = request->getRequestType(); int requestFlag = request->getRequestHandlerFlag(); - if (requestFlag == RequestHandlerFlag::InitFlag) - { - cout << "\t\trequestFlag : Init\n"; - - // entity handler to perform resource initialization operations - } - else if (requestFlag == RequestHandlerFlag::RequestFlag) + if (requestFlag == RequestHandlerFlag::RequestFlag) { cout << "\t\trequestFlag : Request\n";