Changeset 73977 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Aug 30, 2018 12:13:02 PM (6 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/RTCRestArrayBase.cpp
r73968 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 83 84 *********************************************************************************************************************************/ 84 85 85 voidRTCRestArrayBase::resetToDefault()86 int RTCRestArrayBase::resetToDefault() 86 87 { 87 88 /* The default state of an array is empty. At least for now. */ 88 89 clear(); 90 return VINF_SUCCESS; 89 91 } 90 92 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBase.cpp
r73967 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 33 34 #include <iprt/err.h> 34 35 #include <iprt/http.h> 36 #include <iprt/log.h> 35 37 36 38 … … 62 64 63 65 void RTCRestClientApiBase::doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod, 64 RTCRestClientResponseBase *a_pResponse )66 RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod) 65 67 { 68 LogFlow(("doCall: %s %s\n", a_pszMethod, RTHttpMethodName(a_enmHttpMethod))); 69 66 70 /* 67 71 * Initialize the HTTP instance. … … 155 159 } 156 160 a_pResponse->receiveComplete(rc, hHttp); 161 RT_NOREF_PV(a_pszMethod); 157 162 } 158 163 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientRequestBase.cpp
r73918 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 37 38 /** 38 39 * Default constructor. 39 * */40 */ 40 41 RTCRestClientRequestBase::RTCRestClientRequestBase() 42 : m_fIsSet(0) 43 , m_fErrorSet(0) 41 44 { 42 /* nothing to do */ 45 } 46 47 48 /** 49 * Copy constructor. 50 */ 51 RTCRestClientRequestBase::RTCRestClientRequestBase(RTCRestClientRequestBase const &a_rThat) 52 : m_fIsSet(a_rThat.m_fIsSet) 53 , m_fErrorSet(a_rThat.m_fErrorSet) 54 { 43 55 } 44 56 … … 50 62 { 51 63 /* nothing to do */ 64 } 65 66 67 /** 68 * Copy assignment operator. 69 */ 70 RTCRestClientRequestBase &RTCRestClientRequestBase::operator=(RTCRestClientRequestBase const &a_rThat) 71 { 72 m_fIsSet = a_rThat.m_fIsSet; 73 m_fErrorSet = a_rThat.m_fErrorSet; 74 return *this; 52 75 } 53 76 -
trunk/src/VBox/Runtime/common/rest/RTCRestClientResponseBase.cpp
r73968 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 -
trunk/src/VBox/Runtime/common/rest/RTCRestJsonPrimaryCursor.cpp
r73875 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 -
trunk/src/VBox/Runtime/common/rest/RTCRestOutputToString.cpp
r73956 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 -
trunk/src/VBox/Runtime/common/rest/RTCRestStringMapBase.cpp
r73965 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 72 73 *********************************************************************************************************************************/ 73 74 74 voidRTCRestStringMapBase::resetToDefault()75 int RTCRestStringMapBase::resetToDefault() 75 76 { 76 77 /* Default is an empty map. */ 77 78 clear(); 79 return VINF_SUCCESS; 78 80 } 79 81 -
trunk/src/VBox/Runtime/common/rest/rest-primary-object-types.cpp
r73956 r73977 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_REST 31 32 #include <iprt/cpp/restbase.h> 32 33 … … 143 144 144 145 145 void RTCRestBool::resetToDefault() 146 int RTCRestBool::assignCopy(RTCRestBool const &a_rThat) 147 { 148 m_fValue = a_rThat.m_fValue; 149 return VINF_SUCCESS; 150 } 151 152 153 int RTCRestBool::resetToDefault() 146 154 { 147 155 m_fValue = false; 156 return VINF_SUCCESS; 148 157 } 149 158 … … 265 274 266 275 267 void RTCRestInt64::resetToDefault() 276 int RTCRestInt64::assignCopy(RTCRestInt64 const &a_rThat) 277 { 278 m_iValue = a_rThat.m_iValue; 279 return VINF_SUCCESS; 280 } 281 282 283 int RTCRestInt64::resetToDefault() 268 284 { 269 285 m_iValue = 0; 286 return VINF_SUCCESS; 270 287 } 271 288 … … 375 392 376 393 377 void RTCRestInt32::resetToDefault() 394 int RTCRestInt32::assignCopy(RTCRestInt32 const &a_rThat) 395 { 396 m_iValue = a_rThat.m_iValue; 397 return VINF_SUCCESS; 398 } 399 400 401 int RTCRestInt32::resetToDefault() 378 402 { 379 403 m_iValue = 0; 404 return VINF_SUCCESS; 380 405 } 381 406 … … 491 516 492 517 493 void RTCRestInt16::resetToDefault() 518 int RTCRestInt16::assignCopy(RTCRestInt16 const &a_rThat) 519 { 520 m_iValue = a_rThat.m_iValue; 521 return VINF_SUCCESS; 522 } 523 524 525 int RTCRestInt16::resetToDefault() 494 526 { 495 527 m_iValue = 0; 528 return VINF_SUCCESS; 496 529 } 497 530 … … 598 631 599 632 600 void RTCRestDouble::resetToDefault() 633 /** Copy assignment operator. */ 634 RTCRestDouble &RTCRestDouble::operator=(RTCRestDouble const &a_rThat) 635 { 636 m_rdValue = a_rThat.m_rdValue; 637 return *this; 638 } 639 640 641 int RTCRestDouble::assignCopy(RTCRestDouble const &a_rThat) 642 { 643 m_rdValue = a_rThat.m_rdValue; 644 return VINF_SUCCESS; 645 } 646 647 648 int RTCRestDouble::resetToDefault() 601 649 { 602 650 m_rdValue = 0.0; 651 return VINF_SUCCESS; 603 652 } 604 653 … … 715 764 716 765 717 void RTCRestString::resetToDefault() 766 int RTCRestString::assignCopy(RTCString const &a_rThat) 767 { 768 return assignNoThrow(a_rThat); 769 } 770 771 772 int RTCRestString::assignCopy(const char *a_pszThat) 773 { 774 return assignNoThrow(a_pszThat); 775 } 776 777 778 int RTCRestString::resetToDefault() 718 779 { 719 780 setNull(); 781 return VINF_SUCCESS; 720 782 } 721 783 -
trunk/src/VBox/Runtime/generic/http-curl.cpp
r73967 r73977 2 2 /** @file 3 3 * IPRT - HTTP client API, cURL based. 4 * 5 * Logging groups: 6 * Log4 - request headers. 7 * Log5 - request body. 8 * Log6 - response headers. 9 * Log7 - response body. 4 10 */ 5 11 … … 2874 2880 AssertPtrReturn(pszUrl, VERR_INVALID_POINTER); 2875 2881 2882 #ifdef LOG_ENABLED 2883 if (LogIs6Enabled() && pThis->pHeaders) 2884 { 2885 Log4(("RTHttpPerform: headers:\n")); 2886 for (struct curl_slist const *pCur = pThis->pHeaders; pCur; pCur = pCur->next) 2887 Log4(("%s", pCur->data)); 2888 } 2889 if (pvReqBody && cbReqBody) 2890 Log5(("RTHttpPerform: request body:\n%.*Rhxd\n", cbReqBody, pvReqBody)); 2891 #endif 2892 2876 2893 /* 2877 2894 * Set the busy flag (paranoia). … … 2887 2904 if (RT_SUCCESS(rc)) 2888 2905 { 2889 2890 /* HTTP method. */ 2906 /* Set the HTTP method. */ 2891 2907 int rcCurl = 1; 2892 2908 switch (enmMethod) … … 2970 2986 if (ppvHeaders) 2971 2987 { 2988 Log(("RTHttpPerform: headers: %zx bytes (allocated %zx)\n", 2989 pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.cbAllocated)); 2990 Log6(("RTHttpPerform: headers blob:\n%.*Rhxd\n", pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.pb)); 2972 2991 *ppvHeaders = pThis->HeadersOutput.uData.Mem.pb; 2973 2992 *pcbHeaders = pThis->HeadersOutput.uData.Mem.cb; 2974 2993 pThis->HeadersOutput.uData.Mem.pb = NULL; 2975 Log(("RTHttpPerform: headers: %zx bytes (allocated %zx)\n",2976 pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.cbAllocated));2977 2994 } 2978 2995 if (ppvBody) 2979 2996 { 2997 Log(("RTHttpPerform: body: %zx bytes (allocated %zx)\n", 2998 pThis->BodyOutput.uData.Mem.cb, pThis->BodyOutput.uData.Mem.cbAllocated)); 2999 Log7(("RTHttpPerform: body blob:\n%.*Rhxd\n", pThis->BodyOutput.uData.Mem.cb, pThis->BodyOutput.uData.Mem.pb)); 2980 3000 *ppvBody = pThis->BodyOutput.uData.Mem.pb; 2981 3001 *pcbBody = pThis->BodyOutput.uData.Mem.cb; 2982 3002 pThis->BodyOutput.uData.Mem.pb = NULL; 2983 Log(("RTHttpPerform: body: %zx bytes (allocated %zx)\n",2984 pThis->HeadersOutput.uData.Mem.cb, pThis->HeadersOutput.uData.Mem.cbAllocated));2985 3003 } 2986 3004 } … … 3004 3022 3005 3023 3024 RTR3DECL(const char *) RTHttpMethodName(RTHTTPMETHOD enmMethod) 3025 { 3026 switch (enmMethod) 3027 { 3028 case RTHTTPMETHOD_INVALID: return "invalid"; 3029 case RTHTTPMETHOD_GET: return "GET"; 3030 case RTHTTPMETHOD_PUT: return "PUT"; 3031 case RTHTTPMETHOD_POST: return "POST"; 3032 case RTHTTPMETHOD_PATCH: return "PATCH"; 3033 case RTHTTPMETHOD_DELETE: return "DELETE"; 3034 case RTHTTPMETHOD_HEAD: return "HEAD"; 3035 case RTHTTPMETHOD_OPTIONS: return "OPTIONS"; 3036 case RTHTTPMETHOD_TRACE: return "TRACE"; 3037 3038 case RTHTTPMETHOD_END: 3039 case RTHTTPMETHOD_32BIT_HACK: 3040 break; 3041 } 3042 return "unknown"; 3043 } 3044 3045 3006 3046 /********************************************************************************************************************************* 3007 3047 * Callback APIs. *
Note:
See TracChangeset
for help on using the changeset viewer.