VirtualBox

Ignore:
Timestamp:
Dec 9, 2020 1:53:36 PM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: Documentation. bugref:9874

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp

    r87061 r87063  
    7676*   Internal functions                                                                                                           *
    7777*********************************************************************************************************************************/
     78
     79/**
     80 * Return the HTTP server transfer for a specific transfer ID.
     81 *
     82 * @returns Pointer to HTTP server transfer if found, NULL if not found.
     83 * @param   pSrv                HTTP server instance.
     84 * @param   idTransfer          Transfer ID to return HTTP server transfer for.
     85 */
    7886static PSHCLHTTPSERVERTRANSFER shClTransferHttpServerGetTransferById(PSHCLHTTPSERVER pSrv, SHCLTRANSFERID idTransfer)
    7987{
     
    206214*   Public functions                                                                                                             *
    207215*********************************************************************************************************************************/
     216
     217/**
     218 * Creates a new Shared Clipboard HTTP server instance, extended version.
     219 *
     220 * @returns VBox status code.
     221 * @param   pSrv                HTTP server instance to create.
     222 * @param   uPort               TCP port number to use.
     223 */
    208224int ShClTransferHttpServerCreateEx(PSHCLHTTPSERVER pSrv, uint16_t uPort)
    209225{
     
    249265}
    250266
     267/**
     268 * Creates a new Shared Clipboard HTTP server instance.
     269 *
     270 * This does automatic probing of TCP ports if one already is being used.
     271 *
     272 * @returns VBox status code.
     273 * @param   pSrv                HTTP server instance to create.
     274 * @param   puPort              Where to return the TCP port number being used on success.
     275 */
    251276int ShClTransferHttpServerCreate(PSHCLHTTPSERVER pSrv, uint16_t *puPort)
    252277{
     
    281306}
    282307
     308/**
     309 * Destroys a Shared Clipboard HTTP server instance.
     310 *
     311 * @returns VBox status code.
     312 * @param   pSrv                HTTP server instance to destroy.
     313 */
    283314int ShClTransferHttpServerDestroy(PSHCLHTTPSERVER pSrv)
    284315{
     
    302333}
    303334
     335/**
     336 * Registers a Shared Clipboard transfer to a HTTP server instance.
     337 *
     338 * @returns VBox status code.
     339 * @param   pSrv                HTTP server instance to register transfer for.
     340 * @param   pTransfer           Transfer to register.
     341 */
    304342int ShClTransferHttpServerRegisterTransfer(PSHCLHTTPSERVER pSrv, PSHCLTRANSFER pTransfer)
    305343{
     
    341379}
    342380
     381/**
     382 * Unregisters a formerly registered Shared Clipboard transfer.
     383 *
     384 * @returns VBox status code.
     385 * @param   pSrv                HTTP server instance to unregister transfer from.
     386 * @param   pTransfer           Transfer to unregister.
     387 */
    343388int ShClTransferHttpServerUnregisterTransfer(PSHCLHTTPSERVER pSrv, PSHCLTRANSFER pTransfer)
    344389{
     
    361406            pSrvTx = NULL;
    362407
     408            Assert(pSrv->cTransfers);
    363409            pSrv->cTransfers--;
    364410
     
    372418}
    373419
     420/**
     421 * Returns whether a specific transfer ID is registered with a HTTP server instance or not.
     422 *
     423 * @returns \c true if the transfer ID is registered, \c false if not.
     424 * @param   pSrv                HTTP server instance.
     425 * @param   idTransfer          Transfer ID to check for.
     426 */
    374427bool ShClTransferHttpServerHasTransfer(PSHCLHTTPSERVER pSrv, SHCLTRANSFERID idTransfer)
    375428{
     
    385438}
    386439
     440/**
     441 * Returns the used TCP port number of a HTTP server instance.
     442 *
     443 * @returns TCP port number. 0 if not specified yet.
     444 * @param   pSrv                HTTP server instance to return port for.
     445 */
    387446uint16_t ShClTransferHttpServerGetPort(PSHCLHTTPSERVER pSrv)
    388447{
     
    398457}
    399458
     459/**
     460 * Returns the number of registered HTTP server transfers of a HTTP server instance.
     461 *
     462 * @returns Number of registered transfers.
     463 * @param   pSrv                HTTP server instance to return registered transfers for.
     464 */
    400465uint32_t ShClTransferHttpServerGetTransferCount(PSHCLHTTPSERVER pSrv)
    401466{
     
    411476}
    412477
     478/**
     479 * Returns the host name (scheme) of a HTTP server instance.
     480 *
     481 * @param   pSrv                HTTP server instance to return host name (scheme) for.
     482 *
     483 * @returns Host name (scheme).
     484 */
    413485static const char *shClTransferHttpServerGetHost(PSHCLHTTPSERVER pSrv)
    414486{
     
    417489}
    418490
     491/**
     492 * Returns an allocated string with a HTTP server instance's address.
     493 *
     494 * @returns Allocated string with a HTTP server instance's address, or NULL on OOM.
     495 *          Needs to be free'd by the caller using RTStrFree().
     496 * @param   pSrv                HTTP server instance to return address for.
     497 */
    419498char *ShClTransferHttpServerGetAddressA(PSHCLHTTPSERVER pSrv)
    420499{
     
    430509}
    431510
     511/**
     512 * Returns an allocated string with the URL of a given Shared Clipboard transfer ID.
     513 *
     514 * @returns Allocated string with the URL of a given Shared Clipboard transfer ID, or NULL if not found.
     515 *          Needs to be free'd by the caller using RTStrFree().
     516 * @param   pSrv                HTTP server instance to return URL for.
     517 */
    432518char *ShClTransferHttpServerGetUrlA(PSHCLHTTPSERVER pSrv, SHCLTRANSFERID idTransfer)
    433519{
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