X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fsimulator%2Fsrc%2Fcommon%2Fresponse_model.h;h=6a78748faa0fb17d4a443c0c343663f94e72fd13;hb=390866079e285d2c74918432c0d597d5da52f8a0;hp=77cb2bbf6214e8d934188bfc08933bb9b9a1b1f2;hpb=3e9402ad71cb3e93266a77796f44d17bab9853fd;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/simulator/src/common/response_model.h b/service/simulator/src/common/response_model.h index 77cb2bb..6a78748 100644 --- a/service/simulator/src/common/response_model.h +++ b/service/simulator/src/common/response_model.h @@ -21,8 +21,8 @@ #ifndef RESPONSE_MODEL_H_ #define RESPONSE_MODEL_H_ -#include "simulator_client_types.h" -#include "simulator_resource_model.h" +#include "simulator_resource_model_schema.h" +#include "simulator_error_codes.h" class RequestModelBuilder; class ResponseModel @@ -30,20 +30,15 @@ class ResponseModel public: friend class RequestModelBuilder; - SimulatorResult verifyResponse(const OC::OCRepresentation &rep); + std::shared_ptr getSchema(); + SimulatorResult verifyResponse(const SimulatorResourceModel &resModel); private: ResponseModel(int code); - void setRepSchema(SimulatorResourceModelSP &repSchema); - SimulatorResult validateAttributeInteger(SimulatorResourceModel::Attribute &attrSchema, - const OC::OCRepresentation::AttributeItem &ocAttribute); - SimulatorResult validateAttributeDouble(SimulatorResourceModel::Attribute &attrSchema, - const OC::OCRepresentation::AttributeItem &ocAttribute); - SimulatorResult validateAttributeString(SimulatorResourceModel::Attribute &attrSchema, - const OC::OCRepresentation::AttributeItem &ocAttribute); + void setResponseBodyModel(const std::shared_ptr &repSchema); int m_code; - SimulatorResourceModelSP m_repSchema; + std::shared_ptr m_repSchema; }; typedef std::shared_ptr ResponseModelSP;