Changeset 74009 in vbox
- Timestamp:
- Aug 31, 2018 7:28:56 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/cpp/restbase.h (modified) (3 diffs)
-
src/VBox/Runtime/common/rest/RTCRestClientApiBase.cpp (modified) (3 diffs)
-
src/VBox/Runtime/common/rest/RTCRestClientResponseBase.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/restbase.h
r74008 r74009 1455 1455 1456 1456 /** 1457 * Resets the object state. 1458 */ 1459 virtual void reset(void); 1460 1461 /** 1457 1462 * Prepares the HTTP handle for receiving the response. 1458 1463 * … … 1704 1709 * Implements stuff for making an API call. 1705 1710 * 1711 * @returns a_pResponse->getStatus() 1706 1712 * @param a_rRequest Reference to the request object. 1707 1713 * @param a_enmHttpMethod The HTTP request method. … … 1709 1715 * @param a_pszMethod The method name, for logging purposes. 1710 1716 */ 1711 virtual voiddoCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod,1712 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod);1717 virtual int doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod, 1718 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod); 1713 1719 1714 1720 }; -
trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBase.cpp
r73978 r74009 63 63 64 64 65 voidRTCRestClientApiBase::doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod,66 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod)65 int RTCRestClientApiBase::doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod, 66 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod) 67 67 { 68 68 LogFlow(("doCall: %s %s\n", a_pszMethod, RTHttpMethodName(a_enmHttpMethod))); 69 70 /* 71 * Reset the response object, allowing reuse of such. 72 */ 73 a_pResponse->reset(); 69 74 70 75 /* … … 149 154 a_pResponse->receiveFinal(); 150 155 151 return ;156 return a_pResponse->getStatus(); 152 157 } 153 158 } … … 158 163 a_pResponse->receiveComplete(rc, hHttp); 159 164 RT_NOREF_PV(a_pszMethod); 165 166 return a_pResponse->getStatus(); 160 167 } 161 168 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientResponseBase.cpp
r73995 r74009 84 84 85 85 return *this; 86 } 87 88 89 void RTCRestClientResponseBase::reset() 90 { 91 /* Return to default constructor state. */ 92 m_rcStatus = VERR_WRONG_ORDER; 93 m_rcHttp = VERR_NOT_AVAILABLE; 94 if (m_pErrInfo) 95 deleteErrInfo(); 96 m_strContentType.setNull(); 86 97 } 87 98
Note:
See TracChangeset
for help on using the changeset viewer.

