VirtualBox

Changeset 73699 in vbox for trunk/include


Ignore:
Timestamp:
Aug 15, 2018 8:26:03 PM (6 years ago)
Author:
vboxsync
Message:

http-curl.cpp: add a few thin wrappers for some curl options.

File:
1 edited

Legend:

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

    r73334 r73699  
    6060
    6161/**
     62 * Resets a HTTP client instance.
     63 *
     64 * @returns iprt status code.
     65 *
     66 * @param   hHttp      Handle to the HTTP interface.
     67 */
     68RTR3DECL(int) RTHttpReset(RTHTTP hHttp);
     69
     70/**
    6271 * Destroys a HTTP client instance.
    6372 *
     
    310319RTR3DECL(int) RTHttpSetDownloadProgressCallback(RTHTTP hHttp, PRTHTTPDOWNLDPROGRCALLBACK pfnDownloadProgress, void *pvUser);
    311320
     321// ----8<--------8<---- XXX: uwe: quick and dirty curl wrappers for OCI
     322
     323typedef DECLCALLBACK(size_t) RTHTTPREADCALLBACK(void *pbDst, size_t cbItem, size_t cItems, void *pvUser);
     324typedef RTHTTPREADCALLBACK *PRTHTTPREADCALLBACK;
     325
     326#define RT_HTTP_READCALLBACK_ABORT 0x10000000 /* CURL_READFUNC_ABORT */
     327
     328RTR3DECL(int) RTHttpSetReadCallback(RTHTTP hHttp, PRTHTTPREADCALLBACK pfnRead, void *pvUser);
     329
     330
     331typedef DECLCALLBACK(size_t) RTHTTPWRITECALLBACK(char *pbSrc, size_t cbItem, size_t cItems, void *pvUser);
     332typedef RTHTTPWRITECALLBACK *PRTHTTPWRITECALLBACK;
     333
     334RTR3DECL(int) RTHttpSetWriteCallback(RTHTTP hHttp, PRTHTTPWRITECALLBACK pfnWrite, void *pvUser);
     335RTR3DECL(int) RTHttpSetWriteHeaderCallback(RTHTTP hHttp, PRTHTTPWRITECALLBACK pfnWrite, void *pvUser);
     336
     337
     338/* these are thin wrappers for setting one or a few related curl options */
     339RTR3DECL(int) RTHttpRawSetUrl(RTHTTP hHttp, const char *pszUrl);
     340
     341RTR3DECL(int) RTHttpRawSetGet(RTHTTP hHttp);
     342RTR3DECL(int) RTHttpRawSetHead(RTHTTP hHttp);
     343RTR3DECL(int) RTHttpRawSetPost(RTHTTP hHttp);
     344RTR3DECL(int) RTHttpRawSetPut(RTHTTP hHttp);
     345RTR3DECL(int) RTHttpRawSetDelete(RTHTTP hHttp);
     346RTR3DECL(int) RTHttpRawSetCustomRequest(RTHTTP hHttp, const char *pszVerb);
     347
     348RTR3DECL(int) RTHttpRawSetPostFields(RTHTTP hHttp, const void *pv, size_t cb);
     349RTR3DECL(int) RTHttpRawSetInfileSize(RTHTTP hHttp, RTFOFF cb);
     350
     351RTR3DECL(int) RTHttpRawSetVerbose(RTHTTP hHttp, bool fValue);
     352RTR3DECL(int) RTHttpRawSetTimeout(RTHTTP hHttp, long sec);
     353
     354RTR3DECL(int) RTHttpRawPerform(RTHTTP hHttp);
     355
     356RTR3DECL(int) RTHttpRawGetResponseCode(RTHTTP hHttp, long *plCode);
    312357
    313358/** @} */
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