VirtualBox

Changeset 78648 in vbox for trunk/include/VBox


Ignore:
Timestamp:
May 22, 2019 9:30:34 AM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Update.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r78581 r78648  
    329329};
    330330
     331/**
     332 * Structure for keeping Shared Clipboard meta data.
     333 *
     334 * For URI transfers this represents a string list with the file object root entries in it.
     335 */
     336typedef struct _SHAREDCLIPBOARDMETADATA
     337{
     338    /** Actual meta data block. */
     339    void  *pvMeta;
     340    /** Total size (in bytes) of the allocated meta data block .*/
     341    size_t cbMeta;
     342    /** How many bytes are being used in the meta data block. */
     343    size_t cbUsed;
     344} SHAREDCLIPBOARDMETADATA, *PSHAREDCLIPBOARDMETADATA;
     345
     346int SharedClipboardMetaDataInit(PSHAREDCLIPBOARDMETADATA pMeta);
     347void SharedClipboardMetaDataDestroy(PSHAREDCLIPBOARDMETADATA pMeta);
     348int SharedClipboardMetaDataAdd(PSHAREDCLIPBOARDMETADATA pMeta, const void *pvDataAdd, uint32_t cbDataAdd);
     349int SharedClipboardMetaDataResize(PSHAREDCLIPBOARDMETADATA pMeta, size_t cbNewSize);
     350size_t SharedClipboardMetaDataGetUsed(PSHAREDCLIPBOARDMETADATA pMeta);
     351size_t SharedClipboardMetaDataGetSize(PSHAREDCLIPBOARDMETADATA pMeta);
     352const void *SharedClipboardMetaDataRaw(PSHAREDCLIPBOARDMETADATA pMeta);
     353
    331354#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_uri_h */
    332355
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r78624 r78648  
    202202} VBoxClipboardWriteDataHdrMsg;
    203203
    204 typedef struct _VBOXCLIPBOARDWRITEDATACHUNK
    205 {
    206     /** Data block buffer. */
    207     void                       *pvData;
    208     /** Size (in bytes) of data block. */
    209     uint32_t                    cbData;
    210     /** (Rolling) Checksum. Not yet implemented. */
    211     void                       *pvChecksum;
    212     /** Size (in bytes) of checksum. Not yet implemented. */
    213     uint32_t                    cbChecksum;
    214 } VBOXCLIPBOARDWRITEDATACHUNK, *PVBOXCLIPBOARDWRITEDATACHUNK;
     204#define VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_DATA_HDR 12
    215205
    216206/**
     
    236226} VBoxClipboardWriteDataChunkMsg;
    237227
     228#define VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_DATA_CHUNK 5
     229
    238230/**
    239231 * Sends a directory entry.
     
    255247    HGCMFunctionParameter fMode;        /* OUT uint32_t */
    256248} VBoxClipboardWriteDirMsg;
     249
     250#define VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_DIR 4
    257251
    258252/**
     
    280274} VBoxClipboardWriteFileHdrMsg;
    281275
     276#define VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_FILE_HDR 6
     277
    282278/**
    283279 * Sends data of a file entry.
     
    303299} VBoxClipboardWriteFileDataMsg;
    304300
     301#define VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_FILE_DATA 5
     302
    305303/**
    306304 * Sends an error event.
     
    340338    CB_MAGIC_CLIPBOARD_WRITE_ERROR      = VBOX_CLIPBOARD_CB_MAGIC_MAKE(VBOX_SHARED_CLIPBOARD_FN_WRITE_ERROR, 0)
    341339};
    342 
    343 typedef struct _VBOXCLIPBOARDCBHEADERDATA
    344 {
    345     /** Magic number to identify the structure. */
    346     uint32_t                    uMagic;
    347     /** Context ID to identify callback data. */
    348     uint32_t                    uContextID;
    349 } VBOXCLIPBOARDCBHEADERDATA, *PVBOXCLIPBOARDCBHEADERDATA;
    350340
    351341/**
     
    382372} VBOXCLIPBOARDDATAHDR, *PVBOXCLIPBOARDDATAHDR;
    383373
    384 typedef struct _VBOXCLIPBOARDCBWRITEDATAHDRDATA
    385 {
    386     /** Callback data header. */
    387     VBOXCLIPBOARDCBHEADERDATA         hdr;
    388     /** Actual header data. */
    389     VBOXCLIPBOARDDATAHDR              data;
    390 } VBOXCLIPBOARDCBWRITEDATAHDRDATA, *PVBOXCLIPBOARDCBWRITEDATAHDRDATA;
    391 
    392 typedef struct VBOXCLIPBOARDSNDDATA
     374typedef struct _VBOXCLIPBOARDDATACHUNK
    393375{
    394376    /** Data block buffer. */
     
    400382    /** Size (in bytes) of checksum. Not yet implemented. */
    401383    uint32_t                    cbChecksum;
    402 } VBOXCLIPBOARDSNDDATA, *PVBOXCLIPBOARDSNDDATA;
    403 
    404 typedef struct VBOXCLIPBOARDCBSNDDATADATA
    405 {
    406     /** Callback data header. */
    407     VBOXCLIPBOARDCBHEADERDATA         hdr;
    408     /** Actual data. */
    409     VBOXCLIPBOARDSNDDATA              data;
    410 } VBOXCLIPBOARDCBDATADATA, *PVBOXCLIPBOARDCBSNDDATADATA;
    411 
    412 typedef struct _VBOXCLIPBOARDCBWRITEDIRDATA
    413 {
    414     /** Callback data header. */
    415     VBOXCLIPBOARDCBHEADERDATA   hdr;
     384} VBOXCLIPBOARDDATACHUNK, *PVBOXCLIPBOARDDATACHUNK;
     385
     386typedef struct _VBOXCLIPBOARDDIRDATA
     387{
    416388    /** Directory path. */
    417389    char                       *pszPath;
     
    420392    /** Directory creation mode. */
    421393    uint32_t                    fMode;
    422 } VBOXCLIPBOARDCBWRITEDIRDATA, *PVBOXCLIPBOARDCBWRITEDIRDATA;
    423 
    424 typedef struct _VBOXCLIPBOARDCBWRITEFILEHDRDATA
    425 {
    426     /** Callback data header. */
    427     VBOXCLIPBOARDCBHEADERDATA   hdr;
     394} VBOXCLIPBOARDDIRDATA, *PVBOXCLIPBOARDDIRDATA;
     395
     396typedef struct _VBOXCLIPBOARDFILEHDR
     397{
    428398    /** File path (name). */
    429399    char                       *pszFilePath;
     
    436406    /** Additional flags. Not used at the moment. */
    437407    uint32_t                    fFlags;
    438 } VBOXCLIPBOARDCBWRITEFILEHDRDATA, *PVBOXCLIPBOARDCBWRITEFILEHDRDATA;
    439 
    440 typedef struct _VBOXCLIPBOARDCBWRITEFILEDATADATA
    441 {
    442     /** Callback data header. */
    443     VBOXCLIPBOARDCBHEADERDATA   hdr;
     408} VBOXCLIPBOARDFILEHDR, *PVBOXCLIPBOARDFILEHDR;
     409
     410typedef struct _VBOXCLIPBOARDFILEDATA
     411{
    444412    /** Current file data chunk. */
    445413    void                       *pvData;
     
    450418    /** Size (in bytes) of current data chunk. */
    451419    uint32_t                    cbChecksum;
    452 } VBOXCLIPBOARDCBWRITEFILEDATADATA, *PVBOXCLIPBOARDCBWRITEFILEDATADATA;
    453 
    454 typedef struct _VBOXCLIPBOARDCBEVTERRORDATA
    455 {
    456     /** Callback data header. */
    457     VBOXCLIPBOARDCBHEADERDATA   hdr;
     420} VBOXCLIPBOARDFILEDATA, *PVBOXCLIPBOARDFILEDATA;
     421
     422typedef struct _VBOXCLIPBOARDERRORDATA
     423{
    458424    int32_t                     rc;
    459 } VBOXCLIPBOARDCBEVTERRORDATA, *PVBOXCLIPBOARDCBEVTERRORDATA;
     425} VBOXCLIPBOARDERRORDATA, *PVBOXCLIPBOARDERRORDATA;
    460426# endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    461427
     
    464430void VBoxSvcClipboardUnlock(void);
    465431
     432bool VBoxSvcClipboardDataHdrIsValid(PVBOXCLIPBOARDDATAHDR pData);
     433bool VBoxSvcClipboardDataChunkIsValid(PVBOXCLIPBOARDDATACHUNK pData);
     434bool VBoxSvcClipboardDirDataIsValid(PVBOXCLIPBOARDDIRDATA pData);
     435bool VBoxSvcClipboardFileHdrIsValid(PVBOXCLIPBOARDFILEHDR pFileHdr, PVBOXCLIPBOARDDATAHDR pDataHdr);
     436bool VBoxSvcClipboardFileDataIsValid(PVBOXCLIPBOARDFILEDATA pData, PVBOXCLIPBOARDDATAHDR pDataHdr);
     437
    466438#endif /* !VBOX_INCLUDED_HostServices_VBoxClipboardSvc_h */
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