VirtualBox

Changeset 58217 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Oct 13, 2015 3:36:47 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103369
Message:

Runtime/http-curl: added RTHttpSetDownloadProgressCallback()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/http-curl.cpp

    r58206 r58217  
    150150    /** Download size hint set by the progress callback. */
    151151    uint64_t            cbDownloadHint;
     152    /** Callback called during download. */
     153    PRTHTTPDOWNLDPROGRCALLBACK pfnDownloadProgress;
     154    /** User pointer parameter for pfnDownloadProgress. */
     155    void               *pvDownloadProgressUser;
    152156} RTHTTPINTERNAL;
    153157/** Pointer to an internal HTTP client instance. */
     
    21212125    pThis->cbDownloadHint = (uint64_t)rdTotalDownload;
    21222126
     2127    if (pThis->pfnDownloadProgress)
     2128        pThis->pfnDownloadProgress(pThis, pThis->pvDownloadProgressUser, (uint64_t)rdTotalDownload, (uint64_t)rdDownloaded);
     2129
    21232130    return pThis->fAbort ? 1 : 0;
    21242131}
     
    25052512}
    25062513
     2514
     2515RTR3DECL(int) RTHttpSetDownloadProgressCallback(RTHTTP hHttp, PRTHTTPDOWNLDPROGRCALLBACK pfnDownloadProgress, void *pvUser)
     2516{
     2517    PRTHTTPINTERNAL pThis = hHttp;
     2518    RTHTTP_VALID_RETURN(pThis);
     2519
     2520    pThis->pfnDownloadProgress = pfnDownloadProgress;
     2521    pThis->pvDownloadProgressUser = pvUser;
     2522    return VINF_SUCCESS;
     2523}
Note: See TracChangeset for help on using the changeset viewer.

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