VirtualBox

Changeset 100522 in vbox for trunk/include


Ignore:
Timestamp:
Jul 11, 2023 4:52:03 PM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Resolved a @todo: Removed SHCLOBJHANDLEINFO and only use SHCLTRANSFEROBJ instead, as both structures almost were the same. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/SharedClipboard-transfers.h

    r100468 r100522  
    519519
    520520/**
    521  * Structure for a Shared Clipboard transfer object.
    522  */
    523 typedef struct _SHCLTRANSFEROBJ
    524 {
    525     /** Handle of the object. */
    526     SHCLOBJHANDLE        uHandle;
    527     /** Absolute (local) path of the object. Source-style path. */
    528     char                *pszPathAbs;
    529     /** Object information. */
    530     SHCLFSOBJINFO        objInfo;
    531     /** Object type. */
    532     SHCLSOURCE           enmSource;
    533     /** Current state. */
    534     SHCLTRANSFEROBJSTATE State;
    535 } SHCLTRANSFEROBJ;
    536 /** Pointer to a Shared Clipboard transfer object. */
    537 typedef SHCLTRANSFEROBJ *PSHCLTRANSFEROBJ;
    538 
    539 /**
    540521 * Enumeration for specifying a Shared Clipboard object type.
    541522 */
     
    553534    SHCLOBJTYPE_32BIT_SIZE_HACK = 0x7fffffff
    554535} SHCLOBJTYPE;
     536
     537/**
     538 * Structure for a single Shared Clipboard transfer object.
     539 */
     540typedef struct _SHCLTRANSFEROBJ
     541{
     542    /** The list node. */
     543    RTLISTNODE           Node;
     544    /** Handle of the object. */
     545    SHCLOBJHANDLE        hObj;
     546    /** Absolute (local) path of the object. Source-style path. */
     547    char                *pszPathLocalAbs;
     548    /** Object file system information. */
     549    SHCLFSOBJINFO        objInfo;
     550    /** Source the object originates from. */
     551    SHCLSOURCE           enmSource;
     552    /** Current state. */
     553    SHCLTRANSFEROBJSTATE State;
     554    /** Type of object handle. */
     555    SHCLOBJTYPE          enmType;
     556    /** Data union, based on \a enmType. */
     557    union
     558    {
     559        /** Local data. */
     560        struct
     561        {
     562            union
     563            {
     564                RTDIR  hDir;
     565                RTFILE hFile;
     566            };
     567        } Local;
     568    } u;
     569} SHCLTRANSFEROBJ;
     570/** Pointer to a Shared Clipboard transfer object. */
     571typedef SHCLTRANSFEROBJ *PSHCLTRANSFEROBJ;
    555572
    556573/**
     
    586603
    587604/**
    588  * Structure for keeping transfer object handle information.
    589  * This is using to map own (local) handles to the underlying file system.
    590  */
    591 typedef struct _SHCLOBJHANDLEINFO
    592 {
    593     /** The list node. */
    594     RTLISTNODE     Node;
    595     /** The object's handle. */
    596     SHCLOBJHANDLE  hObj;
    597     /** Type of object handle. */
    598     SHCLOBJTYPE    enmType;
    599     /** Absolute local path of the object. */
    600     char          *pszPathLocalAbs;
    601     /** Data union, based on \a enmType. */
    602     union
    603     {
    604         /** Local data. */
    605         struct
    606         {
    607             union
    608             {
    609                 RTDIR  hDir;
    610                 RTFILE hFile;
    611             };
    612         } Local;
    613     } u;
    614 } SHCLOBJHANDLEINFO;
    615 /** Pointer to a Shared Clipboard transfer object handle. */
    616 typedef SHCLOBJHANDLEINFO *PSHCLOBJHANDLEINFO;
    617 
    618 /**
    619605 * Structure for maintaining an Shared Clipboard transfer state.
    620606 * Everything in here will be part of a saved state (later).
     
    853839    DECLCALLBACKMEMBER(void,  pfnOnStarted,(PSHCLTRANSFERCALLBACKCTX pCbCtx));
    854840    /**
    855      * Called when the transfer has been complete.
     841     * Called when the transfer has been completed.
    856842     *
    857843     * @param   pCbCtx              Pointer to callback context to use.
     
    11061092bool ShClTransferObjCtxIsValid(PSHCLCLIENTTRANSFEROBJCTX pObjCtx);
    11071093
    1108 int ShClTransferObjHandleInfoInit(PSHCLOBJHANDLEINFO pInfo);
    1109 void ShClTransferObjHandleInfoDestroy(PSHCLOBJHANDLEINFO pInfo);
     1094int ShClTransferObjInit(PSHCLTRANSFEROBJ pObj);
     1095void ShClTransferObjDestroy(PSHCLTRANSFEROBJ pObj);
    11101096
    11111097int ShClTransferObjOpenParmsInit(PSHCLOBJOPENCREATEPARMS pParms);
     
    11181104int ShClTransferObjRead(PSHCLTRANSFER pTransfer, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t fFlags, uint32_t *pcbRead);
    11191105int ShClTransferObjWrite(PSHCLTRANSFER pTransfer, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t fFlags, uint32_t *pcbWritten);
    1120 PSHCLOBJHANDLEINFO ShClTransferObjGet(PSHCLTRANSFER pTransfer, SHCLOBJHANDLE hObj);
     1106PSHCLTRANSFEROBJ ShClTransferObjGet(PSHCLTRANSFER pTransfer, SHCLOBJHANDLE hObj);
    11211107
    11221108PSHCLOBJDATACHUNK ShClTransferObjDataChunkDup(PSHCLOBJDATACHUNK pDataChunk);
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