VirtualBox

Changeset 99937 in vbox for trunk/include/iprt/http-server.h


Ignore:
Timestamp:
May 23, 2023 3:38:52 PM (19 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Added new testcase for the HTTP server in combination with the Shared Clipboard API, various updates and general improvements. bugref:9437

File:
1 edited

Legend:

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

    r98103 r99937  
    7373    /** Request body data. */
    7474    RTHTTPBODY       Body;
     75    /** User-supplied (opaque) pointer.
     76     *  Can be used for faster lookups between callbacks. */
     77    void            *pvUser;
    7578} RTHTTPSERVERREQ;
    7679/** Pointer to a HTTP client request. */
     
    134137{
    135138    /**
    136      * Called before a given URL will be retrieved by the GET method.
     139     * Called before beginning to process a request. Guaranteed.
     140     *
     141     * @returns VBox status code.
     142     * @param   pData           Pointer to HTTP callback data.
     143     * @param   pReq            Pointer to request to handle.
     144     */
     145    DECLCALLBACKMEMBER(int, pfnRequestBegin,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq));
     146    /**
     147     * Called after processing a request. Guaranteed.
     148     *
     149     * @returns VBox status code.
     150     * @param   pData           Pointer to HTTP callback data.
     151     * @param   pReq            Pointer to request to handle.
     152     */
     153    DECLCALLBACKMEMBER(int, pfnRequestEnd,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq));
     154    /**
     155     * Opens a resource for a GET request.
     156     *
     157     * Will be called as as a second function for a GET request.
    137158     *
    138159     * Note: High level function, not being called when pfnOnGetRequest is implemented.
     
    145166    DECLCALLBACKMEMBER(int, pfnOpen,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void **ppvHandle));
    146167    /**
    147      * Called when a given URL will be retrieved by the GET method.
     168     * Reads a resource for a GET request.
    148169     *
    149170     * Note:  High level function, not being called when pfnOnGetRequest is implemented.
     
    152173     * @returns VBox status code.
    153174     * @param   pData           Pointer to HTTP callback data.
     175     * @param   pReq            Pointer to request to handle.
    154176     * @param   pvHandle        Opaque handle for object identification.
    155177     * @param   pvBuf           Pointer to buffer where to store the read data.
     
    157179     * @param   pcbRead         Where to return the amount (in bytes) of read data. Optional and can be NULL.
    158180     */
    159     DECLCALLBACKMEMBER(int, pfnRead,(PRTHTTPCALLBACKDATA pData, void *pvHandle, void *pvBuf, size_t cbBuf, size_t *pcbRead));
    160     /**
    161      * Called when a given URL is done retrieving by the GET method.
     181    DECLCALLBACKMEMBER(int, pfnRead,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void *pvHandle, void *pvBuf, size_t cbBuf, size_t *pcbRead));
     182    /**
     183     * Closes a resouce for a GET a request.
    162184     *
    163185     * Note: High level function, not being called when pfnOnGetRequest is implemented.
     
    165187     * @returns VBox status code.
    166188     * @param   pData           Pointer to HTTP callback data.
    167      * @param   pszUrl          URL to handle.
     189     * @param   pReq            Pointer to request to handle.
    168190     * @param   pvHandle        Opaque handle for object identification.
    169191     */
    170     DECLCALLBACKMEMBER(int, pfnClose,(PRTHTTPCALLBACKDATA pData, void *pvHandle));
     192    DECLCALLBACKMEMBER(int, pfnClose,(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void *pvHandle));
    171193    /**
    172194     * Queries information about a given URL.
    173195     *
    174      * Will be called with GET or HEAD request.
     196     * Will be called as first function for a GET or HEAD request.
     197     *
     198     * Note: High level function, not being called when pfnOnGetRequest is implemented.*
    175199     *
    176200     * @returns VBox status code.
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