X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fresource-encapsulation%2Finclude%2FRCSRequest.h;h=9ecbc01f4e7f64278b16a8ee0a2c5af68d822649;hb=390866079e285d2c74918432c0d597d5da52f8a0;hp=9a78af876c7f8fd2108694a7b228b150dca7dfad;hpb=3e9402ad71cb3e93266a77796f44d17bab9853fd;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/resource-encapsulation/include/RCSRequest.h b/service/resource-encapsulation/include/RCSRequest.h index 9a78af8..9ecbc01 100644 --- a/service/resource-encapsulation/include/RCSRequest.h +++ b/service/resource-encapsulation/include/RCSRequest.h @@ -26,36 +26,68 @@ #ifndef SERVERBUILDER_PRIMITIVEREQUEST_H #define SERVERBUILDER_PRIMITIVEREQUEST_H -#include +#include +#include + +namespace OC +{ + class OCResourceRequest; +} namespace OIC { namespace Service { + class RCSResourceObject; + /** * This class describes the request. * */ class RCSRequest { - public: - /** - * Constructor to set resource URI. - * - * @param resourceUri URI of the resource for which the request is generated. - */ - explicit RCSRequest(const std::string &resourceUri); + public: + RCSRequest() = default; + + /** + * Constructor to set resource URI. + * + * @param resourceUri URI of the resource for which the request is generated. + */ + explicit RCSRequest(const std::string& resourceUri); + + RCSRequest(const std::shared_ptr< RCSResourceObject >&, + const std::shared_ptr< OC::OCResourceRequest >&); + + /** + * @return the resource object which receives this request. + */ + std::weak_ptr< RCSResourceObject > getResourceObject() const noexcept; + + /** + * @return the URI of the request. + * + */ + std::string getResourceUri() const; + + /** + * @return the OCResourceRequest. + */ + std::shared_ptr< OC::OCResourceRequest > getOCRequest() const noexcept; - RCSRequest &operator=(RCSRequest &) = delete; + /** + * @return the query parameters of the request. + */ + const std::map< std::string, std::string >& getQueryParams() const; - /** - * @return Returns the URI of the request. - * - */ - std::string getResourceUri() const; + /** + * @return the interface of the request. + */ + std::string getInterface() const; - private: - std::string m_resourceUri; + private: + std::weak_ptr< RCSResourceObject > m_resourceObject; + std::shared_ptr< OC::OCResourceRequest > m_ocRequest; }; }