VirtualBox

Changeset 74222 in vbox for trunk/include


Ignore:
Timestamp:
Sep 12, 2018 1:30:00 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/http: Implemented header callbacks. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/http.h

    r74203 r74222  
    536536 * @returns IPRT status code.
    537537 * @param   hHttp           The HTTP client handle.
    538  * @param   pszField        The field name.
     538 * @param   uMatchWord      Match word constructed by RTHTTP_MAKE_HDR_MATCH_WORD
     539 * @param   pchField        The field name (not zero terminated).
    539540 * @param   cchField        The length of the field.
    540  * @param   pszValue        The field value.
     541 * @param   pchValue        The field value (not zero terminated).
    541542 * @param   cchValue        The length of the value.
    542543 * @param   pvUser          The user parameter.
    543544 */
    544 typedef DECLCALLBACK(int) FNRTHTTPHEADERCALLBACK(RTHTTP hHttp, const char *pszField, size_t cchField,
    545                                                  const char *pszValue, size_t cchValue, void *pvUser);
     545typedef DECLCALLBACK(int) FNRTHTTPHEADERCALLBACK(RTHTTP hHttp, uint32_t uMatchWord, const char *pchField, size_t cchField,
     546                                                 const char *pchValue, size_t cchValue, void *pvUser);
    546547/** Pointer to a header field consumer callback. */
    547548typedef FNRTHTTPHEADERCALLBACK *PFNRTHTTPHEADERCALLBACK;
     549
     550/**
     551 * Forms a fast header match word.
     552 *
     553 * @returns Fast header match word.
     554 * @param   a_cchField      The length of the header field name.
     555 * @param   a_chLower1      The first character in the name, lowercased.
     556 * @param   a_chLower2      The second character in the name, lowercased.
     557 * @param   a_chLower3      The third character in the name, lowercased.
     558 */
     559#define RTHTTP_MAKE_HDR_MATCH_WORD(a_cchField, a_chLower1, a_chLower2, a_chLower3)   \
     560    RT_MAKE_U32_FROM_U8(a_cchField, a_chLower1, a_chLower2, a_chLower3)
    548561
    549562/**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette