VirtualBox

Changeset 80662 in vbox


Ignore:
Timestamp:
Sep 9, 2019 8:43:14 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Renaming (SHAREDCLIPBOARD -> SHCL and VBOXCLIPBOARD -> SHCL).

Location:
trunk
Files:
29 edited

Legend:

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

    r80459 r80662  
    4848
    4949/** A Shared Clipboard list handle. */
    50 typedef uint64_t SHAREDCLIPBOARDLISTHANDLE;
     50typedef uint64_t SHCLLISTHANDLE;
    5151/** Pointer to a Shared Clipboard list handle. */
    52 typedef SHAREDCLIPBOARDLISTHANDLE *PSHAREDCLIPBOARDLISTHANDLE;
     52typedef SHCLLISTHANDLE *PSHCLLISTHANDLE;
    5353
    5454/** Specifies an invalid Shared Clipboard list handle. */
    55 #define SHAREDCLIPBOARDLISTHANDLE_INVALID        ((SHAREDCLIPBOARDLISTHANDLE)~0LL)
     55#define SHCLLISTHANDLE_INVALID        ((SHCLLISTHANDLE)~0LL)
    5656
    5757/** A Shared Clipboard object handle. */
    58 typedef uint64_t SHAREDCLIPBOARDOBJHANDLE;
     58typedef uint64_t SHCLOBJHANDLE;
    5959/** Pointer to a Shared Clipboard object handle. */
    60 typedef SHAREDCLIPBOARDOBJHANDLE *PSHAREDCLIPBOARDOBJHANDLE;
     60typedef SHCLOBJHANDLE *PSHCLOBJHANDLE;
    6161
    6262/** Specifies an invalid Shared Clipboard object handle. */
    63 #define SHAREDCLIPBOARDOBJHANDLE_INVALID         ((SHAREDCLIPBOARDOBJHANDLE)~0LL)
     63#define SHCLOBJHANDLE_INVALID         ((SHCLOBJHANDLE)~0LL)
    6464
    6565/** @} */
     
    7070
    7171/** No flags. Initialization value. */
    72 #define SHAREDCLIPBOARD_OBJ_CF_NONE                  (0x00000000)
     72#define SHCL_OBJ_CF_NONE                  (0x00000000)
    7373
    7474/** Lookup only the object, do not return a handle. All other flags are ignored. */
    75 #define SHAREDCLIPBOARD_OBJ_CF_LOOKUP                (0x00000001)
     75#define SHCL_OBJ_CF_LOOKUP                (0x00000001)
    7676
    7777/** Create/open a directory. */
    78 #define SHAREDCLIPBOARD_OBJ_CF_DIRECTORY             (0x00000004)
     78#define SHCL_OBJ_CF_DIRECTORY             (0x00000004)
    7979
    8080/** Open/create action to do if object exists
     
    8787 *  FILE_EXISTS with NIL handle.
    8888 */
    89 #define SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS      (0x000000F0)
    90 #define SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW         (0x00000F00)
     89#define SHCL_OBJ_CF_ACT_MASK_IF_EXISTS      (0x000000F0)
     90#define SHCL_OBJ_CF_ACT_MASK_IF_NEW         (0x00000F00)
    9191
    9292/** What to do if object exists. */
    93 #define SHAREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS      (0x00000000)
    94 #define SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS      (0x00000010)
    95 #define SHAREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS   (0x00000020)
    96 #define SHAREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS (0x00000030)
     93#define SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS      (0x00000000)
     94#define SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS      (0x00000010)
     95#define SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS   (0x00000020)
     96#define SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS (0x00000030)
    9797
    9898/** What to do if object does not exist. */
    99 #define SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW       (0x00000000)
    100 #define SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW         (0x00000100)
     99#define SHCL_OBJ_CF_ACT_CREATE_IF_NEW       (0x00000000)
     100#define SHCL_OBJ_CF_ACT_FAIL_IF_NEW         (0x00000100)
    101101
    102102/** Read/write requested access for the object. */
    103 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_RW          (0x00003000)
     103#define SHCL_OBJ_CF_ACCESS_MASK_RW          (0x00003000)
    104104
    105105/** No access requested. */
    106 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_NONE             (0x00000000)
     106#define SHCL_OBJ_CF_ACCESS_NONE             (0x00000000)
    107107/** Read access requested. */
    108 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ             (0x00001000)
     108#define SHCL_OBJ_CF_ACCESS_READ             (0x00001000)
    109109/** Write access requested. */
    110 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_WRITE            (0x00002000)
     110#define SHCL_OBJ_CF_ACCESS_WRITE            (0x00002000)
    111111/** Read/Write access requested. */
    112 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE        (SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ | SHAREDCLIPBOARD_OBJ_CF_ACCESS_WRITE)
     112#define SHCL_OBJ_CF_ACCESS_READWRITE        (SHCL_OBJ_CF_ACCESS_READ | SHCL_OBJ_CF_ACCESS_WRITE)
    113113
    114114/** Requested share access for the object. */
    115 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_DENY        (0x0000C000)
     115#define SHCL_OBJ_CF_ACCESS_MASK_DENY        (0x0000C000)
    116116
    117117/** Allow any access. */
    118 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE         (0x00000000)
     118#define SHCL_OBJ_CF_ACCESS_DENYNONE         (0x00000000)
    119119/** Do not allow read. */
    120 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD         (0x00004000)
     120#define SHCL_OBJ_CF_ACCESS_DENYREAD         (0x00004000)
    121121/** Do not allow write. */
    122 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE        (0x00008000)
     122#define SHCL_OBJ_CF_ACCESS_DENYWRITE        (0x00008000)
    123123/** Do not allow access. */
    124 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL          (SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD | SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE)
     124#define SHCL_OBJ_CF_ACCESS_DENYALL          (SHCL_OBJ_CF_ACCESS_DENYREAD | SHCL_OBJ_CF_ACCESS_DENYWRITE)
    125125
    126126/** Requested access to attributes of the object. */
    127 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR        (0x00030000)
     127#define SHCL_OBJ_CF_ACCESS_MASK_ATTR        (0x00030000)
    128128
    129129/** No access requested. */
    130 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE        (0x00000000)
     130#define SHCL_OBJ_CF_ACCESS_ATTR_NONE        (0x00000000)
    131131/** Read access requested. */
    132 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ        (0x00010000)
     132#define SHCL_OBJ_CF_ACCESS_ATTR_READ        (0x00010000)
    133133/** Write access requested. */
    134 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE       (0x00020000)
     134#define SHCL_OBJ_CF_ACCESS_ATTR_WRITE       (0x00020000)
    135135/** Read/Write access requested. */
    136 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE   (SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ | SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE)
    137 
    138 /** The file is opened in append mode. Ignored if SHAREDCLIPBOARD_OBJ_CF_ACCESS_WRITE is not set. */
    139 #define SHAREDCLIPBOARD_OBJ_CF_ACCESS_APPEND           (0x00040000)
     136#define SHCL_OBJ_CF_ACCESS_ATTR_READWRITE   (SHCL_OBJ_CF_ACCESS_ATTR_READ | SHCL_OBJ_CF_ACCESS_ATTR_WRITE)
     137
     138/** The file is opened in append mode. Ignored if SHCL_OBJ_CF_ACCESS_WRITE is not set. */
     139#define SHCL_OBJ_CF_ACCESS_APPEND           (0x00040000)
    140140
    141141/** @} */
     
    146146 *  trying to open the object.
    147147 */
    148 typedef enum _SHAREDCLIPBOARDCREATERESULT
    149 {
    150     SHAREDCLIPBOARD_CREATERESULT_NONE,
     148typedef enum _SHCLCREATERESULT
     149{
     150    SHCL_CREATERESULT_NONE,
    151151    /** Specified path does not exist. */
    152     SHAREDCLIPBOARD_CREATERESULT_PATH_NOT_FOUND,
     152    SHCL_CREATERESULT_PATH_NOT_FOUND,
    153153    /** Path to file exists, but the last component does not. */
    154     SHAREDCLIPBOARD_CREATERESULT_FILE_NOT_FOUND,
     154    SHCL_CREATERESULT_FILE_NOT_FOUND,
    155155    /** File already exists and either has been opened or not. */
    156     SHAREDCLIPBOARD_CREATERESULT_FILE_EXISTS,
     156    SHCL_CREATERESULT_FILE_EXISTS,
    157157    /** New file was created. */
    158     SHAREDCLIPBOARD_CREATERESULT_FILE_CREATED,
     158    SHCL_CREATERESULT_FILE_CREATED,
    159159    /** Existing file was replaced or overwritten. */
    160     SHAREDCLIPBOARD_CREATERESULT_FILE_REPLACED,
     160    SHCL_CREATERESULT_FILE_REPLACED,
    161161    /** Blow the type up to 32-bit. */
    162     SHAREDCLIPBOARD_CREATERESULT_32BIT_HACK = 0x7fffffff
    163 } SHAREDCLIPBOARDCREATERESULT;
    164 AssertCompile(SHAREDCLIPBOARD_CREATERESULT_NONE == 0);
    165 AssertCompileSize(SHAREDCLIPBOARDCREATERESULT, 4);
    166 
    167 /**
    168  * The available additional information in a SHAREDCLIPBOARDFSOBJATTR object.
    169  */
    170 typedef enum _SHAREDCLIPBOARDFSOBJATTRADD
     162    SHCL_CREATERESULT_32BIT_HACK = 0x7fffffff
     163} SHCLCREATERESULT;
     164AssertCompile(SHCL_CREATERESULT_NONE == 0);
     165AssertCompileSize(SHCLCREATERESULT, 4);
     166
     167/**
     168 * The available additional information in a SHCLFSOBJATTR object.
     169 */
     170typedef enum _SHCLFSOBJATTRADD
    171171{
    172172    /** No additional information is available / requested. */
    173     SHAREDCLIPBOARDFSOBJATTRADD_NOTHING = 1,
    174     /** The additional unix attributes (SHAREDCLIPBOARDFSOBJATTR::u::Unix) are
     173    SHCLFSOBJATTRADD_NOTHING = 1,
     174    /** The additional unix attributes (SHCLFSOBJATTR::u::Unix) are
    175175     *  available / requested. */
    176     SHAREDCLIPBOARDFSOBJATTRADD_UNIX,
    177     /** The additional extended attribute size (SHAREDCLIPBOARDFSOBJATTR::u::EASize) is
     176    SHCLFSOBJATTRADD_UNIX,
     177    /** The additional extended attribute size (SHCLFSOBJATTR::u::EASize) is
    178178     *  available / requested. */
    179     SHAREDCLIPBOARDFSOBJATTRADD_EASIZE,
     179    SHCLFSOBJATTRADD_EASIZE,
    180180    /** The last valid item (inclusive).
    181      * The valid range is SHAREDCLIPBOARDFSOBJATTRADD_NOTHING thru
    182      * SHAREDCLIPBOARDFSOBJATTRADD_LAST. */
    183     SHAREDCLIPBOARDFSOBJATTRADD_LAST = SHAREDCLIPBOARDFSOBJATTRADD_EASIZE,
     181     * The valid range is SHCLFSOBJATTRADD_NOTHING thru
     182     * SHCLFSOBJATTRADD_LAST. */
     183    SHCLFSOBJATTRADD_LAST = SHCLFSOBJATTRADD_EASIZE,
    184184
    185185    /** The usual 32-bit hack. */
    186     SHAREDCLIPBOARDFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff
    187 } SHAREDCLIPBOARDFSOBJATTRADD;
     186    SHCLFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff
     187} SHCLFSOBJATTRADD;
    188188
    189189
     
    200200 */
    201201#pragma pack(1)
    202 typedef struct _SHAREDCLIPBOARDFSOBJATTR
     202typedef struct _SHCLFSOBJATTR
    203203{
    204204    /** Mode flags (st_mode). RTFS_UNIX_*, RTFS_TYPE_*, and RTFS_DOS_*.
     
    206206     *          Fortuntately, these are depending on windows, dos and unix
    207207     *          standard values, so this shouldn't be much of a pain. */
    208     RTFMODE         fMode;
     208    RTFMODE          fMode;
    209209
    210210    /** The additional attributes available. */
    211     SHAREDCLIPBOARDFSOBJATTRADD enmAdditional;
     211    SHCLFSOBJATTRADD enmAdditional;
    212212
    213213    /**
     
    217217     * data as it is provided by the underlying OS.
    218218     */
    219     union SHAREDCLIPBOARDFSOBJATTRUNION
     219    union SHCLFSOBJATTRUNION
    220220    {
    221221        /** Additional Unix Attributes
    222          * These are available when SHAREDCLIPBOARDFSOBJATTRADD is set in fUnix.
     222         * These are available when SHCLFSOBJATTRADD is set in fUnix.
    223223         */
    224          struct SHAREDCLIPBOARDFSOBJATTRUNIX
     224         struct SHCLFSOBJATTRUNIX
    225225         {
    226226            /** The user owning the filesystem object (st_uid).
     
    265265         * Extended attribute size.
    266266         */
    267         struct SHAREDCLIPBOARDFSOBJATTREASIZE
     267        struct SHCLFSOBJATTREASIZE
    268268        {
    269269            /** Size of EAs. */
     
    271271        } EASize;
    272272    } u;
    273 } SHAREDCLIPBOARDFSOBJATTR;
     273} SHCLFSOBJATTR;
    274274#pragma pack()
    275 AssertCompileSize(SHAREDCLIPBOARDFSOBJATTR, 44);
     275AssertCompileSize(SHCLFSOBJATTR, 44);
    276276/** Pointer to a shared folder filesystem object attributes structure. */
    277 typedef SHAREDCLIPBOARDFSOBJATTR *PSHAREDCLIPBOARDFSOBJATTR;
     277typedef SHCLFSOBJATTR *PSHCLFSOBJATTR;
    278278/** Pointer to a const shared folder filesystem object attributes structure. */
    279 typedef const SHAREDCLIPBOARDFSOBJATTR *PCSHAREDCLIPBOARDFSOBJATTR;
     279typedef const SHCLFSOBJATTR *PCSHCLFSOBJATTR;
    280280
    281281/**
     
    283283 */
    284284#pragma pack(1)
    285 typedef struct _SHAREDCLIPBOARDFSOBJINFO
     285typedef struct _SHCLFSOBJINFO
    286286{
    287287   /** Logical size (st_size).
     
    315315
    316316   /** Attributes. */
    317    SHAREDCLIPBOARDFSOBJATTR Attr;
    318 
    319 } SHAREDCLIPBOARDFSOBJINFO;
     317   SHCLFSOBJATTR Attr;
     318
     319} SHCLFSOBJINFO;
    320320#pragma pack()
    321 AssertCompileSize(SHAREDCLIPBOARDFSOBJINFO, 92);
     321AssertCompileSize(SHCLFSOBJINFO, 92);
    322322/** Pointer to a shared folder filesystem object information structure. */
    323 typedef SHAREDCLIPBOARDFSOBJINFO *PSHAREDCLIPBOARDFSOBJINFO;
     323typedef SHCLFSOBJINFO *PSHCLFSOBJINFO;
    324324/** Pointer to a const shared folder filesystem object information
    325325 *  structure. */
    326 typedef const SHAREDCLIPBOARDFSOBJINFO *PCSHAREDCLIPBOARDFSOBJINFO;
     326typedef const SHCLFSOBJINFO *PCSHCLFSOBJINFO;
    327327
    328328#pragma pack(1)
     
    330330 * Structure for keeping object open/create parameters.
    331331 */
    332 typedef struct _VBOXCLIPBOARDOBJOPENCREATEPARMS
     332typedef struct _SHCLOBJOPENCREATEPARMS
    333333{
    334334    /** Path to object to open / create. */
     
    336336    /** Size (in bytes) of path to to object. */
    337337    uint32_t                    cbPath;
    338     /** SHAREDCLIPBOARD_OBJ_CF_* */
     338    /** SHCL_OBJ_CF_* */
    339339    uint32_t                    fCreate;
    340340    /**
     
    342342     * returned actual attributes of opened/created object.
    343343     */
    344     SHAREDCLIPBOARDFSOBJINFO    ObjInfo;
    345 } VBOXCLIPBOARDOBJOPENCREATEPARMS, *PVBOXCLIPBOARDOBJOPENCREATEPARMS;
     344    SHCLFSOBJINFO    ObjInfo;
     345} SHCLOBJOPENCREATEPARMS, *PSHCLOBJOPENCREATEPARMS;
    346346#pragma pack()
    347347
     
    349349 * Structure for keeping a reply message.
    350350 */
    351 typedef struct _VBOXCLIPBOARDREPLY
    352 {
    353     /** Message type of type VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_XXX. */
     351typedef struct _SHCLREPLY
     352{
     353    /** Message type of type VBOX_SHCL_REPLYMSGTYPE_XXX. */
    354354    uint32_t uType;
    355355    /** IPRT result of overall operation. Note: int vs. uint32! */
     
    359359        struct
    360360        {
    361             SHAREDCLIPBOARDLISTHANDLE uHandle;
     361            SHCLLISTHANDLE uHandle;
    362362        } ListOpen;
    363363        struct
    364364        {
    365             SHAREDCLIPBOARDOBJHANDLE uHandle;
     365            SHCLOBJHANDLE uHandle;
    366366        } ObjOpen;
    367367        struct
    368368        {
    369             SHAREDCLIPBOARDOBJHANDLE uHandle;
     369            SHCLOBJHANDLE uHandle;
    370370        } ObjClose;
    371371    } u;
     
    374374    /** Payload size (in bytes). */
    375375    uint32_t cbPayload;
    376 } VBOXCLIPBOARDREPLY, *PVBOXCLIPBOARDREPLY;
    377 
    378 struct _VBOXCLIPBOARDLISTENTRY;
    379 typedef _VBOXCLIPBOARDLISTENTRY VBOXCLIPBOARDLISTENTRY;
     376} SHCLREPLY, *PSHCLREPLY;
     377
     378struct _SHCLLISTENTRY;
     379typedef _SHCLLISTENTRY SHCLLISTENTRY;
    380380
    381381/** Defines a single root list entry. Currently the same as a regular list entry. */
    382 typedef VBOXCLIPBOARDLISTENTRY VBOXCLIPBOARDROOTLISTENTRY;
     382typedef SHCLLISTENTRY SHCLROOTLISTENTRY;
    383383/** Defines a pointer to a single root list entry. Currently the same as a regular list entry pointer. */
    384 typedef VBOXCLIPBOARDROOTLISTENTRY *PVBOXCLIPBOARDROOTLISTENTRY;
     384typedef SHCLROOTLISTENTRY *PSHCLROOTLISTENTRY;
    385385
    386386/**
    387387 * Structure for keeping Shared Clipboard root list headers.
    388388 */
    389 typedef struct _VBOXCLIPBOARDROOTLISTHDR
     389typedef struct _SHCLROOTLISTHDR
    390390{
    391391    /** Roots listing flags; unused at the moment. */
     
    393393    /** Number of root list entries. */
    394394    uint32_t                cRoots;
    395 } VBOXCLIPBOARDROOTLISTHDR, *PVBOXCLIPBOARDROOTLISTHDR;
     395} SHCLROOTLISTHDR, *PSHCLROOTLISTHDR;
    396396
    397397/**
    398398 * Structure for maintaining a Shared Clipboard root list.
    399399 */
    400 typedef struct _VBOXCLIPBOARDROOTLIST
     400typedef struct _SHCLROOTLIST
    401401{
    402402    /** Root list header. */
    403     VBOXCLIPBOARDROOTLISTHDR    Hdr;
     403    SHCLROOTLISTHDR    Hdr;
    404404    /** Root list entries. */
    405     VBOXCLIPBOARDROOTLISTENTRY *paEntries;
    406 } VBOXCLIPBOARDROOTLIST, *PVBOXCLIPBOARDROOTLIST;
     405    SHCLROOTLISTENTRY *paEntries;
     406} SHCLROOTLIST, *PSHCLROOTLIST;
    407407
    408408/**
    409409 * Structure for maintaining Shared Clipboard list open paramters.
    410410 */
    411 typedef struct _VBOXCLIPBOARDLISTOPENPARMS
    412 {
    413     /** Listing flags (see VBOX_SHAREDCLIPBOARD_LIST_FLAG_XXX). */
     411typedef struct _SHCLLISTOPENPARMS
     412{
     413    /** Listing flags (see VBOX_SHCL_LIST_FLAG_XXX). */
    414414    uint32_t fList;
    415415    /** Size (in bytes) of the filter string. */
     
    421421    /** Listing path (absolute). If empty or NULL the listing's root path will be opened. */
    422422    char    *pszPath;
    423 } VBOXCLIPBOARDLISTOPENPARMS, *PVBOXCLIPBOARDLISTOPENPARMS;
     423} SHCLLISTOPENPARMS, *PSHCLLISTOPENPARMS;
    424424
    425425/**
    426426 * Structure for keeping a Shared Clipboard list header.
    427427 */
    428 typedef struct _VBOXCLIPBOARDLISTHDR
     428typedef struct _SHCLLISTHDR
    429429{
    430430    /** Feature flag(s). Not being used atm. */
     
    434434    /** Total size (in bytes) returned. */
    435435    uint64_t cbTotalSize;
    436 } VBOXCLIPBOARDLISTHDR, *PVBOXCLIPBOARDLISTHDR;
     436} SHCLLISTHDR, *PSHCLLISTHDR;
    437437
    438438/**
    439439 * Structure for a Shared Clipboard list entry.
    440440 */
    441 typedef struct _VBOXCLIPBOARDLISTENTRY
     441typedef struct _SHCLLISTENTRY
    442442{
    443443    /** Entry name. */
     
    451451    /** Data of the actual list entry. */
    452452    void    *pvInfo;
    453 } VBOXCLIPBOARDLISTENTRY, *PVBOXCLIPBOARDLISTENTRY;
     453} SHCLLISTENTRY, *PSHCLLISTENTRY;
    454454
    455455/** Maximum length (in UTF-8 characters) of a list entry name. */
    456 #define VBOXCLIPBOARDLISTENTRY_MAX_NAME     RTPATH_MAX /** @todo Improve this to be more dynamic. */
     456#define SHCLLISTENTRY_MAX_NAME     RTPATH_MAX /** @todo Improve this to be more dynamic. */
    457457
    458458/**
    459459 * Structure for maintaining a Shared Clipboard list.
    460460 */
    461 typedef struct _VBOXCLIPBOARDLIST
     461typedef struct _SHCLLIST
    462462{
    463463    /** List header. */
    464     VBOXCLIPBOARDLISTHDR        Hdr;
     464    SHCLLISTHDR        Hdr;
    465465    /** List entries. */
    466     VBOXCLIPBOARDROOTLISTENTRY *paEntries;
    467 } VBOXCLIPBOARDLIST, *PVBOXCLIPBOARDLIST;
     466    SHCLROOTLISTENTRY *paEntries;
     467} SHCLLIST, *PSHCLLIST;
    468468
    469469/**
    470470 * Structure for keeping a Shared Clipboard object data chunk.
    471471 */
    472 typedef struct _VBOXCLIPBOARDOBJDATACHUNK
     472typedef struct _SHCLOBJDATACHUNK
    473473{
    474474    /** Handle of object this data chunk is related to. */
     
    478478    /** Size (in bytes) of data chunk. */
    479479    uint32_t  cbData;
    480 } VBOXCLIPBOARDOBJDATACHUNK, *PVBOXCLIPBOARDOBJDATACHUNK;
     480} SHCLOBJDATACHUNK, *PSHCLOBJDATACHUNK;
    481481
    482482/**
    483483 * Enumeration for specifying a clipboard area object type.
    484484 */
    485 typedef enum _SHAREDCLIPBOARDAREAOBJTYPE
     485typedef enum _SHCLAREAOBJTYPE
    486486{
    487487    /** Unknown object type; do not use. */
    488     SHAREDCLIPBOARDAREAOBJTYPE_UNKNOWN = 0,
     488    SHCLAREAOBJTYPE_UNKNOWN = 0,
    489489    /** Object is a directory. */
    490     SHAREDCLIPBOARDAREAOBJTYPE_DIR,
     490    SHCLAREAOBJTYPE_DIR,
    491491    /** Object is a file. */
    492     SHAREDCLIPBOARDAREAOBJTYPE_FILE,
     492    SHCLAREAOBJTYPE_FILE,
    493493    /** Object is a symbolic link. */
    494     SHAREDCLIPBOARDAREAOBJTYPE_SYMLINK,
     494    SHCLAREAOBJTYPE_SYMLINK,
    495495    /** The usual 32-bit hack. */
    496     SHAREDCLIPBOARDAREAOBJTYPE_32Bit_Hack = 0x7fffffff
    497 } SHAREDCLIPBOARDAREAOBJTYPE;
     496    SHCLAREAOBJTYPE_32Bit_Hack = 0x7fffffff
     497} SHCLAREAOBJTYPE;
    498498
    499499/** Clipboard area ID. A valid area is >= 1.
    500500 *  If 0 is specified, the last (most recent) area is meant.
    501501 *  Set to UINT32_MAX if not initialized. */
    502 typedef uint32_t SHAREDCLIPBOARDAREAID;
     502typedef uint32_t SHCLAREAID;
    503503
    504504/** Defines a non-initialized (nil) clipboard area. */
    505 #define NIL_SHAREDCLIPBOARDAREAID       UINT32_MAX
     505#define NIL_SHCLAREAID       UINT32_MAX
    506506
    507507/** SharedClipboardArea open flags. */
    508 typedef uint32_t SHAREDCLIPBOARDAREAOPENFLAGS;
     508typedef uint32_t SHCLAREAOPENFLAGS;
    509509
    510510/** No clipboard area open flags specified. */
    511 #define SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE               0
     511#define SHCLAREA_OPEN_FLAGS_NONE               0
    512512/** The clipboard area must not exist yet. */
    513 #define SHAREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST     RT_BIT(0)
     513#define SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST     RT_BIT(0)
    514514/** Mask of all valid clipboard area open flags.  */
    515 #define SHAREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK         0x1
     515#define SHCLAREA_OPEN_FLAGS_VALID_MASK         0x1
    516516
    517517/** Defines a clipboard area object state. */
    518 typedef uint32_t SHAREDCLIPBOARDAREAOBJSTATE;
     518typedef uint32_t SHCLAREAOBJSTATE;
    519519
    520520/** No object state set. */
    521 #define SHAREDCLIPBOARDAREAOBJSTATE_NONE                0
     521#define SHCLAREAOBJSTATE_NONE                0
    522522/** The object is considered as being complete (e.g. serialized). */
    523 #define SHAREDCLIPBOARDAREAOBJSTATE_COMPLETE            RT_BIT(0)
     523#define SHCLAREAOBJSTATE_COMPLETE            RT_BIT(0)
    524524
    525525/**
     
    529529 *       is too heavy for this purpose.
    530530 */
    531 typedef struct _SHAREDCLIPBOARDAREAOBJ
    532 {
    533     SHAREDCLIPBOARDAREAOBJTYPE  enmType;
    534     SHAREDCLIPBOARDAREAOBJSTATE fState;
    535 } SHAREDCLIPBOARDAREAOBJ, *PSHAREDCLIPBOARDAREAOBJ;
     531typedef struct _SHCLAREAOBJ
     532{
     533    SHCLAREAOBJTYPE  enmType;
     534    SHCLAREAOBJSTATE fState;
     535} SHCLAREAOBJ, *PSHCLAREAOBJ;
    536536
    537537/**
     
    548548
    549549    SharedClipboardArea(void);
    550     SharedClipboardArea(const char *pszPath, SHAREDCLIPBOARDAREAID uID = NIL_SHAREDCLIPBOARDAREAID,
    551                         SHAREDCLIPBOARDAREAOPENFLAGS fFlags = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);
     550    SharedClipboardArea(const char *pszPath, SHCLAREAID uID = NIL_SHCLAREAID,
     551                        SHCLAREAOPENFLAGS fFlags = SHCLAREA_OPEN_FLAGS_NONE);
    552552    virtual ~SharedClipboardArea(void);
    553553
     
    560560    int Unlock(void);
    561561
    562     int AddObject(const char *pszPath, const SHAREDCLIPBOARDAREAOBJ &Obj);
    563     int GetObject(const char *pszPath, PSHAREDCLIPBOARDAREAOBJ pObj);
     562    int AddObject(const char *pszPath, const SHCLAREAOBJ &Obj);
     563    int GetObject(const char *pszPath, PSHCLAREAOBJ pObj);
    564564
    565565    int Close(void);
    566566    bool IsOpen(void) const;
    567     int OpenEx(const char *pszPath, SHAREDCLIPBOARDAREAID uID = NIL_SHAREDCLIPBOARDAREAID,
    568                SHAREDCLIPBOARDAREAOPENFLAGS fFlags = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);
    569     int OpenTemp(SHAREDCLIPBOARDAREAID uID = NIL_SHAREDCLIPBOARDAREAID,
    570                  SHAREDCLIPBOARDAREAOPENFLAGS fFlags = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);
    571     SHAREDCLIPBOARDAREAID GetID(void) const;
     567    int OpenEx(const char *pszPath, SHCLAREAID uID = NIL_SHCLAREAID,
     568               SHCLAREAOPENFLAGS fFlags = SHCLAREA_OPEN_FLAGS_NONE);
     569    int OpenTemp(SHCLAREAID uID = NIL_SHCLAREAID,
     570                 SHCLAREAOPENFLAGS fFlags = SHCLAREA_OPEN_FLAGS_NONE);
     571    SHCLAREAID GetID(void) const;
    572572    const char *GetDirAbs(void) const;
    573573    uint32_t GetRefCount(void);
     
    578578public:
    579579
    580     static int PathConstruct(const char *pszBase, SHAREDCLIPBOARDAREAID uID, char *pszPath, size_t cbPath);
     580    static int PathConstruct(const char *pszBase, SHCLAREAID uID, char *pszPath, size_t cbPath);
    581581
    582582protected:
     
    588588protected:
    589589
    590     typedef std::map<RTCString, SHAREDCLIPBOARDAREAOBJ> SharedClipboardAreaFsObjMap;
     590    typedef std::map<RTCString, SHCLAREAOBJ> SharedClipboardAreaFsObjMap;
    591591
    592592    /** Creation timestamp (in ms). */
     
    605605    SharedClipboardAreaFsObjMap  m_mapObj;
    606606    /** Associated clipboard area ID. */
    607     SHAREDCLIPBOARDAREAID        m_uID;
     607    SHCLAREAID        m_uID;
    608608};
    609609
     
    611611int SharedClipboardPathSanitize(char *pszPath, size_t cbPath);
    612612
    613 PVBOXCLIPBOARDROOTLIST SharedClipboardURIRootListAlloc(void);
    614 void SharedClipboardURIRootListFree(PVBOXCLIPBOARDROOTLIST pRootList);
    615 
    616 PVBOXCLIPBOARDROOTLISTHDR SharedClipboardURIRootListHdrDup(PVBOXCLIPBOARDROOTLISTHDR pRoots);
    617 int SharedClipboardURIRootListHdrInit(PVBOXCLIPBOARDROOTLISTHDR pRoots);
    618 void SharedClipboardURIRootListHdrDestroy(PVBOXCLIPBOARDROOTLISTHDR pRoots);
    619 
    620 int SharedClipboardURIRootListEntryCopy(PVBOXCLIPBOARDROOTLISTENTRY pDst, PVBOXCLIPBOARDROOTLISTENTRY pSrc);
    621 PVBOXCLIPBOARDROOTLISTENTRY SharedClipboardURIRootListEntryDup(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry);
    622 void SharedClipboardURIRootListEntryDestroy(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry);
    623 
    624 int SharedClipboardURIListHdrAlloc(PVBOXCLIPBOARDLISTHDR *ppListHdr);
    625 void SharedClipboardURIListHdrFree(PVBOXCLIPBOARDLISTHDR pListHdr);
    626 PVBOXCLIPBOARDLISTHDR SharedClipboardURIListHdrDup(PVBOXCLIPBOARDLISTHDR pListHdr);
    627 int SharedClipboardURIListHdrInit(PVBOXCLIPBOARDLISTHDR pListHdr);
    628 void SharedClipboardURIListHdrDestroy(PVBOXCLIPBOARDLISTHDR pListHdr);
    629 void SharedClipboardURIListHdrFree(PVBOXCLIPBOARDLISTHDR pListHdr);
    630 void SharedClipboardURIListHdrReset(PVBOXCLIPBOARDLISTHDR pListHdr);
    631 bool SharedClipboardURIListHdrIsValid(PVBOXCLIPBOARDLISTHDR pListHdr);
    632 
    633 int SharedClipboardURIListOpenParmsCopy(PVBOXCLIPBOARDLISTOPENPARMS pDst, PVBOXCLIPBOARDLISTOPENPARMS pSrc);
    634 PVBOXCLIPBOARDLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PVBOXCLIPBOARDLISTOPENPARMS pParms);
    635 int SharedClipboardURIListOpenParmsInit(PVBOXCLIPBOARDLISTOPENPARMS pParms);
    636 void SharedClipboardURIListOpenParmsDestroy(PVBOXCLIPBOARDLISTOPENPARMS pParms);
    637 
    638 int SharedClipboardURIListEntryAlloc(PVBOXCLIPBOARDLISTENTRY *ppListEntry);
    639 void SharedClipboardURIListEntryFree(PVBOXCLIPBOARDLISTENTRY pListEntry);
    640 int SharedClipboardURIListEntryCopy(PVBOXCLIPBOARDLISTENTRY pDst, PVBOXCLIPBOARDLISTENTRY pSrc);
    641 PVBOXCLIPBOARDLISTENTRY SharedClipboardURIListEntryDup(PVBOXCLIPBOARDLISTENTRY pListEntry);
    642 int SharedClipboardURIListEntryInit(PVBOXCLIPBOARDLISTENTRY pListEntry);
    643 void SharedClipboardURIListEntryDestroy(PVBOXCLIPBOARDLISTENTRY pListEntry);
    644 bool SharedClipboardURIListEntryIsValid(PVBOXCLIPBOARDLISTENTRY pListEntry);
     613PSHCLROOTLIST SharedClipboardURIRootListAlloc(void);
     614void SharedClipboardURIRootListFree(PSHCLROOTLIST pRootList);
     615
     616PSHCLROOTLISTHDR SharedClipboardURIRootListHdrDup(PSHCLROOTLISTHDR pRoots);
     617int SharedClipboardURIRootListHdrInit(PSHCLROOTLISTHDR pRoots);
     618void SharedClipboardURIRootListHdrDestroy(PSHCLROOTLISTHDR pRoots);
     619
     620int SharedClipboardURIRootListEntryCopy(PSHCLROOTLISTENTRY pDst, PSHCLROOTLISTENTRY pSrc);
     621PSHCLROOTLISTENTRY SharedClipboardURIRootListEntryDup(PSHCLROOTLISTENTRY pRootListEntry);
     622void SharedClipboardURIRootListEntryDestroy(PSHCLROOTLISTENTRY pRootListEntry);
     623
     624int SharedClipboardURIListHdrAlloc(PSHCLLISTHDR *ppListHdr);
     625void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr);
     626PSHCLLISTHDR SharedClipboardURIListHdrDup(PSHCLLISTHDR pListHdr);
     627int SharedClipboardURIListHdrInit(PSHCLLISTHDR pListHdr);
     628void SharedClipboardURIListHdrDestroy(PSHCLLISTHDR pListHdr);
     629void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr);
     630void SharedClipboardURIListHdrReset(PSHCLLISTHDR pListHdr);
     631bool SharedClipboardURIListHdrIsValid(PSHCLLISTHDR pListHdr);
     632
     633int SharedClipboardURIListOpenParmsCopy(PSHCLLISTOPENPARMS pDst, PSHCLLISTOPENPARMS pSrc);
     634PSHCLLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PSHCLLISTOPENPARMS pParms);
     635int SharedClipboardURIListOpenParmsInit(PSHCLLISTOPENPARMS pParms);
     636void SharedClipboardURIListOpenParmsDestroy(PSHCLLISTOPENPARMS pParms);
     637
     638int SharedClipboardURIListEntryAlloc(PSHCLLISTENTRY *ppListEntry);
     639void SharedClipboardURIListEntryFree(PSHCLLISTENTRY pListEntry);
     640int SharedClipboardURIListEntryCopy(PSHCLLISTENTRY pDst, PSHCLLISTENTRY pSrc);
     641PSHCLLISTENTRY SharedClipboardURIListEntryDup(PSHCLLISTENTRY pListEntry);
     642int SharedClipboardURIListEntryInit(PSHCLLISTENTRY pListEntry);
     643void SharedClipboardURIListEntryDestroy(PSHCLLISTENTRY pListEntry);
     644bool SharedClipboardURIListEntryIsValid(PSHCLLISTENTRY pListEntry);
    645645
    646646/**
    647647 * Enumeration specifying an URI transfer direction.
    648648 */
    649 typedef enum _SHAREDCLIPBOARDURITRANSFERDIR
     649typedef enum _SHCLURITRANSFERDIR
    650650{
    651651    /** Unknown transfer directory. */
    652     SHAREDCLIPBOARDURITRANSFERDIR_UNKNOWN = 0,
     652    SHCLURITRANSFERDIR_UNKNOWN = 0,
    653653    /** Read transfer (from source). */
    654     SHAREDCLIPBOARDURITRANSFERDIR_READ,
     654    SHCLURITRANSFERDIR_READ,
    655655    /** Write transfer (to target). */
    656     SHAREDCLIPBOARDURITRANSFERDIR_WRITE,
     656    SHCLURITRANSFERDIR_WRITE,
    657657    /** The usual 32-bit hack. */
    658     SHAREDCLIPBOARDURITRANSFERDIR_32BIT_HACK = 0x7fffffff
    659 } SHAREDCLIPBOARDURITRANSFERDIR;
    660 
    661 struct _SHAREDCLIPBOARDURITRANSFER;
    662 typedef struct _SHAREDCLIPBOARDURITRANSFER SHAREDCLIPBOARDURITRANSFER;
     658    SHCLURITRANSFERDIR_32BIT_HACK = 0x7fffffff
     659} SHCLURITRANSFERDIR;
     660
     661struct _SHCLURITRANSFER;
     662typedef struct _SHCLURITRANSFER SHCLURITRANSFER;
    663663
    664664/**
    665665 * Structure for handling a single URI object context.
    666666 */
    667 typedef struct _SHAREDCLIPBOARDCLIENTURIOBJCTX
    668 {
    669     SHAREDCLIPBOARDURITRANSFER *pTransfer;
    670     SHAREDCLIPBOARDOBJHANDLE    uHandle;
    671 } SHAREDCLIPBOARDCLIENTURIOBJCTX, *PSHAREDCLIPBOARDCLIENTURIOBJCTX;
    672 
    673 typedef struct _SHAREDCLIPBOARDURITRANSFEROBJSTATE
     667typedef struct _SHCLCLIENTURIOBJCTX
     668{
     669    SHCLURITRANSFER *pTransfer;
     670    SHCLOBJHANDLE    uHandle;
     671} SHCLCLIENTURIOBJCTX, *PSHCLCLIENTURIOBJCTX;
     672
     673typedef struct _SHCLURITRANSFEROBJSTATE
    674674{
    675675    uint64_t                    cbProcessed;
    676 } SHAREDCLIPBOARDURITRANSFEROBJSTATE, *PSHAREDCLIPBOARDURITRANSFEROBJSTATE;
    677 
    678 typedef struct _SHAREDCLIPBOARDURITRANSFEROBJ
    679 {
    680     SHAREDCLIPBOARDOBJHANDLE           uHandle;
     676} SHCLURITRANSFEROBJSTATE, *PSHCLURITRANSFEROBJSTATE;
     677
     678typedef struct _SHCLURITRANSFEROBJ
     679{
     680    SHCLOBJHANDLE           uHandle;
    681681    char                              *pszPathAbs;
    682     SHAREDCLIPBOARDFSOBJINFO           objInfo;
    683     SHAREDCLIPBOARDSOURCE              enmSource;
    684     SHAREDCLIPBOARDURITRANSFEROBJSTATE State;
    685 } SHAREDCLIPBOARDURITRANSFEROBJ, *PSHAREDCLIPBOARDURITRANSFEROBJ;
     682    SHCLFSOBJINFO           objInfo;
     683    SHCLSOURCE              enmSource;
     684    SHCLURITRANSFEROBJSTATE State;
     685} SHCLURITRANSFEROBJ, *PSHCLURITRANSFEROBJ;
    686686
    687687/** No status set. */
    688 #define SHAREDCLIPBOARDURITRANSFERSTATUS_NONE           0
     688#define SHCLURITRANSFERSTATUS_NONE           0
    689689/** The transfer has been announced but is not running yet. */
    690 #define SHAREDCLIPBOARDURITRANSFERSTATUS_READY          1
     690#define SHCLURITRANSFERSTATUS_READY          1
    691691/** The transfer is active and running. */
    692 #define SHAREDCLIPBOARDURITRANSFERSTATUS_RUNNING        2
     692#define SHCLURITRANSFERSTATUS_RUNNING        2
    693693/** The transfer has been completed. */
    694 #define SHAREDCLIPBOARDURITRANSFERSTATUS_COMPLETED      3
     694#define SHCLURITRANSFERSTATUS_COMPLETED      3
    695695/** The transfer has been canceled. */
    696 #define SHAREDCLIPBOARDURITRANSFERSTATUS_CANCELED       4
     696#define SHCLURITRANSFERSTATUS_CANCELED       4
    697697/** The transfer ran into an unrecoverable error. */
    698 #define SHAREDCLIPBOARDURITRANSFERSTATUS_ERROR          5
     698#define SHCLURITRANSFERSTATUS_ERROR          5
    699699
    700700/** Defines a transfer status. */
    701 typedef uint32_t SHAREDCLIPBOARDURITRANSFERSTATUS;
     701typedef uint32_t SHCLURITRANSFERSTATUS;
    702702
    703703/**
    704704 * Enumeration for specifying a Shared Clipboard object type.
    705705 */
    706 typedef enum _SHAREDCLIPBOARDURIOBJTYPE
     706typedef enum _SHCLURIOBJTYPE
    707707{
    708708    /** Invalid object type. */
    709     SHAREDCLIPBOARDURIOBJTYPE_INVALID = 0,
     709    SHCLURIOBJTYPE_INVALID = 0,
    710710    /** Object is a directory. */
    711     SHAREDCLIPBOARDURIOBJTYPE_DIRECTORY,
     711    SHCLURIOBJTYPE_DIRECTORY,
    712712    /** Object is a file. */
    713     SHAREDCLIPBOARDURIOBJTYPE_FILE,
     713    SHCLURIOBJTYPE_FILE,
    714714    /** Object is a symbolic link. */
    715     SHAREDCLIPBOARDURIOBJTYPE_SYMLINK,
     715    SHCLURIOBJTYPE_SYMLINK,
    716716    /** The usual 32-bit hack. */
    717     SHAREDCLIPBOARDURIOBJTYPE_32BIT_SIZE_HACK = 0x7fffffff
    718 } SHAREDCLIPBOARDURIOBJTYPE;
     717    SHCLURIOBJTYPE_32BIT_SIZE_HACK = 0x7fffffff
     718} SHCLURIOBJTYPE;
    719719
    720720/**
     
    722722 * This is using to map own (local) handles to the underlying file system.
    723723 */
    724 typedef struct _SHAREDCLIPBOARDURILISTHANDLEINFO
     724typedef struct _SHCLURILISTHANDLEINFO
    725725{
    726726    /** The list node. */
    727727    RTLISTNODE                    Node;
    728728    /** The list's handle. */
    729     SHAREDCLIPBOARDLISTHANDLE     hList;
     729    SHCLLISTHANDLE     hList;
    730730    /** Type of list handle. */
    731     SHAREDCLIPBOARDURIOBJTYPE     enmType;
     731    SHCLURIOBJTYPE     enmType;
    732732    /** Absolute local path of the list object. */
    733733    char                         *pszPathLocalAbs;
     
    744744        } Local;
    745745    } u;
    746 } SHAREDCLIPBOARDURILISTHANDLEINFO, *PSHAREDCLIPBOARDURILISTHANDLEINFO;
     746} SHCLURILISTHANDLEINFO, *PSHCLURILISTHANDLEINFO;
    747747
    748748/**
     
    750750 * This is using to map own (local) handles to the underlying file system.
    751751 */
    752 typedef struct _SHAREDCLIPBOARDURIOBJHANDLEINFO
     752typedef struct _SHCLURIOBJHANDLEINFO
    753753{
    754754    /** The list node. */
    755755    RTLISTNODE                Node;
    756756    /** The object's handle. */
    757     SHAREDCLIPBOARDOBJHANDLE  hObj;
     757    SHCLOBJHANDLE  hObj;
    758758    /** Type of object handle. */
    759     SHAREDCLIPBOARDURIOBJTYPE enmType;
     759    SHCLURIOBJTYPE enmType;
    760760    /** Absolute local path of the object. */
    761761    char                     *pszPathLocalAbs;
     
    772772        } Local;
    773773    } u;
    774 } SHAREDCLIPBOARDURIOBJHANDLEINFO, *PSHAREDCLIPBOARDURIOBJHANDLEINFO;
     774} SHCLURIOBJHANDLEINFO, *PSHCLURIOBJHANDLEINFO;
    775775
    776776/**
    777777 * Structure for keeping a single root list entry.
    778778 */
    779 typedef struct _SHAREDCLIPBOARDURILISTROOT
     779typedef struct _SHCLURILISTROOT
    780780{
    781781    /** The list node. */
     
    783783    /** Absolute path of entry. */
    784784    char               *pszPathAbs;
    785 } SHAREDCLIPBOARDURILISTROOT, *PSHAREDCLIPBOARDURILISTROOT;
     785} SHCLURILISTROOT, *PSHCLURILISTROOT;
    786786
    787787/**
     
    789789 * Everything in here will be part of a saved state (later).
    790790 */
    791 typedef struct _SHAREDCLIPBOARDURITRANSFERSTATE
     791typedef struct _SHCLURITRANSFERSTATE
    792792{
    793793    /** The transfer's (local) ID. */
    794794    uint16_t                            uID;
    795795    /** The transfer's current status. */
    796     SHAREDCLIPBOARDURITRANSFERSTATUS    enmStatus;
     796    SHCLURITRANSFERSTATUS    enmStatus;
    797797    /** The transfer's direction. */
    798     SHAREDCLIPBOARDURITRANSFERDIR       enmDir;
     798    SHCLURITRANSFERDIR       enmDir;
    799799    /** The transfer's source. */
    800     SHAREDCLIPBOARDSOURCE               enmSource;
    801 } SHAREDCLIPBOARDURITRANSFERSTATE, *PSHAREDCLIPBOARDURITRANSFERSTATE;
    802 
    803 struct _SHAREDCLIPBOARDURITRANSFER;
    804 typedef struct _SHAREDCLIPBOARDURITRANSFER *PSHAREDCLIPBOARDURITRANSFER;
     800    SHCLSOURCE               enmSource;
     801} SHCLURITRANSFERSTATE, *PSHCLURITRANSFERSTATE;
     802
     803struct _SHCLURITRANSFER;
     804typedef struct _SHCLURITRANSFER *PSHCLURITRANSFER;
    805805
    806806/**
     
    808808 * This is handed in to the provider implementation callbacks.
    809809 */
    810     typedef struct _SHAREDCLIPBOARDPROVIDERCTX
     810    typedef struct _SHCLPROVIDERCTX
    811811{
    812812    /** Pointer to the related URI transfer. */
    813     PSHAREDCLIPBOARDURITRANSFER pTransfer;
     813    PSHCLURITRANSFER pTransfer;
    814814    /** User-defined data pointer. Can be NULL if not needed. */
    815815    void                       *pvUser;
    816 } SHAREDCLIPBOARDPROVIDERCTX, *PSHAREDCLIPBOARDPROVIDERCTX;
     816} SHCLPROVIDERCTX, *PSHCLPROVIDERCTX;
    817817
    818818/** Defines an URI clipboard provider function declaration with additional parameters. */
    819 #define SHAREDCLIPBOARDPROVIDERFUNCDECL(a_Name, ...) \
    820     typedef DECLCALLBACK(int) RT_CONCAT(FNSHAREDCLIPBOARDPROVIDER, a_Name)(PSHAREDCLIPBOARDPROVIDERCTX, __VA_ARGS__); \
    821     typedef RT_CONCAT(FNSHAREDCLIPBOARDPROVIDER, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDPROVIDER, a_Name);
     819#define SHCLPROVIDERFUNCDECL(a_Name, ...) \
     820    typedef DECLCALLBACK(int) RT_CONCAT(FNSHCLPROVIDER, a_Name)(PSHCLPROVIDERCTX, __VA_ARGS__); \
     821    typedef RT_CONCAT(FNSHCLPROVIDER, a_Name) RT_CONCAT(*PFNSHCLPROVIDER, a_Name);
    822822
    823823/** Defines an URI clipboard provider function declaration with additional parameters. */
    824 #define SHAREDCLIPBOARDPROVIDERFUNCDECLRET(a_Ret, a_Name, ...) \
    825     typedef DECLCALLBACK(a_Ret) RT_CONCAT(FNSHAREDCLIPBOARDPROVIDER, a_Name)(PSHAREDCLIPBOARDPROVIDERCTX, __VA_ARGS__); \
    826     typedef RT_CONCAT(FNSHAREDCLIPBOARDPROVIDER, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDPROVIDER, a_Name);
     824#define SHCLPROVIDERFUNCDECLRET(a_Ret, a_Name, ...) \
     825    typedef DECLCALLBACK(a_Ret) RT_CONCAT(FNSHCLPROVIDER, a_Name)(PSHCLPROVIDERCTX, __VA_ARGS__); \
     826    typedef RT_CONCAT(FNSHCLPROVIDER, a_Name) RT_CONCAT(*PFNSHCLPROVIDER, a_Name);
    827827
    828828/** Defines an URI clipboard provider function declaration (no additional parameters). */
    829 #define SHAREDCLIPBOARDPROVIDERFUNCDECLVOID(a_Name) \
    830     typedef DECLCALLBACK(int) RT_CONCAT(FNSHAREDCLIPBOARDPROVIDER, a_Name)(PSHAREDCLIPBOARDPROVIDERCTX); \
    831     typedef RT_CONCAT(FNSHAREDCLIPBOARDPROVIDER, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDPROVIDER, a_Name);
     829#define SHCLPROVIDERFUNCDECLVOID(a_Name) \
     830    typedef DECLCALLBACK(int) RT_CONCAT(FNSHCLPROVIDER, a_Name)(PSHCLPROVIDERCTX); \
     831    typedef RT_CONCAT(FNSHCLPROVIDER, a_Name) RT_CONCAT(*PFNSHCLPROVIDER, a_Name);
    832832
    833833/** Declares a URI clipboard provider function member. */
    834 #define SHAREDCLIPBOARDPROVIDERFUNCMEMBER(a_Name, a_Member) \
    835     RT_CONCAT(PFNSHAREDCLIPBOARDPROVIDER, a_Name) a_Member;
    836 
    837 SHAREDCLIPBOARDPROVIDERFUNCDECLVOID(TRANSFEROPEN)
    838 SHAREDCLIPBOARDPROVIDERFUNCDECLVOID(TRANSFERCLOSE)
    839 SHAREDCLIPBOARDPROVIDERFUNCDECL(GETROOTS, PVBOXCLIPBOARDROOTLIST *ppRootList)
    840 SHAREDCLIPBOARDPROVIDERFUNCDECL(LISTOPEN, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList)
    841 SHAREDCLIPBOARDPROVIDERFUNCDECL(LISTCLOSE, SHAREDCLIPBOARDLISTHANDLE hList)
    842 SHAREDCLIPBOARDPROVIDERFUNCDECL(LISTHDRREAD, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)
    843 SHAREDCLIPBOARDPROVIDERFUNCDECL(LISTHDRWRITE, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)
    844 SHAREDCLIPBOARDPROVIDERFUNCDECL(LISTENTRYREAD, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pEntry)
    845 SHAREDCLIPBOARDPROVIDERFUNCDECL(LISTENTRYWRITE, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pEntry)
    846 SHAREDCLIPBOARDPROVIDERFUNCDECL(OBJOPEN, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms, PSHAREDCLIPBOARDOBJHANDLE phObj)
    847 SHAREDCLIPBOARDPROVIDERFUNCDECL(OBJCLOSE, SHAREDCLIPBOARDOBJHANDLE hObj)
    848 SHAREDCLIPBOARDPROVIDERFUNCDECL(OBJREAD, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
    849 SHAREDCLIPBOARDPROVIDERFUNCDECL(OBJWRITE, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
     834#define SHCLPROVIDERFUNCMEMBER(a_Name, a_Member) \
     835    RT_CONCAT(PFNSHCLPROVIDER, a_Name) a_Member;
     836
     837SHCLPROVIDERFUNCDECLVOID(TRANSFEROPEN)
     838SHCLPROVIDERFUNCDECLVOID(TRANSFERCLOSE)
     839SHCLPROVIDERFUNCDECL(GETROOTS, PSHCLROOTLIST *ppRootList)
     840SHCLPROVIDERFUNCDECL(LISTOPEN, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList)
     841SHCLPROVIDERFUNCDECL(LISTCLOSE, SHCLLISTHANDLE hList)
     842SHCLPROVIDERFUNCDECL(LISTHDRREAD, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
     843SHCLPROVIDERFUNCDECL(LISTHDRWRITE, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
     844SHCLPROVIDERFUNCDECL(LISTENTRYREAD, SHCLLISTHANDLE hList, PSHCLLISTENTRY pEntry)
     845SHCLPROVIDERFUNCDECL(LISTENTRYWRITE, SHCLLISTHANDLE hList, PSHCLLISTENTRY pEntry)
     846SHCLPROVIDERFUNCDECL(OBJOPEN, PSHCLOBJOPENCREATEPARMS pCreateParms, PSHCLOBJHANDLE phObj)
     847SHCLPROVIDERFUNCDECL(OBJCLOSE, SHCLOBJHANDLE hObj)
     848SHCLPROVIDERFUNCDECL(OBJREAD, SHCLOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
     849SHCLPROVIDERFUNCDECL(OBJWRITE, SHCLOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
    850850
    851851/**
    852852 * Shared Clipboard URI provider interface table.
    853853 */
    854 typedef struct _SHAREDCLIPBOARDPROVIDERINTERFACE
    855 {
    856     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(TRANSFEROPEN, pfnTransferOpen)
    857     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(TRANSFERCLOSE, pfnTransferClose)
    858     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(GETROOTS, pfnGetRoots)
    859     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(LISTOPEN, pfnListOpen)
    860     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(LISTCLOSE, pfnListClose)
    861     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(LISTHDRREAD, pfnListHdrRead)
    862     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(LISTHDRWRITE, pfnListHdrWrite)
    863     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(LISTENTRYREAD, pfnListEntryRead)
    864     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(LISTENTRYWRITE, pfnListEntryWrite)
    865     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJOPEN, pfnObjOpen)
    866     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJCLOSE, pfnObjClose)
    867     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJREAD, pfnObjRead)
    868     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJWRITE, pfnObjWrite)
    869 } SHAREDCLIPBOARDPROVIDERINTERFACE, *PSHAREDCLIPBOARDPROVIDERINTERFACE;
     854typedef struct _SHCLPROVIDERINTERFACE
     855{
     856    SHCLPROVIDERFUNCMEMBER(TRANSFEROPEN, pfnTransferOpen)
     857    SHCLPROVIDERFUNCMEMBER(TRANSFERCLOSE, pfnTransferClose)
     858    SHCLPROVIDERFUNCMEMBER(GETROOTS, pfnGetRoots)
     859    SHCLPROVIDERFUNCMEMBER(LISTOPEN, pfnListOpen)
     860    SHCLPROVIDERFUNCMEMBER(LISTCLOSE, pfnListClose)
     861    SHCLPROVIDERFUNCMEMBER(LISTHDRREAD, pfnListHdrRead)
     862    SHCLPROVIDERFUNCMEMBER(LISTHDRWRITE, pfnListHdrWrite)
     863    SHCLPROVIDERFUNCMEMBER(LISTENTRYREAD, pfnListEntryRead)
     864    SHCLPROVIDERFUNCMEMBER(LISTENTRYWRITE, pfnListEntryWrite)
     865    SHCLPROVIDERFUNCMEMBER(OBJOPEN, pfnObjOpen)
     866    SHCLPROVIDERFUNCMEMBER(OBJCLOSE, pfnObjClose)
     867    SHCLPROVIDERFUNCMEMBER(OBJREAD, pfnObjRead)
     868    SHCLPROVIDERFUNCMEMBER(OBJWRITE, pfnObjWrite)
     869} SHCLPROVIDERINTERFACE, *PSHCLPROVIDERINTERFACE;
    870870
    871871/**
    872872 * Structure for the Shared Clipboard provider creation context.
    873873 */
    874 typedef struct _SHAREDCLIPBOARDPROVIDERCREATIONCTX
     874typedef struct _SHCLPROVIDERCREATIONCTX
    875875{
    876876    /** Specifies what the source of the provider is. */
    877     SHAREDCLIPBOARDSOURCE             enmSource;
     877    SHCLSOURCE             enmSource;
    878878    /** The provider interface table. */
    879     SHAREDCLIPBOARDPROVIDERINTERFACE  Interface;
     879    SHCLPROVIDERINTERFACE  Interface;
    880880    /** Provider callback data. */
    881881    void                             *pvUser;
    882 } SHAREDCLIPBOARDPROVIDERCREATIONCTX, *PSHAREDCLIPBOARDPROVIDERCREATIONCTX;
    883 
    884 struct _SHAREDCLIPBOARDURITRANSFER;
    885 typedef _SHAREDCLIPBOARDURITRANSFER *PSHAREDCLIPBOARDURITRANSFER;
     882} SHCLPROVIDERCREATIONCTX, *PSHCLPROVIDERCREATIONCTX;
     883
     884struct _SHCLURITRANSFER;
     885typedef _SHCLURITRANSFER *PSHCLURITRANSFER;
    886886
    887887/**
    888888 * Structure for storing URI transfer callback data.
    889889 */
    890 typedef struct _SHAREDCLIPBOARDURITRANSFERCALLBACKDATA
     890typedef struct _SHCLURITRANSFERCALLBACKDATA
    891891{
    892892    /** Pointer to related URI transfer. */
    893     PSHAREDCLIPBOARDURITRANSFER pTransfer;
     893    PSHCLURITRANSFER pTransfer;
    894894    /** Saved user pointer. */
    895895    void                       *pvUser;
    896 } SHAREDCLIPBOARDURITRANSFERCALLBACKDATA, *PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA;
    897 
    898 #define SHAREDCLIPBOARDTRANSFERCALLBACKDECLVOID(a_Name) \
    899     typedef DECLCALLBACK(void) RT_CONCAT(FNSHAREDCLIPBOARDCALLBACK, a_Name)(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData); \
    900     typedef RT_CONCAT(FNSHAREDCLIPBOARDCALLBACK, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDCALLBACK, a_Name);
    901 
    902 #define SHAREDCLIPBOARDTRANSFERCALLBACKDECL(a_Name, ...) \
    903     typedef DECLCALLBACK(void) RT_CONCAT(FNSHAREDCLIPBOARDCALLBACK, a_Name)(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, __VA_ARGS__); \
    904     typedef RT_CONCAT(FNSHAREDCLIPBOARDCALLBACK, a_Name) RT_CONCAT(*PFNSHAREDCLIPBOARDCALLBACK, a_Name);
    905 
    906 #define SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(a_Name, a_Member) \
    907     RT_CONCAT(PFNSHAREDCLIPBOARDCALLBACK, a_Name) a_Member;
    908 
    909 SHAREDCLIPBOARDTRANSFERCALLBACKDECLVOID(TRANSFERPREPARE)
    910 SHAREDCLIPBOARDTRANSFERCALLBACKDECLVOID(TRANSFERSTARTED)
    911 SHAREDCLIPBOARDTRANSFERCALLBACKDECLVOID(LISTHEADERCOMPLETE)
    912 SHAREDCLIPBOARDTRANSFERCALLBACKDECLVOID(LISTENTRYCOMPLETE)
    913 SHAREDCLIPBOARDTRANSFERCALLBACKDECL    (TRANSFERCOMPLETE, int rc)
    914 SHAREDCLIPBOARDTRANSFERCALLBACKDECLVOID(TRANSFERCANCELED)
    915 SHAREDCLIPBOARDTRANSFERCALLBACKDECL    (TRANSFERERROR, int rc)
     896} SHCLURITRANSFERCALLBACKDATA, *PSHCLURITRANSFERCALLBACKDATA;
     897
     898#define SHCLTRANSFERCALLBACKDECLVOID(a_Name) \
     899    typedef DECLCALLBACK(void) RT_CONCAT(FNSHCLCALLBACK, a_Name)(PSHCLURITRANSFERCALLBACKDATA pData); \
     900    typedef RT_CONCAT(FNSHCLCALLBACK, a_Name) RT_CONCAT(*PFNSHCLCALLBACK, a_Name);
     901
     902#define SHCLTRANSFERCALLBACKDECL(a_Name, ...) \
     903    typedef DECLCALLBACK(void) RT_CONCAT(FNSHCLCALLBACK, a_Name)(PSHCLURITRANSFERCALLBACKDATA pData, __VA_ARGS__); \
     904    typedef RT_CONCAT(FNSHCLCALLBACK, a_Name) RT_CONCAT(*PFNSHCLCALLBACK, a_Name);
     905
     906#define SHCLTRANSFERCALLBACKMEMBER(a_Name, a_Member) \
     907    RT_CONCAT(PFNSHCLCALLBACK, a_Name) a_Member;
     908
     909SHCLTRANSFERCALLBACKDECLVOID(TRANSFERPREPARE)
     910SHCLTRANSFERCALLBACKDECLVOID(TRANSFERSTARTED)
     911SHCLTRANSFERCALLBACKDECLVOID(LISTHEADERCOMPLETE)
     912SHCLTRANSFERCALLBACKDECLVOID(LISTENTRYCOMPLETE)
     913SHCLTRANSFERCALLBACKDECL    (TRANSFERCOMPLETE, int rc)
     914SHCLTRANSFERCALLBACKDECLVOID(TRANSFERCANCELED)
     915SHCLTRANSFERCALLBACKDECL    (TRANSFERERROR, int rc)
    916916
    917917/**
     
    919919 * All callbacks are optional and therefore can be NULL.
    920920 */
    921 typedef struct _SHAREDCLIPBOARDURITRANSFERCALLBACKS
     921typedef struct _SHCLURITRANSFERCALLBACKS
    922922{
    923923    /** Saved user pointer. */
    924924    void                                  *pvUser;
    925925    /** Function pointer, called when the transfer is going to be prepared. */
    926     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERPREPARE, pfnTransferPrepare)
     926    SHCLTRANSFERCALLBACKMEMBER(TRANSFERPREPARE, pfnTransferPrepare)
    927927    /** Function pointer, called when the transfer has been started. */
    928     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERSTARTED, pfnTransferStarted)
     928    SHCLTRANSFERCALLBACKMEMBER(TRANSFERSTARTED, pfnTransferStarted)
    929929    /** Function pointer, called when reading / writing the list header is complete. */
    930     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(LISTHEADERCOMPLETE, pfnListHeaderComplete)
     930    SHCLTRANSFERCALLBACKMEMBER(LISTHEADERCOMPLETE, pfnListHeaderComplete)
    931931    /** Function pointer, called when reading / writing a list entry is complete. */
    932     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(LISTENTRYCOMPLETE, pfnListEntryComplete)
     932    SHCLTRANSFERCALLBACKMEMBER(LISTENTRYCOMPLETE, pfnListEntryComplete)
    933933    /** Function pointer, called when the transfer is complete. */
    934     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERCOMPLETE, pfnTransferComplete)
     934    SHCLTRANSFERCALLBACKMEMBER(TRANSFERCOMPLETE, pfnTransferComplete)
    935935    /** Function pointer, called when the transfer has been canceled. */
    936     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERCANCELED, pfnTransferCanceled)
     936    SHCLTRANSFERCALLBACKMEMBER(TRANSFERCANCELED, pfnTransferCanceled)
    937937    /** Function pointer, called when transfer resulted in an unrecoverable error. */
    938     SHAREDCLIPBOARDTRANSFERCALLBACKMEMBER(TRANSFERERROR, pfnTransferError)
    939 } SHAREDCLIPBOARDURITRANSFERCALLBACKS, *PSHAREDCLIPBOARDURITRANSFERCALLBACKS;
     938    SHCLTRANSFERCALLBACKMEMBER(TRANSFERERROR, pfnTransferError)
     939} SHCLURITRANSFERCALLBACKS, *PSHCLURITRANSFERCALLBACKS;
    940940
    941941/**
    942942 * Structure for thread-related members for a single URI transfer.
    943943 */
    944 typedef struct _SHAREDCLIPBOARDURITRANSFERTHREAD
     944typedef struct _SHCLURITRANSFERTHREAD
    945945{
    946946    /** Thread handle for the reading / writing thread.
     
    953953    /** Thread cancelled flag / indicator. */
    954954    volatile bool               fCancelled;
    955 } SHAREDCLIPBOARDURITRANSFERTHREAD, *PSHAREDCLIPBOARDURITRANSFERTHREAD;
     955} SHCLURITRANSFERTHREAD, *PSHCLURITRANSFERTHREAD;
    956956
    957957/**
     
    960960 ** @todo Not yet thread safe.
    961961 */
    962 typedef struct _SHAREDCLIPBOARDURITRANSFER
     962typedef struct _SHCLURITRANSFER
    963963{
    964964    /** The node member for using this struct in a RTList. */
     
    967967    RTCRITSECT                          CritSect;
    968968    /** The transfer's state (for SSM, later). */
    969     SHAREDCLIPBOARDURITRANSFERSTATE     State;
     969    SHCLURITRANSFERSTATE     State;
    970970    /** Timeout (in ms) for waiting of events. Default is 30s. */
    971971    RTMSINTERVAL                        uTimeoutMs;
     
    975975    uint32_t                            cbMaxChunkSize;
    976976    /** The transfer's own event source. */
    977     SHAREDCLIPBOARDEVENTSOURCE          Events;
     977    SHCLEVENTSOURCE          Events;
    978978    /** Next upcoming list handle. */
    979     SHAREDCLIPBOARDLISTHANDLE           uListHandleNext;
     979    SHCLLISTHANDLE           uListHandleNext;
    980980    /** List of all list handles elated to this transfer. */
    981981    RTLISTANCHOR                        lstList;
     
    985985    RTLISTANCHOR                        lstRoots;
    986986    /** Next upcoming object handle. */
    987     SHAREDCLIPBOARDOBJHANDLE            uObjHandleNext;
     987    SHCLOBJHANDLE            uObjHandleNext;
    988988    /** Map of all objects handles related to this transfer. */
    989989    RTLISTANCHOR                        lstObj;
     
    992992     *  On the host this area ID gets shared (maintained / locked) across all VMs via VBoxSVC. */
    993993    SharedClipboardArea                *pArea;
    994     SHAREDCLIPBOARDPROVIDERCTX          ProviderCtx;
     994    SHCLPROVIDERCTX          ProviderCtx;
    995995    /** The transfer's provider interface. */
    996     SHAREDCLIPBOARDPROVIDERINTERFACE    ProviderIface;
     996    SHCLPROVIDERINTERFACE    ProviderIface;
    997997    /** The transfer's (optional) callback table. */
    998     SHAREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;
     998    SHCLURITRANSFERCALLBACKS Callbacks;
    999999    /** Opaque pointer to implementation-specific parameters. */
    10001000    void                               *pvUser;
     
    10021002    size_t                              cbUser;
    10031003    /** Contains thread-related attributes. */
    1004     SHAREDCLIPBOARDURITRANSFERTHREAD    Thread;
    1005 } SHAREDCLIPBOARDURITRANSFER, *PSHAREDCLIPBOARDURITRANSFER;
     1004    SHCLURITRANSFERTHREAD    Thread;
     1005} SHCLURITRANSFER, *PSHCLURITRANSFER;
    10061006
    10071007/**
    10081008 * Structure for keeping URI clipboard information around.
    10091009 */
    1010 typedef struct _SHAREDCLIPBOARDURICTX
     1010typedef struct _SHCLURICTX
    10111011{
    10121012    /** Critical section for serializing access. */
     
    10221022    /** Number of total transfers (in list). */
    10231023    uint32_t                    cTransfers;
    1024 } SHAREDCLIPBOARDURICTX, *PSHAREDCLIPBOARDURICTX;
    1025 
    1026 int SharedClipboardURIObjCtxInit(PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx);
    1027 void SharedClipboardURIObjCtxDestroy(PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx);
    1028 bool SharedClipboardURIObjCtxIsValid(PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx);
    1029 
    1030 int SharedClipboardURIObjectOpenParmsInit(PVBOXCLIPBOARDOBJOPENCREATEPARMS pParms);
    1031 int SharedClipboardURIObjectOpenParmsCopy(PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsDst, PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsSrc);
    1032 void SharedClipboardURIObjectOpenParmsDestroy(PVBOXCLIPBOARDOBJOPENCREATEPARMS pParms);
    1033 
    1034 int SharedClipboardURIObjectOpen(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDOBJOPENCREATEPARMS pOpenCreateParms,
    1035                                  PSHAREDCLIPBOARDOBJHANDLE phObj);
    1036 int SharedClipboardURIObjectClose(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj);
    1037 int SharedClipboardURIObjectRead(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags);
    1038 int SharedClipboardURIObjectWrite(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten, uint32_t fFlags);
    1039 
    1040 PVBOXCLIPBOARDOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk);
    1041 void SharedClipboardURIObjectDataChunkDestroy(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk);
    1042 void SharedClipboardURIObjectDataChunkFree(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk);
    1043 
    1044 int SharedClipboardURITransferCreate(SHAREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,
    1045                                      PSHAREDCLIPBOARDURITRANSFER *ppTransfer);
    1046 int SharedClipboardURITransferDestroy(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1047 
    1048 int SharedClipboardURITransferOpen(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1049 int SharedClipboardURITransferClose(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1050 
    1051 int SharedClipboardURITransferListOpen(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,
    1052                                        PSHAREDCLIPBOARDLISTHANDLE phList);
    1053 int SharedClipboardURITransferListClose(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList);
    1054 int SharedClipboardURITransferListGetHeader(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,
    1055                                             PVBOXCLIPBOARDLISTHDR pHdr);
    1056 PSHAREDCLIPBOARDURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    1057                                                                     SHAREDCLIPBOARDLISTHANDLE hList, uint64_t uIdx);
    1058 int SharedClipboardURITransferListRead(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,
    1059                                        PVBOXCLIPBOARDLISTENTRY pEntry);
    1060 int SharedClipboardURITransferListWrite(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,
    1061                                         PVBOXCLIPBOARDLISTENTRY pEntry);
    1062 bool SharedClipboardURITransferListHandleIsValid(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList);
    1063 
    1064 int SharedClipboardURITransferPrepare(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1065 int SharedClipboardURITransferSetInterface(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    1066                                            PSHAREDCLIPBOARDPROVIDERCREATIONCTX pCreationCtx);
    1067 int SharedClipboardURILTransferSetRoots(PSHAREDCLIPBOARDURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots);
    1068 void SharedClipboardURITransferReset(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1069 SharedClipboardArea *SharedClipboardURITransferGetArea(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1070 
    1071 uint32_t SharedClipboardURILTransferRootsCount(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1072 int SharedClipboardURILTransferRootsEntry(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint64_t uIndex, PVBOXCLIPBOARDROOTLISTENTRY pEntry);
    1073 int SharedClipboardURILTransferRootsAsList(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDROOTLIST *ppRootList);
    1074 
    1075 SHAREDCLIPBOARDSOURCE SharedClipboardURITransferGetSource(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1076 SHAREDCLIPBOARDURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1077 int SharedClipboardURITransferHandleReply(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDREPLY pReply);
    1078 int SharedClipboardURITransferRun(PSHAREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);
    1079 void SharedClipboardURITransferSetCallbacks(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    1080                                             PSHAREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks);
    1081 
    1082 int SharedClipboardURITransferRead(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1083 int SharedClipboardURITransferReadObjects(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1084 
    1085 int SharedClipboardURITransferWrite(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1086 int SharedClipboardURITransferWriteObjects(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1087 
    1088 int SharedClipboardURICtxInit(PSHAREDCLIPBOARDURICTX pURI);
    1089 void SharedClipboardURICtxDestroy(PSHAREDCLIPBOARDURICTX pURI);
    1090 void SharedClipboardURICtxReset(PSHAREDCLIPBOARDURICTX pURI);
    1091 PSHAREDCLIPBOARDURITRANSFER SharedClipboardURICtxGetTransfer(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx);
    1092 uint32_t SharedClipboardURICtxGetRunningTransfers(PSHAREDCLIPBOARDURICTX pURI);
    1093 uint32_t SharedClipboardURICtxGetTotalTransfers(PSHAREDCLIPBOARDURICTX pURI);
    1094 void SharedClipboardURICtxTransfersCleanup(PSHAREDCLIPBOARDURICTX pURI);
    1095 bool SharedClipboardURICtxTransfersMaximumReached(PSHAREDCLIPBOARDURICTX pURI);
    1096 int SharedClipboardURICtxTransferAdd(PSHAREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1097 int SharedClipboardURICtxTransferRemove(PSHAREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer);
    1098 
    1099 void SharedClipboardFsObjFromIPRT(PSHAREDCLIPBOARDFSOBJINFO pDst, PCRTFSOBJINFO pSrc);
     1024} SHCLURICTX, *PSHCLURICTX;
     1025
     1026int SharedClipboardURIObjCtxInit(PSHCLCLIENTURIOBJCTX pObjCtx);
     1027void SharedClipboardURIObjCtxDestroy(PSHCLCLIENTURIOBJCTX pObjCtx);
     1028bool SharedClipboardURIObjCtxIsValid(PSHCLCLIENTURIOBJCTX pObjCtx);
     1029
     1030int SharedClipboardURIObjectOpenParmsInit(PSHCLOBJOPENCREATEPARMS pParms);
     1031int SharedClipboardURIObjectOpenParmsCopy(PSHCLOBJOPENCREATEPARMS pParmsDst, PSHCLOBJOPENCREATEPARMS pParmsSrc);
     1032void SharedClipboardURIObjectOpenParmsDestroy(PSHCLOBJOPENCREATEPARMS pParms);
     1033
     1034int SharedClipboardURIObjectOpen(PSHCLURITRANSFER pTransfer, PSHCLOBJOPENCREATEPARMS pOpenCreateParms,
     1035                                 PSHCLOBJHANDLE phObj);
     1036int SharedClipboardURIObjectClose(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj);
     1037int SharedClipboardURIObjectRead(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags);
     1038int SharedClipboardURIObjectWrite(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten, uint32_t fFlags);
     1039
     1040PSHCLOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PSHCLOBJDATACHUNK pDataChunk);
     1041void SharedClipboardURIObjectDataChunkDestroy(PSHCLOBJDATACHUNK pDataChunk);
     1042void SharedClipboardURIObjectDataChunkFree(PSHCLOBJDATACHUNK pDataChunk);
     1043
     1044int SharedClipboardURITransferCreate(SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource,
     1045                                     PSHCLURITRANSFER *ppTransfer);
     1046int SharedClipboardURITransferDestroy(PSHCLURITRANSFER pTransfer);
     1047
     1048int SharedClipboardURITransferOpen(PSHCLURITRANSFER pTransfer);
     1049int SharedClipboardURITransferClose(PSHCLURITRANSFER pTransfer);
     1050
     1051int SharedClipboardURITransferListOpen(PSHCLURITRANSFER pTransfer, PSHCLLISTOPENPARMS pOpenParms,
     1052                                       PSHCLLISTHANDLE phList);
     1053int SharedClipboardURITransferListClose(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList);
     1054int SharedClipboardURITransferListGetHeader(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList,
     1055                                            PSHCLLISTHDR pHdr);
     1056PSHCLURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHCLURITRANSFER pTransfer,
     1057                                                                    SHCLLISTHANDLE hList, uint64_t uIdx);
     1058int SharedClipboardURITransferListRead(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList,
     1059                                       PSHCLLISTENTRY pEntry);
     1060int SharedClipboardURITransferListWrite(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList,
     1061                                        PSHCLLISTENTRY pEntry);
     1062bool SharedClipboardURITransferListHandleIsValid(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList);
     1063
     1064int SharedClipboardURITransferPrepare(PSHCLURITRANSFER pTransfer);
     1065int SharedClipboardURITransferSetInterface(PSHCLURITRANSFER pTransfer,
     1066                                           PSHCLPROVIDERCREATIONCTX pCreationCtx);
     1067int SharedClipboardURILTransferSetRoots(PSHCLURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots);
     1068void SharedClipboardURITransferReset(PSHCLURITRANSFER pTransfer);
     1069SharedClipboardArea *SharedClipboardURITransferGetArea(PSHCLURITRANSFER pTransfer);
     1070
     1071uint32_t SharedClipboardURILTransferRootsCount(PSHCLURITRANSFER pTransfer);
     1072int SharedClipboardURILTransferRootsEntry(PSHCLURITRANSFER pTransfer, uint64_t uIndex, PSHCLROOTLISTENTRY pEntry);
     1073int SharedClipboardURILTransferRootsAsList(PSHCLURITRANSFER pTransfer, PSHCLROOTLIST *ppRootList);
     1074
     1075SHCLSOURCE SharedClipboardURITransferGetSource(PSHCLURITRANSFER pTransfer);
     1076SHCLURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHCLURITRANSFER pTransfer);
     1077int SharedClipboardURITransferHandleReply(PSHCLURITRANSFER pTransfer, PSHCLREPLY pReply);
     1078int SharedClipboardURITransferRun(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);
     1079void SharedClipboardURITransferSetCallbacks(PSHCLURITRANSFER pTransfer,
     1080                                            PSHCLURITRANSFERCALLBACKS pCallbacks);
     1081
     1082int SharedClipboardURITransferRead(PSHCLURITRANSFER pTransfer);
     1083int SharedClipboardURITransferReadObjects(PSHCLURITRANSFER pTransfer);
     1084
     1085int SharedClipboardURITransferWrite(PSHCLURITRANSFER pTransfer);
     1086int SharedClipboardURITransferWriteObjects(PSHCLURITRANSFER pTransfer);
     1087
     1088int SharedClipboardURICtxInit(PSHCLURICTX pURI);
     1089void SharedClipboardURICtxDestroy(PSHCLURICTX pURI);
     1090void SharedClipboardURICtxReset(PSHCLURICTX pURI);
     1091PSHCLURITRANSFER SharedClipboardURICtxGetTransfer(PSHCLURICTX pURI, uint32_t uIdx);
     1092uint32_t SharedClipboardURICtxGetRunningTransfers(PSHCLURICTX pURI);
     1093uint32_t SharedClipboardURICtxGetTotalTransfers(PSHCLURICTX pURI);
     1094void SharedClipboardURICtxTransfersCleanup(PSHCLURICTX pURI);
     1095bool SharedClipboardURICtxTransfersMaximumReached(PSHCLURICTX pURI);
     1096int SharedClipboardURICtxTransferAdd(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer);
     1097int SharedClipboardURICtxTransferRemove(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer);
     1098
     1099void SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO pDst, PCRTFSOBJINFO pSrc);
    11001100
    11011101bool SharedClipboardMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax);
  • trunk/include/VBox/GuestHost/SharedClipboard-win.h

    r80444 r80662  
    8383 * If the new API is not available, those function pointer are NULL.
    8484 */
    85 typedef struct _VBOXCLIPBOARDWINAPINEW
     85typedef struct _SHCLWINAPINEW
    8686{
    8787    PFNADDCLIPBOARDFORMATLISTENER    pfnAddClipboardFormatListener;
    8888    PFNREMOVECLIPBOARDFORMATLISTENER pfnRemoveClipboardFormatListener;
    89 } VBOXCLIPBOARDWINAPINEW, *PVBOXCLIPBOARDWINAPINEW;
     89} SHCLWINAPINEW, *PSHCLWINAPINEW;
    9090
    9191/**
    9292 * Structure for keeping variables which are needed to drive the old clipboard API.
    9393 */
    94 typedef struct _VBOXCLIPBOARDWINAPIOLD
     94typedef struct _SHCLWINAPIOLD
    9595{
    9696    /** Timer ID for the refresh timer. */
     
    9898    /** Whether "pinging" the clipboard chain currently is in progress or not. */
    9999    bool                   fCBChainPingInProcess;
    100 } VBOXCLIPBOARDWINAPIOLD, *PVBOXCLIPBOARDWINAPIOLD;
     100} SHCLWINAPIOLD, *PSHCLWINAPIOLD;
    101101
    102102/**
    103103 * Structure for maintaining a Shared Clipboard context on Windows platforms.
    104104 */
    105 typedef struct _VBOXCLIPBOARDWINCTX
     105typedef struct _SHCLWINCTX
    106106{
    107107    /** Window handle of our (invisible) clipbaord window. */
     
    112112    HWND                        hWndClipboardOwnerUs;
    113113    /** Structure for maintaining the new clipboard API. */
    114     VBOXCLIPBOARDWINAPINEW      newAPI;
     114    SHCLWINAPINEW      newAPI;
    115115    /** Structure for maintaining the old clipboard API. */
    116     VBOXCLIPBOARDWINAPIOLD      oldAPI;
    117 } VBOXCLIPBOARDWINCTX, *PVBOXCLIPBOARDWINCTX;
     116    SHCLWINAPIOLD      oldAPI;
     117} SHCLWINCTX, *PSHCLWINCTX;
    118118
    119119int VBoxClipboardWinOpen(HWND hWnd);
     
    121121int VBoxClipboardWinClear(void);
    122122
    123 int VBoxClipboardWinCheckAndInitNewAPI(PVBOXCLIPBOARDWINAPINEW pAPI);
    124 bool VBoxClipboardWinIsNewAPI(PVBOXCLIPBOARDWINAPINEW pAPI);
    125 
    126 int VBoxClipboardWinChainAdd(PVBOXCLIPBOARDWINCTX pCtx);
    127 int VBoxClipboardWinChainRemove(PVBOXCLIPBOARDWINCTX pCtx);
     123int VBoxClipboardWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI);
     124bool VBoxClipboardWinIsNewAPI(PSHCLWINAPINEW pAPI);
     125
     126int VBoxClipboardWinChainAdd(PSHCLWINCTX pCtx);
     127int VBoxClipboardWinChainRemove(PSHCLWINCTX pCtx);
    128128VOID CALLBACK VBoxClipboardWinChainPingProc(HWND hWnd, UINT uMsg, ULONG_PTR dwData, LRESULT lResult);
    129 LRESULT VBoxClipboardWinChainPassToNext(PVBOXCLIPBOARDWINCTX pWinCtx, UINT msg, WPARAM wParam, LPARAM lParam);
    130 
    131 VBOXCLIPBOARDFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat);
    132 int VBoxClipboardWinGetFormats(PVBOXCLIPBOARDWINCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats);
     129LRESULT VBoxClipboardWinChainPassToNext(PSHCLWINCTX pWinCtx, UINT msg, WPARAM wParam, LPARAM lParam);
     130
     131SHCLFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat);
     132int VBoxClipboardWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATDATA pFormats);
    133133
    134134#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
     
    141141int VBoxClipboardWinConvertMIMEToCFHTML(const char *pszSource, size_t cb, char **ppszOutput, uint32_t *pcbOutput);
    142142
    143 LRESULT VBoxClipboardWinHandleWMChangeCBChain(PVBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
    144 int VBoxClipboardWinHandleWMDestroy(PVBOXCLIPBOARDWINCTX pWinCtx);
    145 int VBoxClipboardWinHandleWMRenderAllFormats(PVBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd);
    146 int VBoxClipboardWinHandleWMTimer(PVBOXCLIPBOARDWINCTX pWinCtx);
    147 
    148 int VBoxClipboardWinAnnounceFormats(PVBOXCLIPBOARDWINCTX pWinCtx, VBOXCLIPBOARDFORMATS fFormats);
     143LRESULT VBoxClipboardWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
     144int VBoxClipboardWinHandleWMDestroy(PSHCLWINCTX pWinCtx);
     145int VBoxClipboardWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd);
     146int VBoxClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx);
     147
     148int VBoxClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats);
    149149#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    150 int VBoxClipboardWinURITransferCreate(PVBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer);
    151 void VBoxClipboardWinURITransferDestroy(PVBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer);
     150int VBoxClipboardWinURITransferCreate(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer);
     151void VBoxClipboardWinURITransferDestroy(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer);
    152152#endif
    153153
     
    170170public:
    171171
    172     VBoxClipboardWinDataObject(PSHAREDCLIPBOARDURITRANSFER pTransfer,
     172    VBoxClipboardWinDataObject(PSHCLURITRANSFER pTransfer,
    173173                               LPFORMATETC pFormatEtc = NULL, LPSTGMEDIUM pStgMed = NULL, ULONG cFormats = 0);
    174174    virtual ~VBoxClipboardWinDataObject(void);
     
    218218    static int Thread(RTTHREAD hThread, void *pvUser);
    219219
    220     int readDir(PSHAREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strPath);
     220    int readDir(PSHCLURITRANSFER pTransfer, const Utf8Str &strPath);
    221221
    222222    int copyToHGlobal(const void *pvData, size_t cbData, UINT fFlags, HGLOBAL *phGlobal);
    223     int createFileGroupDescriptorFromTransfer(PSHAREDCLIPBOARDURITRANSFER pTransfer,
     223    int createFileGroupDescriptorFromTransfer(PSHCLURITRANSFER pTransfer,
    224224                                              bool fUnicode, HGLOBAL *phGlobal);
    225225
     
    237237        Utf8Str                  strPath;
    238238        /** Related (cached) object information. */
    239         SHAREDCLIPBOARDFSOBJINFO objInfo;
     239        SHCLFSOBJINFO objInfo;
    240240    };
    241241
     
    248248    LPFORMATETC                 m_pFormatEtc;
    249249    LPSTGMEDIUM                 m_pStgMedium;
    250     PSHAREDCLIPBOARDURITRANSFER m_pTransfer;
     250    PSHCLURITRANSFER m_pTransfer;
    251251    IStream                    *m_pStream;
    252252    ULONG                       m_uObjIdx;
     
    303303public:
    304304
    305     VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHAREDCLIPBOARDURITRANSFER pTransfer,
    306                                const Utf8Str &strPath, PSHAREDCLIPBOARDFSOBJINFO pObjInfo);
     305    VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer,
     306                               const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo);
    307307    virtual ~VBoxClipboardWinStreamImpl(void);
    308308
     
    329329public: /* Own methods. */
    330330
    331     static HRESULT Create(VBoxClipboardWinDataObject *pParent, PSHAREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strPath,
    332                           PSHAREDCLIPBOARDFSOBJINFO pObjInfo, IStream **ppStream);
     331    static HRESULT Create(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, const Utf8Str &strPath,
     332                          PSHCLFSOBJINFO pObjInfo, IStream **ppStream);
    333333private:
    334334
     
    338338    LONG                           m_lRefCount;
    339339    /** Pointer to the associated URI transfer. */
    340     PSHAREDCLIPBOARDURITRANSFER    m_pURITransfer;
     340    PSHCLURITRANSFER    m_pURITransfer;
    341341    /** The object handle to use. */
    342     SHAREDCLIPBOARDOBJHANDLE       m_hObj;
     342    SHCLOBJHANDLE       m_hObj;
    343343    /** Object path. */
    344344    Utf8Str                        m_strPath;
    345345    /** (Cached) object information. */
    346     SHAREDCLIPBOARDFSOBJINFO       m_objInfo;
     346    SHCLFSOBJINFO       m_objInfo;
    347347    /** Number of bytes already processed. */
    348348    uint64_t                       m_cbProcessed;
     
    353353/**
    354354 * Class for Windows-specifics for maintaining a single URI transfer.
    355  * Set as pvUser / cbUser in SHAREDCLIPBOARDURICTX.
     355 * Set as pvUser / cbUser in SHCLURICTX.
    356356 */
    357357class SharedClipboardWinURITransferCtx
  • trunk/include/VBox/GuestHost/SharedClipboard.h

    r80623 r80662  
    3535
    3636/** A single Shared Clipboard format. */
    37 typedef uint32_t VBOXCLIPBOARDFORMAT;
     37typedef uint32_t SHCLFORMAT;
    3838/** Pointer to a single Shared Clipboard format. */
    39 typedef VBOXCLIPBOARDFORMAT *PVBOXCLIPBOARDFORMAT;
     39typedef SHCLFORMAT *PSHCLFORMAT;
    4040
    4141/** Bit map of Shared Clipboard formats. */
    42 typedef uint32_t VBOXCLIPBOARDFORMATS;
     42typedef uint32_t SHCLFORMATS;
    4343/** Pointer to a bit map of Shared Clipboard formats. */
    44 typedef VBOXCLIPBOARDFORMATS *PVBOXCLIPBOARDFORMATS;
     44typedef SHCLFORMATS *PSHCLFORMATS;
    4545
    4646/**
     
    6363 * Structure for keeping a generic Shared Clipboard data block.
    6464 */
    65 typedef struct _SHAREDCLIPBOARDDATABLOCK
     65typedef struct _SHCLDATABLOCK
    6666{
    6767    /** Clipboard format this data block represents. */
    68     VBOXCLIPBOARDFORMAT  uFormat;
     68    SHCLFORMAT  uFormat;
    6969    /** Pointer to actual data block. */
    7070    void                *pvData;
    7171    /** Size (in bytes) of actual data block. */
    7272    uint32_t             cbData;
    73 } SHAREDCLIPBOARDDATABLOCK, *PSHAREDCLIPBOARDDATABLOCK;
     73} SHCLDATABLOCK, *PSHCLDATABLOCK;
    7474
    7575/**
    7676 * Structure for keeping a Shared Clipboard data read request.
    7777 */
    78 typedef struct _SHAREDCLIPBOARDDATAREQ
     78typedef struct _SHCLDATAREQ
    7979{
    8080    /** In which format the data needs to be sent. */
    81     VBOXCLIPBOARDFORMAT uFmt;
     81    SHCLFORMAT uFmt;
    8282    /** Read flags; currently unused. */
    8383    uint32_t            fFlags;
    8484    /** Maximum data (in byte) can be sent. */
    8585    uint32_t            cbSize;
    86 } SHAREDCLIPBOARDDATAREQ, *PSHAREDCLIPBOARDDATAREQ;
     86} SHCLDATAREQ, *PSHCLDATAREQ;
    8787
    8888/**
    8989 * Structure for keeping Shared Clipboard formats specifications.
    9090 */
    91 typedef struct _SHAREDCLIPBOARDFORMATDATA
     91typedef struct _SHCLFORMATDATA
    9292{
    9393    /** Available format(s) as bit map. */
    94     VBOXCLIPBOARDFORMATS uFormats;
     94    SHCLFORMATS uFormats;
    9595    /** Formats flags. Currently unused. */
    9696    uint32_t             fFlags;
    97 } SHAREDCLIPBOARDFORMATDATA, *PSHAREDCLIPBOARDFORMATDATA;
     97} SHCLFORMATDATA, *PSHCLFORMATDATA;
    9898
    9999/**
    100100 * Structure for an (optional) Shared Clipboard event payload.
    101101 */
    102 typedef struct _SHAREDCLIPBOARDEVENTPAYLOAD
     102typedef struct _SHCLEVENTPAYLOAD
    103103{
    104104    /** Payload ID; currently unused. */
     
    108108    /** Size (in bytes) of actual payload data. */
    109109    uint32_t cbData;
    110 } SHAREDCLIPBOARDEVENTPAYLOAD, *PSHAREDCLIPBOARDEVENTPAYLOAD;
     110} SHCLEVENTPAYLOAD, *PSHCLEVENTPAYLOAD;
    111111
    112112/** Defines an event source ID. */
    113 typedef uint16_t VBOXCLIPBOARDEVENTSOURCEID;
     113typedef uint16_t SHCLEVENTSOURCEID;
    114114/** Defines a pointer to a event source ID. */
    115 typedef VBOXCLIPBOARDEVENTSOURCEID *PVBOXCLIPBOARDEVENTSOURCEID;
     115typedef SHCLEVENTSOURCEID *PSHCLEVENTSOURCEID;
    116116
    117117/** Defines an event ID. */
    118 typedef uint16_t VBOXCLIPBOARDEVENTID;
     118typedef uint16_t SHCLEVENTID;
    119119/** Defines a pointer to a event source ID. */
    120 typedef VBOXCLIPBOARDEVENTID *PVBOXCLIPBOARDEVENTID;
     120typedef SHCLEVENTID *PSHCLEVENTID;
    121121
    122122/** Maximum number of concurrent Shared Clipboard transfers a VM can have.
     
    131131 * Structure for maintaining a Shared Clipboard event.
    132132 */
    133 typedef struct _SHAREDCLIPBOARDEVENT
     133typedef struct _SHCLEVENT
    134134{
    135135    /** List node. */
    136136    RTLISTNODE                   Node;
    137137    /** The event's ID, for self-reference. */
    138     VBOXCLIPBOARDEVENTID         uID;
     138    SHCLEVENTID         uID;
    139139    /** Event semaphore for signalling the event. */
    140140    RTSEMEVENT                   hEventSem;
    141141    /** Payload to this event. Optional and can be NULL. */
    142     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
    143 } SHAREDCLIPBOARDEVENT, *PSHAREDCLIPBOARDEVENT;
     142    PSHCLEVENTPAYLOAD pPayload;
     143} SHCLEVENT, *PSHCLEVENT;
    144144
    145145/**
     
    149149 * it can be used in different contexts.
    150150 */
    151 typedef struct _SHAREDCLIPBOARDEVENTSOURCE
     151typedef struct _SHCLEVENTSOURCE
    152152{
    153153    /** The event source' ID. */
    154     VBOXCLIPBOARDEVENTSOURCEID uID;
     154    SHCLEVENTSOURCEID uID;
    155155    /** Next upcoming event ID. */
    156     VBOXCLIPBOARDEVENTID       uEventIDNext;
    157     /** List of events (PSHAREDCLIPBOARDEVENT). */
     156    SHCLEVENTID       uEventIDNext;
     157    /** List of events (PSHCLEVENT). */
    158158    RTLISTANCHOR               lstEvents;
    159 } SHAREDCLIPBOARDEVENTSOURCE, *PSHAREDCLIPBOARDEVENTSOURCE;
     159} SHCLEVENTSOURCE, *PSHCLEVENTSOURCE;
    160160
    161161int SharedClipboardPayloadAlloc(uint32_t uID, const void *pvData, uint32_t cbData,
    162                                 PSHAREDCLIPBOARDEVENTPAYLOAD *ppPayload);
    163 void SharedClipboardPayloadFree(PSHAREDCLIPBOARDEVENTPAYLOAD pPayload);
    164 
    165 int SharedClipboardEventSourceCreate(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTSOURCEID uID);
    166 void SharedClipboardEventSourceDestroy(PSHAREDCLIPBOARDEVENTSOURCE pSource);
    167 
    168 VBOXCLIPBOARDEVENTID SharedClipboardEventIDGenerate(PSHAREDCLIPBOARDEVENTSOURCE pSource);
    169 VBOXCLIPBOARDEVENTID SharedClipboardEventGetLast(PSHAREDCLIPBOARDEVENTSOURCE pSource);
    170 int SharedClipboardEventRegister(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);
    171 int SharedClipboardEventUnregister(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);
    172 int SharedClipboardEventWait(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, RTMSINTERVAL uTimeoutMs,
    173                              PSHAREDCLIPBOARDEVENTPAYLOAD* ppPayload);
    174 int SharedClipboardEventSignal(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, PSHAREDCLIPBOARDEVENTPAYLOAD pPayload);
    175 void SharedClipboardEventPayloadDetach(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);
     162                                PSHCLEVENTPAYLOAD *ppPayload);
     163void SharedClipboardPayloadFree(PSHCLEVENTPAYLOAD pPayload);
     164
     165int SharedClipboardEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID);
     166void SharedClipboardEventSourceDestroy(PSHCLEVENTSOURCE pSource);
     167
     168SHCLEVENTID SharedClipboardEventIDGenerate(PSHCLEVENTSOURCE pSource);
     169SHCLEVENTID SharedClipboardEventGetLast(PSHCLEVENTSOURCE pSource);
     170int SharedClipboardEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID);
     171int SharedClipboardEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID);
     172int SharedClipboardEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, RTMSINTERVAL uTimeoutMs,
     173                             PSHCLEVENTPAYLOAD* ppPayload);
     174int SharedClipboardEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, PSHCLEVENTPAYLOAD pPayload);
     175void SharedClipboardEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID);
    176176
    177177/**
    178178 * Enumeration to specify the Shared Clipboard URI source type.
    179179 */
    180 typedef enum SHAREDCLIPBOARDSOURCE
     180typedef enum SHCLSOURCE
    181181{
    182182    /** Invalid source type. */
    183     SHAREDCLIPBOARDSOURCE_INVALID = 0,
     183    SHCLSOURCE_INVALID = 0,
    184184    /** Source is local. */
    185     SHAREDCLIPBOARDSOURCE_LOCAL,
     185    SHCLSOURCE_LOCAL,
    186186    /** Source is remote. */
    187     SHAREDCLIPBOARDSOURCE_REMOTE,
     187    SHCLSOURCE_REMOTE,
    188188    /** The usual 32-bit hack. */
    189     SHAREDCLIPBOARDSOURCE_32Bit_Hack = 0x7fffffff
    190 } SHAREDCLIPBOARDSOURCE;
     189    SHCLSOURCE_32Bit_Hack = 0x7fffffff
     190} SHCLSOURCE;
    191191
    192192/** Opaque data structure for the X11/VBox frontend/glue code. */
    193 struct _VBOXCLIPBOARDCONTEXT;
    194 typedef struct _VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;
    195 typedef struct _VBOXCLIPBOARDCONTEXT *PVBOXCLIPBOARDCONTEXT;
     193struct _SHCLCONTEXT;
     194typedef struct _SHCLCONTEXT SHCLCONTEXT;
     195typedef struct _SHCLCONTEXT *PSHCLCONTEXT;
    196196
    197197/** Opaque data structure for the X11/VBox backend code. */
     
    205205
    206206/* APIs exported by the X11 backend */
    207 extern CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless);
     207extern CLIPBACKEND *ClipConstructX11(SHCLCONTEXT *pFrontend, bool fHeadless);
    208208extern void ClipDestructX11(CLIPBACKEND *pBackend);
    209209extern int ClipStartX11(CLIPBACKEND *pBackend, bool grab);
    210210extern int ClipStopX11(CLIPBACKEND *pBackend);
    211 extern int ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormats);
    212 extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormat, CLIPREADCBREQ *pReq);
     211extern int ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, SHCLFORMATS vboxFormats);
     212extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, SHCLFORMATS vboxFormat, CLIPREADCBREQ *pReq);
    213213
    214214/* APIs exported by the X11/VBox frontend */
    215 extern int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb);
    216 extern void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats);
    217 extern void ClipRequestFromX11CompleteCallback(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
     215extern int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb);
     216extern void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats);
     217extern void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
    218218#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_h */
    219219
  • trunk/include/VBox/GuestHost/clipboard-helper.h

    r80285 r80662  
    189189 * @param   u32Format           Clipboard format to use for dumping.
    190190 */
    191 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, VBOXCLIPBOARDFORMAT u32Format);
     191void VBoxClipboardDbgDumpData(const void *pv, size_t cb, SHCLFORMAT u32Format);
    192192#endif /* LOG_ENABLED */
    193193
  • trunk/include/VBox/HostServices/VBoxClipboardExt.h

    r80558 r80662  
    4040#define VBOX_CLIPBOARD_EXT_FN_DATA_WRITE           (3)
    4141/** Registers a new clipboard area.
    42  *  Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */
     42 *  Uses the SHCLEXTAREAPARMS struct. */
    4343#define VBOX_CLIPBOARD_EXT_FN_AREA_REGISTER        (4)
    4444/** Unregisters an existing clipboard area.
    45  *  Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */
     45 *  Uses the SHCLEXTAREAPARMS struct. */
    4646#define VBOX_CLIPBOARD_EXT_FN_AREA_UNREGISTER      (5)
    4747/** Attaches to an existing clipboard area.
    48  *  Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */
     48 *  Uses the SHCLEXTAREAPARMS struct. */
    4949#define VBOX_CLIPBOARD_EXT_FN_AREA_ATTACH          (6)
    5050/** Detaches from an existing clipboard area.
    51  *  Uses the VBOXCLIPBOARDEXTAREAPARMS struct. */
     51 *  Uses the SHCLEXTAREAPARMS struct. */
    5252#define VBOX_CLIPBOARD_EXT_FN_AREA_DETACH          (7)
    5353
     
    5555typedef VRDPCLIPBOARDEXTCALLBACK *PFNVRDPCLIPBOARDEXTCALLBACK;
    5656
    57 typedef struct _VBOXCLIPBOARDEXTPARMS
     57typedef struct _SHCLEXTPARMS
    5858{
    5959    uint32_t                        uFormat;
     
    6464    } u;
    6565    uint32_t   cbData;
    66 } VBOXCLIPBOARDEXTPARMS;
     66} SHCLEXTPARMS;
    6767
    6868#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    69 typedef uint32_t VBOXCLIPBOARDEXTAREAREGISTETRFLAGS;
     69typedef uint32_t SHCLEXTAREAREGISTETRFLAGS;
    7070/** No clipboard register area flags specified. */
    71 #define VBOXCLIPBOARDEXTAREA_REGISTER_FLAGS_NONE        0
     71#define SHCLEXTAREA_REGISTER_FLAGS_NONE        0
    7272
    73 typedef uint32_t VBOXCLIPBOARDEXTAREAATTACHFLAGS;
     73typedef uint32_t SHCLEXTAREAATTACHFLAGS;
    7474/** No clipboard attach area flags specified. */
    75 #define VBOXCLIPBOARDEXTAREA_ATTACH_FLAGS_NONE          0
     75#define SHCLEXTAREA_ATTACH_FLAGS_NONE          0
    7676
    7777/**
    7878 * Structure for keeping clipboard area callback parameters.
    7979 */
    80 typedef struct _VBOXCLIPBOARDEXTAREAPARMS
     80typedef struct _SHCLEXTAREAPARMS
    8181{
    8282    /** The clipboard area's ID the callback is for. */
    83     SHAREDCLIPBOARDAREAID uID;
     83    SHCLAREAID uID;
    8484    union
    8585    {
     
    8989            uint32_t                           cbData;
    9090            /** Area register flags; not used yet and must be set to 0. */
    91             VBOXCLIPBOARDEXTAREAREGISTETRFLAGS fFlags;
     91            SHCLEXTAREAREGISTETRFLAGS fFlags;
    9292        } fn_register;
    9393        struct
    9494        {
    9595            /** Area attach flags; not used yet and must be set to 0. */
    96             VBOXCLIPBOARDEXTAREAATTACHFLAGS    fFlags;
     96            SHCLEXTAREAATTACHFLAGS    fFlags;
    9797        } fn_attach;
    9898    } u;
    99 } VBOXCLIPBOARDEXTAREAPARMS, *PVBOXCLIPBOARDEXTAREAPARMS;
     99} SHCLEXTAREAPARMS, *PSHCLEXTAREAPARMS;
    100100#endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    101101
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r80637 r80662  
    389389
    390390/** @todo might be necessary for future. */
    391 #define VBOX_SHAREDCLIPBOARD_LIST_FLAG_NONE          0
    392 #define VBOX_SHAREDCLIPBOARD_LIST_FLAG_RETURN_ONE    RT_BIT(0)
    393 #define VBOX_SHAREDCLIPBOARD_LIST_FLAG_RESTART       RT_BIT(1)
    394 
    395 #define VBOX_SHAREDCLIPBOARD_LISTHDR_FLAG_NONE       0
     391#define VBOX_SHCL_LIST_FLAG_NONE          0
     392#define VBOX_SHCL_LIST_FLAG_RETURN_ONE    RT_BIT(0)
     393#define VBOX_SHCL_LIST_FLAG_RESTART       RT_BIT(1)
     394
     395#define VBOX_SHCL_LISTHDR_FLAG_NONE       0
    396396
    397397/** No additional information provided. */
    398 #define VBOX_SHAREDCLIPBOARD_INFO_FLAG_NONE          0
    399 /** Get object information of type SHAREDCLIPBOARDFSOBJINFO. */
    400 #define VBOX_SHAREDCLIPBOARD_INFO_FLAG_FSOBJINFO     RT_BIT(0)
     398#define VBOX_SHCL_INFO_FLAG_NONE          0
     399/** Get object information of type SHCLFSOBJINFO. */
     400#define VBOX_SHCL_INFO_FLAG_FSOBJINFO     RT_BIT(0)
    401401
    402402/**
     
    409409    /** uint32_t, in: Context ID. */
    410410    HGCMFunctionParameter uContext;
    411     /** uint32_t, in: Transfer status of type SHAREDCLIPBOARDURITRANSFERSTATUS. */
     411    /** uint32_t, in: Transfer status of type SHCLURITRANSFERSTATUS. */
    412412    HGCMFunctionParameter uStatus;
    413413    /** uint32_t, in: Size of payload of this status, based on the status type. */
     
    419419#define VBOX_SHARED_CLIPBOARD_CPARMS_STATUS 4
    420420
    421 #define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_INVALID           0
    422 #define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN         1
    423 #define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE        2
    424 #define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN          3
    425 #define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE         4
     421#define VBOX_SHCL_REPLYMSGTYPE_INVALID           0
     422#define VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN         1
     423#define VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE        2
     424#define VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN          3
     425#define VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE         4
    426426
    427427/**
     
    434434    /** uint32_t, out: Context ID. */
    435435    HGCMFunctionParameter uContext;
    436     /** uint32_t, out: Message type of type VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_XXX. */
     436    /** uint32_t, out: Message type of type VBOX_SHCL_REPLYMSGTYPE_XXX. */
    437437    HGCMFunctionParameter enmType;
    438438    /** uint32_t, out: IPRT result of overall operation. */
     
    499499    /** uint32_t, in: Context ID. */
    500500    HGCMFunctionParameter uContext;
    501     /** uint32_t, in: VBOX_SHAREDCLIPBOARD_INFO_FLAG_XXX. */
     501    /** uint32_t, in: VBOX_SHCL_INFO_FLAG_XXX. */
    502502    HGCMFunctionParameter fInfo;
    503503    /** uint32_t, in: Index of root list entry to get (zero-based). */
     
    531531    /** uint32_t, out: Bytes to be used for information/How many bytes were used.  */
    532532    HGCMFunctionParameter           cbInfo;
    533     /** pointer, in/out: Information to be set/get (SHAREDCLIPBOARDFSOBJINFO only currently).
    534      *  Do not forget to set the SHAREDCLIPBOARDFSOBJINFO::Attr::enmAdditional for Get operation as well.  */
     533    /** pointer, in/out: Information to be set/get (SHCLFSOBJINFO only currently).
     534     *  Do not forget to set the SHCLFSOBJINFO::Attr::enmAdditional for Get operation as well.  */
    535535    HGCMFunctionParameter           pvInfo;
    536536} VBoxClipboardRootListEntryMsg;
     
    547547    /** uint32_t, in: Context ID. */
    548548    HGCMFunctionParameter uContext;
    549     /** uint32_t, in: Listing flags (see VBOX_SHAREDCLIPBOARD_LIST_FLAG_XXX). */
     549    /** uint32_t, in: Listing flags (see VBOX_SHCL_LIST_FLAG_XXX). */
    550550    HGCMFunctionParameter fList;
    551551    /** uint32_t, in: Size (in bytes) of the filter string. */
     
    584584    /** uint64_t, in: List handle. */
    585585    HGCMFunctionParameter uHandle;
    586     /** uint32_t, in: Flags of type VBOX_SHAREDCLIPBOARD_LISTHDR_FLAG_XXX. */
     586    /** uint32_t, in: Flags of type VBOX_SHCL_LISTHDR_FLAG_XXX. */
    587587    HGCMFunctionParameter fFlags;
    588588} VBoxClipboardListHdrReqParms;
     
    608608
    609609    VBoxClipboardListHdrReqParms ReqParms;
    610     /** uint32_t, in/out: Feature flags (see VBOX_SHAREDCLIPBOARD_FEATURE_FLAG_XXX). */
     610    /** uint32_t, in/out: Feature flags (see VBOX_SHCL_FEATURE_FLAG_XXX). */
    611611    HGCMFunctionParameter        fFeatures;
    612612    /** uint64_t, in/out:  Number of total objects to transfer. */
     
    624624    /** uint64_t, in: List handle. */
    625625    HGCMFunctionParameter uHandle;
    626     /** uint32_t, in: VBOX_SHAREDCLIPBOARD_INFO_FLAG_XXX. */
     626    /** uint32_t, in: VBOX_SHCL_INFO_FLAG_XXX. */
    627627    HGCMFunctionParameter fInfo;
    628628} VBoxClipboardListEntryReqParms;
     
    653653    /** uint32_t, out: Bytes to be used for information/How many bytes were used.  */
    654654    HGCMFunctionParameter          cbInfo;
    655     /** pointer, in/out: Information to be set/get (SHAREDCLIPBOARDFSOBJINFO only currently).
    656      *  Do not forget to set the SHAREDCLIPBOARDFSOBJINFO::Attr::enmAdditional for Get operation as well.  */
     655    /** pointer, in/out: Information to be set/get (SHCLFSOBJINFO only currently).
     656     *  Do not forget to set the SHCLFSOBJINFO::Attr::enmAdditional for Get operation as well.  */
    657657    HGCMFunctionParameter          pvInfo;
    658658} VBoxClipboardListEntryMsg;
     
    672672    /** pointer, in/out: Absoulte path of object to open/create. */
    673673    HGCMFunctionParameter szPath;
    674     /** uint32_t in/out: Open / Create flags of type SHAREDCLIPBOARD_OBJ_CF_. */
     674    /** uint32_t in/out: Open / Create flags of type SHCL_OBJ_CF_. */
    675675    HGCMFunctionParameter fCreate;
    676676} VBoxClipboardObjOpenMsg;
     
    684684    /** uint32_t, in/out: Context ID. */
    685685    HGCMFunctionParameter uContext;
    686     /** uint64_t, in: SHAREDCLIPBOARDOBJHANDLE of object to close. */
     686    /** uint64_t, in: SHCLOBJHANDLE of object to close. */
    687687    HGCMFunctionParameter uHandle;
    688688} VBoxClipboardObjCloseMsg;
     
    694694    /** uint32_t, in: Context ID. */
    695695    HGCMFunctionParameter uContext;
    696     /** uint64_t, in: SHAREDCLIPBOARDOBJHANDLE of object to write to. */
     696    /** uint64_t, in: SHCLOBJHANDLE of object to write to. */
    697697    HGCMFunctionParameter uHandle;
    698698    /** uint32_t, in: How many bytes to read. */
     
    724724    /** uint32_t, in/out: Context ID. */
    725725    HGCMFunctionParameter uContext;
    726     /** uint64_t, in/out: SHAREDCLIPBOARDOBJHANDLE of object to write to. */
     726    /** uint64_t, in/out: SHCLOBJHANDLE of object to write to. */
    727727    HGCMFunctionParameter uHandle;
    728728    /** uint32_t, in/out: Size (in bytes) of current data chunk. */
     
    760760#pragma pack()
    761761
    762 typedef struct _VBOXCLIPBOARDFILEDATA
     762typedef struct _SHCLFILEDATA
    763763{
    764764    /** Current file data chunk. */
     
    770770    /** Size (in bytes) of current data chunk. */
    771771    uint32_t                    cbChecksum;
    772 } VBOXCLIPBOARDFILEDATA, *PVBOXCLIPBOARDFILEDATA;
    773 
    774 typedef struct _VBOXCLIPBOARDERRORDATA
     772} SHCLFILEDATA, *PSHCLFILEDATA;
     773
     774typedef struct _SHCLERRORDATA
    775775{
    776776    int32_t                     rc;
    777 } VBOXCLIPBOARDERRORDATA, *PVBOXCLIPBOARDERRORDATA;
     777} SHCLERRORDATA, *PSHCLERRORDATA;
    778778
    779779bool VBoxSvcClipboardGetHeadless(void);
  • trunk/include/VBox/VBoxGuestLib.h

    r80444 r80662  
    639639    {
    640640        /** Reports available formats from the host. */
    641         SHAREDCLIPBOARDFORMATDATA ReportFormats;
     641        SHCLFORMATDATA ReportFormats;
    642642        /** Requests data to be read from the guest. */
    643         SHAREDCLIPBOARDDATAREQ ReadData;
     643        SHCLDATAREQ ReadData;
    644644    } u;
    645645} VBGLR3CLIPBOARDEVENT, *PVBGLR3CLIPBOARDEVENT;
     
    651651VBGLR3DECL(int)     VbglR3ClipboardReadData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcb);
    652652VBGLR3DECL(int)     VbglR3ClipboardWriteData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb);
    653 VBGLR3DECL(int)     VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDDATABLOCK pData);
    654 VBGLR3DECL(int)     VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats);
     653VBGLR3DECL(int)     VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSHCLDATABLOCK pData);
     654VBGLR3DECL(int)     VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLFORMATDATA pFormats);
    655655VBGLR3DECL(int)     VbglR3ClipboardReportFormats(HGCMCLIENTID idClient, uint32_t fFormats);
    656656
     
    664664#  ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    665665VBGLR3DECL(int)     VbglR3ClipboardTransferEvent(PVBGLR3SHCLCMDCTX pCtx, uint32_t uMsg, uint32_t cParms,
    666                                                  PSHAREDCLIPBOARDURITRANSFER pTransfer);
    667 VBGLR3DECL(int)     VbglR3ClipboardTransferSendStatus(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer,
    668                                                       SHAREDCLIPBOARDURITRANSFERSTATUS uStatus);
    669 
    670 VBGLR3DECL(int)     VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList);
     666                                                 PSHCLURITRANSFER pTransfer);
     667VBGLR3DECL(int)     VbglR3ClipboardTransferSendStatus(PVBGLR3SHCLCMDCTX pCtx, PSHCLURITRANSFER pTransfer,
     668                                                      SHCLURITRANSFERSTATUS uStatus);
     669
     670VBGLR3DECL(int)     VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLIST *ppRootList);
    671671
    672672VBGLR3DECL(int)     VbglR3ClipboardRootListHdrReadReq(PVBGLR3SHCLCMDCTX pCtx, uint32_t *pfRoots);
    673 VBGLR3DECL(int)     VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDROOTLIST pRootList);
    674 VBGLR3DECL(int)     VbglR3ClipboardRootsWrite(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDROOTLISTHDR pRoots);
    675 
    676 VBGLR3DECL(int)     VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList);
    677 VBGLR3DECL(int)     VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms);
    678 VBGLR3DECL(int)     VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDLISTHANDLE hList);
    679 
    680 VBGLR3DECL(int)     VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList);
    681 VBGLR3DECL(int)     VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDLISTHANDLE phList);
    682 
    683 VBGLR3DECL(int)     VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr);
    684 VBGLR3DECL(int)     VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry);
    685 
    686 VBGLR3DECL(int)     VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms);
    687 VBGLR3DECL(int)     VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDOBJHANDLE hObj);
    688 VBGLR3DECL(int)     VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,
    689                                                PSHAREDCLIPBOARDOBJHANDLE phObj);
    690 
    691 VBGLR3DECL(int)     VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDOBJHANDLE phObj);
    692 VBGLR3DECL(int)     VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDOBJHANDLE hObj);
    693 VBGLR3DECL(int)     VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj);
    694 
    695 VBGLR3DECL(int)     VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDOBJHANDLE phObj, uint32_t pcbToRead,
     673VBGLR3DECL(int)     VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLIST pRootList);
     674VBGLR3DECL(int)     VbglR3ClipboardRootsWrite(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLISTHDR pRoots);
     675
     676VBGLR3DECL(int)     VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList);
     677VBGLR3DECL(int)     VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms);
     678VBGLR3DECL(int)     VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLLISTHANDLE hList);
     679
     680VBGLR3DECL(int)     VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList);
     681VBGLR3DECL(int)     VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList);
     682
     683VBGLR3DECL(int)     VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
     684VBGLR3DECL(int)     VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
     685
     686VBGLR3DECL(int)     VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms);
     687VBGLR3DECL(int)     VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj);
     688VBGLR3DECL(int)     VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
     689                                               PSHCLOBJHANDLE phObj);
     690
     691VBGLR3DECL(int)     VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj);
     692VBGLR3DECL(int)     VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj);
     693VBGLR3DECL(int)     VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj);
     694
     695VBGLR3DECL(int)     VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj, uint32_t pcbToRead,
    696696                                               uint32_t *pfFlags);
    697 VBGLR3DECL(int)     VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf,
     697VBGLR3DECL(int)     VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf,
    698698                                               uint32_t *pcbRead);
    699 VBGLR3DECL(int)     VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf,
     699VBGLR3DECL(int)     VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf,
    700700                                            uint32_t *pcbWritten);
    701701#  endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r80623 r80662  
    5252*********************************************************************************************************************************/
    5353
    54 typedef struct _VBOXCLIPBOARDCONTEXT
     54typedef struct _SHCLCONTEXT
    5555{
    5656    /** Pointer to the VBoxClient service environment. */
     
    5959    VBGLR3SHCLCMDCTX         CmdCtx;
    6060    /** Windows-specific context data. */
    61     VBOXCLIPBOARDWINCTX      Win;
     61    SHCLWINCTX      Win;
    6262#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    6363    /** URI transfer data. */
    64     SHAREDCLIPBOARDURICTX    URI;
     64    SHCLURICTX    URI;
    6565#endif
    66 } VBOXCLIPBOARDCONTEXT, *PVBOXCLIPBOARDCONTEXT;
     66} SHCLCONTEXT, *PSHCLCONTEXT;
    6767
    6868#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    69 typedef struct _VBOXCLIPBOARDURIREADTHREADCTX
    70 {
    71     PVBOXCLIPBOARDCONTEXT       pClipboardCtx;
    72     PSHAREDCLIPBOARDURITRANSFER pTransfer;
    73 } VBOXCLIPBOARDURIREADTHREADCTX, *PVBOXCLIPBOARDURIREADTHREADCTX;
    74 
    75 typedef struct _VBOXCLIPBOARDURIWRITETHREADCTX
    76 {
    77     PVBOXCLIPBOARDCONTEXT       pClipboardCtx;
    78     PSHAREDCLIPBOARDURITRANSFER pTransfer;
    79 } VBOXCLIPBOARDURIWRITETHREADCTX, *PVBOXCLIPBOARDURIWRITETHREADCTX;
     69typedef struct _SHCLURIREADTHREADCTX
     70{
     71    PSHCLCONTEXT       pClipboardCtx;
     72    PSHCLURITRANSFER pTransfer;
     73} SHCLURIREADTHREADCTX, *PSHCLURIREADTHREADCTX;
     74
     75typedef struct _SHCLURIWRITETHREADCTX
     76{
     77    PSHCLCONTEXT       pClipboardCtx;
     78    PSHCLURITRANSFER pTransfer;
     79} SHCLURIWRITETHREADCTX, *PSHCLURIWRITETHREADCTX;
    8080#endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    8181
     
    8585*********************************************************************************************************************************/
    8686/** Static clipboard context (since it is the single instance). Directly used in the windows proc. */
    87 static VBOXCLIPBOARDCONTEXT g_Ctx = { NULL };
     87static SHCLCONTEXT g_Ctx = { NULL };
    8888/** Static window class name. */
    8989static char s_szClipWndClassName[] = VBOX_CLIPBOARD_WNDCLASS_NAME;
     
    9494*********************************************************************************************************************************/
    9595#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    96 static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);
    97 static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);
     96static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc);
     97static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc);
    9898#endif
    9999
     
    106106    LogFlowFuncEnter();
    107107
    108     PVBOXCLIPBOARDURIWRITETHREADCTX pCtx = (PVBOXCLIPBOARDURIWRITETHREADCTX)pvUser;
     108    PSHCLURIWRITETHREADCTX pCtx = (PSHCLURIWRITETHREADCTX)pvUser;
    109109    AssertPtr(pCtx);
    110110
    111     PSHAREDCLIPBOARDURITRANSFER pTransfer = pCtx->pTransfer;
     111    PSHCLURITRANSFER pTransfer = pCtx->pTransfer;
    112112    AssertPtr(pTransfer);
    113113
     
    120120    if (RT_SUCCESS(rc))
    121121    {
    122         rc = VbglR3ClipboardTransferSendStatus(&cmdCtx, pTransfer, SHAREDCLIPBOARDURITRANSFERSTATUS_RUNNING);
     122        rc = VbglR3ClipboardTransferSendStatus(&cmdCtx, pTransfer, SHCLURITRANSFERSTATUS_RUNNING);
    123123        if (RT_SUCCESS(rc))
    124124        {
     
    158158}
    159159
    160 static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)
     160static DECLCALLBACK(void) vboxClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc)
    161161{
    162162    RT_NOREF(rc);
     
    166166    LogRel2(("Shared Clipboard: Transfer to destination complete\n"));
    167167
    168     PSHAREDCLIPBOARDURICTX pCtx = (PSHAREDCLIPBOARDURICTX)pData->pvUser;
     168    PSHCLURICTX pCtx = (PSHCLURICTX)pData->pvUser;
    169169    AssertPtr(pCtx);
    170170
    171     PSHAREDCLIPBOARDURITRANSFER pTransfer = pData->pTransfer;
     171    PSHCLURITRANSFER pTransfer = pData->pTransfer;
    172172    AssertPtr(pTransfer);
    173173
     
    182182}
    183183
    184 static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)
     184static DECLCALLBACK(void) vboxClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc)
    185185{
    186186    RT_NOREF(rc);
     
    190190    LogRel(("Shared Clipboard: Transfer to destination failed with %Rrc\n", rc));
    191191
    192     PSHAREDCLIPBOARDURICTX pCtx = (PSHAREDCLIPBOARDURICTX)pData->pvUser;
     192    PSHCLURICTX pCtx = (PSHCLURICTX)pData->pvUser;
    193193    AssertPtr(pCtx);
    194194
    195     PSHAREDCLIPBOARDURITRANSFER pTransfer = pData->pTransfer;
     195    PSHCLURITRANSFER pTransfer = pData->pTransfer;
    196196    AssertPtr(pTransfer);
    197197
     
    206206}
    207207
    208 static int vboxClipboardURITransferOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx)
     208static int vboxClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx)
    209209{
    210210    RT_NOREF(pCtx);
     
    214214}
    215215
    216 static int vboxClipboardURITransferClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx)
     216static int vboxClipboardURITransferClose(PSHCLPROVIDERCTX pCtx)
    217217{
    218218    RT_NOREF(pCtx);
     
    222222}
    223223
    224 static int vboxClipboardURIListOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,
    225                                     PSHAREDCLIPBOARDLISTHANDLE phList)
     224static int vboxClipboardURIListOpen(PSHCLPROVIDERCTX pCtx, PSHCLLISTOPENPARMS pOpenParms,
     225                                    PSHCLLISTHANDLE phList)
    226226{
    227227    RT_NOREF(pCtx, pOpenParms, phList);
     
    229229    LogFlowFuncEnter();
    230230
    231     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     231    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    232232    AssertPtr(pThisCtx);
    233233
     
    240240}
    241241
    242 static int vboxClipboardURIListClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList)
     242static int vboxClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList)
    243243{
    244244    RT_NOREF(pCtx, hList);
     
    246246    LogFlowFuncEnter();
    247247
    248     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     248    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    249249    AssertPtr(pThisCtx);
    250250
     
    257257}
    258258
    259 static int vboxClipboardURIGetRoots(PSHAREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList)
     259static int vboxClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList)
    260260{
    261261    LogFlowFuncEnter();
    262262
    263     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     263    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    264264    AssertPtr(pThisCtx);
    265265
     
    270270}
    271271
    272 static int vboxClipboardURIListHdrRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    273                                        PVBOXCLIPBOARDLISTHDR pListHdr)
     272static int vboxClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     273                                       PSHCLLISTHDR pListHdr)
    274274{
    275275    RT_NOREF(hList);
     
    277277    LogFlowFuncEnter();
    278278
    279     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     279    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    280280    AssertPtr(pThisCtx);
    281281
     
    298298
    299299/*
    300 static int vboxClipboardURIListHdrWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    301                                         PVBOXCLIPBOARDLISTHDR pListHdr)
     300static int vboxClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     301                                        PSHCLLISTHDR pListHdr)
    302302{
    303303    LogFlowFuncEnter();
    304304
    305     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     305    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    306306    AssertPtr(pThisCtx);
    307307
     
    312312}*/
    313313
    314 static int vboxClipboardURIListEntryRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    315                                          PVBOXCLIPBOARDLISTENTRY pListEntry)
     314static int vboxClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     315                                         PSHCLLISTENTRY pListEntry)
    316316{
    317317    RT_NOREF(hList);
     
    319319    LogFlowFuncEnter();
    320320
    321     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     321    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    322322    AssertPtr(pThisCtx);
    323323
     
    332332
    333333/*
    334 static int vboxClipboardURIListEntryWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    335                                           PVBOXCLIPBOARDLISTENTRY pListEntry)
     334static int vboxClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     335                                          PSHCLLISTENTRY pListEntry)
    336336{
    337337    LogFlowFuncEnter();
    338338
    339     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     339    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    340340    AssertPtr(pThisCtx);
    341341
     
    347347*/
    348348
    349 static int vboxClipboardURIObjOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    350                                    PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms, PSHAREDCLIPBOARDOBJHANDLE phObj)
     349static int vboxClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx,
     350                                   PSHCLOBJOPENCREATEPARMS pCreateParms, PSHCLOBJHANDLE phObj)
    351351{
    352352    LogFlowFuncEnter();
    353353
    354     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     354    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    355355    AssertPtr(pThisCtx);
    356356
     
    361361}
    362362
    363 static int vboxClipboardURIObjClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj)
     363static int vboxClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj)
    364364{
    365365    LogFlowFuncEnter();
    366366
    367     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     367    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    368368    AssertPtr(pThisCtx);
    369369
     
    374374}
    375375
    376 static int vboxClipboardURIObjRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     376static int vboxClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    377377                                   void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
    378378{
     
    381381    LogFlowFuncEnter();
    382382
    383     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     383    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    384384    AssertPtr(pThisCtx);
    385385
     
    390390}
    391391
    392 static int vboxClipboardURIObjWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     392static int vboxClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    393393                                    void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
    394394{
     
    397397    LogFlowFuncEnter();
    398398
    399     PVBOXCLIPBOARDCONTEXT pThisCtx = (PVBOXCLIPBOARDCONTEXT)pCtx->pvUser;
     399    PSHCLCONTEXT pThisCtx = (PSHCLCONTEXT)pCtx->pvUser;
    400400    AssertPtr(pThisCtx);
    401401
     
    407407#endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    408408
    409 static LRESULT vboxClipboardWinProcessMsg(PVBOXCLIPBOARDCONTEXT pCtx, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
     409static LRESULT vboxClipboardWinProcessMsg(PSHCLCONTEXT pCtx, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
    410410{
    411411    AssertPtr(pCtx);
    412412
    413     const PVBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;
     413    const PSHCLWINCTX pWinCtx = &pCtx->Win;
    414414
    415415    LRESULT lresultRc = 0;
     
    427427               /* Clipboard was updated by another application.
    428428                * Report available formats to the host. */
    429                SHAREDCLIPBOARDFORMATDATA Formats;
     429               SHCLFORMATDATA Formats;
    430430               int rc = VBoxClipboardWinGetFormats(&pCtx->Win, &Formats);
    431431               if (RT_SUCCESS(rc))
     
    454454               /* Clipboard was updated by another application. */
    455455               /* WM_DRAWCLIPBOARD always expects a return code of 0, so don't change "rc" here. */
    456                SHAREDCLIPBOARDFORMATDATA Formats;
     456               SHCLFORMATDATA Formats;
    457457               int rc = VBoxClipboardWinGetFormats(pWinCtx, &Formats);
    458458               if (RT_SUCCESS(rc))
     
    485485           const UINT cfFormat = (UINT)wParam;
    486486
    487            const VBOXCLIPBOARDFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);
     487           const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);
    488488
    489489           LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat));
     
    647647           Assert(pEvent->enmType == VBGLR3CLIPBOARDEVENTTYPE_REPORT_FORMATS);
    648648
    649            const VBOXCLIPBOARDFORMATS fFormats =  pEvent->u.ReportFormats.uFormats;
     649           const SHCLFORMATS fFormats =  pEvent->u.ReportFormats.uFormats;
    650650
    651651           if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */
     
    661661                        LogFunc(("VBOX_SHARED_CLIPBOARD_FMT_URI_LIST\n"));
    662662
    663                         PSHAREDCLIPBOARDURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pCtx->URI,
     663                        PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pCtx->URI,
    664664                                                                                                 0 /* uIdx */);
    665665                        if (pTransfer)
     
    698698           Assert(pEvent->enmType == VBGLR3CLIPBOARDEVENTTYPE_READ_DATA);
    699699
    700            const VBOXCLIPBOARDFORMAT uFormat = (uint32_t)pEvent->u.ReadData.uFmt;
     700           const SHCLFORMAT uFormat = (uint32_t)pEvent->u.ReadData.uFmt;
    701701
    702702           HANDLE hClip = NULL;
     
    715715                       if (lp != NULL)
    716716                       {
    717                            SHAREDCLIPBOARDDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) };
     717                           SHCLDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) };
    718718
    719719                           rc = VbglR3ClipboardWriteDataEx(&pEvent->cmdCtx, &dataBlock);
     
    735735                       if (uniString != NULL)
    736736                       {
    737                            SHAREDCLIPBOARDDATABLOCK dataBlock = { uFormat, uniString, ((uint32_t)lstrlenW(uniString) + 1) * 2 };
     737                           SHCLDATABLOCK dataBlock = { uFormat, uniString, ((uint32_t)lstrlenW(uniString) + 1) * 2 };
    738738
    739739                           rc = VbglR3ClipboardWriteDataEx(&pEvent->cmdCtx, &dataBlock);
     
    759759                           if (lp != NULL)
    760760                           {
    761                                SHAREDCLIPBOARDDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) };
     761                               SHCLDATABLOCK dataBlock = { uFormat, lp, (uint32_t)GlobalSize(hClip) };
    762762
    763763                               rc = VbglR3ClipboardWriteDataEx(&pEvent->cmdCtx, &dataBlock);
     
    780780                   if (RT_SUCCESS(rc))
    781781                   {
    782                        PSHAREDCLIPBOARDURITRANSFER pTransfer;
    783                        rc = SharedClipboardURITransferCreate(SHAREDCLIPBOARDURITRANSFERDIR_WRITE,
    784                                                              SHAREDCLIPBOARDSOURCE_LOCAL,
     782                       PSHCLURITRANSFER pTransfer;
     783                       rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE,
     784                                                             SHCLSOURCE_LOCAL,
    785785                                                             &pTransfer);
    786786                       if (RT_SUCCESS(rc))
     
    809809                                           if (RT_SUCCESS(rc))
    810810                                           {
    811                                                PVBOXCLIPBOARDURIWRITETHREADCTX pThreadCtx
    812                                                    = (PVBOXCLIPBOARDURIWRITETHREADCTX)RTMemAllocZ(sizeof(VBOXCLIPBOARDURIWRITETHREADCTX));
     811                                               PSHCLURIWRITETHREADCTX pThreadCtx
     812                                                   = (PSHCLURIWRITETHREADCTX)RTMemAllocZ(sizeof(SHCLURIWRITETHREADCTX));
    813813                                               if (pThreadCtx)
    814814                                               {
     
    874874           if (RT_SUCCESS(rc))
    875875           {
    876                PSHAREDCLIPBOARDURITRANSFER pTransfer;
    877                rc = SharedClipboardURITransferCreate(SHAREDCLIPBOARDURITRANSFERDIR_WRITE,
    878                                                      SHAREDCLIPBOARDSOURCE_LOCAL,
     876               PSHCLURITRANSFER pTransfer;
     877               rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE,
     878                                                     SHCLSOURCE_LOCAL,
    879879                                                     &pTransfer);
    880880               if (RT_SUCCESS(rc))
     
    903903                                   if (RT_SUCCESS(rc))
    904904                                   {
    905                                        PVBOXCLIPBOARDURIWRITETHREADCTX pThreadCtx
    906                                            = (PVBOXCLIPBOARDURIWRITETHREADCTX)RTMemAllocZ(sizeof(VBOXCLIPBOARDURIWRITETHREADCTX));
     905                                       PSHCLURIWRITETHREADCTX pThreadCtx
     906                                           = (PSHCLURIWRITETHREADCTX)RTMemAllocZ(sizeof(SHCLURIWRITETHREADCTX));
    907907                                       if (pThreadCtx)
    908908                                       {
     
    949949                    SharedClipboardURICtxGetRunningTransfers(&pCtx->URI)));
    950950
    951            PSHAREDCLIPBOARDURITRANSFER pTransfer;
    952            int rc = SharedClipboardURITransferCreate(SHAREDCLIPBOARDURITRANSFERDIR_READ,
    953                                                      SHAREDCLIPBOARDSOURCE_LOCAL,
     951           PSHCLURITRANSFER pTransfer;
     952           int rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_READ,
     953                                                     SHCLSOURCE_LOCAL,
    954954                                                     &pTransfer);
    955955           if (RT_SUCCESS(rc))
    956956           {
    957                SHAREDCLIPBOARDURITRANSFERCALLBACKS TransferCallbacks;
     957               SHCLURITRANSFERCALLBACKS TransferCallbacks;
    958958               RT_ZERO(TransferCallbacks);
    959959
     
    964964               SharedClipboardURITransferSetCallbacks(pTransfer, &TransferCallbacks);
    965965
    966                SHAREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;
     966               SHCLPROVIDERCREATIONCTX creationCtx;
    967967               RT_ZERO(creationCtx);
    968968
    969                creationCtx.enmSource = SHAREDCLIPBOARDSOURCE_REMOTE;
     969               creationCtx.enmSource = SHCLSOURCE_REMOTE;
    970970
    971971               creationCtx.Interface.pfnGetRoots      = vboxClipboardURIGetRoots;
     
    10291029static LRESULT CALLBACK vboxClipboardWinWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
    10301030
    1031 static int vboxClipboardCreateWindow(PVBOXCLIPBOARDCONTEXT pCtx)
     1031static int vboxClipboardCreateWindow(PSHCLCONTEXT pCtx)
    10321032{
    10331033    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    10581058    if (RT_SUCCESS(rc))
    10591059    {
    1060         const PVBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;
     1060        const PSHCLWINCTX pWinCtx = &pCtx->Win;
    10611061
    10621062        /* Create the window. */
     
    10841084}
    10851085
    1086 static void vboxClipboardDestroy(PVBOXCLIPBOARDCONTEXT pCtx)
     1086static void vboxClipboardDestroy(PSHCLCONTEXT pCtx)
    10871087{
    10881088    AssertPtrReturnVoid(pCtx);
    10891089
    1090     const PVBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;
     1090    const PSHCLWINCTX pWinCtx = &pCtx->Win;
    10911091
    10921092    if (pWinCtx->hWnd)
     
    11011101static LRESULT CALLBACK vboxClipboardWinWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    11021102{
    1103     PVBOXCLIPBOARDCONTEXT pCtx = &g_Ctx; /** @todo r=andy Make pCtx available through SetWindowLongPtr() / GWL_USERDATA. */
     1103    PSHCLCONTEXT pCtx = &g_Ctx; /** @todo r=andy Make pCtx available through SetWindowLongPtr() / GWL_USERDATA. */
    11041104    AssertPtr(pCtx);
    11051105
     
    11121112    LogFlowFuncEnter();
    11131113
    1114     PVBOXCLIPBOARDCONTEXT pCtx = &g_Ctx; /* Only one instance for now. */
     1114    PSHCLCONTEXT pCtx = &g_Ctx; /* Only one instance for now. */
    11151115    AssertPtr(pCtx);
    11161116
     
    11821182    RTThreadUserSignal(RTThreadSelf());
    11831183
    1184     const PVBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pInstance;
     1184    const PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pInstance;
    11851185    AssertPtr(pCtx);
    11861186
    1187     const PVBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;
     1187    const PSHCLWINCTX pWinCtx = &pCtx->Win;
    11881188
    11891189    int rc;
     
    13241324    LogFunc(("Stopping pInstance=%p\n", pInstance));
    13251325
    1326     PVBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pInstance;
     1326    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pInstance;
    13271327    AssertPtr(pCtx);
    13281328
     
    13381338    AssertPtrReturnVoid(pInstance);
    13391339
    1340     PVBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pInstance;
     1340    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pInstance;
    13411341    AssertPtr(pCtx);
    13421342
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp

    r80623 r80662  
    155155
    156156
    157 VBGLR3DECL(int) VbglR3ClipboardFormatsWriteRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)
     157VBGLR3DECL(int) VbglR3ClipboardFormatsWriteRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLFORMATDATA pFormats)
    158158{
    159159    AssertPtrReturn(pCtx,     VERR_INVALID_POINTER);
     
    188188
    189189
    190 VBGLR3DECL(int) VbglR3ClipboardReadDataRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDDATAREQ pDataReq)
     190VBGLR3DECL(int) VbglR3ClipboardReadDataRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLDATAREQ pDataReq)
    191191{
    192192    AssertPtrReturn(pCtx,     VERR_INVALID_POINTER);
     
    366366#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    367367VBGLR3DECL(int) VbglR3ClipboardTransferSendStatus(PVBGLR3SHCLCMDCTX pCtx,
    368                                                   PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDURITRANSFERSTATUS uStatus)
     368                                                  PSHCLURITRANSFER pTransfer, SHCLURITRANSFERSTATUS uStatus)
    369369{
    370370    AssertPtrReturn(pCtx,      VERR_INVALID_POINTER);
     
    388388}
    389389
    390 static int vbglR3ClipboardRootListHdrRead(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDROOTLISTHDR pRootListHdr)
     390static int vbglR3ClipboardRootListHdrRead(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLISTHDR pRootListHdr)
    391391{
    392392    AssertPtrReturn(pCtx,         VERR_INVALID_POINTER);
     
    416416}
    417417
    418 static int vbglR3ClipboardRootListEntryRead(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry)
     418static int vbglR3ClipboardRootListEntryRead(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, PSHCLROOTLISTENTRY pRootListEntry)
    419419{
    420420    AssertPtrReturn(pCtx,           VERR_INVALID_POINTER);
     
    452452}
    453453
    454 VBGLR3DECL(int) VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList)
     454VBGLR3DECL(int) VbglR3ClipboardRootListRead(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLIST *ppRootList)
    455455{
    456456    AssertPtrReturn(pCtx,       VERR_INVALID_POINTER);
     
    459459    int rc;
    460460
    461     PVBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();
     461    PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc();
    462462    if (pRootList)
    463463    {
    464         VBOXCLIPBOARDROOTLISTHDR srcRootListHdr;
     464        SHCLROOTLISTHDR srcRootListHdr;
    465465        rc = vbglR3ClipboardRootListHdrRead(pCtx, &srcRootListHdr);
    466466        if (RT_SUCCESS(rc))
     
    472472            {
    473473                pRootList->paEntries =
    474                     (PVBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(srcRootListHdr.cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));
     474                    (PSHCLROOTLISTENTRY)RTMemAllocZ(srcRootListHdr.cRoots * sizeof(SHCLROOTLISTENTRY));
    475475                if (pRootList->paEntries)
    476476                {
     
    527527}
    528528
    529 VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDROOTLISTHDR pRootListHdr)
     529VBGLR3DECL(int) VbglR3ClipboardRootListHdrReadReply(PVBGLR3SHCLCMDCTX pCtx, PSHCLROOTLISTHDR pRootListHdr)
    530530{
    531531    AssertPtrReturn(pCtx,         VERR_INVALID_POINTER);
     
    579579}
    580580
    581 VBGLR3DECL(int) VbglR3ClipboardRootListEntryReadReply(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, PVBOXCLIPBOARDROOTLISTENTRY pEntry)
     581VBGLR3DECL(int) VbglR3ClipboardRootListEntryReadReply(PVBGLR3SHCLCMDCTX pCtx, uint32_t uIndex, PSHCLROOTLISTENTRY pEntry)
    582582{
    583583    AssertPtrReturn(pCtx,   VERR_INVALID_POINTER);
     
    604604}
    605605
    606 VBGLR3DECL(int) VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,
    607                                             PSHAREDCLIPBOARDLISTHANDLE phList)
     606VBGLR3DECL(int) VbglR3ClipboardListOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms,
     607                                            PSHCLLISTHANDLE phList)
    608608{
    609609    AssertPtrReturn(pCtx,       VERR_INVALID_POINTER);
     
    634634}
    635635
    636 VBGLR3DECL(int) VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms)
     636VBGLR3DECL(int) VbglR3ClipboardListOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTOPENPARMS pOpenParms)
    637637{
    638638    AssertPtrReturn(pCtx,       VERR_INVALID_POINTER);
     
    669669}
    670670
    671 VBGLR3DECL(int) VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDLISTHANDLE hList)
     671VBGLR3DECL(int) VbglR3ClipboardListOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLLISTHANDLE hList)
    672672{
    673673    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    680680
    681681    Msg.uContext.SetUInt32(pCtx->uContextID);
    682     Msg.enmType.SetUInt32(VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN);
     682    Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN);
    683683    Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */
    684684    Msg.cbPayload.SetUInt32(0);
     
    693693}
    694694
    695 VBGLR3DECL(int) VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDLISTHANDLE phList)
     695VBGLR3DECL(int) VbglR3ClipboardListCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList)
    696696{
    697697    AssertPtrReturn(pCtx,   VERR_INVALID_POINTER);
     
    719719}
    720720
    721 VBGLR3DECL(int) VbglR3ClipboardListCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDLISTHANDLE hList)
     721VBGLR3DECL(int) VbglR3ClipboardListCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLLISTHANDLE hList)
    722722{
    723723    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    730730
    731731    Msg.uContext.SetUInt32(pCtx->uContextID);
    732     Msg.enmType.SetUInt32(VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE);
     732    Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE);
    733733    Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */
    734734    Msg.cbPayload.SetUInt32(0);
     
    743743}
    744744
    745 VBGLR3DECL(int) VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList)
     745VBGLR3DECL(int) VbglR3ClipboardListCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList)
    746746{
    747747    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    763763
    764764
    765 VBGLR3DECL(int) VbglR3ClipboardListHdrRead(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList, uint32_t fFlags,
    766                                            PVBOXCLIPBOARDLISTHDR pListHdr)
     765VBGLR3DECL(int) VbglR3ClipboardListHdrRead(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList, uint32_t fFlags,
     766                                           PSHCLLISTHDR pListHdr)
    767767{
    768768    AssertPtrReturn(pCtx,     VERR_INVALID_POINTER);
     
    798798}
    799799
    800 VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDLISTHANDLE phList, uint32_t *pfFlags)
     800VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList, uint32_t *pfFlags)
    801801{
    802802    AssertPtrReturn(pCtx,    VERR_INVALID_POINTER);
     
    828828}
    829829
    830 VBGLR3DECL(int) VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    831                                             PVBOXCLIPBOARDLISTHDR pListHdr)
     830VBGLR3DECL(int) VbglR3ClipboardListHdrWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList,
     831                                            PSHCLLISTHDR pListHdr)
    832832{
    833833    AssertPtrReturn(pCtx,     VERR_INVALID_POINTER);
     
    855855}
    856856
    857 VBGLR3DECL(int) VbglR3ClipboardListEntryRead(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    858                                              PVBOXCLIPBOARDLISTENTRY pListEntry)
     857VBGLR3DECL(int) VbglR3ClipboardListEntryRead(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList,
     858                                             PSHCLLISTENTRY pListEntry)
    859859{
    860860    AssertPtrReturn(pCtx,       VERR_INVALID_POINTER);
     
    885885}
    886886
    887 VBGLR3DECL(int) VbglR3ClipboardListEntryReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDLISTHANDLE phList, uint32_t *pfInfo)
     887VBGLR3DECL(int) VbglR3ClipboardListEntryReadRecvReq(PVBGLR3SHCLCMDCTX pCtx, PSHCLLISTHANDLE phList, uint32_t *pfInfo)
    888888{
    889889    AssertPtrReturn(pCtx,   VERR_INVALID_POINTER);
     
    915915}
    916916
    917 VBGLR3DECL(int) VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    918                                               PVBOXCLIPBOARDLISTENTRY pListEntry)
     917VBGLR3DECL(int) VbglR3ClipboardListEntryWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLLISTHANDLE hList,
     918                                              PSHCLLISTENTRY pListEntry)
    919919{
    920920    AssertPtrReturn(pCtx,       VERR_INVALID_POINTER);
     
    941941}
    942942
    943 VBGLR3DECL(int) VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms)
     943VBGLR3DECL(int) VbglR3ClipboardObjOpenRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms)
    944944{
    945945    AssertPtrReturn(pCtx,         VERR_INVALID_POINTER);
     
    972972}
    973973
    974 VBGLR3DECL(int) VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDOBJHANDLE hObj)
     974VBGLR3DECL(int) VbglR3ClipboardObjOpenReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj)
    975975{
    976976    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    983983
    984984    Msg.uContext.SetUInt32(pCtx->uContextID);
    985     Msg.enmType.SetUInt32(VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN);
     985    Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN);
    986986    Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */
    987987    Msg.cbPayload.SetUInt32(0);
     
    996996}
    997997
    998 VBGLR3DECL(int) VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,
    999                                            PSHAREDCLIPBOARDOBJHANDLE phObj)
     998VBGLR3DECL(int) VbglR3ClipboardObjOpenSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
     999                                           PSHCLOBJHANDLE phObj)
    10001000{
    10011001    AssertPtrReturn(pCtx,         VERR_INVALID_POINTER);
     
    10251025}
    10261026
    1027 VBGLR3DECL(int) VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDOBJHANDLE phObj)
     1027VBGLR3DECL(int) VbglR3ClipboardObjCloseRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj)
    10281028{
    10291029    AssertPtrReturn(pCtx,  VERR_INVALID_POINTER);
     
    10511051}
    10521052
    1053 VBGLR3DECL(int) VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHAREDCLIPBOARDOBJHANDLE hObj)
     1053VBGLR3DECL(int) VbglR3ClipboardObjCloseReply(PVBGLR3SHCLCMDCTX pCtx, int rcReply, SHCLOBJHANDLE hObj)
    10541054{
    10551055    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    10621062
    10631063    Msg.uContext.SetUInt32(pCtx->uContextID);
    1064     Msg.enmType.SetUInt32(VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE);
     1064    Msg.enmType.SetUInt32(VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE);
    10651065    Msg.rc.SetUInt32((uint32_t)rcReply); /** int vs. uint32_t */
    10661066    Msg.cbPayload.SetUInt32(0);
     
    10751075}
    10761076
    1077 VBGLR3DECL(int) VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj)
     1077VBGLR3DECL(int) VbglR3ClipboardObjCloseSend(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj)
    10781078{
    10791079    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    10941094}
    10951095
    1096 VBGLR3DECL(int) VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDOBJHANDLE phObj, uint32_t *pcbToRead,
     1096VBGLR3DECL(int) VbglR3ClipboardObjReadRecv(PVBGLR3SHCLCMDCTX pCtx, PSHCLOBJHANDLE phObj, uint32_t *pcbToRead,
    10971097                                           uint32_t *pfFlags)
    10981098{
     
    11291129}
    11301130
    1131 VBGLR3DECL(int) VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     1131VBGLR3DECL(int) VbglR3ClipboardObjRead(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj,
    11321132                                       void *pvData, uint32_t cbData, uint32_t *pcbRead)
    11331133{
     
    11661166}
    11671167
    1168 VBGLR3DECL(int) VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     1168VBGLR3DECL(int) VbglR3ClipboardObjWrite(PVBGLR3SHCLCMDCTX pCtx, SHCLOBJHANDLE hObj,
    11691169                                        void *pvData, uint32_t cbData, uint32_t *pcbWritten)
    11701170{
     
    12011201
    12021202VBGLR3DECL(int) VbglR3ClipboardTransferEvent(PVBGLR3SHCLCMDCTX pCtx, uint32_t uMsg, uint32_t cParms,
    1203                                              PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1203                                             PSHCLURITRANSFER pTransfer)
    12041204{
    12051205    RT_NOREF(cParms);
     
    12201220            if (RT_SUCCESS(rc))
    12211221            {
    1222                 VBOXCLIPBOARDROOTLISTHDR rootListHdr;
     1222                SHCLROOTLISTHDR rootListHdr;
    12231223                RT_ZERO(rootListHdr);
    12241224
     
    12391239            if (RT_SUCCESS(rc))
    12401240            {
    1241                 VBOXCLIPBOARDROOTLISTENTRY rootListEntry;
     1241                SHCLROOTLISTENTRY rootListEntry;
    12421242                rc = SharedClipboardURILTransferRootsEntry(pTransfer, uIndex, &rootListEntry);
    12431243                if (RT_SUCCESS(rc))
     
    12491249        case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN:
    12501250        {
    1251             VBOXCLIPBOARDLISTOPENPARMS openParmsList;
     1251            SHCLLISTOPENPARMS openParmsList;
    12521252            rc = SharedClipboardURIListOpenParmsInit(&openParmsList);
    12531253            if (RT_SUCCESS(rc))
     
    12581258                    LogFlowFunc(("pszPath=%s\n", openParmsList.pszPath));
    12591259
    1260                     SHAREDCLIPBOARDLISTHANDLE hList = SHAREDCLIPBOARDLISTHANDLE_INVALID;
     1260                    SHCLLISTHANDLE hList = SHCLLISTHANDLE_INVALID;
    12611261                    rc = SharedClipboardURITransferListOpen(pTransfer, &openParmsList, &hList);
    12621262
     
    12741274        case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE:
    12751275        {
    1276             SHAREDCLIPBOARDLISTHANDLE hList;
     1276            SHCLLISTHANDLE hList;
    12771277            rc = VbglR3ClipboardListCloseRecv(pCtx, &hList);
    12781278            if (RT_SUCCESS(rc))
     
    12921292            /** @todo Handle filter + list features. */
    12931293
    1294             SHAREDCLIPBOARDLISTHANDLE hList  = SHAREDCLIPBOARDLISTHANDLE_INVALID;
     1294            SHCLLISTHANDLE hList  = SHCLLISTHANDLE_INVALID;
    12951295            uint32_t                  fFlags = 0;
    12961296            rc = VbglR3ClipboardListHdrReadRecvReq(pCtx, &hList, &fFlags);
    12971297            if (RT_SUCCESS(rc))
    12981298            {
    1299                 VBOXCLIPBOARDLISTHDR hdrList;
     1299                SHCLLISTHDR hdrList;
    13001300                rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList);
    13011301                if (RT_SUCCESS(rc))
     
    13151315            LogFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_WRITE\n"));
    13161316
    1317             VBOXCLIPBOARDLISTHDR hdrList;
     1317            SHCLLISTHDR hdrList;
    13181318            rc = SharedClipboardURIListHdrInit(&hdrList);
    13191319            if (RT_SUCCESS(rc))
     
    13291329            LogFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ\n"));
    13301330
    1331             VBOXCLIPBOARDLISTENTRY entryList;
     1331            SHCLLISTENTRY entryList;
    13321332            rc = SharedClipboardURIListEntryInit(&entryList);
    13331333            if (RT_SUCCESS(rc))
    13341334            {
    1335                 SHAREDCLIPBOARDLISTHANDLE hList;
     1335                SHCLLISTHANDLE hList;
    13361336                uint32_t                  fInfo;
    13371337                rc = VbglR3ClipboardListEntryReadRecvReq(pCtx, &hList, &fInfo);
     
    13411341                    if (RT_SUCCESS(rc))
    13421342                    {
    1343                         PSHAREDCLIPBOARDFSOBJINFO pObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)entryList.pvInfo;
    1344                         Assert(entryList.cbInfo == sizeof(SHAREDCLIPBOARDFSOBJINFO));
     1343                        PSHCLFSOBJINFO pObjInfo = (PSHCLFSOBJINFO)entryList.pvInfo;
     1344                        Assert(entryList.cbInfo == sizeof(SHCLFSOBJINFO));
    13451345
    13461346                        RT_NOREF(pObjInfo);
     
    13691369        case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN:
    13701370        {
    1371             VBOXCLIPBOARDOBJOPENCREATEPARMS openParms;
     1371            SHCLOBJOPENCREATEPARMS openParms;
    13721372            rc = SharedClipboardURIObjectOpenParmsInit(&openParms);
    13731373            if (RT_SUCCESS(rc))
     
    13761376                if (RT_SUCCESS(rc))
    13771377                {
    1378                     SHAREDCLIPBOARDOBJHANDLE hObj;
     1378                    SHCLOBJHANDLE hObj;
    13791379                    rc = SharedClipboardURIObjectOpen(pTransfer, &openParms, &hObj);
    13801380
     
    13921392        case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE:
    13931393        {
    1394             SHAREDCLIPBOARDOBJHANDLE hObj;
     1394            SHCLOBJHANDLE hObj;
    13951395            rc = VbglR3ClipboardObjCloseRecv(pCtx, &hObj);
    13961396            if (RT_SUCCESS(rc))
     
    14081408        case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ:
    14091409        {
    1410             SHAREDCLIPBOARDOBJHANDLE hObj;
     1410            SHCLOBJHANDLE hObj;
    14111411            uint32_t cbBuf;
    14121412            uint32_t fFlags;
     
    15491549
    15501550#if 0
    1551 VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecv(HGCMCLIENTID idClient, PVBOXCLIPBOARDLISTHANDLE phList)
     1551VBGLR3DECL(int) VbglR3ClipboardListHdrReadRecv(HGCMCLIENTID idClient, PSHCLLISTHANDLE phList)
    15521552{
    15531553    AssertPtrReturn(phList, VERR_INVALID_POINTER);
     
    15811581 */
    15821582VBGLR3DECL(int) VbglR3ClipboardListHdrSend(HGCMCLIENTID idClient,
    1583                                            VBOXCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)
     1583                                           SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
    15841584{
    15851585    AssertPtrReturn(pListHdr, VERR_INVALID_POINTER);
     
    16131613 */
    16141614VBGLR3DECL(int) VbglR3ClipboardSendListEntryWrite(HGCMCLIENTID idClient,
    1615                                                   VBOXCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)
     1615                                                  SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
    16161616{
    16171617    AssertPtrReturn(pListEntry, VERR_INVALID_POINTER);
     
    16431643 * @param   pFormats            The formats to send (report).
    16441644 */
    1645 VBGLR3DECL(int) VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)
     1645VBGLR3DECL(int) VbglR3ClipboardFormatsSend(PVBGLR3SHCLCMDCTX pCtx, PSHCLFORMATDATA pFormats)
    16461646{
    16471647    VBoxClipboardFormatsMsg Msg;
     
    17251725 * @param   pData               Clipboard data to send.
    17261726 */
    1727 VBGLR3DECL(int) VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSHAREDCLIPBOARDDATABLOCK pData)
     1727VBGLR3DECL(int) VbglR3ClipboardWriteDataEx(PVBGLR3SHCLCMDCTX pCtx, PSHCLDATABLOCK pData)
    17281728{
    17291729    int rc;
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r80623 r80662  
    4444 * Global clipboard context information.
    4545 */
    46 struct _VBOXCLIPBOARDCONTEXT
     46struct _SHCLCONTEXT
    4747{
    4848    /** Client ID for the clipboard subsystem */
     
    5454
    5555/** Only one client is supported. There seems to be no need for more clients. */
    56 static VBOXCLIPBOARDCONTEXT g_ctx;
     56static SHCLCONTEXT g_ctx;
    5757
    5858
     
    8686 *                    returned
    8787 */
    88 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     88int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    8989{
    9090    RT_NOREF1(pCtx);
     
    148148 * @param u32Formats            The formats to report.
    149149 */
    150 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
     150void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats)
    151151{
    152152    RT_NOREF1(pCtx);
     
    166166 * @param  cb        the size of the data in @a pv
    167167 */
    168 void ClipRequestFromX11CompleteCallback(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     168void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    169169{
    170170    RT_NOREF1(pCtx);
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardArea.cpp

    r79347 r80662  
    3838    , m_fOpen(0)
    3939    , m_hDir(NIL_RTDIR)
    40     , m_uID(NIL_SHAREDCLIPBOARDAREAID)
     40    , m_uID(NIL_SHCLAREAID)
    4141{
    4242    int rc = initInternal();
     
    4646
    4747SharedClipboardArea::SharedClipboardArea(const char *pszPath,
    48                                          SHAREDCLIPBOARDAREAID uID /* = NIL_SHAREDCLIPBOARDAREAID */,
    49                                          SHAREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)
     48                                         SHCLAREAID uID /* = NIL_SHCLAREAID */,
     49                                         SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */)
    5050    : m_tsCreatedMs(0)
    5151    , m_cRefs(0)
     
    115115}
    116116
    117 int SharedClipboardArea::AddObject(const char *pszPath, const SHAREDCLIPBOARDAREAOBJ &Obj)
     117int SharedClipboardArea::AddObject(const char *pszPath, const SHCLAREAOBJ &Obj)
    118118{
    119119    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
     
    126126}
    127127
    128 int SharedClipboardArea::GetObject(const char *pszPath, PSHAREDCLIPBOARDAREAOBJ pObj)
     128int SharedClipboardArea::GetObject(const char *pszPath, PSHCLAREAOBJ pObj)
    129129{
    130130    SharedClipboardAreaFsObjMap::const_iterator itObj = m_mapObj.find(pszPath);
     
    166166    if (RT_SUCCESS(rc))
    167167    {
    168         this->m_fOpen = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE;
    169         this->m_uID   = NIL_SHAREDCLIPBOARDAREAID;
     168        this->m_fOpen = SHCLAREA_OPEN_FLAGS_NONE;
     169        this->m_uID   = NIL_SHCLAREAID;
    170170    }
    171171
     
    185185 */
    186186/* static */
    187 int SharedClipboardArea::PathConstruct(const char *pszBase, SHAREDCLIPBOARDAREAID uID, char *pszPath, size_t cbPath)
     187int SharedClipboardArea::PathConstruct(const char *pszBase, SHCLAREAID uID, char *pszPath, size_t cbPath)
    188188{
    189189    LogFlowFunc(("pszBase=%s, uAreaID=%RU32\n", pszBase, uID));
     
    224224}
    225225
    226 SHAREDCLIPBOARDAREAID SharedClipboardArea::GetID(void) const
     226SHCLAREAID SharedClipboardArea::GetID(void) const
    227227{
    228228    return this->m_uID;
     
    245245
    246246int SharedClipboardArea::OpenEx(const char *pszPath,
    247                                 SHAREDCLIPBOARDAREAID uID /* = NIL_SHAREDCLIPBOARDAREAID */,
    248                                 SHAREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)
     247                                SHCLAREAID uID /* = NIL_SHCLAREAID */,
     248                                SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */)
    249249{
    250250    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
    251     AssertReturn(!(fFlags & ~SHAREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
     251    AssertReturn(!(fFlags & ~SHCLAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
    252252
    253253    char szAreaDir[RTPATH_MAX];
     
    256256    {
    257257        if (   RTDirExists(szAreaDir)
    258             && (fFlags & SHAREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST))
     258            && (fFlags & SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST))
    259259        {
    260260            rc = VERR_ALREADY_EXISTS;
     
    282282}
    283283
    284 int SharedClipboardArea::OpenTemp(SHAREDCLIPBOARDAREAID uID,
    285                                   SHAREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)
    286 {
    287     AssertReturn(!(fFlags & ~SHAREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
     284int SharedClipboardArea::OpenTemp(SHCLAREAID uID,
     285                                  SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */)
     286{
     287    AssertReturn(!(fFlags & ~SHCLAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
    288288
    289289    /*
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp

    r80359 r80662  
    4141//#define VBOX_CLIPBOARD_WITH_UNICODE_SUPPORT 0
    4242
    43 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSHAREDCLIPBOARDURITRANSFER pTransfer,
     43VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSHCLURITRANSFER pTransfer,
    4444                                                       LPFORMATETC pFormatEtc, LPSTGMEDIUM pStgMed, ULONG cFormats)
    4545    : m_enmStatus(Uninitialized)
     
    229229 * @param   strDir              Directory path to handle.
    230230 */
    231 int VBoxClipboardWinDataObject::readDir(PSHAREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strDir)
     231int VBoxClipboardWinDataObject::readDir(PSHCLURITRANSFER pTransfer, const Utf8Str &strDir)
    232232{
    233233    LogFlowFunc(("strDir=%s\n", strDir.c_str()));
    234234
    235     VBOXCLIPBOARDLISTOPENPARMS openParmsList;
     235    SHCLLISTOPENPARMS openParmsList;
    236236    int rc = SharedClipboardURIListOpenParmsInit(&openParmsList);
    237237    if (RT_SUCCESS(rc))
     
    240240        if (RT_SUCCESS(rc))
    241241        {
    242             SHAREDCLIPBOARDLISTHANDLE hList;
     242            SHCLLISTHANDLE hList;
    243243            rc = SharedClipboardURITransferListOpen(pTransfer, &openParmsList, &hList);
    244244            if (RT_SUCCESS(rc))
     
    246246                LogFlowFunc(("strDir=%s -> hList=%RU64\n", strDir.c_str(), hList));
    247247
    248                 VBOXCLIPBOARDLISTHDR hdrList;
     248                SHCLLISTHDR hdrList;
    249249                rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList);
    250250                if (RT_SUCCESS(rc))
     
    255255                    for (uint64_t o = 0; o < hdrList.cTotalObjects; o++)
    256256                    {
    257                         VBOXCLIPBOARDLISTENTRY entryList;
     257                        SHCLLISTENTRY entryList;
    258258                        rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList);
    259259                        if (RT_SUCCESS(rc))
    260260                        {
    261                             PSHAREDCLIPBOARDFSOBJINFO pFsObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)entryList.pvInfo;
    262                             Assert(entryList.cbInfo == sizeof(SHAREDCLIPBOARDFSOBJINFO));
     261                            PSHCLFSOBJINFO pFsObjInfo = (PSHCLFSOBJINFO)entryList.pvInfo;
     262                            Assert(entryList.cbInfo == sizeof(SHCLFSOBJINFO));
    263263
    264264                            Utf8Str strPath = strDir + Utf8Str("\\") + Utf8Str(entryList.pszName);
     
    320320    VBoxClipboardWinDataObject *pThis = (VBoxClipboardWinDataObject *)pvUser;
    321321
    322     PSHAREDCLIPBOARDURITRANSFER pTransfer = pThis->m_pTransfer;
     322    PSHCLURITRANSFER pTransfer = pThis->m_pTransfer;
    323323    AssertPtr(pTransfer);
    324324
     
    333333    if (RT_SUCCESS(rc))
    334334    {
    335         PVBOXCLIPBOARDROOTLIST pRootList;
     335        PSHCLROOTLIST pRootList;
    336336        rc = SharedClipboardURILTransferRootsAsList(pTransfer, &pRootList);
    337337        if (RT_SUCCESS(rc))
     
    341341            for (uint32_t i = 0; i < pRootList->Hdr.cRoots; i++)
    342342            {
    343                 PVBOXCLIPBOARDLISTENTRY pRootEntry = &pRootList->paEntries[i];
     343                PSHCLLISTENTRY pRootEntry = &pRootList->paEntries[i];
    344344                AssertPtr(pRootEntry);
    345345
    346                 Assert(pRootEntry->cbInfo == sizeof(SHAREDCLIPBOARDFSOBJINFO));
    347                 PSHAREDCLIPBOARDFSOBJINFO pFsObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)pRootEntry->pvInfo;
     346                Assert(pRootEntry->cbInfo == sizeof(SHCLFSOBJINFO));
     347                PSHCLFSOBJINFO pFsObjInfo = (PSHCLFSOBJINFO)pRootEntry->pvInfo;
    348348
    349349                LogFlowFunc(("pszRoot=%s, fMode=0x%x\n", pRootEntry->pszName, pFsObjInfo->Attr.fMode));
     
    405405 * @param   phGlobal            Where to store the allocated HGLOBAL object on success.
    406406 */
    407 int VBoxClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSHAREDCLIPBOARDURITRANSFER pTransfer,
     407int VBoxClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSHCLURITRANSFER pTransfer,
    408408                                                                      bool fUnicode, HGLOBAL *phGlobal)
    409409{
     
    478478        pFD->dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
    479479
    480         const SHAREDCLIPBOARDFSOBJINFO *pObjInfo = &itRoot->objInfo;
     480        const SHCLFSOBJINFO *pObjInfo = &itRoot->objInfo;
    481481
    482482        if (RTFS_IS_DIRECTORY(pObjInfo->Attr.fMode))
     
    558558
    559559        /* The caller can call GetData() several times, so make sure we don't do the same transfer multiple times. */
    560         if (SharedClipboardURITransferGetStatus(m_pTransfer) == SHAREDCLIPBOARDURITRANSFERSTATUS_NONE)
     560        if (SharedClipboardURITransferGetStatus(m_pTransfer) == SHCLURITRANSFERSTATUS_NONE)
    561561        {
    562562            rc = SharedClipboardURITransferPrepare(m_pTransfer);
     
    615615            /* Hand-in the provider so that our IStream implementation can continue working with it. */
    616616            hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer,
    617                                                     fsObjEntry.strPath.c_str()/* File name */, &fsObjEntry.objInfo /* PSHAREDCLIPBOARDFSOBJINFO */,
     617                                                    fsObjEntry.strPath.c_str()/* File name */, &fsObjEntry.objInfo /* PSHCLFSOBJINFO */,
    618618                                                    &m_pStream);
    619619            if (SUCCEEDED(hr))
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp

    r80359 r80662  
    4646
    4747
    48 VBoxClipboardWinStreamImpl::VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHAREDCLIPBOARDURITRANSFER pTransfer,
    49                                                        const Utf8Str &strPath, PSHAREDCLIPBOARDFSOBJINFO pObjInfo)
     48VBoxClipboardWinStreamImpl::VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer,
     49                                                       const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo)
    5050    : m_pParent(pParent)
    5151    , m_lRefCount(1) /* Our IDataObjct *always* holds the last reference to this object; needed for the callbacks. */
    5252    , m_pURITransfer(pTransfer)
    5353    , m_strPath(strPath)
    54     , m_hObj(SHAREDCLIPBOARDOBJHANDLE_INVALID)
     54    , m_hObj(SHCLOBJHANDLE_INVALID)
    5555    , m_objInfo(*pObjInfo)
    5656    , m_cbProcessed(0)
     
    184184    try
    185185    {
    186         if (   m_hObj == SHAREDCLIPBOARDOBJHANDLE_INVALID
     186        if (   m_hObj == SHCLOBJHANDLE_INVALID
    187187            && m_pURITransfer->ProviderIface.pfnObjOpen)
    188188        {
    189             VBOXCLIPBOARDOBJOPENCREATEPARMS openParms;
     189            SHCLOBJOPENCREATEPARMS openParms;
    190190            rc = SharedClipboardURIObjectOpenParmsInit(&openParms);
    191191            if (RT_SUCCESS(rc))
    192192            {
    193                 openParms.fCreate = SHAREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS
    194                                   | SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW
    195                                   | SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ
    196                                   | SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE;
     193                openParms.fCreate = SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS
     194                                  | SHCL_OBJ_CF_ACT_FAIL_IF_NEW
     195                                  | SHCL_OBJ_CF_ACCESS_READ
     196                                  | SHCL_OBJ_CF_ACCESS_DENYWRITE;
    197197
    198198                rc = RTStrCopy(openParms.pszPath, openParms.cbPath, m_strPath.c_str());
     
    362362 */
    363363/* static */
    364 HRESULT VBoxClipboardWinStreamImpl::Create(VBoxClipboardWinDataObject *pParent, PSHAREDCLIPBOARDURITRANSFER pTransfer,
    365                                            const Utf8Str &strPath, PSHAREDCLIPBOARDFSOBJINFO pObjInfo,
     364HRESULT VBoxClipboardWinStreamImpl::Create(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer,
     365                                           const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo,
    366366                                           IStream **ppStream)
    367367{
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp

    r80623 r80662  
    4242 */
    4343int SharedClipboardPayloadAlloc(uint32_t uID, const void *pvData, uint32_t cbData,
    44                                 PSHAREDCLIPBOARDEVENTPAYLOAD *ppPayload)
     44                                PSHCLEVENTPAYLOAD *ppPayload)
    4545{
    4646    AssertPtrReturn(pvData, VERR_INVALID_POINTER);
    4747    AssertReturn   (cbData, VERR_INVALID_PARAMETER);
    4848
    49     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload =
    50         (PSHAREDCLIPBOARDEVENTPAYLOAD)RTMemAlloc(sizeof(SHAREDCLIPBOARDEVENTPAYLOAD));
     49    PSHCLEVENTPAYLOAD pPayload =
     50        (PSHCLEVENTPAYLOAD)RTMemAlloc(sizeof(SHCLEVENTPAYLOAD));
    5151    if (!pPayload)
    5252        return VERR_NO_MEMORY;
     
    7575 * @param   pPayload            Event payload to free.
    7676 */
    77 void SharedClipboardPayloadFree(PSHAREDCLIPBOARDEVENTPAYLOAD pPayload)
     77void SharedClipboardPayloadFree(PSHCLEVENTPAYLOAD pPayload)
    7878{
    7979    if (!pPayload)
     
    100100 * @param   uID                 Event ID to use.
    101101 */
    102 int SharedClipboardEventCreate(PSHAREDCLIPBOARDEVENT pEvent, VBOXCLIPBOARDEVENTID uID)
     102int SharedClipboardEventCreate(PSHCLEVENT pEvent, SHCLEVENTID uID)
    103103{
    104104    AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
     
    121121 * @param   pEvent              Event to destroy.
    122122 */
    123 void SharedClipboardEventDestroy(PSHAREDCLIPBOARDEVENT pEvent)
     123void SharedClipboardEventDestroy(PSHCLEVENT pEvent)
    124124{
    125125    if (!pEvent)
     
    146146 * @param   uID                 ID to use for event source.
    147147 */
    148 int SharedClipboardEventSourceCreate(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTSOURCEID uID)
     148int SharedClipboardEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID)
    149149{
    150150    AssertPtrReturn(pSource, VERR_INVALID_POINTER);
     
    169169 * @param   pSource             Event source to destroy.
    170170 */
    171 void SharedClipboardEventSourceDestroy(PSHAREDCLIPBOARDEVENTSOURCE pSource)
     171void SharedClipboardEventSourceDestroy(PSHCLEVENTSOURCE pSource)
    172172{
    173173    if (!pSource)
     
    176176    LogFlowFunc(("ID=%RU16\n", pSource->uID));
    177177
    178     PSHAREDCLIPBOARDEVENT pEvIt;
    179     PSHAREDCLIPBOARDEVENT pEvItNext;
    180     RTListForEachSafe(&pSource->lstEvents, pEvIt, pEvItNext, SHAREDCLIPBOARDEVENT, Node)
     178    PSHCLEVENT pEvIt;
     179    PSHCLEVENT pEvItNext;
     180    RTListForEachSafe(&pSource->lstEvents, pEvIt, pEvItNext, SHCLEVENT, Node)
    181181    {
    182182        SharedClipboardEventDestroy(pEvIt);
     
    194194 * @param   pSource             Event source to generate event for.
    195195 */
    196 VBOXCLIPBOARDEVENTID SharedClipboardEventIDGenerate(PSHAREDCLIPBOARDEVENTSOURCE pSource)
     196SHCLEVENTID SharedClipboardEventIDGenerate(PSHCLEVENTSOURCE pSource)
    197197{
    198198    AssertPtrReturn(pSource, 0);
     
    209209 * @param   uID                 Event ID to get.
    210210 */
    211 inline PSHAREDCLIPBOARDEVENT sharedClipboardEventGet(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)
    212 {
    213     PSHAREDCLIPBOARDEVENT pEvIt;
    214     RTListForEach(&pSource->lstEvents, pEvIt, SHAREDCLIPBOARDEVENT, Node)
     211inline PSHCLEVENT sharedClipboardEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID)
     212{
     213    PSHCLEVENT pEvIt;
     214    RTListForEach(&pSource->lstEvents, pEvIt, SHCLEVENT, Node)
    215215    {
    216216        if (pEvIt->uID == uID)
     
    227227 * @param   pSource             Event source to get last registered event from.
    228228 */
    229 VBOXCLIPBOARDEVENTID SharedClipboardEventGetLast(PSHAREDCLIPBOARDEVENTSOURCE pSource)
     229SHCLEVENTID SharedClipboardEventGetLast(PSHCLEVENTSOURCE pSource)
    230230{
    231231    AssertPtrReturn(pSource, 0);
    232     PSHAREDCLIPBOARDEVENT pEvent = RTListGetLast(&pSource->lstEvents, SHAREDCLIPBOARDEVENT, Node);
     232    PSHCLEVENT pEvent = RTListGetLast(&pSource->lstEvents, SHCLEVENT, Node);
    233233    if (pEvent)
    234234        return pEvent->uID;
     
    244244 * @param   uID                 Event ID to register.
    245245 */
    246 int SharedClipboardEventRegister(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)
     246int SharedClipboardEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID)
    247247{
    248248    AssertPtrReturn(pSource, VERR_INVALID_POINTER);
     
    254254    if (sharedClipboardEventGet(pSource, uID) == NULL)
    255255    {
    256         PSHAREDCLIPBOARDEVENT pEvent
    257             = (PSHAREDCLIPBOARDEVENT)RTMemAllocZ(sizeof(SHAREDCLIPBOARDEVENT));
     256        PSHCLEVENT pEvent
     257            = (PSHCLEVENT)RTMemAllocZ(sizeof(SHCLEVENT));
    258258        if (pEvent)
    259259        {
     
    287287 * @param   uID                 Event ID to unregister.
    288288 */
    289 int SharedClipboardEventUnregister(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)
     289int SharedClipboardEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID)
    290290{
    291291    AssertPtrReturn(pSource, VERR_INVALID_POINTER);
     
    295295    LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID));
    296296
    297     PSHAREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);
     297    PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID);
    298298    if (pEvent)
    299299    {
     
    326326 *                              SharedClipboardPayloadFree().
    327327 */
    328 int SharedClipboardEventWait(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, RTMSINTERVAL uTimeoutMs,
    329                              PSHAREDCLIPBOARDEVENTPAYLOAD* ppPayload)
     328int SharedClipboardEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, RTMSINTERVAL uTimeoutMs,
     329                             PSHCLEVENTPAYLOAD* ppPayload)
    330330{
    331331    AssertPtrReturn(pSource, VERR_INVALID_POINTER);
     
    335335    int rc;
    336336
    337     PSHAREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);
     337    PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID);
    338338    if (pEvent)
    339339    {
     
    361361 * @param   pPayload            Event payload to associate. Takes ownership. Optional.
    362362 */
    363 int SharedClipboardEventSignal(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID,
    364                                PSHAREDCLIPBOARDEVENTPAYLOAD pPayload)
     363int SharedClipboardEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID,
     364                               PSHCLEVENTPAYLOAD pPayload)
    365365{
    366366    AssertPtrReturn(pSource, VERR_INVALID_POINTER);
     
    370370    LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID));
    371371
    372     PSHAREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);
     372    PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID);
    373373    if (pEvent)
    374374    {
     
    393393 * @param   uID                 Event ID to detach payload for.
    394394 */
    395 void SharedClipboardEventPayloadDetach(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)
     395void SharedClipboardEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID)
    396396{
    397397    AssertPtrReturnVoid(pSource);
     
    399399    LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID));
    400400
    401     PSHAREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);
     401    PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID);
    402402    if (pEvent)
    403403    {
     
    751751}
    752752
    753 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, VBOXCLIPBOARDFORMAT u32Format)
     753void VBoxClipboardDbgDumpData(const void *pv, size_t cb, SHCLFORMAT u32Format)
    754754{
    755755    if (u32Format & VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT)
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-uri.cpp

    r80444 r80662  
    3030
    3131
    32 static int sharedClipboardURITransferThreadCreate(PSHAREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);
    33 static int sharedClipboardURITransferThreadDestroy(PSHAREDCLIPBOARDURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs);
    34 static PSHAREDCLIPBOARDURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx);
     32static int sharedClipboardURITransferThreadCreate(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);
     33static int sharedClipboardURITransferThreadDestroy(PSHCLURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs);
     34static PSHCLURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHCLURICTX pURI, uint32_t uIdx);
    3535static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode,
    36                                                  SHAREDCLIPBOARDOBJHANDLE handleInitial, uint64_t *pfOpen);
     36                                                 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen);
    3737
    3838/** @todo Split this file up in different modules. */
     
    4343 * @returns Allocated URI root list on success, or NULL on failure.
    4444 */
    45 PVBOXCLIPBOARDROOTLIST SharedClipboardURIRootListAlloc(void)
    46 {
    47     PVBOXCLIPBOARDROOTLIST pRootList = (PVBOXCLIPBOARDROOTLIST)RTMemAllocZ(sizeof(VBOXCLIPBOARDROOTLIST));
     45PSHCLROOTLIST SharedClipboardURIRootListAlloc(void)
     46{
     47    PSHCLROOTLIST pRootList = (PSHCLROOTLIST)RTMemAllocZ(sizeof(SHCLROOTLIST));
    4848
    4949    return pRootList;
     
    5656 *                              invalid after returning from this function.
    5757 */
    58 void SharedClipboardURIRootListFree(PVBOXCLIPBOARDROOTLIST pRootList)
     58void SharedClipboardURIRootListFree(PSHCLROOTLIST pRootList)
    5959{
    6060    if (!pRootList)
     
    7474 * @param   pRootLstHdr         Root list header to initialize.
    7575 */
    76 int SharedClipboardURIRootListHdrInit(PVBOXCLIPBOARDROOTLISTHDR pRootLstHdr)
     76int SharedClipboardURIRootListHdrInit(PSHCLROOTLISTHDR pRootLstHdr)
    7777{
    7878    AssertPtrReturn(pRootLstHdr, VERR_INVALID_POINTER);
    7979
    80     RT_BZERO(pRootLstHdr, sizeof(VBOXCLIPBOARDROOTLISTHDR));
     80    RT_BZERO(pRootLstHdr, sizeof(SHCLROOTLISTHDR));
    8181
    8282    return VINF_SUCCESS;
     
    8888 * @param   pRootLstHdr         Root list header to destroy.
    8989 */
    90 void SharedClipboardURIRootListHdrDestroy(PVBOXCLIPBOARDROOTLISTHDR pRootLstHdr)
     90void SharedClipboardURIRootListHdrDestroy(PSHCLROOTLISTHDR pRootLstHdr)
    9191{
    9292    if (!pRootLstHdr)
     
    103103 * @param   pRootLstHdr         Root list header to duplicate.
    104104 */
    105 PVBOXCLIPBOARDROOTLISTHDR SharedClipboardURIRootListHdrDup(PVBOXCLIPBOARDROOTLISTHDR pRootLstHdr)
     105PSHCLROOTLISTHDR SharedClipboardURIRootListHdrDup(PSHCLROOTLISTHDR pRootLstHdr)
    106106{
    107107    AssertPtrReturn(pRootLstHdr, NULL);
     
    109109    int rc = VINF_SUCCESS;
    110110
    111     PVBOXCLIPBOARDROOTLISTHDR pRootsDup = (PVBOXCLIPBOARDROOTLISTHDR)RTMemAllocZ(sizeof(VBOXCLIPBOARDROOTLISTHDR));
     111    PSHCLROOTLISTHDR pRootsDup = (PSHCLROOTLISTHDR)RTMemAllocZ(sizeof(SHCLROOTLISTHDR));
    112112    if (pRootsDup)
    113113    {
     
    132132 * @param   pListEntry          Clipboard root list entry to copy.
    133133 */
    134 int SharedClipboardURIRootListEntryCopy(PVBOXCLIPBOARDROOTLISTENTRY pDst, PVBOXCLIPBOARDROOTLISTENTRY pSrc)
     134int SharedClipboardURIRootListEntryCopy(PSHCLROOTLISTENTRY pDst, PSHCLROOTLISTENTRY pSrc)
    135135{
    136136    return SharedClipboardURIListEntryCopy(pDst, pSrc);
     
    143143 * @param   pListEntry          Clipboard root list entry to duplicate.
    144144 */
    145 PVBOXCLIPBOARDROOTLISTENTRY SharedClipboardURIRootListEntryDup(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry)
     145PSHCLROOTLISTENTRY SharedClipboardURIRootListEntryDup(PSHCLROOTLISTENTRY pRootListEntry)
    146146{
    147147    return SharedClipboardURIListEntryDup(pRootListEntry);
     
    153153 * @param   pListEntry          Clipboard root list entry structure to destroy.
    154154 */
    155 void SharedClipboardURIRootListEntryDestroy(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry)
     155void SharedClipboardURIRootListEntryDestroy(PSHCLROOTLISTENTRY pRootListEntry)
    156156{
    157157    return SharedClipboardURIListEntryDestroy(pRootListEntry);
     
    163163 * @param   pInfo               List handle info structure to destroy.
    164164 */
    165 void SharedClipboardURIListHandleInfoDestroy(PSHAREDCLIPBOARDURILISTHANDLEINFO pInfo)
     165void SharedClipboardURIListHandleInfoDestroy(PSHCLURILISTHANDLEINFO pInfo)
    166166{
    167167    if (!pInfo)
     
    181181 * @param   ppListHdr           Where to store the allocated URI list header structure on success.
    182182 */
    183 int SharedClipboardURIListHdrAlloc(PVBOXCLIPBOARDLISTHDR *ppListHdr)
     183int SharedClipboardURIListHdrAlloc(PSHCLLISTHDR *ppListHdr)
    184184{
    185185    int rc;
    186186
    187     PVBOXCLIPBOARDLISTHDR pListHdr = (PVBOXCLIPBOARDLISTHDR)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTHDR));
     187    PSHCLLISTHDR pListHdr = (PSHCLLISTHDR)RTMemAllocZ(sizeof(SHCLLISTHDR));
    188188    if (pListHdr)
    189189    {
     
    203203 * @param   pListEntry          URI list header structure to free.
    204204 */
    205 void SharedClipboardURIListHdrFree(PVBOXCLIPBOARDLISTHDR pListHdr)
     205void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr)
    206206{
    207207    if (!pListHdr)
     
    222222 * @param   pListHdr            URI list header to duplicate.
    223223 */
    224 PVBOXCLIPBOARDLISTHDR SharedClipboardURIListHdrDup(PVBOXCLIPBOARDLISTHDR pListHdr)
     224PSHCLLISTHDR SharedClipboardURIListHdrDup(PSHCLLISTHDR pListHdr)
    225225{
    226226    AssertPtrReturn(pListHdr, NULL);
    227227
    228     PVBOXCLIPBOARDLISTHDR pListHdrDup = (PVBOXCLIPBOARDLISTHDR)RTMemAlloc(sizeof(VBOXCLIPBOARDLISTHDR));
     228    PSHCLLISTHDR pListHdrDup = (PSHCLLISTHDR)RTMemAlloc(sizeof(SHCLLISTHDR));
    229229    if (pListHdrDup)
    230230    {
     
    241241 * @param   pListHdr            Data header struct to initialize.
    242242 */
    243 int SharedClipboardURIListHdrInit(PVBOXCLIPBOARDLISTHDR pListHdr)
     243int SharedClipboardURIListHdrInit(PSHCLLISTHDR pListHdr)
    244244{
    245245    AssertPtrReturn(pListHdr, VERR_INVALID_POINTER);
     
    257257 * @param   pListHdr            Data header struct to destroy.
    258258 */
    259 void SharedClipboardURIListHdrDestroy(PVBOXCLIPBOARDLISTHDR pListHdr)
     259void SharedClipboardURIListHdrDestroy(PSHCLLISTHDR pListHdr)
    260260{
    261261    if (!pListHdr)
     
    266266
    267267/**
    268  * Resets a VBOXCLIPBOARDListHdr structture.
    269  *
    270  * @returns VBox status code.
    271  * @param   pListHdr            VBOXCLIPBOARDListHdr structture to reset.
    272  */
    273 void SharedClipboardURIListHdrReset(PVBOXCLIPBOARDLISTHDR pListHdr)
     268 * Resets a SHCLListHdr structture.
     269 *
     270 * @returns VBox status code.
     271 * @param   pListHdr            SHCLListHdr structture to reset.
     272 */
     273void SharedClipboardURIListHdrReset(PSHCLLISTHDR pListHdr)
    274274{
    275275    AssertPtrReturnVoid(pListHdr);
     
    277277    LogFlowFuncEnter();
    278278
    279     RT_BZERO(pListHdr, sizeof(VBOXCLIPBOARDLISTHDR));
     279    RT_BZERO(pListHdr, sizeof(SHCLLISTHDR));
    280280}
    281281
     
    286286 * @param   pListHdr            Clipboard data header to validate.
    287287 */
    288 bool SharedClipboardURIListHdrIsValid(PVBOXCLIPBOARDLISTHDR pListHdr)
     288bool SharedClipboardURIListHdrIsValid(PSHCLLISTHDR pListHdr)
    289289{
    290290    RT_NOREF(pListHdr);
     
    292292}
    293293
    294 int SharedClipboardURIListOpenParmsCopy(PVBOXCLIPBOARDLISTOPENPARMS pDst, PVBOXCLIPBOARDLISTOPENPARMS pSrc)
     294int SharedClipboardURIListOpenParmsCopy(PSHCLLISTOPENPARMS pDst, PSHCLLISTOPENPARMS pSrc)
    295295{
    296296    AssertPtrReturn(pDst, VERR_INVALID_POINTER);
     
    330330 * @param   pParms              URI list open parameters structure to duplicate.
    331331 */
    332 PVBOXCLIPBOARDLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PVBOXCLIPBOARDLISTOPENPARMS pParms)
     332PSHCLLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PSHCLLISTOPENPARMS pParms)
    333333{
    334334    AssertPtrReturn(pParms, NULL);
    335335
    336     PVBOXCLIPBOARDLISTOPENPARMS pParmsDup = (PVBOXCLIPBOARDLISTOPENPARMS)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTOPENPARMS));
     336    PSHCLLISTOPENPARMS pParmsDup = (PSHCLLISTOPENPARMS)RTMemAllocZ(sizeof(SHCLLISTOPENPARMS));
    337337    if (!pParmsDup)
    338338        return NULL;
     
    356356 * @param   pParms              URI list open parameters structure to initialize.
    357357 */
    358 int SharedClipboardURIListOpenParmsInit(PVBOXCLIPBOARDLISTOPENPARMS pParms)
     358int SharedClipboardURIListOpenParmsInit(PSHCLLISTOPENPARMS pParms)
    359359{
    360360    AssertPtrReturn(pParms, VERR_INVALID_POINTER);
    361361
    362     RT_BZERO(pParms, sizeof(VBOXCLIPBOARDLISTOPENPARMS));
     362    RT_BZERO(pParms, sizeof(SHCLLISTOPENPARMS));
    363363
    364364    pParms->cbFilter  = 64; /** @todo Make this dynamic. */
     
    377377 * @param   pParms              URI list open parameters structure to destroy.
    378378 */
    379 void SharedClipboardURIListOpenParmsDestroy(PVBOXCLIPBOARDLISTOPENPARMS pParms)
     379void SharedClipboardURIListOpenParmsDestroy(PSHCLLISTOPENPARMS pParms)
    380380{
    381381    if (!pParms)
     
    400400 * @param   ppDirData           Where to return the created clipboard list entry structure on success.
    401401 */
    402 int SharedClipboardURIListEntryAlloc(PVBOXCLIPBOARDLISTENTRY *ppListEntry)
    403 {
    404     PVBOXCLIPBOARDLISTENTRY pListEntry = (PVBOXCLIPBOARDLISTENTRY)RTMemAlloc(sizeof(VBOXCLIPBOARDLISTENTRY));
     402int SharedClipboardURIListEntryAlloc(PSHCLLISTENTRY *ppListEntry)
     403{
     404    PSHCLLISTENTRY pListEntry = (PSHCLLISTENTRY)RTMemAlloc(sizeof(SHCLLISTENTRY));
    405405    if (!pListEntry)
    406406        return VERR_NO_MEMORY;
     
    418418 * @param   pListEntry         Clipboard list entry structure to free.
    419419 */
    420 void SharedClipboardURIListEntryFree(PVBOXCLIPBOARDLISTENTRY pListEntry)
     420void SharedClipboardURIListEntryFree(PSHCLLISTENTRY pListEntry)
    421421{
    422422    if (!pListEntry)
     
    433433 * @param   pListEntry          Clipboard list entry to copy.
    434434 */
    435 int SharedClipboardURIListEntryCopy(PVBOXCLIPBOARDLISTENTRY pDst, PVBOXCLIPBOARDLISTENTRY pSrc)
     435int SharedClipboardURIListEntryCopy(PSHCLLISTENTRY pDst, PSHCLLISTENTRY pSrc)
    436436{
    437437    AssertPtrReturn(pDst, VERR_INVALID_POINTER);
     
    480480 * @param   pListEntry          Clipboard list entry to duplicate.
    481481 */
    482 PVBOXCLIPBOARDLISTENTRY SharedClipboardURIListEntryDup(PVBOXCLIPBOARDLISTENTRY pListEntry)
     482PSHCLLISTENTRY SharedClipboardURIListEntryDup(PSHCLLISTENTRY pListEntry)
    483483{
    484484    AssertPtrReturn(pListEntry, NULL);
     
    486486    int rc = VINF_SUCCESS;
    487487
    488     PVBOXCLIPBOARDLISTENTRY pListEntryDup = (PVBOXCLIPBOARDLISTENTRY)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTENTRY));
     488    PSHCLLISTENTRY pListEntryDup = (PSHCLLISTENTRY)RTMemAllocZ(sizeof(SHCLLISTENTRY));
    489489    if (pListEntryDup)
    490490        rc = SharedClipboardURIListEntryCopy(pListEntryDup, pListEntry);
     
    507507 * @param   pListEntry          Clipboard list entry structure to initialize.
    508508 */
    509 int SharedClipboardURIListEntryInit(PVBOXCLIPBOARDLISTENTRY pListEntry)
    510 {
    511     RT_BZERO(pListEntry, sizeof(VBOXCLIPBOARDLISTENTRY));
    512 
    513     pListEntry->pszName = RTStrAlloc(VBOXCLIPBOARDLISTENTRY_MAX_NAME);
     509int SharedClipboardURIListEntryInit(PSHCLLISTENTRY pListEntry)
     510{
     511    RT_BZERO(pListEntry, sizeof(SHCLLISTENTRY));
     512
     513    pListEntry->pszName = RTStrAlloc(SHCLLISTENTRY_MAX_NAME);
    514514    if (!pListEntry->pszName)
    515515        return VERR_NO_MEMORY;
    516516
    517     pListEntry->cbName = VBOXCLIPBOARDLISTENTRY_MAX_NAME;
     517    pListEntry->cbName = SHCLLISTENTRY_MAX_NAME;
    518518    pListEntry->pvInfo = NULL;
    519519    pListEntry->cbInfo = 0;
     
    528528 * @param   pListEntry          Clipboard list entry structure to destroy.
    529529 */
    530 void SharedClipboardURIListEntryDestroy(PVBOXCLIPBOARDLISTENTRY pListEntry)
     530void SharedClipboardURIListEntryDestroy(PSHCLLISTENTRY pListEntry)
    531531{
    532532    if (!pListEntry)
     
    555555 * @param   pListEntry          Clipboard data chunk to validate.
    556556 */
    557 bool SharedClipboardURIListEntryIsValid(PVBOXCLIPBOARDLISTENTRY pListEntry)
     557bool SharedClipboardURIListEntryIsValid(PSHCLLISTENTRY pListEntry)
    558558{
    559559    RT_NOREF(pListEntry);
     
    570570 * @param   pObjCtx             URI object context to initialize.
    571571 */
    572 int SharedClipboardURIObjCtxInit(PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)
     572int SharedClipboardURIObjCtxInit(PSHCLCLIENTURIOBJCTX pObjCtx)
    573573{
    574574    AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER);
     
    576576    LogFlowFuncEnter();
    577577
    578     pObjCtx->uHandle  = SHAREDCLIPBOARDOBJHANDLE_INVALID;
     578    pObjCtx->uHandle  = SHCLOBJHANDLE_INVALID;
    579579
    580580    return VINF_SUCCESS;
     
    586586 * @param   pObjCtx             URI object context to destroy.
    587587 */
    588 void SharedClipboardURIObjCtxDestroy(PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)
     588void SharedClipboardURIObjCtxDestroy(PSHCLCLIENTURIOBJCTX pObjCtx)
    589589{
    590590    AssertPtrReturnVoid(pObjCtx);
     
    599599 * @param   pObjCtx             URI object context to check.
    600600 */
    601 bool SharedClipboardURIObjCtxIsValid(PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)
     601bool SharedClipboardURIObjCtxIsValid(PSHCLCLIENTURIOBJCTX pObjCtx)
    602602{
    603603    return (   pObjCtx
    604             && pObjCtx->uHandle != SHAREDCLIPBOARDOBJHANDLE_INVALID);
     604            && pObjCtx->uHandle != SHCLOBJHANDLE_INVALID);
    605605}
    606606
     
    610610 * @param   pInfo               Object handle info structure to destroy.
    611611 */
    612 void SharedClipboardURIObjectHandleInfoDestroy(PSHAREDCLIPBOARDURIOBJHANDLEINFO pInfo)
     612void SharedClipboardURIObjectHandleInfoDestroy(PSHCLURIOBJHANDLEINFO pInfo)
    613613{
    614614    if (!pInfo)
     
    628628 * @param   pParms              URI object open parameters structure to initialize.
    629629 */
    630 int SharedClipboardURIObjectOpenParmsInit(PVBOXCLIPBOARDOBJOPENCREATEPARMS pParms)
     630int SharedClipboardURIObjectOpenParmsInit(PSHCLOBJOPENCREATEPARMS pParms)
    631631{
    632632    AssertPtrReturn(pParms, VERR_INVALID_POINTER);
     
    634634    int rc;
    635635
    636     RT_BZERO(pParms, sizeof(VBOXCLIPBOARDOBJOPENCREATEPARMS));
     636    RT_BZERO(pParms, sizeof(SHCLOBJOPENCREATEPARMS));
    637637
    638638    pParms->cbPath    = RTPATH_MAX; /** @todo Make this dynamic. */
     
    656656 * @param   pParmsSrc           Which source URI object open parameters to copy.
    657657 */
    658 int SharedClipboardURIObjectOpenParmsCopy(PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsDst, PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsSrc)
     658int SharedClipboardURIObjectOpenParmsCopy(PSHCLOBJOPENCREATEPARMS pParmsDst, PSHCLOBJOPENCREATEPARMS pParmsSrc)
    659659{
    660660    int rc;
     
    685685 * @param   pParms              URI object open parameters structure to destroy.
    686686 */
    687 void SharedClipboardURIObjectOpenParmsDestroy(PVBOXCLIPBOARDOBJOPENCREATEPARMS pParms)
     687void SharedClipboardURIObjectOpenParmsDestroy(PSHCLOBJOPENCREATEPARMS pParms)
    688688{
    689689    if (!pParms)
     
    704704 * @param   hObj                Object handle of the object to get handle info for.
    705705 */
    706 inline PSHAREDCLIPBOARDURIOBJHANDLEINFO sharedClipboardURIObjectGet(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    707                                                                     SHAREDCLIPBOARDOBJHANDLE hObj)
    708 {
    709     PSHAREDCLIPBOARDURIOBJHANDLEINFO pIt;
    710     RTListForEach(&pTransfer->lstObj, pIt, SHAREDCLIPBOARDURIOBJHANDLEINFO, Node)
     706inline PSHCLURIOBJHANDLEINFO sharedClipboardURIObjectGet(PSHCLURITRANSFER pTransfer,
     707                                                                    SHCLOBJHANDLE hObj)
     708{
     709    PSHCLURIOBJHANDLEINFO pIt;
     710    RTListForEach(&pTransfer->lstObj, pIt, SHCLURIOBJHANDLEINFO, Node)
    711711    {
    712712        if (pIt->hObj == hObj)
     
    725725 * @param   phObj               Where to store the handle of URI object opened on success.
    726726 */
    727 int SharedClipboardURIObjectOpen(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDOBJOPENCREATEPARMS pOpenCreateParms,
    728                                  PSHAREDCLIPBOARDOBJHANDLE phObj)
     727int SharedClipboardURIObjectOpen(PSHCLURITRANSFER pTransfer, PSHCLOBJOPENCREATEPARMS pOpenCreateParms,
     728                                 PSHCLOBJHANDLE phObj)
    729729{
    730730    AssertPtrReturn(pTransfer,        VERR_INVALID_POINTER);
     
    736736    LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pOpenCreateParms->pszPath, pOpenCreateParms->fCreate));
    737737
    738     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    739     {
    740         PSHAREDCLIPBOARDURIOBJHANDLEINFO pInfo
    741             = (PSHAREDCLIPBOARDURIOBJHANDLEINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDURIOBJHANDLEINFO));
     738    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     739    {
     740        PSHCLURIOBJHANDLEINFO pInfo
     741            = (PSHCLURIOBJHANDLEINFO)RTMemAlloc(sizeof(SHCLURIOBJHANDLEINFO));
    742742        if (pInfo)
    743743        {
     
    747747            rc = sharedClipboardConvertFileCreateFlags(fWritable,
    748748                                                       pOpenCreateParms->fCreate, pOpenCreateParms->ObjInfo.Attr.fMode,
    749                                                        SHAREDCLIPBOARDOBJHANDLE_INVALID, &fOpen);
     749                                                       SHCLOBJHANDLE_INVALID, &fOpen);
    750750            if (RT_SUCCESS(rc))
    751751            {
     
    765765            {
    766766                pInfo->hObj    = pTransfer->uObjHandleNext++;
    767                 pInfo->enmType = SHAREDCLIPBOARDURIOBJTYPE_FILE;
     767                pInfo->enmType = SHCLURIOBJTYPE_FILE;
    768768
    769769                RTListAppend(&pTransfer->lstObj, &pInfo->Node);
     
    778778            rc = VERR_NO_MEMORY;
    779779    }
    780     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     780    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    781781    {
    782782        if (pTransfer->ProviderIface.pfnObjOpen)
     
    799799 * @param   hObj                Handle of URI object to close.
    800800 */
    801 int SharedClipboardURIObjectClose(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj)
     801int SharedClipboardURIObjectClose(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj)
    802802{
    803803    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    805805    int rc = VINF_SUCCESS;
    806806
    807     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    808     {
    809         PSHAREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);
     807    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     808    {
     809        PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);
    810810        if (pInfo)
    811811        {
    812812            switch (pInfo->enmType)
    813813            {
    814                 case SHAREDCLIPBOARDURIOBJTYPE_DIRECTORY:
     814                case SHCLURIOBJTYPE_DIRECTORY:
    815815                {
    816816                    rc = RTDirClose(pInfo->u.Local.hDir);
     
    820820                }
    821821
    822                 case SHAREDCLIPBOARDURIOBJTYPE_FILE:
     822                case SHCLURIOBJTYPE_FILE:
    823823                {
    824824                    rc = RTFileClose(pInfo->u.Local.hFile);
     
    840840            rc = VERR_NOT_FOUND;
    841841    }
    842     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     842    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    843843    {
    844844        if (pTransfer->ProviderIface.pfnObjClose)
     
    864864 * @param   pcbRead             How much bytes were read on success. Optional.
    865865 */
    866 int SharedClipboardURIObjectRead(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    867                                  SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags)
     866int SharedClipboardURIObjectRead(PSHCLURITRANSFER pTransfer,
     867                                 SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags)
    868868{
    869869    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    875875    int rc = VINF_SUCCESS;
    876876
    877     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    878     {
    879         PSHAREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);
     877    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     878    {
     879        PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);
    880880        if (pInfo)
    881881        {
    882882            switch (pInfo->enmType)
    883883            {
    884                 case SHAREDCLIPBOARDURIOBJTYPE_FILE:
     884                case SHCLURIOBJTYPE_FILE:
    885885                {
    886886                    size_t cbRead;
     
    902902            rc = VERR_NOT_FOUND;
    903903    }
    904     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     904    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    905905    {
    906906        if (pTransfer->ProviderIface.pfnObjRead)
     
    926926 * @param   pcbWritten          How much bytes were writtenon success. Optional.
    927927 */
    928 int SharedClipboardURIObjectWrite(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    929                                   SHAREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten,
     928int SharedClipboardURIObjectWrite(PSHCLURITRANSFER pTransfer,
     929                                  SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten,
    930930                                  uint32_t fFlags)
    931931{
     
    937937    int rc = VINF_SUCCESS;
    938938
    939     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    940     {
    941         PSHAREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);
     939    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     940    {
     941        PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);
    942942        if (pInfo)
    943943        {
    944944            switch (pInfo->enmType)
    945945            {
    946                 case SHAREDCLIPBOARDURIOBJTYPE_FILE:
     946                case SHCLURIOBJTYPE_FILE:
    947947                {
    948948                    rc = RTFileWrite(pInfo->u.Local.hFile, pvBuf, cbBuf, (size_t *)pcbWritten);
     
    958958            rc = VERR_NOT_FOUND;
    959959    }
    960     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     960    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    961961    {
    962962        if (pTransfer->ProviderIface.pfnObjWrite)
     
    978978 * @param   pDataChunk          URI object data chunk to duplicate.
    979979 */
    980 PVBOXCLIPBOARDOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk)
     980PSHCLOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PSHCLOBJDATACHUNK pDataChunk)
    981981{
    982982    if (!pDataChunk)
    983983        return NULL;
    984984
    985     PVBOXCLIPBOARDOBJDATACHUNK pDataChunkDup = (PVBOXCLIPBOARDOBJDATACHUNK)RTMemAllocZ(sizeof(VBOXCLIPBOARDOBJDATACHUNK));
     985    PSHCLOBJDATACHUNK pDataChunkDup = (PSHCLOBJDATACHUNK)RTMemAllocZ(sizeof(SHCLOBJDATACHUNK));
    986986    if (!pDataChunkDup)
    987987        return NULL;
     
    10041004 * @param   pDataChunk          URI object data chunk to destroy.
    10051005 */
    1006 void SharedClipboardURIObjectDataChunkDestroy(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk)
     1006void SharedClipboardURIObjectDataChunkDestroy(PSHCLOBJDATACHUNK pDataChunk)
    10071007{
    10081008    if (!pDataChunk)
     
    10281028 *                              be invalid after calling this function.
    10291029 */
    1030 void SharedClipboardURIObjectDataChunkFree(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk)
     1030void SharedClipboardURIObjectDataChunkFree(PSHCLOBJDATACHUNK pDataChunk)
    10311031{
    10321032    if (!pDataChunk)
     
    10481048 *                              Must be destroyed by SharedClipboardURITransferDestroy().
    10491049 */
    1050 int SharedClipboardURITransferCreate(SHAREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,
    1051                                      PSHAREDCLIPBOARDURITRANSFER *ppTransfer)
     1050int SharedClipboardURITransferCreate(SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource,
     1051                                     PSHCLURITRANSFER *ppTransfer)
    10521052{
    10531053    AssertPtrReturn(ppTransfer, VERR_INVALID_POINTER);
     
    10551055    LogFlowFuncEnter();
    10561056
    1057     PSHAREDCLIPBOARDURITRANSFER pTransfer = (PSHAREDCLIPBOARDURITRANSFER)RTMemAlloc(sizeof(SHAREDCLIPBOARDURITRANSFER));
     1057    PSHCLURITRANSFER pTransfer = (PSHCLURITRANSFER)RTMemAlloc(sizeof(SHCLURITRANSFER));
    10581058    if (!pTransfer)
    10591059        return VERR_NO_MEMORY;
     
    10621062
    10631063    pTransfer->State.uID       = 0;
    1064     pTransfer->State.enmStatus = SHAREDCLIPBOARDURITRANSFERSTATUS_NONE;
     1064    pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_NONE;
    10651065    pTransfer->State.enmDir    = enmDir;
    10661066    pTransfer->State.enmSource = enmSource;
     
    11151115 * @param   pURI                URI clipboard transfer to destroy.
    11161116 */
    1117 int SharedClipboardURITransferDestroy(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1117int SharedClipboardURITransferDestroy(PSHCLURITRANSFER pTransfer)
    11181118{
    11191119    if (!pTransfer)
     
    11301130    SharedClipboardEventSourceDestroy(&pTransfer->Events);
    11311131
    1132     PSHAREDCLIPBOARDURILISTHANDLEINFO pItList, pItListNext;
    1133     RTListForEachSafe(&pTransfer->lstList, pItList, pItListNext, SHAREDCLIPBOARDURILISTHANDLEINFO, Node)
     1132    PSHCLURILISTHANDLEINFO pItList, pItListNext;
     1133    RTListForEachSafe(&pTransfer->lstList, pItList, pItListNext, SHCLURILISTHANDLEINFO, Node)
    11341134    {
    11351135        SharedClipboardURIListHandleInfoDestroy(pItList);
     
    11401140    }
    11411141
    1142     PSHAREDCLIPBOARDURIOBJHANDLEINFO pItObj, pItObjNext;
    1143     RTListForEachSafe(&pTransfer->lstObj, pItObj, pItObjNext, SHAREDCLIPBOARDURIOBJHANDLEINFO, Node)
     1142    PSHCLURIOBJHANDLEINFO pItObj, pItObjNext;
     1143    RTListForEachSafe(&pTransfer->lstObj, pItObj, pItObjNext, SHCLURIOBJHANDLEINFO, Node)
    11441144    {
    11451145        SharedClipboardURIObjectHandleInfoDestroy(pItObj);
     
    11541154}
    11551155
    1156 int SharedClipboardURITransferOpen(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1156int SharedClipboardURITransferOpen(PSHCLURITRANSFER pTransfer)
    11571157{
    11581158    int rc = VINF_SUCCESS;
     
    11651165}
    11661166
    1167 int SharedClipboardURITransferClose(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1167int SharedClipboardURITransferClose(PSHCLURITRANSFER pTransfer)
    11681168{
    11691169    int rc = VINF_SUCCESS;
     
    11831183 * @param   hList               List handle of the list to get handle info for.
    11841184 */
    1185 inline PSHAREDCLIPBOARDURILISTHANDLEINFO sharedClipboardURITransferListGet(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    1186                                                                            SHAREDCLIPBOARDLISTHANDLE hList)
    1187 {
    1188     PSHAREDCLIPBOARDURILISTHANDLEINFO pIt;
    1189     RTListForEach(&pTransfer->lstList, pIt, SHAREDCLIPBOARDURILISTHANDLEINFO, Node)
     1185inline PSHCLURILISTHANDLEINFO sharedClipboardURITransferListGet(PSHCLURITRANSFER pTransfer,
     1186                                                                           SHCLLISTHANDLE hList)
     1187{
     1188    PSHCLURILISTHANDLEINFO pIt;
     1189    RTListForEach(&pTransfer->lstList, pIt, SHCLURILISTHANDLEINFO, Node)
    11901190    {
    11911191        if (pIt->hList == hList)
     
    11991199 * Creates a new list handle (local only).
    12001200 *
    1201  * @returns New List handle on success, or SHAREDCLIPBOARDLISTHANDLE_INVALID on error.
     1201 * @returns New List handle on success, or SHCLLISTHANDLE_INVALID on error.
    12021202 * @param   pTransfer           URI clipboard transfer to create new list handle for.
    12031203 */
    1204 inline SHAREDCLIPBOARDLISTHANDLE sharedClipboardURITransferListHandleNew(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1204inline SHCLLISTHANDLE sharedClipboardURITransferListHandleNew(PSHCLURITRANSFER pTransfer)
    12051205{
    12061206    return pTransfer->uListHandleNext++; /** @todo Good enough for now. Improve this later. */
     
    12151215 * @param   phList              Where to store the List handle of opened list on success.
    12161216 */
    1217 int SharedClipboardURITransferListOpen(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,
    1218                                        PSHAREDCLIPBOARDLISTHANDLE phList)
     1217int SharedClipboardURITransferListOpen(PSHCLURITRANSFER pTransfer, PSHCLLISTOPENPARMS pOpenParms,
     1218                                       PSHCLLISTHANDLE phList)
    12191219{
    12201220    AssertPtrReturn(pTransfer,  VERR_INVALID_POINTER);
     
    12241224    int rc;
    12251225
    1226     SHAREDCLIPBOARDLISTHANDLE hList = SHAREDCLIPBOARDLISTHANDLE_INVALID;
    1227 
    1228     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    1229     {
    1230         PSHAREDCLIPBOARDURILISTHANDLEINFO pInfo
    1231             = (PSHAREDCLIPBOARDURILISTHANDLEINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDURILISTHANDLEINFO));
     1226    SHCLLISTHANDLE hList = SHCLLISTHANDLE_INVALID;
     1227
     1228    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     1229    {
     1230        PSHCLURILISTHANDLEINFO pInfo
     1231            = (PSHCLURILISTHANDLEINFO)RTMemAlloc(sizeof(SHCLURILISTHANDLEINFO));
    12321232        if (pInfo)
    12331233        {
     
    12401240                switch (pInfo->enmType)
    12411241                {
    1242                     case SHAREDCLIPBOARDURIOBJTYPE_DIRECTORY:
     1242                    case SHCLURIOBJTYPE_DIRECTORY:
    12431243                    {
    12441244                        rc = RTDirOpen(&pInfo->u.Local.hDir, pOpenParms->pszPath);
     
    12461246                    }
    12471247
    1248                     case SHAREDCLIPBOARDURIOBJTYPE_FILE:
     1248                    case SHCLURIOBJTYPE_FILE:
    12491249                    {
    12501250                        rc = RTFileOpen(&pInfo->u.Local.hFile, pOpenParms->pszPath,
     
    12851285            rc = VERR_NO_MEMORY;
    12861286    }
    1287     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     1287    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    12881288    {
    12891289        if (pTransfer->ProviderIface.pfnListOpen)
     
    13111311 * @param   hList               Handle of list to close.
    13121312 */
    1313 int SharedClipboardURITransferListClose(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList)
     1313int SharedClipboardURITransferListClose(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList)
    13141314{
    13151315    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
    13161316
    1317     if (hList == SHAREDCLIPBOARDLISTHANDLE_INVALID)
     1317    if (hList == SHCLLISTHANDLE_INVALID)
    13181318        return VINF_SUCCESS;
    13191319
    13201320    int rc = VINF_SUCCESS;
    13211321
    1322     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    1323     {
    1324         PSHAREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);
     1322    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     1323    {
     1324        PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);
    13251325        if (pInfo)
    13261326        {
    13271327            switch (pInfo->enmType)
    13281328            {
    1329                 case SHAREDCLIPBOARDURIOBJTYPE_DIRECTORY:
     1329                case SHCLURIOBJTYPE_DIRECTORY:
    13301330                {
    13311331                    if (RTDirIsValid(pInfo->u.Local.hDir))
     
    13461346            rc = VERR_NOT_FOUND;
    13471347    }
    1348     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     1348    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    13491349    {
    13501350        if (pTransfer->ProviderIface.pfnListClose)
     
    13671367 * @param   pszPath             Path of file to add.
    13681368 */
    1369 static int sharedClipboardURITransferListHdrAddFile(PVBOXCLIPBOARDLISTHDR pHdr, const char *pszPath)
     1369static int sharedClipboardURITransferListHdrAddFile(PSHCLLISTHDR pHdr, const char *pszPath)
    13701370{
    13711371    uint64_t cbSize = 0;
     
    13911391 * @param   cchDstBase          Number of charaters of destination base path.
    13921392 */
    1393 static int sharedClipboardURITransferListHdrFromDir(PVBOXCLIPBOARDLISTHDR pHdr,
     1393static int sharedClipboardURITransferListHdrFromDir(PSHCLLISTHDR pHdr,
    13941394                                                    const char *pcszSrcPath, const char *pcszDstPath,
    13951395                                                    const char *pcszDstBase)
     
    15431543 * @param   pHdr                Where to store the returned list header information.
    15441544 */
    1545 int SharedClipboardURITransferListGetHeader(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,
    1546                                             PVBOXCLIPBOARDLISTHDR pHdr)
     1545int SharedClipboardURITransferListGetHeader(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList,
     1546                                            PSHCLLISTHDR pHdr)
    15471547{
    15481548    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    15531553    LogFlowFunc(("hList=%RU64\n", hList));
    15541554
    1555     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    1556     {
    1557         PSHAREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);
     1555    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     1556    {
     1557        PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);
    15581558        if (pInfo)
    15591559        {
     
    15631563                switch (pInfo->enmType)
    15641564                {
    1565                     case SHAREDCLIPBOARDURIOBJTYPE_DIRECTORY:
     1565                    case SHCLURIOBJTYPE_DIRECTORY:
    15661566                    {
    15671567                        char *pszPathRel = sharedClipboardPathTranslate(pInfo->pszPathLocalAbs);
     
    15771577                    }
    15781578
    1579                     case SHAREDCLIPBOARDURIOBJTYPE_FILE:
     1579                    case SHCLURIOBJTYPE_FILE:
    15801580                    {
    15811581                        pHdr->cTotalObjects = 1;
     
    16011601            rc = VERR_NOT_FOUND;
    16021602    }
    1603     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     1603    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    16041604    {
    16051605        if (pTransfer->ProviderIface.pfnListHdrRead)
     
    16271627 * @param   uIdx                Index of object to get.
    16281628 */
    1629 PSHAREDCLIPBOARDURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    1630                                                                     SHAREDCLIPBOARDLISTHANDLE hList, uint64_t uIdx)
     1629PSHCLURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHCLURITRANSFER pTransfer,
     1630                                                                    SHCLLISTHANDLE hList, uint64_t uIdx)
    16311631{
    16321632    AssertPtrReturn(pTransfer, NULL);
     
    16471647 * @param   pEntry              Where to store the read information.
    16481648 */
    1649 int SharedClipboardURITransferListRead(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,
    1650                                        PVBOXCLIPBOARDLISTENTRY pEntry)
     1649int SharedClipboardURITransferListRead(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList,
     1650                                       PSHCLLISTENTRY pEntry)
    16511651{
    16521652    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    16571657    LogFlowFunc(("hList=%RU64\n", hList));
    16581658
    1659     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    1660     {
    1661         PSHAREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);
     1659    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     1660    {
     1661        PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);
    16621662        if (pInfo)
    16631663        {
    16641664            switch (pInfo->enmType)
    16651665            {
    1666                 case SHAREDCLIPBOARDURIOBJTYPE_DIRECTORY:
     1666                case SHCLURIOBJTYPE_DIRECTORY:
    16671667                {
    16681668                    LogFlowFunc(("\tDirectory: %s\n", pInfo->pszPathLocalAbs));
     
    17111711                                && !fSkipEntry)
    17121712                            {
    1713                                 pEntry->pvInfo = (PSHAREDCLIPBOARDFSOBJINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDFSOBJINFO));
     1713                                pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(sizeof(SHCLFSOBJINFO));
    17141714                                if (pEntry->pvInfo)
    17151715                                {
     
    17171717                                    if (RT_SUCCESS(rc))
    17181718                                    {
    1719                                         SharedClipboardFsObjFromIPRT(PSHAREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &pDirEntry->Info);
    1720 
    1721                                         pEntry->cbInfo = sizeof(SHAREDCLIPBOARDFSOBJINFO);
    1722                                         pEntry->fInfo  = VBOX_SHAREDCLIPBOARD_INFO_FLAG_FSOBJINFO;
     1719                                        SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &pDirEntry->Info);
     1720
     1721                                        pEntry->cbInfo = sizeof(SHCLFSOBJINFO);
     1722                                        pEntry->fInfo  = VBOX_SHCL_INFO_FLAG_FSOBJINFO;
    17231723                                    }
    17241724                                }
     
    17401740                }
    17411741
    1742                 case SHAREDCLIPBOARDURIOBJTYPE_FILE:
     1742                case SHCLURIOBJTYPE_FILE:
    17431743                {
    17441744                    LogFlowFunc(("\tSingle file: %s\n", pInfo->pszPathLocalAbs));
     
    17481748                    if (RT_SUCCESS(rc))
    17491749                    {
    1750                         pEntry->pvInfo = (PSHAREDCLIPBOARDFSOBJINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDFSOBJINFO));
     1750                        pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(sizeof(SHCLFSOBJINFO));
    17511751                        if (pEntry->pvInfo)
    17521752                        {
     
    17541754                            if (RT_SUCCESS(rc))
    17551755                            {
    1756                                 SharedClipboardFsObjFromIPRT(PSHAREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &objInfo);
    1757 
    1758                                 pEntry->cbInfo = sizeof(SHAREDCLIPBOARDFSOBJINFO);
    1759                                 pEntry->fInfo  = VBOX_SHAREDCLIPBOARD_INFO_FLAG_FSOBJINFO;
     1756                                SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &objInfo);
     1757
     1758                                pEntry->cbInfo = sizeof(SHCLFSOBJINFO);
     1759                                pEntry->fInfo  = VBOX_SHCL_INFO_FLAG_FSOBJINFO;
    17601760                            }
    17611761                        }
     
    17751775            rc = VERR_NOT_FOUND;
    17761776    }
    1777     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     1777    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    17781778    {
    17791779        if (pTransfer->ProviderIface.pfnListEntryRead)
     
    17871787}
    17881788
    1789 int SharedClipboardURITransferListWrite(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,
    1790                                         PVBOXCLIPBOARDLISTENTRY pEntry)
     1789int SharedClipboardURITransferListWrite(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList,
     1790                                        PSHCLLISTENTRY pEntry)
    17911791{
    17921792    RT_NOREF(pTransfer, hList, pEntry);
     
    18101810 * @param   hList               List handle to check.
    18111811 */
    1812 bool SharedClipboardURITransferListHandleIsValid(PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList)
     1812bool SharedClipboardURITransferListHandleIsValid(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList)
    18131813{
    18141814    bool fIsValid = false;
    18151815
    1816     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
     1816    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
    18171817    {
    18181818        fIsValid = sharedClipboardURITransferListGet(pTransfer, hList) != NULL;
    18191819    }
    1820     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     1820    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    18211821    {
    18221822        AssertFailed(); /** @todo Implement. */
     
    18321832 * @param   pTransfer           URI clipboard transfer to prepare.
    18331833 */
    1834 int SharedClipboardURITransferPrepare(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1834int SharedClipboardURITransferPrepare(PSHCLURITRANSFER pTransfer)
    18351835{
    18361836    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    18401840    int rc = VINF_SUCCESS;
    18411841
    1842     AssertMsgReturn(pTransfer->State.enmStatus == SHAREDCLIPBOARDURITRANSFERSTATUS_NONE,
     1842    AssertMsgReturn(pTransfer->State.enmStatus == SHCLURITRANSFERSTATUS_NONE,
    18431843                    ("Transfer has wrong state (%RU32)\n", pTransfer->State.enmStatus), VERR_WRONG_ORDER);
    18441844
     
    18471847    if (pTransfer->Callbacks.pfnTransferPrepare)
    18481848    {
    1849         SHAREDCLIPBOARDURITRANSFERCALLBACKDATA callbackData = { pTransfer, pTransfer->Callbacks.pvUser };
     1849        SHCLURITRANSFERCALLBACKDATA callbackData = { pTransfer, pTransfer->Callbacks.pvUser };
    18501850        pTransfer->Callbacks.pfnTransferPrepare(&callbackData);
    18511851    }
     
    18531853    if (RT_SUCCESS(rc))
    18541854    {
    1855         pTransfer->State.enmStatus = SHAREDCLIPBOARDURITRANSFERSTATUS_READY;
     1855        pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_READY;
    18561856
    18571857        /** @todo Add checksum support. */
     
    18691869 * @param   pCreationCtx        Provider creation context to use for provider creation.
    18701870 */
    1871 int SharedClipboardURITransferSetInterface(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    1872                                            PSHAREDCLIPBOARDPROVIDERCREATIONCTX pCreationCtx)
     1871int SharedClipboardURITransferSetInterface(PSHCLURITRANSFER pTransfer,
     1872                                           PSHCLPROVIDERCREATIONCTX pCreationCtx)
    18731873{
    18741874    AssertPtrReturn(pTransfer,    VERR_INVALID_POINTER);
     
    19061906 * @param   pTransfer           Transfer to clear URI root list for.
    19071907 */
    1908 static void sharedClipboardURIListTransferRootsClear(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1908static void sharedClipboardURIListTransferRootsClear(PSHCLURITRANSFER pTransfer)
    19091909{
    19101910    AssertPtrReturnVoid(pTransfer);
     
    19161916    }
    19171917
    1918     PSHAREDCLIPBOARDURILISTROOT pListRoot, pListRootNext;
    1919     RTListForEachSafe(&pTransfer->lstRoots, pListRoot, pListRootNext, SHAREDCLIPBOARDURILISTROOT, Node)
     1918    PSHCLURILISTROOT pListRoot, pListRootNext;
     1919    RTListForEachSafe(&pTransfer->lstRoots, pListRoot, pListRootNext, SHCLURILISTROOT, Node)
    19201920    {
    19211921        RTStrFree(pListRoot->pszPathAbs);
     
    19391939 * @param   cbRoots             Size (in bytes) of string list.
    19401940 */
    1941 int SharedClipboardURILTransferSetRoots(PSHAREDCLIPBOARDURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots)
     1941int SharedClipboardURILTransferSetRoots(PSHCLURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots)
    19421942{
    19431943    AssertPtrReturn(pTransfer,      VERR_INVALID_POINTER);
     
    19571957    for (size_t i = 0; i < lstRootEntries.size(); ++i)
    19581958    {
    1959         PSHAREDCLIPBOARDURILISTROOT pListRoot = (PSHAREDCLIPBOARDURILISTROOT)RTMemAlloc(sizeof(SHAREDCLIPBOARDURILISTROOT));
     1959        PSHCLURILISTROOT pListRoot = (PSHCLURILISTROOT)RTMemAlloc(sizeof(SHCLURILISTROOT));
    19601960        AssertPtrBreakStmt(pListRoot, rc = VERR_NO_MEMORY);
    19611961
     
    20072007 * @param   pTransfer           URI clipboard transfer to reset.
    20082008 */
    2009 void SharedClipboardURITransferReset(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     2009void SharedClipboardURITransferReset(PSHCLURITRANSFER pTransfer)
    20102010{
    20112011    AssertPtrReturnVoid(pTransfer);
     
    20222022 * @param   pTransfer           URI clipboard transfer to return clipboard area for.
    20232023 */
    2024 SharedClipboardArea *SharedClipboardURITransferGetArea(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     2024SharedClipboardArea *SharedClipboardURITransferGetArea(PSHCLURITRANSFER pTransfer)
    20252025{
    20262026    AssertPtrReturn(pTransfer, NULL);
     
    20352035 * @param   pTransfer           URI clipboard transfer to return root entry count for.
    20362036 */
    2037 uint32_t SharedClipboardURILTransferRootsCount(PSHAREDCLIPBOARDURITRANSFER pTransfer)
     2037uint32_t SharedClipboardURILTransferRootsCount(PSHCLURITRANSFER pTransfer)
    20382038{
    20392039    AssertPtrReturn(pTransfer, 0);
     
    20492049 * @param   uIdx                Index of root list entry to return.
    20502050 */
    2051 inline PSHAREDCLIPBOARDURILISTROOT sharedClipboardURILTransferRootsGet(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint32_t uIdx)
     2051inline PSHCLURILISTROOT sharedClipboardURILTransferRootsGet(PSHCLURITRANSFER pTransfer, uint32_t uIdx)
    20522052{
    20532053    if (uIdx >= pTransfer->cRoots)
    20542054        return NULL;
    20552055
    2056     PSHAREDCLIPBOARDURILISTROOT pIt = RTListGetFirst(&pTransfer->lstRoots, SHAREDCLIPBOARDURILISTROOT, Node);
     2056    PSHCLURILISTROOT pIt = RTListGetFirst(&pTransfer->lstRoots, SHCLURILISTROOT, Node);
    20572057    while (uIdx--)
    2058         pIt = RTListGetNext(&pTransfer->lstRoots, pIt, SHAREDCLIPBOARDURILISTROOT, Node);
     2058        pIt = RTListGetNext(&pTransfer->lstRoots, pIt, SHCLURILISTROOT, Node);
    20592059
    20602060    return pIt;
     
    20692069 * @param   pEntry              Where to store the returned entry on success.
    20702070 */
    2071 int SharedClipboardURILTransferRootsEntry(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    2072                                           uint64_t uIndex, PVBOXCLIPBOARDROOTLISTENTRY pEntry)
     2071int SharedClipboardURILTransferRootsEntry(PSHCLURITRANSFER pTransfer,
     2072                                          uint64_t uIndex, PSHCLROOTLISTENTRY pEntry)
    20732073{
    20742074    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    20802080    int rc;
    20812081
    2082     PSHAREDCLIPBOARDURILISTROOT pRoot = sharedClipboardURILTransferRootsGet(pTransfer, uIndex);
     2082    PSHCLURILISTROOT pRoot = sharedClipboardURILTransferRootsGet(pTransfer, uIndex);
    20832083    AssertPtrReturn(pRoot, VERR_INVALID_PARAMETER);
    20842084
     
    21012101            if (RT_SUCCESS(rc))
    21022102            {
    2103                 pEntry->cbInfo = sizeof(SHAREDCLIPBOARDFSOBJINFO);
    2104                 pEntry->pvInfo = (PSHAREDCLIPBOARDFSOBJINFO)RTMemAlloc(pEntry->cbInfo);
     2103                pEntry->cbInfo = sizeof(SHCLFSOBJINFO);
     2104                pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(pEntry->cbInfo);
    21052105                if (pEntry->pvInfo)
    21062106                {
     
    21092109                    if (RT_SUCCESS(rc))
    21102110                    {
    2111                         SharedClipboardFsObjFromIPRT(PSHAREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &fsObjInfo);
    2112 
    2113                         pEntry->fInfo  = VBOX_SHAREDCLIPBOARD_INFO_FLAG_FSOBJINFO;
     2111                        SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &fsObjInfo);
     2112
     2113                        pEntry->fInfo  = VBOX_SHCL_INFO_FLAG_FSOBJINFO;
    21142114                    }
    21152115                }
     
    21332133 * @param   ppRootList          Where to store the root list on success.
    21342134 */
    2135 int SharedClipboardURILTransferRootsAsList(PSHAREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDROOTLIST *ppRootList)
     2135int SharedClipboardURILTransferRootsAsList(PSHCLURITRANSFER pTransfer, PSHCLROOTLIST *ppRootList)
    21362136{
    21372137    AssertPtrReturn(pTransfer,  VERR_INVALID_POINTER);
     
    21422142    int rc = VINF_SUCCESS;
    21432143
    2144     if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_LOCAL)
    2145     {
    2146         PVBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();
     2144    if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL)
     2145    {
     2146        PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc();
    21472147        if (!pRootList)
    21482148            return VERR_NO_MEMORY;
     
    21542154        if (cRoots)
    21552155        {
    2156             PVBOXCLIPBOARDROOTLISTENTRY paRootListEntries
    2157                 = (PVBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));
     2156            PSHCLROOTLISTENTRY paRootListEntries
     2157                = (PSHCLROOTLISTENTRY)RTMemAllocZ(cRoots * sizeof(SHCLROOTLISTENTRY));
    21582158            if (paRootListEntries)
    21592159            {
     
    21822182        }
    21832183    }
    2184     else if (pTransfer->State.enmSource == SHAREDCLIPBOARDSOURCE_REMOTE)
     2184    else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE)
    21852185    {
    21862186        if (pTransfer->ProviderIface.pfnGetRoots)
     
    22002200 * @param   pTransfer           URI clipboard transfer to return source for.
    22012201 */
    2202 SHAREDCLIPBOARDSOURCE SharedClipboardURITransferGetSource(PSHAREDCLIPBOARDURITRANSFER pTransfer)
    2203 {
    2204     AssertPtrReturn(pTransfer, SHAREDCLIPBOARDSOURCE_INVALID);
     2202SHCLSOURCE SharedClipboardURITransferGetSource(PSHCLURITRANSFER pTransfer)
     2203{
     2204    AssertPtrReturn(pTransfer, SHCLSOURCE_INVALID);
    22052205
    22062206    return pTransfer->State.enmSource;
     
    22132213 * @param   pTransfer           URI clipboard transfer to return status for.
    22142214 */
    2215 SHAREDCLIPBOARDURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHAREDCLIPBOARDURITRANSFER pTransfer)
    2216 {
    2217     AssertPtrReturn(pTransfer, SHAREDCLIPBOARDURITRANSFERSTATUS_NONE);
     2215SHCLURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHCLURITRANSFER pTransfer)
     2216{
     2217    AssertPtrReturn(pTransfer, SHCLURITRANSFERSTATUS_NONE);
    22182218
    22192219    return pTransfer->State.enmStatus;
     
    22282228 * @param   pvUser              Pointer to user-provided data.
    22292229 */
    2230 int SharedClipboardURITransferRun(PSHAREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)
     2230int SharedClipboardURITransferRun(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)
    22312231{
    22322232    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
    22332233
    2234     AssertMsgReturn(pTransfer->State.enmStatus == SHAREDCLIPBOARDURITRANSFERSTATUS_READY,
     2234    AssertMsgReturn(pTransfer->State.enmStatus == SHCLURITRANSFERSTATUS_READY,
    22352235                    ("Wrong status (currently is %RU32)\n", pTransfer->State.enmStatus), VERR_WRONG_ORDER);
    22362236
     
    22482248 * @param   pCallbacks          Pointer to callback table to set.
    22492249 */
    2250 void SharedClipboardURITransferSetCallbacks(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    2251                                             PSHAREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks)
     2250void SharedClipboardURITransferSetCallbacks(PSHCLURITRANSFER pTransfer,
     2251                                            PSHCLURITRANSFERCALLBACKS pCallbacks)
    22522252{
    22532253    AssertPtrReturnVoid(pTransfer);
     
    22812281 * @param   pvUser              Pointer to user-provided data.
    22822282 */
    2283 static int sharedClipboardURITransferThreadCreate(PSHAREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)
     2283static int sharedClipboardURITransferThreadCreate(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)
    22842284
    22852285{
     
    22972297        if (pTransfer->Thread.fStarted) /* Did the thread indicate that it started correctly? */
    22982298        {
    2299             pTransfer->State.enmStatus = SHAREDCLIPBOARDURITRANSFERSTATUS_RUNNING;
     2299            pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_RUNNING;
    23002300        }
    23012301        else
     
    23142314 * @param   uTimeoutMs          Timeout (in ms) to wait for thread creation.
    23152315 */
    2316 static int sharedClipboardURITransferThreadDestroy(PSHAREDCLIPBOARDURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs)
     2316static int sharedClipboardURITransferThreadDestroy(PSHCLURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs)
    23172317{
    23182318    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    23402340 * @param   pURI                URI clipboard context to initialize.
    23412341 */
    2342 int SharedClipboardURICtxInit(PSHAREDCLIPBOARDURICTX pURI)
     2342int SharedClipboardURICtxInit(PSHCLURICTX pURI)
    23432343{
    23442344    AssertPtrReturn(pURI, VERR_INVALID_POINTER);
     
    23682368 * @param   pURI                URI clipboard context to destroy.
    23692369 */
    2370 void SharedClipboardURICtxDestroy(PSHAREDCLIPBOARDURICTX pURI)
     2370void SharedClipboardURICtxDestroy(PSHCLURICTX pURI)
    23712371{
    23722372    AssertPtrReturnVoid(pURI);
     
    23762376    RTCritSectDelete(&pURI->CritSect);
    23772377
    2378     PSHAREDCLIPBOARDURITRANSFER pTransfer, pTransferNext;
    2379     RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHAREDCLIPBOARDURITRANSFER, Node)
     2378    PSHCLURITRANSFER pTransfer, pTransferNext;
     2379    RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHCLURITRANSFER, Node)
    23802380    {
    23812381        SharedClipboardURITransferDestroy(pTransfer);
     
    23962396 * @param   pURI                URI clipboard context to reset.
    23972397 */
    2398 void SharedClipboardURICtxReset(PSHAREDCLIPBOARDURICTX pURI)
     2398void SharedClipboardURICtxReset(PSHCLURICTX pURI)
    23992399{
    24002400    AssertPtrReturnVoid(pURI);
     
    24022402    LogFlowFuncEnter();
    24032403
    2404     PSHAREDCLIPBOARDURITRANSFER pTransfer;
    2405     RTListForEach(&pURI->List, pTransfer, SHAREDCLIPBOARDURITRANSFER, Node)
     2404    PSHCLURITRANSFER pTransfer;
     2405    RTListForEach(&pURI->List, pTransfer, SHCLURITRANSFER, Node)
    24062406        SharedClipboardURITransferReset(pTransfer);
    24072407}
     
    24142414 * @param   pTransfer           Pointer to URI clipboard transfer to add.
    24152415 */
    2416 int SharedClipboardURICtxTransferAdd(PSHAREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     2416int SharedClipboardURICtxTransferAdd(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer)
    24172417{
    24182418    AssertPtrReturn(pURI,      VERR_INVALID_POINTER);
     
    24392439 * @param   pTransfer           Pointer to URI clipboard transfer to remove.
    24402440 */
    2441 int SharedClipboardURICtxTransferRemove(PSHAREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     2441int SharedClipboardURICtxTransferRemove(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer)
    24422442{
    24432443    AssertPtrReturn(pURI,      VERR_INVALID_POINTER);
     
    24672467 * @param   uIdx                Index of the transfer to return.
    24682468 */
    2469 static PSHAREDCLIPBOARDURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx)
     2469static PSHCLURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHCLURICTX pURI, uint32_t uIdx)
    24702470{
    24712471    AssertReturn(uIdx == 0, NULL); /* Only one transfer allowed at the moment. */
    2472     return RTListGetFirst(&pURI->List, SHAREDCLIPBOARDURITRANSFER, Node);
     2472    return RTListGetFirst(&pURI->List, SHCLURITRANSFER, Node);
    24732473}
    24742474
     
    24802480 * @param   uIdx                Index of the transfer to return.
    24812481 */
    2482 PSHAREDCLIPBOARDURITRANSFER SharedClipboardURICtxGetTransfer(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx)
     2482PSHCLURITRANSFER SharedClipboardURICtxGetTransfer(PSHCLURICTX pURI, uint32_t uIdx)
    24832483{
    24842484    return sharedClipboardURICtxGetTransferInternal(pURI, uIdx);
     
    24912491 * @param   pURI                URI clipboard context to return number for.
    24922492 */
    2493 uint32_t SharedClipboardURICtxGetRunningTransfers(PSHAREDCLIPBOARDURICTX pURI)
     2493uint32_t SharedClipboardURICtxGetRunningTransfers(PSHCLURICTX pURI)
    24942494{
    24952495    AssertPtrReturn(pURI, 0);
     
    25032503 * @param   pURI                URI clipboard context to return number for.
    25042504 */
    2505 uint32_t SharedClipboardURICtxGetTotalTransfers(PSHAREDCLIPBOARDURICTX pURI)
     2505uint32_t SharedClipboardURICtxGetTotalTransfers(PSHCLURICTX pURI)
    25062506{
    25072507    AssertPtrReturn(pURI, 0);
     
    25152515 * @param   pURI                URI clipboard context to cleanup transfers for.
    25162516 */
    2517 void SharedClipboardURICtxTransfersCleanup(PSHAREDCLIPBOARDURICTX pURI)
     2517void SharedClipboardURICtxTransfersCleanup(PSHCLURICTX pURI)
    25182518{
    25192519    AssertPtrReturnVoid(pURI);
     
    25222522
    25232523    /* Remove all transfers which are not in a running state (e.g. only announced). */
    2524     PSHAREDCLIPBOARDURITRANSFER pTransfer, pTransferNext;
    2525     RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHAREDCLIPBOARDURITRANSFER, Node)
    2526     {
    2527         if (SharedClipboardURITransferGetStatus(pTransfer) != SHAREDCLIPBOARDURITRANSFERSTATUS_RUNNING)
     2524    PSHCLURITRANSFER pTransfer, pTransferNext;
     2525    RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHCLURITRANSFER, Node)
     2526    {
     2527        if (SharedClipboardURITransferGetStatus(pTransfer) != SHCLURITRANSFERSTATUS_RUNNING)
    25282528        {
    25292529            SharedClipboardURITransferDestroy(pTransfer);
     
    25452545 * @param   pURI                URI clipboard context to determine value for.
    25462546 */
    2547 bool SharedClipboardURICtxTransfersMaximumReached(PSHAREDCLIPBOARDURICTX pURI)
     2547bool SharedClipboardURICtxTransfersMaximumReached(PSHCLURICTX pURI)
    25482548{
    25492549    AssertPtrReturn(pURI, true);
     
    25612561 * @param   pSrc                The IPRT structure to convert data from.
    25622562 */
    2563 void SharedClipboardFsObjFromIPRT(PSHAREDCLIPBOARDFSOBJINFO pDst, PCRTFSOBJINFO pSrc)
     2563void SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO pDst, PCRTFSOBJINFO pSrc)
    25642564{
    25652565    pDst->cbObject          = pSrc->cbObject;
     
    25772577        default:
    25782578        case RTFSOBJATTRADD_NOTHING:
    2579             pDst->Attr.enmAdditional        = SHAREDCLIPBOARDFSOBJATTRADD_NOTHING;
     2579            pDst->Attr.enmAdditional        = SHCLFSOBJATTRADD_NOTHING;
    25802580            break;
    25812581
    25822582        case RTFSOBJATTRADD_UNIX:
    2583             pDst->Attr.enmAdditional        = SHAREDCLIPBOARDFSOBJATTRADD_UNIX;
     2583            pDst->Attr.enmAdditional        = SHCLFSOBJATTRADD_UNIX;
    25842584            pDst->Attr.u.Unix.uid           = pSrc->Attr.u.Unix.uid;
    25852585            pDst->Attr.u.Unix.gid           = pSrc->Attr.u.Unix.gid;
     
    25932593
    25942594        case RTFSOBJATTRADD_EASIZE:
    2595             pDst->Attr.enmAdditional        = SHAREDCLIPBOARDFSOBJATTRADD_EASIZE;
     2595            pDst->Attr.enmAdditional        = SHCLFSOBJATTRADD_EASIZE;
    25962596            pDst->Attr.u.EASize.cb          = pSrc->Attr.u.EASize.cb;
    25972597            break;
     
    26122612 */
    26132613static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode,
    2614                                                  SHAREDCLIPBOARDOBJHANDLE handleInitial, uint64_t *pfOpen)
     2614                                                 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen)
    26152615{
    26162616    uint64_t fOpen = 0;
     
    26402640         * and it contained random bits from stack. Detect this using the handle field value
    26412641         * passed from the guest: old additions set it (incorrectly) to 0, new additions
    2642          * set it to SHAREDCLIPBOARDOBJHANDLE_INVALID(~0).
     2642         * set it to SHCLOBJHANDLE_INVALID(~0).
    26432643         */
    26442644        if (handleInitial == 0)
     
    26562656    }
    26572657
    2658     switch ((fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_RW))
     2658    switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_RW))
    26592659    {
    26602660        default:
    2661         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_NONE:
     2661        case SHCL_OBJ_CF_ACCESS_NONE:
    26622662        {
    26632663#ifdef RT_OS_WINDOWS
    2664             if ((fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR) != SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE)
     2664            if ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_ATTR) != SHCL_OBJ_CF_ACCESS_ATTR_NONE)
    26652665                fOpen |= RTFILE_O_ATTR_ONLY;
    26662666            else
    26672667#endif
    26682668                fOpen |= RTFILE_O_READ;
    2669             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_NONE\n"));
     2669            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_NONE\n"));
    26702670            break;
    26712671        }
    26722672
    2673         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ:
     2673        case SHCL_OBJ_CF_ACCESS_READ:
    26742674        {
    26752675            fOpen |= RTFILE_O_READ;
    2676             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_READ\n"));
     2676            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_READ\n"));
    26772677            break;
    26782678        }
    26792679
    2680         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_WRITE:
     2680        case SHCL_OBJ_CF_ACCESS_WRITE:
    26812681        {
    26822682            fOpen |= RTFILE_O_WRITE;
    2683             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_WRITE\n"));
     2683            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_WRITE\n"));
    26842684            break;
    26852685        }
    26862686
    2687         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE:
     2687        case SHCL_OBJ_CF_ACCESS_READWRITE:
    26882688        {
    26892689            fOpen |= RTFILE_O_READWRITE;
    2690             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE\n"));
     2690            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_READWRITE\n"));
    26912691            break;
    26922692        }
    26932693    }
    26942694
    2695     if (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACCESS_APPEND)
     2695    if (fShClFlags & SHCL_OBJ_CF_ACCESS_APPEND)
    26962696    {
    26972697        fOpen |= RTFILE_O_APPEND;
    26982698    }
    26992699
    2700     switch ((fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR))
     2700    switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_ATTR))
    27012701    {
    27022702        default:
    2703         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE:
     2703        case SHCL_OBJ_CF_ACCESS_ATTR_NONE:
    27042704        {
    27052705            fOpen |= RTFILE_O_ACCESS_ATTR_DEFAULT;
    2706             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE\n"));
     2706            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_NONE\n"));
    27072707            break;
    27082708        }
    27092709
    2710         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ:
     2710        case SHCL_OBJ_CF_ACCESS_ATTR_READ:
    27112711        {
    27122712            fOpen |= RTFILE_O_ACCESS_ATTR_READ;
    2713             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ\n"));
     2713            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_READ\n"));
    27142714            break;
    27152715        }
    27162716
    2717         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE:
     2717        case SHCL_OBJ_CF_ACCESS_ATTR_WRITE:
    27182718        {
    27192719            fOpen |= RTFILE_O_ACCESS_ATTR_WRITE;
    2720             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE\n"));
     2720            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_WRITE\n"));
    27212721            break;
    27222722        }
    27232723
    2724         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE:
     2724        case SHCL_OBJ_CF_ACCESS_ATTR_READWRITE:
    27252725        {
    27262726            fOpen |= RTFILE_O_ACCESS_ATTR_READWRITE;
    2727             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE\n"));
     2727            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_READWRITE\n"));
    27282728            break;
    27292729        }
     
    27312731
    27322732    /* Sharing mask */
    2733     switch ((fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACCESS_MASK_DENY))
     2733    switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_DENY))
    27342734    {
    27352735        default:
    2736         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE:
     2736        case SHCL_OBJ_CF_ACCESS_DENYNONE:
    27372737            fOpen |= RTFILE_O_DENY_NONE;
    2738             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE\n"));
     2738            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYNONE\n"));
    27392739            break;
    27402740
    2741         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD:
     2741        case SHCL_OBJ_CF_ACCESS_DENYREAD:
    27422742            fOpen |= RTFILE_O_DENY_READ;
    2743             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD\n"));
     2743            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYREAD\n"));
    27442744            break;
    27452745
    2746         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE:
     2746        case SHCL_OBJ_CF_ACCESS_DENYWRITE:
    27472747            fOpen |= RTFILE_O_DENY_WRITE;
    2748             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE\n"));
     2748            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYWRITE\n"));
    27492749            break;
    27502750
    2751         case SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL:
     2751        case SHCL_OBJ_CF_ACCESS_DENYALL:
    27522752            fOpen |= RTFILE_O_DENY_ALL;
    2753             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL\n"));
     2753            LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYALL\n"));
    27542754            break;
    27552755    }
    27562756
    27572757    /* Open/Create action mask */
    2758     switch ((fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS))
    2759     {
    2760         case SHAREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS:
    2761             if (SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2758    switch ((fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_EXISTS))
     2759    {
     2760        case SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS:
     2761            if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    27622762            {
    27632763                fOpen |= RTFILE_O_OPEN_CREATE;
    2764                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));
     2764                LogFlowFunc(("SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n"));
    27652765            }
    2766             else if (SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2766            else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    27672767            {
    27682768                fOpen |= RTFILE_O_OPEN;
    2769                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));
     2769                LogFlowFunc(("SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n"));
    27702770            }
    27712771            else
     
    27752775            }
    27762776            break;
    2777         case SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS:
    2778             if (SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2777        case SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS:
     2778            if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    27792779            {
    27802780                fOpen |= RTFILE_O_CREATE;
    2781                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));
     2781                LogFlowFunc(("SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n"));
    27822782            }
    27832783            else
     
    27872787            }
    27882788            break;
    2789         case SHAREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS:
    2790             if (SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2789        case SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS:
     2790            if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    27912791            {
    27922792                fOpen |= RTFILE_O_CREATE_REPLACE;
    2793                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));
     2793                LogFlowFunc(("SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n"));
    27942794            }
    2795             else if (SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2795            else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    27962796            {
    27972797                fOpen |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE;
    2798                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));
     2798                LogFlowFunc(("SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n"));
    27992799            }
    28002800            else
     
    28042804            }
    28052805            break;
    2806         case SHAREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS:
    2807             if (SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2806        case SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS:
     2807            if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    28082808            {
    28092809                fOpen |= RTFILE_O_CREATE_REPLACE;
    2810                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));
     2810                LogFlowFunc(("SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n"));
    28112811            }
    2812             else if (SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))
     2812            else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW))
    28132813            {
    28142814                fOpen |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE;
    2815                 LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));
     2815                LogFlowFunc(("SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n"));
    28162816            }
    28172817            else
     
    28242824        {
    28252825            rc = VERR_INVALID_PARAMETER;
    2826             LogFlowFunc(("SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS - invalid parameter\n"));
     2826            LogFlowFunc(("SHCL_OBJ_CF_ACT_MASK_IF_EXISTS - invalid parameter\n"));
    28272827            break;
    28282828        }
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp

    r80444 r80662  
    154154 *                              Will be set to NULL if the new API is not available.
    155155 */
    156 int VBoxClipboardWinCheckAndInitNewAPI(PVBOXCLIPBOARDWINAPINEW pAPI)
     156int VBoxClipboardWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI)
    157157{
    158158    RTLDRMOD hUser32 = NIL_RTLDRMOD;
     
    175175    else
    176176    {
    177         RT_BZERO(pAPI, sizeof(VBOXCLIPBOARDWINAPINEW));
     177        RT_BZERO(pAPI, sizeof(SHCLWINAPINEW));
    178178        LogFunc(("New Clipboard API not available; rc=%Rrc\n", rc));
    179179    }
     
    188188 * @param   pAPI                Structure used for checking if the new clipboard API is available or not.
    189189 */
    190 bool VBoxClipboardWinIsNewAPI(PVBOXCLIPBOARDWINAPINEW pAPI)
     190bool VBoxClipboardWinIsNewAPI(PSHCLWINAPINEW pAPI)
    191191{
    192192    if (!pAPI)
     
    201201 * @param   pCtx                Windows clipboard context to use to add ourselves.
    202202 */
    203 int VBoxClipboardWinChainAdd(PVBOXCLIPBOARDWINCTX pCtx)
    204 {
    205     const PVBOXCLIPBOARDWINAPINEW pAPI = &pCtx->newAPI;
     203int VBoxClipboardWinChainAdd(PSHCLWINCTX pCtx)
     204{
     205    const PSHCLWINAPINEW pAPI = &pCtx->newAPI;
    206206
    207207    BOOL fRc;
     
    234234 * @param   pCtx                Windows clipboard context to use to remove ourselves.
    235235 */
    236 int VBoxClipboardWinChainRemove(PVBOXCLIPBOARDWINCTX pCtx)
     236int VBoxClipboardWinChainRemove(PSHCLWINCTX pCtx)
    237237{
    238238    if (!pCtx->hWnd)
    239239        return VINF_SUCCESS;
    240240
    241     const PVBOXCLIPBOARDWINAPINEW pAPI = &pCtx->newAPI;
     241    const PSHCLWINAPINEW pAPI = &pCtx->newAPI;
    242242
    243243    BOOL fRc;
     
    283283
    284284    /** @todo r=andy Why not using SetWindowLongPtr for keeping the context? */
    285     PVBOXCLIPBOARDWINCTX pCtx = (PVBOXCLIPBOARDWINCTX)dwData;
     285    PSHCLWINCTX pCtx = (PSHCLWINCTX)dwData;
    286286    AssertPtrReturnVoid(pCtx);
    287287
     
    298298 * @param   lParam              LPARAM to pass.
    299299 */
    300 LRESULT VBoxClipboardWinChainPassToNext(PVBOXCLIPBOARDWINCTX pWinCtx,
     300LRESULT VBoxClipboardWinChainPassToNext(PSHCLWINCTX pWinCtx,
    301301                                        UINT msg, WPARAM wParam, LPARAM lParam)
    302302{
     
    327327 * @param   uFormat             Windows clipboard format to convert.
    328328 */
    329 VBOXCLIPBOARDFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat)
     329SHCLFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat)
    330330{
    331331    /* Insert the requested clipboard format data into the clipboard. */
    332     VBOXCLIPBOARDFORMAT vboxFormat = VBOX_SHARED_CLIPBOARD_FMT_NONE;
     332    SHCLFORMAT vboxFormat = VBOX_SHARED_CLIPBOARD_FMT_NONE;
    333333
    334334    switch (uFormat)
     
    386386 * @param   pFormats            Where to store the retrieved formats.
    387387 */
    388 int VBoxClipboardWinGetFormats(PVBOXCLIPBOARDWINCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)
     388int VBoxClipboardWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATDATA pFormats)
    389389{
    390390    AssertPtrReturn(pCtx,     VERR_INVALID_POINTER);
    391391    AssertPtrReturn(pFormats, VERR_INVALID_POINTER);
    392392
    393     VBOXCLIPBOARDFORMATS fFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE;
     393    SHCLFORMATS fFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE;
    394394
    395395    /* Query list of available formats and report to host. */
     
    649649 * @param   lParam              lParam to pass on.
    650650 */
    651 LRESULT VBoxClipboardWinHandleWMChangeCBChain(PVBOXCLIPBOARDWINCTX pWinCtx,
     651LRESULT VBoxClipboardWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx,
    652652                                              HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
    653653{
     
    697697 * @param   pWinCtx             Windows context to use.
    698698 */
    699 int VBoxClipboardWinHandleWMDestroy(PVBOXCLIPBOARDWINCTX pWinCtx)
     699int VBoxClipboardWinHandleWMDestroy(PSHCLWINCTX pWinCtx)
    700700{
    701701    LogFlowFuncEnter();
     
    723723 * @param   hWnd                Window handle to use.
    724724 */
    725 int VBoxClipboardWinHandleWMRenderAllFormats(PVBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd)
     725int VBoxClipboardWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd)
    726726{
    727727    RT_NOREF(pWinCtx);
     
    750750 * @param   pWinCtx             Windows context to use.
    751751 */
    752 int VBoxClipboardWinHandleWMTimer(PVBOXCLIPBOARDWINCTX pWinCtx)
     752int VBoxClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx)
    753753{
    754754    int rc = VINF_SUCCESS;
     
    790790 * @param   fFormats            Clipboard format(s) to announce.
    791791 */
    792 int VBoxClipboardWinAnnounceFormats(PVBOXCLIPBOARDWINCTX pWinCtx, VBOXCLIPBOARDFORMATS fFormats)
     792int VBoxClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats)
    793793{
    794794    LogFunc(("fFormats=0x%x\n", fFormats));
     
    846846 * @param   pTransfer           URI transfer to use.
    847847 */
    848 int VBoxClipboardWinURITransferCreate(PVBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     848int VBoxClipboardWinURITransferCreate(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer)
    849849{
    850850    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    912912 * @param   pTransfer           URI transfer to create implementation-specific data for.
    913913 */
    914 void VBoxClipboardWinURITransferDestroy(PVBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     914void VBoxClipboardWinURITransferDestroy(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer)
    915915{
    916916    RT_NOREF(pWinCtx);
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r80623 r80662  
    206206{
    207207    /** Opaque data structure describing the front-end. */
    208     VBOXCLIPBOARDCONTEXT *pFrontend;
     208    SHCLCONTEXT *pFrontend;
    209209    /** Is an X server actually available? */
    210210    bool fHaveX11;
     
    926926 * @note  X11 backend code
    927927 */
    928 CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless)
     928CLIPBACKEND *ClipConstructX11(SHCLCONTEXT *pFrontend, bool fHeadless)
    929929{
    930930    CLIPBACKEND *pCtx = (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND));
     
    21202120
    21212121/* Return the data in the simulated VBox clipboard. */
    2122 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     2122int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    21232123{
    21242124    RT_NOREF2(pCtx, u32Format);
     
    22412241static uint32_t g_fX11Formats = 0;
    22422242
    2243 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
     2243void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats)
    22442244{
    22452245    RT_NOREF1(pCtx);
     
    23892389static char g_completedBuf[MAX_BUF_SIZE];
    23902390
    2391 void ClipRequestFromX11CompleteCallback(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     2391void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    23922392{
    23932393    RT_NOREF1(pCtx);
     
    28852885# include <iprt/test.h>
    28862886
    2887 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     2887int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    28882888{
    28892889    RT_NOREF4(pCtx, u32Format, ppv, pcb);
     
    28912891}
    28922892
    2893 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
     2893void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats)
    28942894{
    28952895    RT_NOREF2(pCtx, u32Formats);
    28962896}
    28972897
    2898 void ClipRequestFromX11CompleteCallback(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     2898void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    28992899{
    29002900    RT_NOREF5(pCtx, rc, pReq, pv, cb);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp

    r80623 r80662  
    3535*********************************************************************************************************************************/
    3636/** Global clipboard context information */
    37 struct _VBOXCLIPBOARDCONTEXT
     37struct _SHCLCONTEXT
    3838{
    3939    /** We have a separate thread to poll for new clipboard content */
     
    4242    /** The reference to the current pasteboard */
    4343    PasteboardRef           pasteboard;
    44     PVBOXCLIPBOARDCLIENT    pClient;
     44    PSHCLCLIENT    pClient;
    4545};
    4646
     
    5050*********************************************************************************************************************************/
    5151/** Only one client is supported. There seems to be no need for more clients. */
    52 static VBOXCLIPBOARDCONTEXT g_ctx;
     52static SHCLCONTEXT g_ctx;
    5353
    5454
     
    5959 * @param   pCtx    The context.
    6060 */
    61 static int vboxClipboardChanged(VBOXCLIPBOARDCONTEXT *pCtx)
     61static int vboxClipboardChanged(SHCLCONTEXT *pCtx)
    6262{
    6363    if (pCtx->pClient == NULL)
     
    7171        && fChanged)
    7272    {
    73         SHAREDCLIPBOARDFORMATDATA formatData;
     73        SHCLFORMATDATA formatData;
    7474        RT_ZERO(formatData);
    7575
     
    9090 * @returns VINF_SUCCESS (not used).
    9191 * @param   ThreadSelf  Our thread handle.
    92  * @param   pvUser      Pointer to the VBOXCLIPBOARDCONTEXT structure.
     92 * @param   pvUser      Pointer to the SHCLCONTEXT structure.
    9393 *
    9494 */
     
    9898
    9999    AssertPtrReturn(pvUser, VERR_INVALID_PARAMETER);
    100     VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pvUser;
     100    SHCLCONTEXT *pCtx = (SHCLCONTEXT *)pvUser;
    101101
    102102    while (!pCtx->fTerminate)
     
    156156}
    157157
    158 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT pClient, bool fHeadless)
     158int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)
    159159{
    160160    RT_NOREF(fHeadless);
     
    178178}
    179179
    180 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT pClient)
     180int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)
    181181{
    182182    /* Sync the host clipboard content with the client. */
     
    190190}
    191191
    192 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT pClient)
     192int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)
    193193{
    194194    VBoxSvcClipboardLock();
     
    201201}
    202202
    203 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT pClient,
    204                                        PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)
     203int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient,
     204                                       PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats)
    205205{
    206206    RT_NOREF(pCmdCtx);
     
    219219#endif
    220220
    221     SHAREDCLIPBOARDDATAREQ dataReq;
     221    SHCLDATAREQ dataReq;
    222222    RT_ZERO(dataReq);
    223223
     
    236236 * @param pcbActual             Where to write the actual size of the written data.
    237237 */
    238 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    239                                  PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)
     238int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     239                                 PSHCLDATABLOCK pData, uint32_t *pcbActual)
    240240{
    241241    RT_NOREF(pCmdCtx);
     
    262262 * @param pData                 Data block to write to clipboard.
    263263 */
    264 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT pClient,
    265                                   PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData)
     264int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient,
     265                                  PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData)
    266266{
    267267    RT_NOREF(pCmdCtx);
     
    277277
    278278#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    279 int VBoxClipboardSvcImplURIReadDir(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)
     279int VBoxClipboardSvcImplURIReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)
    280280{
    281281    RT_NOREF(pClient, pDirData);
     
    283283}
    284284
    285 int VBoxClipboardSvcImplURIWriteDir(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)
     285int VBoxClipboardSvcImplURIWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)
    286286{
    287287    RT_NOREF(pClient, pDirData);
     
    289289}
    290290
    291 int VBoxClipboardSvcImplURIReadFileHdr(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)
     291int VBoxClipboardSvcImplURIReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)
    292292{
    293293    RT_NOREF(pClient, pFileHdr);
     
    295295}
    296296
    297 int VBoxClipboardSvcImplURIWriteFileHdr(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)
     297int VBoxClipboardSvcImplURIWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)
    298298{
    299299    RT_NOREF(pClient, pFileHdr);
     
    301301}
    302302
    303 int VBoxClipboardSvcImplURIReadFileData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)
     303int VBoxClipboardSvcImplURIReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)
    304304{
    305305    RT_NOREF(pClient, pFileData);
     
    307307}
    308308
    309 int VBoxClipboardSvcImplURIWriteFileData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)
     309int VBoxClipboardSvcImplURIWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)
    310310{
    311311    RT_NOREF(pClient, pFileData);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r80638 r80662  
    4040
    4141#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    42 struct VBOXCLIPBOARDCLIENTSTATE;
     42struct SHCLCLIENTSTATE;
    4343#endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    4444
     
    5555 * Structure for keeping a single HGCM message.
    5656 */
    57 typedef struct _VBOXCLIPBOARDCLIENTMSG
     57typedef struct _SHCLCLIENTMSG
    5858{
    5959    /** Stored message type. */
     
    6565    /** Message context. */
    6666    VBOXSHCLMSGCTX   m_Ctx;
    67 } VBOXCLIPBOARDCLIENTMSG, *PVBOXCLIPBOARDCLIENTMSG;
    68 
    69 typedef struct VBOXCLIPBOARDCLIENTURISTATE
     67} SHCLCLIENTMSG, *PSHCLCLIENTMSG;
     68
     69typedef struct SHCLCLIENTURISTATE
    7070{
    7171    /** Directory of the transfer to start. */
    72     SHAREDCLIPBOARDURITRANSFERDIR enmTransferDir;
    73 } VBOXCLIPBOARDCLIENTURISTATE, *PVBOXCLIPBOARDCLIENTURISTATE;
     72    SHCLURITRANSFERDIR enmTransferDir;
     73} SHCLCLIENTURISTATE, *PSHCLCLIENTURISTATE;
    7474
    7575/**
     
    7777 * This structure needs to be serializable by SSM (must be a POD type).
    7878 */
    79 typedef struct VBOXCLIPBOARDCLIENTSTATE
    80 {
    81     struct VBOXCLIPBOARDCLIENTSTATE *pNext;
    82     struct VBOXCLIPBOARDCLIENTSTATE *pPrev;
    83 
    84     VBOXCLIPBOARDCONTEXT            *pCtx;
     79typedef struct SHCLCLIENTSTATE
     80{
     81    struct SHCLCLIENTSTATE *pNext;
     82    struct SHCLCLIENTSTATE *pPrev;
     83
     84    SHCLCONTEXT            *pCtx;
    8585
    8686    /** The client's HGCM ID. */
     
    9090    /** Maximum chunk size to use for data transfers. Set to _64K by default. */
    9191    uint32_t                         cbChunkSize;
    92     SHAREDCLIPBOARDSOURCE            enmSource;
     92    SHCLSOURCE            enmSource;
    9393    /** The client's URI state. */
    94     VBOXCLIPBOARDCLIENTURISTATE      URI;
    95 } VBOXCLIPBOARDCLIENTSTATE, *PVBOXCLIPBOARDCLIENTSTATE;
    96 
    97 typedef struct _VBOXCLIPBOARDCLIENTCMDCTX
     94    SHCLCLIENTURISTATE      URI;
     95} SHCLCLIENTSTATE, *PSHCLCLIENTSTATE;
     96
     97typedef struct _SHCLCLIENTCMDCTX
    9898{
    9999    uint32_t                          uContextID;
    100 } VBOXCLIPBOARDCLIENTCMDCTX, *PVBOXCLIPBOARDCLIENTCMDCTX;
    101 
    102 typedef struct _VBOXCLIPBOARDCLIENT
     100} SHCLCLIENTCMDCTX, *PSHCLCLIENTCMDCTX;
     101
     102typedef struct _SHCLCLIENT
    103103{
    104104    /** The client's HGCM client ID. */
    105105    uint32_t                          uClientID;
    106106    /** General client state data. */
    107     VBOXCLIPBOARDCLIENTSTATE          State;
     107    SHCLCLIENTSTATE          State;
    108108    /** The client's message queue (FIFO). */
    109     RTCList<VBOXCLIPBOARDCLIENTMSG *> queueMsg;
     109    RTCList<SHCLCLIENTMSG *> queueMsg;
    110110    /** The client's own event source. */
    111     SHAREDCLIPBOARDEVENTSOURCE        Events;
     111    SHCLEVENTSOURCE        Events;
    112112#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    113113    /** URI context data. */
    114     SHAREDCLIPBOARDURICTX             URI;
     114    SHCLURICTX             URI;
    115115#endif
    116116    /** Structure for keeping the client's pending (deferred return) state.
     
    130130        PVBOXHGCMSVCPARM   paParms;
    131131    } Pending;
    132 } VBOXCLIPBOARDCLIENT, *PVBOXCLIPBOARDCLIENT;
     132} SHCLCLIENT, *PSHCLCLIENT;
    133133
    134134/**
     
    136136 * Currently empty.
    137137 */
    138 typedef struct _VBOXCLIPBOARDEVENTSOURCEMAPENTRY
    139 {
    140 } VBOXCLIPBOARDEVENTSOURCEMAPENTRY;
     138typedef struct _SHCLEVENTSOURCEMAPENTRY
     139{
     140} SHCLEVENTSOURCEMAPENTRY;
    141141
    142142/** Map holding information about connected HGCM clients. Key is the (unique) HGCM client ID.
    143  *  The value is a weak pointer to PVBOXCLIPBOARDCLIENT, which is owned by HGCM. */
    144 typedef std::map<uint32_t, PVBOXCLIPBOARDCLIENT> ClipboardClientMap;
     143 *  The value is a weak pointer to PSHCLCLIENT, which is owned by HGCM. */
     144typedef std::map<uint32_t, PSHCLCLIENT> ClipboardClientMap;
    145145
    146146/** Map holding information about event sources. Key is the (unique) event source ID. */
    147 typedef std::map<VBOXCLIPBOARDEVENTSOURCEID, VBOXCLIPBOARDEVENTSOURCEMAPENTRY> ClipboardEventSourceMap;
     147typedef std::map<SHCLEVENTSOURCEID, SHCLEVENTSOURCEMAPENTRY> ClipboardEventSourceMap;
    148148
    149149/** Simple queue (list) which holds deferred (waiting) clients. */
     
    156156 * to communicate with the Shared Clipboard host service.
    157157 */
    158 typedef struct _VBOXCLIPBOARDEXTSTATE
     158typedef struct _SHCLEXTSTATE
    159159{
    160160    /** Pointer to the actual service extension handle. */
     
    173173     *  is reading clipboard data from the extension. */
    174174    uint32_t       uDelayedFormats;
    175 } VBOXCLIPBOARDEXTSTATE, *PVBOXCLIPBOARDEXTSTATE;
     175} SHCLEXTSTATE, *PSHCLEXTSTATE;
    176176
    177177/*
    178178 * The service functions. Locking is between the service thread and the platform-dependent (window) thread.
    179179 */
    180 int vboxSvcClipboardDataReadRequest(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDDATAREQ pDataReq, PVBOXCLIPBOARDEVENTID puEvent);
    181 int vboxSvcClipboardDataReadSignal(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData);
    182 int vboxSvcClipboardFormatsReport(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDFORMATDATA pFormats);
     180int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, PSHCLEVENTID puEvent);
     181int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData);
     182int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats);
    183183
    184184uint32_t vboxSvcClipboardGetMode(void);
    185 int vboxSvcClipboardSetSource(PVBOXCLIPBOARDCLIENT pClient, SHAREDCLIPBOARDSOURCE enmSource);
    186 
    187 void vboxSvcClipboardMsgQueueReset(PVBOXCLIPBOARDCLIENT pClient);
    188 PVBOXCLIPBOARDCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms);
    189 void vboxSvcClipboardMsgFree(PVBOXCLIPBOARDCLIENTMSG pMsg);
    190 void vboxSvcClipboardMsgSetPeekReturn(PVBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms);
    191 int vboxSvcClipboardMsgAdd(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTMSG pMsg, bool fAppend);
    192 int vboxSvcClipboardMsgPeek(PVBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait);
    193 int vboxSvcClipboardMsgGet(PVBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    194 
    195 int vboxSvcClipboardClientWakeup(PVBOXCLIPBOARDCLIENT pClient);
     185int vboxSvcClipboardSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource);
     186
     187void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient);
     188PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms);
     189void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg);
     190void vboxSvcClipboardMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms);
     191int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend);
     192int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait);
     193int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     194
     195int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient);
    196196
    197197# ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    198 int vboxSvcClipboardURITransferStart(PVBOXCLIPBOARDCLIENT pClient,
    199                                      SHAREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,
    200                                      PSHAREDCLIPBOARDURITRANSFER *ppTransfer);
     198int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient,
     199                                     SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource,
     200                                     PSHCLURITRANSFER *ppTransfer);
    201201bool vboxSvcClipboardURIMsgIsAllowed(uint32_t uMode, uint32_t uMsg);
    202202# endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
     
    208208void VBoxClipboardSvcImplDestroy(void);
    209209
    210 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT pClient, bool fHeadless);
    211 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT pClient);
    212 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDFORMATDATA pFormats);
     210int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless);
     211int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient);
     212int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats);
    213213/** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/
    214 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual);
    215 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData);
     214int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual);
     215int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData);
    216216/**
    217217 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer
    218218 * after a save and restore of the guest.
    219219 */
    220 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT pClient);
     220int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient);
    221221
    222222#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    223 int vboxSvcClipboardURITransferOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx);
    224 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx);
    225 
    226 int vboxSvcClipboardURIGetRoots(PSHAREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList);
    227 
    228 int vboxSvcClipboardURIListOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    229                                 PVBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList);
    230 int vboxSvcClipboardURIListClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList);
    231 int vboxSvcClipboardURIListHdrRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    232                                    PVBOXCLIPBOARDLISTHDR pListHdr);
    233 int vboxSvcClipboardURIListHdrWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    234                                     PVBOXCLIPBOARDLISTHDR pListHdr);
    235 int vboxSvcClipboardURIListEntryRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    236                                      PVBOXCLIPBOARDLISTENTRY pListEntry);
    237 int vboxSvcClipboardURIListEntryWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,
    238                                       PVBOXCLIPBOARDLISTENTRY pListEntry);
    239 
    240 int vboxSvcClipboardURIObjOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,
    241                                PSHAREDCLIPBOARDOBJHANDLE phObj);
    242 int vboxSvcClipboardURIObjClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj);
    243 int vboxSvcClipboardURIObjRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     223int vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx);
     224DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx);
     225
     226int vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList);
     227
     228int vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx,
     229                                PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList);
     230int vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList);
     231int vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     232                                   PSHCLLISTHDR pListHdr);
     233int vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     234                                    PSHCLLISTHDR pListHdr);
     235int vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     236                                     PSHCLLISTENTRY pListEntry);
     237int vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,
     238                                      PSHCLLISTENTRY pListEntry);
     239
     240int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
     241                               PSHCLOBJHANDLE phObj);
     242int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj);
     243int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    244244                               void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead);
    245 int vboxSvcClipboardURIObjWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     245int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    246246                                void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten);
    247247
    248 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
    249 DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
    250 DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
    251 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);
    252 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
    253 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);
    254 
    255 int VBoxClipboardSvcImplURITransferCreate(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer);
    256 int VBoxClipboardSvcImplURITransferDestroy(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer);
     248DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData);
     249DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData);
     250DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData);
     251DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc);
     252DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData);
     253DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc);
     254
     255int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer);
     256int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer);
    257257#endif /*VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    258258
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.cpp

    r80557 r80662  
    4040*   Externals                                                                                                                    *
    4141*********************************************************************************************************************************/
    42 extern VBOXCLIPBOARDEXTSTATE g_ExtState;
     42extern SHCLEXTSTATE g_ExtState;
    4343extern PVBOXHGCMSVCHELPERS g_pHelpers;
    4444extern ClipboardClientQueue g_listClientsDeferred;
     
    4949*********************************************************************************************************************************/
    5050static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    51                                           PVBOXSHCLMSGCTX pMsgCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms);
     51                                          PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms);
    5252static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    53                                            PVBOXSHCLMSGCTX pMsgCtx, SHAREDCLIPBOARDLISTHANDLE hList);
     53                                           PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList);
    5454
    5555
     
    5858*********************************************************************************************************************************/
    5959
    60 DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx)
     60DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx)
    6161{
    6262    RT_NOREF(pCtx);
     
    6666}
    6767
    68 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx)
     68DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx)
    6969{
    7070    RT_NOREF(pCtx);
     
    7474}
    7575
    76 DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSHAREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList)
     76DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList)
    7777{
    7878    LogFlowFuncEnter();
    7979
    80     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     80    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    8181    AssertPtr(pClient);
    8282
    8383    int rc;
    8484
    85     PVBOXCLIPBOARDCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ,
     85    PSHCLCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ,
    8686                                                               VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_HDR_READ);
    8787    if (pMsgHdr)
    8888    {
    89         VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     89        SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    9090
    9191        HGCMSvcSetU32(&pMsgHdr->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent));
     
    101101            if (RT_SUCCESS(rc))
    102102            {
    103                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayloadHdr;
     103                PSHCLEVENTPAYLOAD pPayloadHdr;
    104104                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent,
    105105                                              pCtx->pTransfer->uTimeoutMs, &pPayloadHdr);
    106106                if (RT_SUCCESS(rc))
    107107                {
    108                     PVBOXCLIPBOARDROOTLISTHDR pSrcRootListHdr = (PVBOXCLIPBOARDROOTLISTHDR)pPayloadHdr->pvData;
    109                     Assert(pPayloadHdr->cbData == sizeof(VBOXCLIPBOARDROOTLISTHDR));
     108                    PSHCLROOTLISTHDR pSrcRootListHdr = (PSHCLROOTLISTHDR)pPayloadHdr->pvData;
     109                    Assert(pPayloadHdr->cbData == sizeof(SHCLROOTLISTHDR));
    110110
    111111                    LogFlowFunc(("cRoots=%RU32, fRoots=0x%x\n", pSrcRootListHdr->cRoots, pSrcRootListHdr->fRoots));
    112112
    113                     PVBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();
     113                    PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc();
    114114                    if (pRootList)
    115115                    {
     
    117117                        {
    118118                            pRootList->paEntries =
    119                                 (PVBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(pSrcRootListHdr->cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));
     119                                (PSHCLROOTLISTENTRY)RTMemAllocZ(pSrcRootListHdr->cRoots * sizeof(SHCLROOTLISTENTRY));
    120120
    121121                            if (pRootList->paEntries)
     
    123123                                for (uint32_t i = 0; i < pSrcRootListHdr->cRoots; i++)
    124124                                {
    125                                     PVBOXCLIPBOARDCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ,
     125                                    PSHCLCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ,
    126126                                                                                                 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_ENTRY_READ_REQ);
    127127
     
    140140                                        break;
    141141
    142                                     PSHAREDCLIPBOARDEVENTPAYLOAD pPayloadEntry;
     142                                    PSHCLEVENTPAYLOAD pPayloadEntry;
    143143                                    rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent,
    144144                                                                  pCtx->pTransfer->uTimeoutMs, &pPayloadEntry);
     
    146146                                        break;
    147147
    148                                     PVBOXCLIPBOARDROOTLISTENTRY pSrcRootListEntry = (PVBOXCLIPBOARDROOTLISTENTRY)pPayloadEntry->pvData;
    149                                     Assert(pPayloadEntry->cbData == sizeof(VBOXCLIPBOARDROOTLISTENTRY));
     148                                    PSHCLROOTLISTENTRY pSrcRootListEntry = (PSHCLROOTLISTENTRY)pPayloadEntry->pvData;
     149                                    Assert(pPayloadEntry->cbData == sizeof(SHCLROOTLISTENTRY));
    150150
    151151                                    rc = SharedClipboardURIListEntryCopy(&pRootList->paEntries[i], pSrcRootListEntry);
     
    190190}
    191191
    192 DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    193                                               PVBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList)
     192DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx,
     193                                              PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList)
    194194{
    195195    LogFlowFuncEnter();
    196196
    197     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     197    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    198198    AssertPtr(pClient);
    199199
    200200    int rc;
    201201
    202     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN,
     202    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN,
    203203                                                            VBOX_SHARED_CLIPBOARD_CPARMS_LIST_OPEN);
    204204    if (pMsg)
    205205    {
    206         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     206        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    207207
    208208        pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent);
     
    220220                if (RT_SUCCESS(rc))
    221221                {
    222                     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     222                    PSHCLEVENTPAYLOAD pPayload;
    223223                    rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    224224                    if (RT_SUCCESS(rc))
    225225                    {
    226                         Assert(pPayload->cbData == sizeof(VBOXCLIPBOARDREPLY));
    227 
    228                         PVBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;
     226                        Assert(pPayload->cbData == sizeof(SHCLREPLY));
     227
     228                        PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData;
    229229                        AssertPtr(pReply);
    230230
    231                         Assert(pReply->uType == VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN);
     231                        Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN);
    232232
    233233                        *phList = pReply->u.ListOpen.uHandle;
     
    248248}
    249249
    250 DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList)
     250DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList)
    251251{
    252252    LogFlowFuncEnter();
    253253
    254     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     254    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    255255    AssertPtr(pClient);
    256256
    257257    int rc;
    258258
    259     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE,
     259    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE,
    260260                                                            VBOX_SHARED_CLIPBOARD_CPARMS_LIST_CLOSE);
    261261    if (pMsg)
    262262    {
    263         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     263        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    264264
    265265        pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent);
     
    277277                if (RT_SUCCESS(rc))
    278278                {
    279                     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     279                    PSHCLEVENTPAYLOAD pPayload;
    280280                    rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    281281                    if (RT_SUCCESS(rc))
     
    294294}
    295295
    296 DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    297                                                  SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)
     296DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx,
     297                                                 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
    298298{
    299299    LogFlowFuncEnter();
    300300
    301     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     301    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    302302    AssertPtr(pClient);
    303303
    304304    int rc;
    305305
    306     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ,
     306    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ,
    307307                                                            VBOX_SHARED_CLIPBOARD_CPARMS_LIST_HDR_READ_REQ);
    308308    if (pMsg)
    309309    {
    310         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     310        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    311311
    312312        HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent));
     
    323323            if (RT_SUCCESS(rc))
    324324            {
    325                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     325                PSHCLEVENTPAYLOAD pPayload;
    326326                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent,
    327327                                                         pCtx->pTransfer->uTimeoutMs, &pPayload);
    328328                if (RT_SUCCESS(rc))
    329329                {
    330                     Assert(pPayload->cbData == sizeof(VBOXCLIPBOARDLISTHDR));
    331 
    332                     *pListHdr = *(PVBOXCLIPBOARDLISTHDR)pPayload->pvData;
     330                    Assert(pPayload->cbData == sizeof(SHCLLISTHDR));
     331
     332                    *pListHdr = *(PSHCLLISTHDR)pPayload->pvData;
    333333
    334334                    SharedClipboardPayloadFree(pPayload);
     
    344344}
    345345
    346 DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    347                                                   SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)
     346DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx,
     347                                                  SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
    348348{
    349349    RT_NOREF(pCtx, hList, pListHdr);
     
    354354}
    355355
    356 DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    357                                                    SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)
     356DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx,
     357                                                   SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
    358358{
    359359    LogFlowFuncEnter();
    360360
    361     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     361    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    362362    AssertPtr(pClient);
    363363
    364364    int rc;
    365365
    366     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ,
     366    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ,
    367367                                                            VBOX_SHARED_CLIPBOARD_CPARMS_LIST_ENTRY_READ);
    368368    if (pMsg)
    369369    {
    370         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     370        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    371371
    372372        HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent));
     
    383383            if (RT_SUCCESS(rc))
    384384            {
    385                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     385                PSHCLEVENTPAYLOAD pPayload;
    386386                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    387387                if (RT_SUCCESS(rc))
    388388                {
    389                     Assert(pPayload->cbData == sizeof(VBOXCLIPBOARDLISTENTRY));
    390 
    391                     rc = SharedClipboardURIListEntryCopy(pListEntry, (PVBOXCLIPBOARDLISTENTRY)pPayload->pvData);
     389                    Assert(pPayload->cbData == sizeof(SHCLLISTENTRY));
     390
     391                    rc = SharedClipboardURIListEntryCopy(pListEntry, (PSHCLLISTENTRY)pPayload->pvData);
    392392
    393393                    SharedClipboardPayloadFree(pPayload);
     
    403403}
    404404
    405 DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx,
    406                                                     SHAREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)
     405DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx,
     406                                                    SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
    407407{
    408408    RT_NOREF(pCtx, hList, pListEntry);
     
    413413}
    414414
    415 int vboxSvcClipboardURIObjOpen(PSHAREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,
    416                                PSHAREDCLIPBOARDOBJHANDLE phObj)
     415int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
     416                               PSHCLOBJHANDLE phObj)
    417417{
    418418    LogFlowFuncEnter();
    419419
    420     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     420    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    421421    AssertPtr(pClient);
    422422
    423423    int rc;
    424424
    425     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN,
     425    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN,
    426426                                                            VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_OPEN);
    427427    if (pMsg)
    428428    {
    429         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     429        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    430430
    431431        LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pCreateParms->pszPath, pCreateParms->fCreate));
     
    448448            if (RT_SUCCESS(rc))
    449449            {
    450                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     450                PSHCLEVENTPAYLOAD pPayload;
    451451                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    452452                if (RT_SUCCESS(rc))
    453453                {
    454                     Assert(pPayload->cbData == sizeof(VBOXCLIPBOARDREPLY));
    455 
    456                     PVBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;
     454                    Assert(pPayload->cbData == sizeof(SHCLREPLY));
     455
     456                    PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData;
    457457                    AssertPtr(pReply);
    458458
    459                     Assert(pReply->uType == VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN);
     459                    Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN);
    460460
    461461                    *phObj = pReply->u.ObjOpen.uHandle;
     
    473473}
    474474
    475 int vboxSvcClipboardURIObjClose(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj)
     475int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj)
    476476{
    477477    LogFlowFuncEnter();
    478478
    479     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     479    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    480480    AssertPtr(pClient);
    481481
    482482    int rc;
    483483
    484     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE,
     484    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE,
    485485                                                            VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_CLOSE);
    486486    if (pMsg)
    487487    {
    488         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     488        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    489489
    490490        HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent));
     
    500500            if (RT_SUCCESS(rc))
    501501            {
    502                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     502                PSHCLEVENTPAYLOAD pPayload;
    503503                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    504504                if (RT_SUCCESS(rc))
    505505                {
    506                     Assert(pPayload->cbData == sizeof(VBOXCLIPBOARDREPLY));
     506                    Assert(pPayload->cbData == sizeof(SHCLREPLY));
    507507
    508508#ifdef VBOX_STRICT
    509                     PVBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;
     509                    PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData;
    510510                    AssertPtr(pReply);
    511511
    512                     Assert(pReply->uType == VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE);
     512                    Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE);
    513513#endif
    514514
     
    525525}
    526526
    527 int vboxSvcClipboardURIObjRead(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     527int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    528528                               void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
    529529{
    530530    LogFlowFuncEnter();
    531531
    532     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     532    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    533533    AssertPtr(pClient);
    534534
    535535    int rc;
    536536
    537     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ,
     537    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ,
    538538                                                            VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_READ_REQ);
    539539    if (pMsg)
    540540    {
    541         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     541        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    542542
    543543        HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent));
     
    555555            if (RT_SUCCESS(rc))
    556556            {
    557                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     557                PSHCLEVENTPAYLOAD pPayload;
    558558                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    559559                if (RT_SUCCESS(rc))
    560560                {
    561                     Assert(pPayload->cbData == sizeof(VBOXCLIPBOARDOBJDATACHUNK));
    562 
    563                     PVBOXCLIPBOARDOBJDATACHUNK pDataChunk = (PVBOXCLIPBOARDOBJDATACHUNK)pPayload->pvData;
     561                    Assert(pPayload->cbData == sizeof(SHCLOBJDATACHUNK));
     562
     563                    PSHCLOBJDATACHUNK pDataChunk = (PSHCLOBJDATACHUNK)pPayload->pvData;
    564564                    AssertPtr(pDataChunk);
    565565
     
    583583}
    584584
    585 int vboxSvcClipboardURIObjWrite(PSHAREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,
     585int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    586586                                void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
    587587{
    588588    LogFlowFuncEnter();
    589589
    590     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;
     590    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
    591591    AssertPtr(pClient);
    592592
    593593    int rc;
    594594
    595     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE,
     595    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE,
    596596                                                            VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_WRITE);
    597597    if (pMsg)
    598598    {
    599         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
     599        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);
    600600
    601601        HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent));
     
    613613            if (RT_SUCCESS(rc))
    614614            {
    615                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     615                PSHCLEVENTPAYLOAD pPayload;
    616616                rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    617617                if (RT_SUCCESS(rc))
     
    641641*********************************************************************************************************************************/
    642642
    643 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData)
     643DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData)
    644644{
    645645    RT_NOREF(pData);
     
    648648}
    649649
    650 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)
     650DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc)
    651651{
    652652    RT_NOREF(pData, rc);
     
    657657}
    658658
    659 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData)
     659DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData)
    660660{
    661661    LogFlowFuncEnter();
     
    666666}
    667667
    668 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)
     668DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc)
    669669{
    670670    LogFlowFuncEnter();
     
    689689 */
    690690static int vboxSvcClipboardURIGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    691                                        PVBOXCLIPBOARDREPLY pReply)
     691                                       PSHCLREPLY pReply)
    692692{
    693693    int rc;
     
    714714            switch (pReply->uType)
    715715            {
    716                 case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN:
     716                case VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN:
    717717                {
    718718                    if (cParms >= 6)
     
    721721                }
    722722
    723                 case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN:
     723                case VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN:
    724724                {
    725725                    if (cParms >= 6)
     
    728728                }
    729729
    730                 case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE:
     730                case VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE:
    731731                {
    732732                    if (cParms >= 6)
     
    757757 */
    758758static int vboxSvcClipboardURIGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    759                                              PVBOXCLIPBOARDROOTLISTHDR pRootLstHdr)
     759                                             PSHCLROOTLISTHDR pRootLstHdr)
    760760{
    761761    int rc;
     
    783783 */
    784784static int vboxSvcClipboardURIGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    785                                                PVBOXCLIPBOARDROOTLISTENTRY pListEntry)
     785                                               PSHCLROOTLISTENTRY pListEntry)
    786786{
    787787    int rc;
     
    820820 */
    821821static int vboxSvcClipboardURIGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    822                                           PVBOXCLIPBOARDLISTOPENPARMS pOpenParms)
     822                                          PSHCLLISTOPENPARMS pOpenParms)
    823823{
    824824    int rc;
     
    867867 */
    868868static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    869                                           PVBOXSHCLMSGCTX pMsgCtx, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms)
     869                                          PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms)
    870870{
    871871    int rc;
     
    900900 */
    901901static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    902                                            PVBOXSHCLMSGCTX pMsgCtx, SHAREDCLIPBOARDLISTHANDLE hList)
     902                                           PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList)
    903903{
    904904    int rc;
     
    928928 */
    929929static int vboxSvcClipboardURIGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    930                                          PSHAREDCLIPBOARDLISTHANDLE phList, PVBOXCLIPBOARDLISTHDR pListHdr)
     930                                         PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr)
    931931{
    932932    int rc;
     
    967967 */
    968968static int vboxSvcClipboardURISetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    969                                          PVBOXSHCLMSGCTX pMsgCtx, PVBOXCLIPBOARDLISTHDR pListHdr)
     969                                         PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr)
    970970{
    971971    int rc;
     
    10021002 */
    10031003static int vboxSvcClipboardURIGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    1004                                            PSHAREDCLIPBOARDLISTHANDLE phList, PVBOXCLIPBOARDLISTENTRY pListEntry)
     1004                                           PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry)
    10051005{
    10061006    int rc;
     
    10481048 */
    10491049static int vboxSvcClipboardURISetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    1050                                            PVBOXSHCLMSGCTX pMsgCtx, PVBOXCLIPBOARDLISTENTRY pListEntry)
     1050                                           PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTENTRY pListEntry)
    10511051{
    10521052    int rc;
     
    10791079 * @param   pDataChunk          Where to store the object data chunk data.
    10801080 */
    1081 static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDOBJDATACHUNK pDataChunk)
     1081static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk)
    10821082{
    10831083    AssertPtrReturn(paParms,    VERR_INVALID_PARAMETER);
     
    11441144 * @param   paParms             Array function parameters supplied.
    11451145 */
    1146 static int vboxSvcClipboardURITransferHandleReply(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer,
     1146static int vboxSvcClipboardURITransferHandleReply(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer,
    11471147                                                  uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    11481148{
     
    11511151    int rc;
    11521152
    1153     uint32_t            cbReply = sizeof(VBOXCLIPBOARDREPLY);
    1154     PVBOXCLIPBOARDREPLY pReply  = (PVBOXCLIPBOARDREPLY)RTMemAlloc(cbReply);
     1153    uint32_t            cbReply = sizeof(SHCLREPLY);
     1154    PSHCLREPLY pReply  = (PSHCLREPLY)RTMemAlloc(cbReply);
    11551155    if (pReply)
    11561156    {
     
    11581158        if (RT_SUCCESS(rc))
    11591159        {
    1160             PSHAREDCLIPBOARDEVENTPAYLOAD pPayload
    1161                 = (PSHAREDCLIPBOARDEVENTPAYLOAD)RTMemAlloc(sizeof(SHAREDCLIPBOARDEVENTPAYLOAD));
     1160            PSHCLEVENTPAYLOAD pPayload
     1161                = (PSHCLEVENTPAYLOAD)RTMemAlloc(sizeof(SHCLEVENTPAYLOAD));
    11621162            if (pPayload)
    11631163            {
     
    11671167                switch (pReply->uType)
    11681168                {
    1169                     case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN:
     1169                    case VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN:
    11701170                        RT_FALL_THROUGH();
    1171                     case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE:
     1171                    case VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE:
    11721172                        RT_FALL_THROUGH();
    1173                     case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN:
     1173                    case VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN:
    11741174                        RT_FALL_THROUGH();
    1175                     case VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE:
     1175                    case VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE:
    11761176                    {
    11771177                        uint32_t uCID;
     
    11791179                        if (RT_SUCCESS(rc))
    11801180                        {
    1181                             const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
     1181                            const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
    11821182
    11831183                            LogFlowFunc(("uCID=%RU32 -> uEvent=%RU32\n", uCID, uEvent));
     
    12271227 * @param   tsArrival           Timestamp of arrival.
    12281228 */
    1229 int vboxSvcClipboardURIHandler(PVBOXCLIPBOARDCLIENT pClient,
     1229int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient,
    12301230                               VBOXHGCMCALLHANDLE callHandle,
    12311231                               uint32_t u32Function,
     
    12621262     * Pre-check: For certain messages we need to make sure that a (right) transfer is present.
    12631263     */
    1264     PSHAREDCLIPBOARDURITRANSFER pTransfer = NULL;
     1264    PSHCLURITRANSFER pTransfer = NULL;
    12651265    switch (u32Function)
    12661266    {
     
    13011301                break;
    13021302
    1303             SHAREDCLIPBOARDURITRANSFERSTATUS uStatus = SHAREDCLIPBOARDURITRANSFERSTATUS_NONE;
     1303            SHCLURITRANSFERSTATUS uStatus = SHCLURITRANSFERSTATUS_NONE;
    13041304            rc = HGCMSvcGetU32(&paParms[1], &uStatus);
    13051305            if (RT_FAILURE(rc))
     
    13161316            }
    13171317
    1318             if (uStatus == SHAREDCLIPBOARDURITRANSFERSTATUS_RUNNING)
    1319             {
    1320                 const SHAREDCLIPBOARDURITRANSFERDIR enmDir = SHAREDCLIPBOARDURITRANSFERDIR_READ;
    1321 
    1322                 PSHAREDCLIPBOARDURITRANSFER pTransfer;
     1318            if (uStatus == SHCLURITRANSFERSTATUS_RUNNING)
     1319            {
     1320                const SHCLURITRANSFERDIR enmDir = SHCLURITRANSFERDIR_READ;
     1321
     1322                PSHCLURITRANSFER pTransfer;
    13231323                rc = SharedClipboardURITransferCreate(enmDir,
    1324                                                       SHAREDCLIPBOARDSOURCE_REMOTE, &pTransfer);
     1324                                                      SHCLSOURCE_REMOTE, &pTransfer);
    13251325                if (RT_SUCCESS(rc))
    13261326                {
     
    13281328                    if (RT_SUCCESS(rc))
    13291329                    {
    1330                         SHAREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;
     1330                        SHCLPROVIDERCREATIONCTX creationCtx;
    13311331                        RT_ZERO(creationCtx);
    13321332
     
    13401340                        creationCtx.Interface.pfnObjClose      = vboxSvcClipboardURIObjClose;
    13411341
    1342                         if (enmDir == SHAREDCLIPBOARDURITRANSFERDIR_READ)
     1342                        if (enmDir == SHCLURITRANSFERDIR_READ)
    13431343                        {
    13441344                            creationCtx.Interface.pfnGetRoots        = vboxSvcClipboardURIGetRoots;
     
    13551355
    13561356                        /* Register needed callbacks so that we can wait for the meta data to arrive here. */
    1357                         SHAREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;
     1357                        SHCLURITRANSFERCALLBACKS Callbacks;
    13581358                        RT_ZERO(Callbacks);
    13591359
     
    14091409        case VBOX_SHARED_CLIPBOARD_GUEST_FN_ROOT_LIST_HDR_WRITE:
    14101410        {
    1411             VBOXCLIPBOARDROOTLISTHDR lstHdr;
     1411            SHCLROOTLISTHDR lstHdr;
    14121412            rc = vboxSvcClipboardURIGetRootListHdr(cParms, paParms, &lstHdr);
    14131413            if (RT_SUCCESS(rc))
    14141414            {
    14151415                void    *pvData = SharedClipboardURIRootListHdrDup(&lstHdr);
    1416                 uint32_t cbData = sizeof(VBOXCLIPBOARDROOTLISTHDR);
     1416                uint32_t cbData = sizeof(SHCLROOTLISTHDR);
    14171417
    14181418                uint32_t uCID;
     
    14201420                if (RT_SUCCESS(rc))
    14211421                {
    1422                     const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
    1423 
    1424                     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     1422                    const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
     1423
     1424                    PSHCLEVENTPAYLOAD pPayload;
    14251425                    rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload);
    14261426                    if (RT_SUCCESS(rc))
     
    14381438        {
    14391439    #if 0
    1440             VBOXCLIPBOARDROOTLISTENTRY lstEntry;
     1440            SHCLROOTLISTENTRY lstEntry;
    14411441            rc = VBoxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry);
    14421442            if (RT_SUCCESS(rc))
    14431443            {
    14441444                void    *pvData = SharedClipboardURIRootListEntryDup(&lstEntry);
    1445                 uint32_t cbData = sizeof(VBOXCLIPBOARDROOTLISTENTRY);
    1446 
    1447                 PSHAREDCLIPBOARDURITRANSFERPAYLOAD pPayload;
    1448                 rc = SharedClipboardURITransferPayloadAlloc(SHAREDCLIPBOARDURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
     1445                uint32_t cbData = sizeof(SHCLROOTLISTENTRY);
     1446
     1447                PSHCLURITRANSFERPAYLOAD pPayload;
     1448                rc = SharedClipboardURITransferPayloadAlloc(SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
    14491449                                                            pvData, cbData, &pPayload);
    14501450                if (RT_SUCCESS(rc))
    1451                     rc = SharedClipboardURITransferEventSignal(pTransfer, SHAREDCLIPBOARDURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
     1451                    rc = SharedClipboardURITransferEventSignal(pTransfer, SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
    14521452                                                               pPayload);
    14531453            }
     
    14581458        case VBOX_SHARED_CLIPBOARD_GUEST_FN_ROOT_LIST_ENTRY_WRITE:
    14591459        {
    1460             VBOXCLIPBOARDROOTLISTENTRY lstEntry;
     1460            SHCLROOTLISTENTRY lstEntry;
    14611461            rc = vboxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry);
    14621462            if (RT_SUCCESS(rc))
    14631463            {
    14641464                void    *pvData = SharedClipboardURIRootListEntryDup(&lstEntry);
    1465                 uint32_t cbData = sizeof(VBOXCLIPBOARDROOTLISTENTRY);
     1465                uint32_t cbData = sizeof(SHCLROOTLISTENTRY);
    14661466
    14671467                uint32_t uCID;
     
    14691469                if (RT_SUCCESS(rc))
    14701470                {
    1471                     const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
    1472 
    1473                     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     1471                    const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
     1472
     1473                    PSHCLEVENTPAYLOAD pPayload;
    14741474                    rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload);
    14751475                    if (RT_SUCCESS(rc))
     
    14861486        case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_OPEN:
    14871487        {
    1488             VBOXCLIPBOARDLISTOPENPARMS listOpenParms;
     1488            SHCLLISTOPENPARMS listOpenParms;
    14891489            rc = vboxSvcClipboardURIGetListOpen(cParms, paParms, &listOpenParms);
    14901490            if (RT_SUCCESS(rc))
    14911491            {
    1492                 SHAREDCLIPBOARDLISTHANDLE hList;
     1492                SHCLLISTHANDLE hList;
    14931493                rc = SharedClipboardURITransferListOpen(pTransfer, &listOpenParms, &hList);
    14941494                if (RT_SUCCESS(rc))
     
    15061506                break;
    15071507
    1508             SHAREDCLIPBOARDLISTHANDLE hList;
     1508            SHCLLISTHANDLE hList;
    15091509            rc = HGCMSvcGetU64(&paParms[1], &hList);
    15101510            if (RT_SUCCESS(rc))
     
    15201520                break;
    15211521
    1522             SHAREDCLIPBOARDLISTHANDLE hList;
     1522            SHCLLISTHANDLE hList;
    15231523            rc = HGCMSvcGetU64(&paParms[1], &hList); /* Get list handle. */
    15241524            if (RT_SUCCESS(rc))
    15251525            {
    1526                 VBOXCLIPBOARDLISTHDR hdrList;
     1526                SHCLLISTHDR hdrList;
    15271527                rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList);
    15281528                /*if (RT_SUCCESS(rc))
     
    15341534        case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_HDR_WRITE:
    15351535        {
    1536             VBOXCLIPBOARDLISTHDR hdrList;
     1536            SHCLLISTHDR hdrList;
    15371537            rc = SharedClipboardURIListHdrInit(&hdrList);
    15381538            if (RT_SUCCESS(rc))
    15391539            {
    1540                 SHAREDCLIPBOARDLISTHANDLE hList;
     1540                SHCLLISTHANDLE hList;
    15411541                rc = vboxSvcClipboardURIGetListHdr(cParms, paParms, &hList, &hdrList);
    15421542                if (RT_SUCCESS(rc))
    15431543                {
    15441544                    void    *pvData = SharedClipboardURIListHdrDup(&hdrList);
    1545                     uint32_t cbData = sizeof(VBOXCLIPBOARDLISTHDR);
     1545                    uint32_t cbData = sizeof(SHCLLISTHDR);
    15461546
    15471547                    uint32_t uCID;
     
    15491549                    if (RT_SUCCESS(rc))
    15501550                    {
    1551                         const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
    1552 
    1553                         PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     1551                        const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
     1552
     1553                        PSHCLEVENTPAYLOAD pPayload;
    15541554                        rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload);
    15551555                        if (RT_SUCCESS(rc))
     
    15701570                break;
    15711571
    1572             SHAREDCLIPBOARDLISTHANDLE hList;
     1572            SHCLLISTHANDLE hList;
    15731573            rc = HGCMSvcGetU64(&paParms[1], &hList); /* Get list handle. */
    15741574            if (RT_SUCCESS(rc))
    15751575            {
    1576                 VBOXCLIPBOARDLISTENTRY entryList;
     1576                SHCLLISTENTRY entryList;
    15771577                rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList);
    15781578            }
     
    15821582        case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_ENTRY_WRITE:
    15831583        {
    1584             VBOXCLIPBOARDLISTENTRY entryList;
     1584            SHCLLISTENTRY entryList;
    15851585            rc = SharedClipboardURIListEntryInit(&entryList);
    15861586            if (RT_SUCCESS(rc))
    15871587            {
    1588                 SHAREDCLIPBOARDLISTHANDLE hList;
     1588                SHCLLISTHANDLE hList;
    15891589                rc = vboxSvcClipboardURIGetListEntry(cParms, paParms, &hList, &entryList);
    15901590                if (RT_SUCCESS(rc))
    15911591                {
    15921592                    void    *pvData = SharedClipboardURIListEntryDup(&entryList);
    1593                     uint32_t cbData = sizeof(VBOXCLIPBOARDLISTENTRY);
     1593                    uint32_t cbData = sizeof(SHCLLISTENTRY);
    15941594
    15951595                    uint32_t uCID;
     
    15971597                    if (RT_SUCCESS(rc))
    15981598                    {
    1599                         const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
    1600 
    1601                         PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     1599                        const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
     1600
     1601                        PSHCLEVENTPAYLOAD pPayload;
    16021602                        rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload);
    16031603                        if (RT_SUCCESS(rc))
     
    16321632        case VBOX_SHARED_CLIPBOARD_GUEST_FN_OBJ_WRITE:
    16331633        {
    1634             VBOXCLIPBOARDOBJDATACHUNK dataChunk;
     1634            SHCLOBJDATACHUNK dataChunk;
    16351635            rc = vboxSvcClipboardURIGetObjDataChunk(cParms, paParms, &dataChunk);
    16361636            if (RT_SUCCESS(rc))
    16371637            {
    16381638                void    *pvData = SharedClipboardURIObjectDataChunkDup(&dataChunk);
    1639                 uint32_t cbData = sizeof(VBOXCLIPBOARDOBJDATACHUNK);
     1639                uint32_t cbData = sizeof(SHCLOBJDATACHUNK);
    16401640
    16411641                uint32_t uCID;
     
    16431643                if (RT_SUCCESS(rc))
    16441644                {
    1645                     const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
    1646 
    1647                     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     1645                    const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);
     1646
     1647                    PSHCLEVENTPAYLOAD pPayload;
    16481648                    rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload);
    16491649                    if (RT_SUCCESS(rc))
     
    16641664            LogFlowFunc(("VBOX_SHARED_CLIPBOARD_GUEST_FN_WRITE_DIR\n"));
    16651665
    1666             VBOXCLIPBOARDDIRDATA dirData;
     1666            SHCLDIRDATA dirData;
    16671667            rc = VBoxSvcClipboardURIGetDir(cParms, paParms, &dirData);
    16681668            if (RT_SUCCESS(rc))
     
    16801680                    if (RT_SUCCESS(rc))
    16811681                    {
    1682                         SHAREDCLIPBOARDAREAOBJ Obj = { SHAREDCLIPBOARDAREAOBJTYPE_DIR, SHAREDCLIPBOARDAREAOBJSTATE_COMPLETE };
     1682                        SHCLAREAOBJ Obj = { SHCLAREAOBJTYPE_DIR, SHCLAREAOBJSTATE_COMPLETE };
    16831683                        int rc2 = pArea->AddObject(pszDir, Obj);
    16841684                        AssertRC(rc2);
     
    16971697            LogFlowFunc(("VBOX_SHARED_CLIPBOARD_GUEST_FN_READ_FILE_HDR\n"));
    16981698
    1699             VBOXCLIPBOARDFILEHDR fileHdr;
     1699            SHCLFILEHDR fileHdr;
    17001700            rc = VBoxSvcClipboardURISetFileHdr(cParms, paParms, &fileHdr);
    17011701            break;
     
    17221722                break;
    17231723
    1724             VBOXCLIPBOARDFILEHDR fileHdr;
     1724            SHCLFILEHDR fileHdr;
    17251725            rc = VBoxSvcClipboardURIGetFileHdr(cParms, paParms, &fileHdr);
    17261726            if (RT_SUCCESS(rc))
     
    17381738                    if (RT_SUCCESS(rc))
    17391739                    {
    1740                         PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);
     1740                        PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);
    17411741                        AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER);
    17421742
     
    17671767                            }
    17681768
    1769                             SHAREDCLIPBOARDAREAOBJ Obj = { SHAREDCLIPBOARDAREAOBJTYPE_FILE, SHAREDCLIPBOARDAREAOBJSTATE_NONE };
     1769                            SHCLAREAOBJ Obj = { SHCLAREAOBJTYPE_FILE, SHCLAREAOBJSTATE_NONE };
    17701770                            int rc2 = pArea->AddObject(pszPathAbs, Obj);
    17711771                            AssertRC(rc2);
     
    17831783            LogFlowFunc(("VBOX_SHARED_CLIPBOARD_FN_READ_FILE_DATA\n"));
    17841784
    1785             VBOXCLIPBOARDFILEDATA fileData;
     1785            SHCLFILEDATA fileData;
    17861786            rc = VBoxSvcClipboardURISetFileData(cParms, paParms, &fileData);
    17871787            break;
     
    17981798            }
    17991799
    1800             VBOXCLIPBOARDFILEDATA fileData;
     1800            SHCLFILEDATA fileData;
    18011801            rc = VBoxSvcClipboardURIGetFileData(cParms, paParms, &fileData);
    18021802            if (RT_SUCCESS(rc))
    18031803            {
    1804                 PSHAREDCLIPBOARDCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);
     1804                PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);
    18051805                AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER);
    18061806
     
    19011901 * @param   pTransfer           URI transfer to register a clipboard area for.
    19021902 */
    1903 int vboxSvcClipboardURIAreaRegister(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1903int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)
    19041904{
    19051905    RT_NOREF(pClientState);
     
    19181918    if (g_ExtState.pfnExtension)
    19191919    {
    1920         VBOXCLIPBOARDEXTAREAPARMS parms;
     1920        SHCLEXTAREAPARMS parms;
    19211921        RT_ZERO(parms);
    19221922
    1923         parms.uID = NIL_SHAREDCLIPBOARDAREAID;
     1923        parms.uID = NIL_SHCLAREAID;
    19241924
    19251925        /* As the meta data is now complete, register a new clipboard on the host side. */
     
    19271927        if (RT_SUCCESS(rc))
    19281928        {
    1929             /* Note: Do *not* specify SHAREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST as flags here, as VBoxSVC took care of the
     1929            /* Note: Do *not* specify SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST as flags here, as VBoxSVC took care of the
    19301930             *       clipboard area creation already. */
    19311931            rc = pTransfer->pArea->OpenTemp(parms.uID /* Area ID */,
    1932                                             SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE);
     1932                                            SHCLAREA_OPEN_FLAGS_NONE);
    19331933        }
    19341934
     
    19501950 * @param   pTransfer           URI transfer to unregister a clipboard area from.
    19511951 */
    1952 int vboxSvcClipboardURIAreaUnregister(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     1952int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)
    19531953{
    19541954    RT_NOREF(pClientState);
     
    19631963    if (g_ExtState.pfnExtension)
    19641964    {
    1965         VBOXCLIPBOARDEXTAREAPARMS parms;
     1965        SHCLEXTAREAPARMS parms;
    19661966        RT_ZERO(parms);
    19671967
     
    19981998 * @param   uID                 ID of clipboard area to to attach to. Specify 0 to attach to the most recent one.
    19991999 */
    2000 int vboxSvcClipboardURIAreaAttach(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer,
    2001                                   SHAREDCLIPBOARDAREAID uID)
     2000int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer,
     2001                                  SHCLAREAID uID)
    20022002{
    20032003    RT_NOREF(pClientState);
     
    20162016    if (g_ExtState.pfnExtension)
    20172017    {
    2018         VBOXCLIPBOARDEXTAREAPARMS parms;
     2018        SHCLEXTAREAPARMS parms;
    20192019        RT_ZERO(parms);
    20202020
     
    20462046 * @param   pTransfer           URI transfer to detach a clipboard area from.
    20472047 */
    2048 int vboxSvcClipboardURIAreaDetach(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     2048int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)
    20492049{
    20502050    RT_NOREF(pClientState);
     
    20612061    if (g_ExtState.pfnExtension)
    20622062    {
    2063         VBOXCLIPBOARDEXTAREAPARMS parms;
     2063        SHCLEXTAREAPARMS parms;
    20642064        RT_ZERO(parms);
    20652065        parms.uID = uAreaID;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.h

    r79497 r80662  
    2222#endif
    2323
    24 int vboxSvcClipboardURIHandler(PVBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);
     24int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);
    2525int vboxSvcClipboardURIHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    2626
    27 int vboxSvcClipboardURIAreaRegister(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);
    28 int vboxSvcClipboardURIAreaUnregister(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);
    29 int vboxSvcClipboardURIAreaAttach(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDAREAID uID);
    30 int vboxSvcClipboardURIAreaDetach(PVBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);
     27int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);
     28int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);
     29int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, SHCLAREAID uID);
     30int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);
    3131
    3232#endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_uri_h */
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-utils.cpp

    r80444 r80662  
    9393
    9494#if 0
    95 int vboxSvcClipboardURIReportMsg(PVBOXCLIPBOARDCLIENT pClient, uint32_t uMsg, uint32_t uParm)
     95int vboxSvcClipboardURIReportMsg(PSHCLCLIENT pClient, uint32_t uMsg, uint32_t uParm)
    9696{
    9797    AssertPtrReturn(pClient, VERR_INVALID_POINTER);
     
    115115
    116116            pClient->State.URI.fTransferStart = true;
    117             pClient->State.URI.enmTransferDir = (SHAREDCLIPBOARDURITRANSFERDIR)uParm;
     117            pClient->State.URI.enmTransferDir = (SHCLURITRANSFERDIR)uParm;
    118118            break;
    119119
     
    130130}
    131131
    132 bool vboxSvcClipboardURIReturnMsg(PVBOXCLIPBOARDCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     132bool vboxSvcClipboardURIReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    133133{
    134134    RT_NOREF(pClient, cParms, paParms);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r80623 r80662  
    5353*   Internal Functions                                                                                                           *
    5454*********************************************************************************************************************************/
    55 static int vboxClipboardSvcWinSyncInternal(PVBOXCLIPBOARDCONTEXT pCtx);
    56 
    57 struct _VBOXCLIPBOARDCONTEXT
     55static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx);
     56
     57struct _SHCLCONTEXT
    5858{
    5959    /** Handle for window message handling thread. */
    6060    RTTHREAD                 hThread;
    6161    /** Structure for keeping and communicating with service client. */
    62     PVBOXCLIPBOARDCLIENT     pClient;
     62    PSHCLCLIENT     pClient;
    6363    /** Windows-specific context data. */
    64     VBOXCLIPBOARDWINCTX      Win;
     64    SHCLWINCTX      Win;
    6565};
    6666
     
    114114}
    115115
    116 static int vboxClipboardSvcWinDataSet(PVBOXCLIPBOARDCONTEXT pCtx, UINT cfFormat, void *pvData, uint32_t cbData)
     116static int vboxClipboardSvcWinDataSet(PSHCLCONTEXT pCtx, UINT cfFormat, void *pvData, uint32_t cbData)
    117117{
    118118    AssertPtrReturn(pCtx,   VERR_INVALID_POINTER);
     
    167167}
    168168
    169 static int vboxClipboardSvcWinDataRead(PVBOXCLIPBOARDCONTEXT pCtx, UINT cfFormat,
     169static int vboxClipboardSvcWinDataRead(PSHCLCONTEXT pCtx, UINT cfFormat,
    170170                                       void **ppvData, uint32_t *pcbData)
    171171{
    172172    LogFlowFunc(("cfFormat=%u\n", cfFormat));
    173173
    174     SHAREDCLIPBOARDDATAREQ dataReq;
     174    SHCLDATAREQ dataReq;
    175175    RT_ZERO(dataReq);
    176176
     
    178178    dataReq.cbSize = _64K; /** @todo Make this more dynamic. */
    179179
    180     VBOXCLIPBOARDEVENTID uEvent = 0;
     180    SHCLEVENTID uEvent = 0;
    181181    int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent);
    182182    if (RT_SUCCESS(rc))
    183183    {
    184         PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     184        PSHCLEVENTPAYLOAD pPayload;
    185185        rc = SharedClipboardEventWait(&pCtx->pClient->Events, uEvent, 30 * 1000, &pPayload);
    186186        if (RT_SUCCESS(rc))
     
    200200}
    201201
    202 static LRESULT CALLBACK vboxClipboardSvcWinWndProcMain(PVBOXCLIPBOARDCONTEXT pCtx,
     202static LRESULT CALLBACK vboxClipboardSvcWinWndProcMain(PSHCLCONTEXT pCtx,
    203203                                                       HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    204204{
     
    207207    LRESULT lresultRc = 0;
    208208
    209     const PVBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;
     209    const PSHCLWINCTX pWinCtx = &pCtx->Win;
    210210
    211211    switch (uMsg)
     
    222222                int rc = vboxClipboardSvcWinSyncInternal(pCtx);
    223223                if (RT_SUCCESS(rc))
    224                     vboxSvcClipboardSetSource(pCtx->pClient, SHAREDCLIPBOARDSOURCE_LOCAL);
     224                    vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL);
    225225            }
    226226
     
    244244                int rc = vboxClipboardSvcWinSyncInternal(pCtx);
    245245                if (RT_SUCCESS(rc))
    246                     vboxSvcClipboardSetSource(pCtx->pClient, SHAREDCLIPBOARDSOURCE_LOCAL);
     246                    vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL);
    247247            }
    248248
     
    266266            const UINT cfFormat = (UINT)wParam;
    267267
    268             const VBOXCLIPBOARDFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);
     268            const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);
    269269
    270270            LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat));
     
    314314
    315315            /* Announce available formats. Do not insert data -- will be inserted in WM_RENDERFORMAT. */
    316             VBOXCLIPBOARDFORMATS fFormats = (uint32_t)lParam;
     316            SHCLFORMATS fFormats = (uint32_t)lParam;
    317317            if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */
    318318            {
     
    361361    AssertPtrReturn(pUserData, 0);
    362362
    363     PVBOXCLIPBOARDCONTEXT pCtx = reinterpret_cast<PVBOXCLIPBOARDCONTEXT>(pUserData);
     363    PSHCLCONTEXT pCtx = reinterpret_cast<PSHCLCONTEXT>(pUserData);
    364364    if (pCtx)
    365365        return vboxClipboardSvcWinWndProcMain(pCtx, hWnd, uMsg, wParam, lParam);
     
    398398    bool fThreadSignalled = false;
    399399
    400     const PVBOXCLIPBOARDCONTEXT pCtx    = (PVBOXCLIPBOARDCONTEXT)pvUser;
     400    const PSHCLCONTEXT pCtx    = (PSHCLCONTEXT)pvUser;
    401401    AssertPtr(pCtx);
    402     const PVBOXCLIPBOARDWINCTX  pWinCtx = &pCtx->Win;
     402    const PSHCLWINCTX  pWinCtx = &pCtx->Win;
    403403
    404404    HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
     
    517517 * @param   pCtx                Clipboard context to synchronize.
    518518 */
    519 static int vboxClipboardSvcWinSyncInternal(PVBOXCLIPBOARDCONTEXT pCtx)
     519static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx)
    520520{
    521521    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    527527    if (pCtx->pClient)
    528528    {
    529         SHAREDCLIPBOARDFORMATDATA Formats;
     529        SHCLFORMATDATA Formats;
    530530        RT_ZERO(Formats);
    531531
     
    559559}
    560560
    561 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT pClient, bool fHeadless)
     561int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)
    562562{
    563563    RT_NOREF(fHeadless);
     
    567567    int rc;
    568568
    569     PVBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));
     569    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)RTMemAllocZ(sizeof(SHCLCONTEXT));
    570570    if (pCtx)
    571571    {
     
    596596}
    597597
    598 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT pClient)
     598int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)
    599599{
    600600    /* Sync the host clipboard content with the client. */
     
    602602}
    603603
    604 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT pClient)
     604int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)
    605605{
    606606    AssertPtrReturn(pClient, VERR_INVALID_POINTER);
     
    610610    int rc = VINF_SUCCESS;
    611611
    612     PVBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;
     612    PSHCLCONTEXT pCtx = pClient->State.pCtx;
    613613    if (pCtx)
    614614    {
     
    641641}
    642642
    643 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    644                                        PSHAREDCLIPBOARDFORMATDATA pFormats)
     643int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     644                                       PSHCLFORMATDATA pFormats)
    645645{
    646646    AssertPtrReturn(pClient, VERR_INVALID_POINTER);
     
    649649    int rc;
    650650
    651     PVBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;
     651    PSHCLCONTEXT pCtx = pClient->State.pCtx;
    652652    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    653653
     
    657657    if (pFormats->uFormats & VBOX_SHARED_CLIPBOARD_FMT_URI_LIST)
    658658    {
    659         PSHAREDCLIPBOARDURITRANSFER pTransfer;
     659        PSHCLURITRANSFER pTransfer;
    660660        rc = vboxSvcClipboardURITransferStart(pClient,
    661                                               SHAREDCLIPBOARDURITRANSFERDIR_READ, SHAREDCLIPBOARDSOURCE_REMOTE,
     661                                              SHCLURITRANSFERDIR_READ, SHCLSOURCE_REMOTE,
    662662                                              &pTransfer);
    663663        if (RT_SUCCESS(rc))
     
    691691}
    692692
    693 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    694                                  PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)
     693int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     694                                 PSHCLDATABLOCK pData, uint32_t *pcbActual)
    695695{
    696696    AssertPtrReturn(pClient,             VERR_INVALID_POINTER);
     
    702702    HANDLE hClip = NULL;
    703703
    704     const PVBOXCLIPBOARDWINCTX pWinCtx = &pClient->State.pCtx->Win;
     704    const PSHCLWINCTX pWinCtx = &pClient->State.pCtx->Win;
    705705
    706706    /*
     
    802802}
    803803
    804 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    805                                   PSHAREDCLIPBOARDDATABLOCK pData)
     804int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     805                                  PSHCLDATABLOCK pData)
    806806{
    807807    LogFlowFuncEnter();
     
    814814
    815815#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    816 int VBoxClipboardSvcImplURITransferCreate(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     816int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
    817817{
    818818    RT_NOREF(pClient, pTransfer);
     
    823823}
    824824
    825 int VBoxClipboardSvcImplURITransferDestroy(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     825int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
    826826{
    827827    LogFlowFuncEnter();
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp

    r80623 r80662  
    5858  * @param   fHeadless          Whether headless.
    5959  */
    60 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT pClient, bool fHeadless)
     60int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)
    6161{
    6262    RT_NOREF(pClient, fHeadless);
     
    6969 * after a save and restore of the guest.
    7070 */
    71 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT pClient)
     71int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)
    7272{
    7373    RT_NOREF(pClient);
     
    8181 * @param   pClient         Structure containing context information about the guest system
    8282 */
    83 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT pClient)
     83int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)
    8484{
    8585    RT_NOREF(pClient);
     
    9595 * @param pFormats              Clipboard formats the guest is offering.
    9696 */
    97 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    98                                        PSHAREDCLIPBOARDFORMATDATA pFormats)
     97int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     98                                       PSHCLFORMATDATA pFormats)
    9999{
    100100    RT_NOREF(pClient, pCmdCtx, pFormats);
     
    110110 * @param pcbActual     Where to store the actual amount of data available.
    111111 */
    112 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    113                                  PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)
     112int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     113                                 PSHCLDATABLOCK pData, uint32_t *pcbActual)
    114114{
    115115    RT_NOREF(pClient, pCmdCtx, pData);
     
    121121}
    122122
    123 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    124                                   PSHAREDCLIPBOARDDATABLOCK pData)
     123int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     124                                  PSHCLDATABLOCK pData)
    125125{
    126126    RT_NOREF(pClient, pCmdCtx, pData);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r80623 r80662  
    4242 * Global context information used by the host glue for the X11 clipboard backend.
    4343 */
    44 struct _VBOXCLIPBOARDCONTEXT
     44struct _SHCLCONTEXT
    4545{
    4646    /** This mutex is grabbed during any critical operations on the clipboard
     
    5050    CLIPBACKEND         *pBackend;
    5151    /** Pointer to the VBox host client data structure. */
    52     PVBOXCLIPBOARDCLIENT pClient;
     52    PSHCLCLIENT pClient;
    5353    /** We set this when we start shutting down as a hint not to post any new
    5454     * requests. */
     
    6363 * @note  Host glue code
    6464 */
    65 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
     65void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats)
    6666{
    6767    LogFlowFunc(("pCtx=%p, u32Formats=%02X\n", pCtx, u32Formats));
    6868
    69     SHAREDCLIPBOARDFORMATDATA formatData;
     69    SHCLFORMATDATA formatData;
    7070    RT_ZERO(formatData);
    7171
     
    100100 *        the clipboard and leave ownership to X11.
    101101 */
    102 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT pClient, bool fHeadless)
     102int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)
    103103{
    104104    int rc = VINF_SUCCESS;
    105105
    106     PVBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));
     106    PSHCLCONTEXT pCtx = (PSHCLCONTEXT)RTMemAllocZ(sizeof(SHCLCONTEXT));
    107107    if (pCtx)
    108108    {
     
    142142 * @note  Host glue code
    143143 */
    144 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT pClient)
     144int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)
    145145{
    146146    LogFlowFuncEnter();
     
    149149     * there is data in the host clipboard it will automatically be sent to
    150150     * the guest when the clipboard starts up. */
    151     SHAREDCLIPBOARDFORMATDATA formatData;
     151    SHCLFORMATDATA formatData;
    152152    RT_ZERO(formatData);
    153153
     
    161161 * @note  Host glue code
    162162 */
    163 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT pClient)
     163int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)
    164164{
    165165    LogFlowFuncEnter();
    166166
    167     PVBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;
     167    PSHCLCONTEXT pCtx = pClient->State.pCtx;
    168168
    169169    /* Drop the reference to the client, in case it is still there.  This
     
    173173
    174174    /* If there is a currently pending request, release it immediately. */
    175     SHAREDCLIPBOARDDATABLOCK dataBlock = { 0, NULL, 0 };
     175    SHCLDATABLOCK dataBlock = { 0, NULL, 0 };
    176176    VBoxClipboardSvcImplWriteData(pClient, NULL, &dataBlock);
    177177
     
    199199 * @param pFormats              Clipboard formats the guest is offering.
    200200 */
    201 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    202                                        PSHAREDCLIPBOARDFORMATDATA pFormats)
     201int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     202                                       PSHCLFORMATDATA pFormats)
    203203{
    204204    RT_NOREF(pCmdCtx);
     
    224224    uint32_t            *pcbActual;
    225225    /** The request's event ID. */
    226     VBOXCLIPBOARDEVENTID uEvent;
     226    SHCLEVENTID uEvent;
    227227};
    228228
     
    245245 *
    246246 */
    247 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT pClient,
    248                                  PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)
     247int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient,
     248                                 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual)
    249249{
    250250    RT_NOREF(pCmdCtx);
     
    258258    if (pReq)
    259259    {
    260         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);
     260        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);
    261261
    262262        pReq->pv        = pData->pvData;
     
    271271            if (RT_SUCCESS(rc))
    272272            {
    273                 PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     273                PSHCLEVENTPAYLOAD pPayload;
    274274                rc = SharedClipboardEventWait(&pClient->Events, uEvent, 30 * 1000, &pPayload);
    275275                if (RT_SUCCESS(rc))
     
    299299 * @param  pData                Data block to write to clipboard.
    300300 */
    301 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT pClient,
    302                                   PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData)
     301int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient,
     302                                  PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData)
    303303{
    304304    LogFlowFunc(("pClient=%p, pv=%p, cb=%RU32, uFormat=%02X\n",
     
    323323 * @todo   Change this to deal with the buffer issues rather than offloading them onto the caller.
    324324 */
    325 void ClipRequestFromX11CompleteCallback(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
     325void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc,
    326326                                        CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    327327{
    328328    AssertMsgRC(rc, ("Clipboard data completion from X11 failed with %Rrc\n", rc));
    329329
    330     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     330    PSHCLEVENTPAYLOAD pPayload;
    331331    int rc2 = SharedClipboardPayloadAlloc(pReq->uEvent, pv, cb, &pPayload);
    332332    if (RT_SUCCESS(rc2))
     
    349349 * @note   Host glue code.
    350350 */
    351 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     351int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    352352{
    353353    LogFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p\n", pCtx, u32Format, ppv));
     
    361361
    362362    /* Request data from the guest. */
    363     SHAREDCLIPBOARDDATAREQ dataReq;
     363    SHCLDATAREQ dataReq;
    364364    RT_ZERO(dataReq);
    365365
     
    367367    dataReq.cbSize = _64K; /** @todo Make this more dynamic. */
    368368
    369     VBOXCLIPBOARDEVENTID uEvent;
     369    SHCLEVENTID uEvent;
    370370    int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent);
    371371    if (RT_SUCCESS(rc))
    372372    {
    373         PSHAREDCLIPBOARDEVENTPAYLOAD pPayload;
     373        PSHCLEVENTPAYLOAD pPayload;
    374374        rc = SharedClipboardEventWait(&pCtx->pClient->Events, uEvent, 30 * 1000, &pPayload);
    375375        if (RT_SUCCESS(rc))
     
    390390
    391391#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    392 int VBoxClipboardSvcImplURITransferCreate(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     392int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
    393393{
    394394    RT_NOREF(pClient, pTransfer);
     
    396396}
    397397
    398 int VBoxClipboardSvcImplURITransferDestroy(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)
     398int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
    399399{
    400400    RT_NOREF(pClient, pTransfer);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r80640 r80662  
    224224*   Prototypes                                                                                                                   *
    225225*********************************************************************************************************************************/
    226 static int vboxSvcClipboardClientStateInit(PVBOXCLIPBOARDCLIENTSTATE pClientState, uint32_t uClientID);
    227 static int vboxSvcClipboardClientStateDestroy(PVBOXCLIPBOARDCLIENTSTATE pClientState);
    228 static void vboxSvcClipboardClientStateReset(PVBOXCLIPBOARDCLIENTSTATE pClientState);
     226static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID);
     227static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState);
     228static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState);
    229229
    230230
     
    241241
    242242/** Holds the service extension state. */
    243 VBOXCLIPBOARDEXTSTATE g_ExtState = { 0 };
     243SHCLEXTSTATE g_ExtState = { 0 };
    244244
    245245/** Global map of all connected clients. */
     
    260260 * @param   puID                Where to store the created event source ID on success.
    261261 */
    262 int vboxSvcClipboardEventSourceCreateID(PVBOXCLIPBOARDEVENTSOURCEID puID)
     262int vboxSvcClipboardEventSourceCreateID(PSHCLEVENTSOURCEID puID)
    263263{
    264264    AssertPtrReturn(puID, VERR_INVALID_POINTER);
     
    266266    for (uint32_t i = 0; i < 32; i++) /* Don't try too hard. */
    267267    {
    268         VBOXCLIPBOARDEVENTSOURCEID uID = RTRandU32() % VBOX_SHARED_CLIPBOARD_MAX_EVENT_SOURCES;
     268        SHCLEVENTSOURCEID uID = RTRandU32() % VBOX_SHARED_CLIPBOARD_MAX_EVENT_SOURCES;
    269269        if (g_mapEventSources.find(uID) == g_mapEventSources.end())
    270270        {
     
    343343 * @param   pClient             Pointer to the client data structure to reset message queue for.
    344344 */
    345 void vboxSvcClipboardMsgQueueReset(PVBOXCLIPBOARDCLIENT pClient)
     345void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient)
    346346{
    347347    LogFlowFuncEnter();
     
    361361 * @param   cParms              Number of HGCM parameters to allocate.
    362362 */
    363 PVBOXCLIPBOARDCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms)
    364 {
    365     PVBOXCLIPBOARDCLIENTMSG pMsg = (PVBOXCLIPBOARDCLIENTMSG)RTMemAlloc(sizeof(VBOXCLIPBOARDCLIENTMSG));
     363PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms)
     364{
     365    PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG));
    366366    if (pMsg)
    367367    {
     
    386386 *                              The pointer will be invalid after calling this function.
    387387 */
    388 void vboxSvcClipboardMsgFree(PVBOXCLIPBOARDCLIENTMSG pMsg)
     388void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg)
    389389{
    390390    if (!pMsg)
     
    407407 * @remarks ASSUMES the parameters has been cleared by clientMsgPeek.
    408408 */
    409 void vboxSvcClipboardMsgSetPeekReturn(PVBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)
     409void vboxSvcClipboardMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)
    410410{
    411411    Assert(cDstParms >= 2);
     
    437437 * @param   cDstParms   The number of peek parameters (at least two).
    438438 */
    439 int vboxSvcClipboardMsgSetGetHostMsgOldReturn(PVBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)
     439int vboxSvcClipboardMsgSetGetHostMsgOldReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)
    440440{
    441441    AssertPtrReturn(pMsg,           VERR_INVALID_POINTER);
     
    494494 * @param   fAppend             Whether to append or prepend the message to the queue.
    495495 */
    496 int vboxSvcClipboardMsgAdd(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTMSG pMsg, bool fAppend)
     496int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend)
    497497{
    498498    AssertPtrReturn(pMsg, VERR_INVALID_POINTER);
     
    527527 *                      immediately.
    528528 */
    529 int vboxSvcClipboardMsgPeek(PVBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     529int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    530530                            bool fWait)
    531531{
     
    571571    if (!pClient->queueMsg.isEmpty())
    572572    {
    573         PVBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();
     573        PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first();
    574574        if (pFirstMsg)
    575575        {
     
    616616 * @param   paParms     Array of parameters.
    617617 */
    618 int vboxSvcClipboardMsgGetOld(PVBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     618int vboxSvcClipboardMsgGetOld(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    619619{
    620620    int rc;
     
    633633        if (!pClient->queueMsg.isEmpty())
    634634        {
    635             PVBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();
     635            PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first();
    636636            AssertPtr(pFirstMsg);
    637637
     
    692692 * @param   paParms      Array of parameters.
    693693 */
    694 int vboxSvcClipboardMsgGet(PVBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     694int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    695695{
    696696    /*
     
    706706    if (!pClient->queueMsg.isEmpty())
    707707    {
    708         PVBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();
     708        PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first();
    709709        if (pFirstMsg)
    710710        {
     
    807807 * @param   pClient             Client to wake up.
    808808 */
    809 int vboxSvcClipboardClientWakeup(PVBOXCLIPBOARDCLIENT pClient)
     809int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient)
    810810{
    811811    int rc = VINF_NO_CHANGE;
     
    819819        if (!pClient->queueMsg.isEmpty())
    820820        {
    821             PVBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();
     821            PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first();
    822822            if (pFirstMsg)
    823823            {
     
    879879 * @param   puEvent             Event ID for waiting for new data. Optional.
    880880 */
    881 int vboxSvcClipboardDataReadRequest(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDDATAREQ pDataReq,
    882                                     PVBOXCLIPBOARDEVENTID puEvent)
     881int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq,
     882                                    PSHCLEVENTID puEvent)
    883883{
    884884    AssertPtrReturn(pClient,  VERR_INVALID_POINTER);
     
    888888    int rc;
    889889
    890     PVBOXCLIPBOARDCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,
     890    PSHCLCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,
    891891                                                                    VBOX_SHARED_CLIPBOARD_CPARMS_READ_DATA);
    892892    if (pMsgReadData)
    893893    {
    894         const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);
     894        const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);
    895895
    896896        HGCMSvcSetU32(&pMsgReadData->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pClient->Events.uID, uEvent));
     
    922922}
    923923
    924 int vboxSvcClipboardDataReadSignal(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
    925                                    PSHAREDCLIPBOARDDATABLOCK pData)
    926 {
    927     VBOXCLIPBOARDEVENTID uEvent;
     924int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
     925                                   PSHCLDATABLOCK pData)
     926{
     927    SHCLEVENTID uEvent;
    928928    if (pClient->State.uProtocolVer == 0)
    929929    {
     
    937937    int rc = VINF_SUCCESS;
    938938
    939     PSHAREDCLIPBOARDEVENTPAYLOAD pPayload = NULL;
     939    PSHCLEVENTPAYLOAD pPayload = NULL;
    940940    if (pData->cbData)
    941941        rc = SharedClipboardPayloadAlloc(uEvent, pData->pvData, pData->cbData, &pPayload);
     
    952952}
    953953
    954 int vboxSvcClipboardFormatsReport(PVBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDFORMATDATA pFormats)
     954int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats)
    955955{
    956956    AssertPtrReturn(pClient,  VERR_INVALID_POINTER);
     
    959959    int rc;
    960960
    961     PVBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3);
     961    PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3);
    962962    if (pMsg)
    963963    {
    964         VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);
     964        SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);
    965965
    966966        HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pClient->Events.uID, uEvent));
     
    979979}
    980980
    981 int vboxSvcClipboardGetDataWrite(PVBOXCLIPBOARDCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     981int vboxSvcClipboardGetDataWrite(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    982982{
    983983    LogFlowFuncEnter();
     
    991991    int rc;
    992992
    993     SHAREDCLIPBOARDDATABLOCK dataBlock;
     993    SHCLDATABLOCK dataBlock;
    994994    RT_ZERO(dataBlock);
    995995
    996     VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;
     996    SHCLCLIENTCMDCTX cmdCtx;
    997997    RT_ZERO(cmdCtx);
    998998
     
    10441044        if (g_ExtState.pfnExtension)
    10451045        {
    1046             VBOXCLIPBOARDEXTPARMS parms;
     1046            SHCLEXTPARMS parms;
    10471047            RT_ZERO(parms);
    10481048
     
    10611061}
    10621062
    1063 int vboxSvcClipboardSetSource(PVBOXCLIPBOARDCLIENT pClient, SHAREDCLIPBOARDSOURCE enmSource)
     1063int vboxSvcClipboardSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource)
    10641064{
    10651065    if (!pClient) /* If no client connected (anymore), bail out. */
     
    10821082
    10831083#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    1084 int vboxSvcClipboardURITransferStart(PVBOXCLIPBOARDCLIENT pClient,
    1085                                      SHAREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,
    1086                                      PSHAREDCLIPBOARDURITRANSFER *ppTransfer)
     1084int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient,
     1085                                     SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource,
     1086                                     PSHCLURITRANSFER *ppTransfer)
    10871087{
    10881088    LogFlowFuncEnter();
     
    10941094    if (!SharedClipboardURICtxTransfersMaximumReached(&pClient->URI))
    10951095    {
    1096         PSHAREDCLIPBOARDURITRANSFER pTransfer;
     1096        PSHCLURITRANSFER pTransfer;
    10971097        rc = SharedClipboardURITransferCreate(enmDir, enmSource, &pTransfer);
    10981098        if (RT_SUCCESS(rc))
    10991099        {
    1100             SHAREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;
     1100            SHCLPROVIDERCREATIONCTX creationCtx;
    11011101            RT_ZERO(creationCtx);
    11021102
    1103             if (enmDir == SHAREDCLIPBOARDURITRANSFERDIR_READ)
     1103            if (enmDir == SHCLURITRANSFERDIR_READ)
    11041104            {
    11051105                rc = vboxSvcClipboardURIAreaRegister(&pClient->State, pTransfer);
     
    11231123                }
    11241124            }
    1125             else if (enmDir == SHAREDCLIPBOARDURITRANSFERDIR_WRITE)
     1125            else if (enmDir == SHCLURITRANSFERDIR_WRITE)
    11261126            {
    11271127                AssertFailed(); /** @todo Implement this. */
     
    11291129
    11301130            /* Register needed callbacks so that we can wait for the meta data to arrive here. */
    1131             SHAREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;
     1131            SHCLURITRANSFERCALLBACKS Callbacks;
    11321132            RT_ZERO(Callbacks);
    11331133
     
    12101210    LogFunc(("u32ClientID=%RU32\n", u32ClientID));
    12111211
    1212     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;
     1212    PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient;
    12131213    AssertPtr(pClient);
    12141214
    12151215#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    1216     PSHAREDCLIPBOARDURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/);
     1216    PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/);
    12171217    if (pTransfer)
    12181218        vboxSvcClipboardURIAreaDetach(&pClient->State, pTransfer);
     
    12431243    RT_NOREF(fRequestor, fRestoring);
    12441244
    1245     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;
     1245    PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient;
    12461246    AssertPtr(pvClient);
    12471247
     
    12501250
    12511251    /* Create the client's own event source. */
    1252     VBOXCLIPBOARDEVENTSOURCEID uEventSourceID;
     1252    SHCLEVENTSOURCEID uEventSourceID;
    12531253    int rc = vboxSvcClipboardEventSourceCreateID(&uEventSourceID);
    12541254    if (RT_SUCCESS(rc))
     
    13021302    int rc = VINF_SUCCESS;
    13031303
    1304     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;
     1304    PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient;
    13051305    AssertPtr(pClient);
    13061306
     
    14371437                else
    14381438                {
    1439                     rc = vboxSvcClipboardSetSource(pClient, SHAREDCLIPBOARDSOURCE_REMOTE);
     1439                    rc = vboxSvcClipboardSetSource(pClient, SHCLSOURCE_REMOTE);
    14401440                    if (RT_SUCCESS(rc))
    14411441                    {
    14421442                        if (g_ExtState.pfnExtension)
    14431443                        {
    1444                             VBOXCLIPBOARDEXTPARMS parms;
     1444                            SHCLEXTPARMS parms;
    14451445                            RT_ZERO(parms);
    14461446
     
    14501450                        }
    14511451
    1452                         VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;
     1452                        SHCLCLIENTCMDCTX cmdCtx;
    14531453                        RT_ZERO(cmdCtx);
    14541454
    1455                         SHAREDCLIPBOARDFORMATDATA formatData;
     1455                        SHCLFORMATDATA formatData;
    14561456                        RT_ZERO(formatData);
    14571457
     
    14991499                            SharedClipboardURICtxTransfersCleanup(&pClient->URI);
    15001500
    1501                             PSHAREDCLIPBOARDURITRANSFER pTransfer;
    1502                             rc = SharedClipboardURITransferCreate(SHAREDCLIPBOARDURITRANSFERDIR_WRITE,
     1501                            PSHCLURITRANSFER pTransfer;
     1502                            rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE,
    15031503                                                                  pClient->State.enmSource,
    15041504                                                                  &pTransfer);
     
    15091509                                if (RT_SUCCESS(rc))
    15101510                                {
    1511                                     SHAREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;
     1511                                    SHCLPROVIDERCREATIONCTX creationCtx;
    15121512                                    RT_ZERO(creationCtx);
    15131513
     
    15571557                            if (g_ExtState.pfnExtension)
    15581558                            {
    1559                                 VBOXCLIPBOARDEXTPARMS parms;
     1559                                SHCLEXTPARMS parms;
    15601560                                RT_ZERO(parms);
    15611561
     
    15771577                                if (g_ExtState.fDelayedAnnouncement)
    15781578                                {
    1579                                     SHAREDCLIPBOARDFORMATDATA formatData;
     1579                                    SHCLFORMATDATA formatData;
    15801580                                    RT_ZERO(formatData);
    15811581
     
    16001600                             *       so data which has been read above might get overridden by the host clipboard eventually. */
    16011601
    1602                             VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;
     1602                            SHCLCLIENTCMDCTX cmdCtx;
    16031603                            RT_ZERO(cmdCtx);
    16041604
     
    16071607                            if (RT_SUCCESS(rc))
    16081608                            {
    1609                                 SHAREDCLIPBOARDDATABLOCK dataBlock;
     1609                                SHCLDATABLOCK dataBlock;
    16101610                                RT_ZERO(dataBlock);
    16111611
     
    16601660 * @param   uClientID           Client ID (HGCM) to use for this client state.
    16611661 */
    1662 static int vboxSvcClipboardClientStateInit(PVBOXCLIPBOARDCLIENTSTATE pClientState, uint32_t uClientID)
     1662static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID)
    16631663{
    16641664    LogFlowFuncEnter();
     
    16801680 * @param   pClientState        Client state to destroy.
    16811681 */
    1682 static int vboxSvcClipboardClientStateDestroy(PVBOXCLIPBOARDCLIENTSTATE pClientState)
     1682static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState)
    16831683{
    16841684    RT_NOREF(pClientState);
     
    16941694 * @param   pClientState    Client state to reset.
    16951695 */
    1696 static void vboxSvcClipboardClientStateReset(PVBOXCLIPBOARDCLIENTSTATE pClientState)
     1696static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState)
    16971697{
    16981698    LogFlowFuncEnter();
    16991699
    17001700#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    1701     pClientState->URI.enmTransferDir = SHAREDCLIPBOARDURITRANSFERDIR_UNKNOWN;
     1701    pClientState->URI.enmTransferDir = SHCLURITRANSFERDIR_UNKNOWN;
    17021702#else
    17031703    RT_NOREF(pClientState);
     
    17741774#ifndef UNIT_TEST
    17751775/**
    1776  * SSM descriptor table for the VBOXCLIPBOARDCLIENTSTATE structure.
     1776 * SSM descriptor table for the SHCLCLIENTSTATE structure.
    17771777 */
    17781778static SSMFIELD const s_aShClSSMClientState[] =
    17791779{
    1780     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTSTATE, uProtocolVer),
    1781     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTSTATE, cbChunkSize),
    1782     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTSTATE, enmSource),
     1780    SSMFIELD_ENTRY(SHCLCLIENTSTATE, uProtocolVer),
     1781    SSMFIELD_ENTRY(SHCLCLIENTSTATE, cbChunkSize),
     1782    SSMFIELD_ENTRY(SHCLCLIENTSTATE, enmSource),
    17831783    SSMFIELD_ENTRY_TERM()
    17841784};
    17851785
    17861786/**
    1787  * SSM descriptor table for the VBOXCLIPBOARDCLIENTURISTATE structure.
     1787 * SSM descriptor table for the SHCLCLIENTURISTATE structure.
    17881788 */
    17891789static SSMFIELD const s_aShClSSMClientURIState[] =
    17901790{
    1791     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTURISTATE, enmTransferDir),
     1791    SSMFIELD_ENTRY(SHCLCLIENTURISTATE, enmTransferDir),
    17921792    SSMFIELD_ENTRY_TERM()
    17931793};
    17941794
    17951795/**
    1796  * SSM descriptor table for the header of the VBOXCLIPBOARDCLIENTMSG structure.
     1796 * SSM descriptor table for the header of the SHCLCLIENTMSG structure.
    17971797 * The actual message parameters will be serialized separately.
    17981798 */
    17991799static SSMFIELD const s_aShClSSMClientMsgHdr[] =
    18001800{
    1801     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTMSG, m_uMsg),
    1802     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTMSG, m_cParms),
     1801    SSMFIELD_ENTRY(SHCLCLIENTMSG, m_uMsg),
     1802    SSMFIELD_ENTRY(SHCLCLIENTMSG, m_cParms),
    18031803    SSMFIELD_ENTRY_TERM()
    18041804};
     
    18271827    LogFunc(("u32ClientID=%RU32\n", u32ClientID));
    18281828
    1829     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;
     1829    PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient;
    18301830    AssertPtr(pClient);
    18311831
     
    18451845    for (size_t i = 0; i < pClient->queueMsg.size(); i++)
    18461846    {
    1847         PVBOXCLIPBOARDCLIENTMSG pMsg = pClient->queueMsg.at(i);
     1847        PSHCLCLIENTMSG pMsg = pClient->queueMsg.at(i);
    18481848        AssertPtr(pMsg);
    18491849
    1850         rc = SSMR3PutStructEx(pSSM, pMsg, sizeof(VBOXCLIPBOARDCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);
     1850        rc = SSMR3PutStructEx(pSSM, pMsg, sizeof(SHCLCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);
    18511851        AssertRCReturn(rc, rc);
    18521852
     
    19091909    LogFunc(("u32ClientID=%RU32\n", u32ClientID));
    19101910
    1911     PVBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;
     1911    PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient;
    19121912    AssertPtr(pClient);
    19131913
     
    19351935        for (uint64_t i = 0; i < cMsg; i++)
    19361936        {
    1937             PVBOXCLIPBOARDCLIENTMSG pMsg = (PVBOXCLIPBOARDCLIENTMSG)RTMemAlloc(sizeof(VBOXCLIPBOARDCLIENTMSG));
     1937            PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG));
    19381938            AssertPtrReturn(pMsg, VERR_NO_MEMORY);
    19391939
    1940             rc = SSMR3GetStructEx(pSSM, pMsg, sizeof(VBOXCLIPBOARDCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);
     1940            rc = SSMR3GetStructEx(pSSM, pMsg, sizeof(SHCLCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);
    19411941            AssertRCReturn(rc, rc);
    19421942
     
    19841984    if (itClient != g_mapClients.end())
    19851985    {
    1986         PVBOXCLIPBOARDCLIENT pClient = itClient->second;
     1986        PSHCLCLIENT pClient = itClient->second;
    19871987        AssertPtr(pClient);
    19881988
     
    20002000                else
    20012001                {
    2002                     SHAREDCLIPBOARDFORMATDATA formatData;
     2002                    SHCLFORMATDATA formatData;
    20032003                    RT_ZERO(formatData);
    20042004
     
    20142014            case VBOX_CLIPBOARD_EXT_FN_DATA_READ:
    20152015            {
    2016                 SHAREDCLIPBOARDDATAREQ dataReq;
     2016                SHCLDATAREQ dataReq;
    20172017                RT_ZERO(dataReq);
    20182018
     
    20402040    LogFlowFunc(("pfnExtension=%p\n", pfnExtension));
    20412041
    2042     VBOXCLIPBOARDEXTPARMS parms;
     2042    SHCLEXTPARMS parms;
    20432043    RT_ZERO(parms);
    20442044
     
    20892089            g_pHelpers = pTable->pHelpers;
    20902090
    2091             pTable->cbClient = sizeof(VBOXCLIPBOARDCLIENT);
     2091            pTable->cbClient = sizeof(SHCLCLIENT);
    20922092
    20932093            pTable->pfnUnload     = svcUnload;
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp

    r80626 r80662  
    2626extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *ptable);
    2727
    28 static VBOXCLIPBOARDCLIENT g_Client;
     28static SHCLCLIENT g_Client;
    2929static VBOXHGCMSVCHELPERS g_Helpers = { NULL };
    3030
     
    279279int VBoxClipboardSvcImplInit() { return VINF_SUCCESS; }
    280280void VBoxClipboardSvcImplDestroy() { }
    281 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT)
     281int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT)
    282282{ return VINF_SUCCESS; }
    283 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT, bool)
     283int VBoxClipboardSvcImplConnect(PSHCLCLIENT, bool)
    284284{ return VINF_SUCCESS; }
    285 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDFORMATDATA)
     285int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLFORMATDATA)
    286286{ AssertFailed(); return VINF_SUCCESS; }
    287 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDDATABLOCK, unsigned int *)
     287int VBoxClipboardSvcImplReadData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK, unsigned int *)
    288288{ AssertFailed(); return VERR_WRONG_ORDER; }
    289 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDDATABLOCK)
     289int VBoxClipboardSvcImplWriteData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK)
    290290{ AssertFailed(); return VINF_SUCCESS; }
    291 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT)
     291int VBoxClipboardSvcImplSync(PSHCLCLIENT)
    292292{ AssertFailed(); return VERR_WRONG_ORDER; }
    293293
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r80559 r80662  
    84218421            LogFlowFunc(("VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE\n"));
    84228422
    8423             VBOXCLIPBOARDEXTPARMS *pParms = (VBOXCLIPBOARDEXTPARMS *)pvParms;
     8423            SHCLEXTPARMS *pParms = (SHCLEXTPARMS *)pvParms;
    84248424            AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    84258425
     
    84378437            LogFlowFunc(("VBOX_CLIPBOARD_EXT_FN_DATA_READ\n"));
    84388438
    8439             VBOXCLIPBOARDEXTPARMS *pParms = (VBOXCLIPBOARDEXTPARMS *)pvParms;
     8439            SHCLEXTPARMS *pParms = (SHCLEXTPARMS *)pvParms;
    84408440            AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    84418441
     
    84568456            LogFlowFunc(("VBOX_CLIPBOARD_EXT_FN_DATA_WRITE\n"));
    84578457
    8458             VBOXCLIPBOARDEXTPARMS *pParms = (VBOXCLIPBOARDEXTPARMS *)pvParms;
     8458            SHCLEXTPARMS *pParms = (SHCLEXTPARMS *)pvParms;
    84598459            AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    84608460
     
    84758475            if (SUCCEEDED(hrc))
    84768476            {
    8477                 PVBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;
     8477                PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms;
    84788478                AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    84798479
     
    84878487        case VBOX_CLIPBOARD_EXT_FN_AREA_UNREGISTER:
    84888488        {
    8489             PVBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;
     8489            PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms;
    84908490            AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    84918491
     
    84978497        case VBOX_CLIPBOARD_EXT_FN_AREA_ATTACH:
    84988498        {
    8499             PVBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;
     8499            PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms;
    85008500            AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    85018501
     
    85078507        case VBOX_CLIPBOARD_EXT_FN_AREA_DETACH:
    85088508        {
    8509             PVBOXCLIPBOARDEXTAREAPARMS pParms = (PVBOXCLIPBOARDEXTAREAPARMS)pvParms;
     8509            PSHCLEXTAREAPARMS pParms = (PSHCLEXTAREAPARMS)pvParms;
    85108510            AssertPtrBreakStmt(pParms, rc = VERR_INVALID_POINTER);
    85118511
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r80623 r80662  
    230230{
    231231    SharedClipboardAreaData()
    232         : uID(NIL_SHAREDCLIPBOARDAREAID) { }
     232        : uID(NIL_SHCLAREAID) { }
    233233
    234234    /** The area's (unique) ID.
    235      *  Set to NIL_SHAREDCLIPBOARDAREAID if not initialized yet. */
     235     *  Set to NIL_SHCLAREAID if not initialized yet. */
    236236    ULONG               uID;
    237237    /** The actual Shared Clipboard area assigned to this ID. */
     
    248248{
    249249    SharedClipboardData()
    250         : uMostRecentClipboardAreaID(NIL_SHAREDCLIPBOARDAREAID)
     250        : uMostRecentClipboardAreaID(NIL_SHCLAREAID)
    251251        , uMaxClipboardAreas(32) /** @todo Make this configurable. */
    252252    {
     
    271271    ULONG GenerateAreaID(void)
    272272    {
    273         ULONG uID = NIL_SHAREDCLIPBOARDAREAID;
     273        ULONG uID = NIL_SHCLAREAID;
    274274
    275275        int rc = RTCritSectEnter(&CritSect);
     
    289289    RTCRITSECT                          CritSect;
    290290    /** The most recent (last created) clipboard area ID.
    291      *  NIL_SHAREDCLIPBOARDAREAID if not initialized yet. */
     291     *  NIL_SHCLAREAID if not initialized yet. */
    292292    ULONG                               uMostRecentClipboardAreaID;
    293293    /** Maximum of concurrent clipboard areas.
     
    34243424    if (pAreaData)
    34253425    {
    3426         vrc = pAreaData->Area.OpenTemp(uAreaID, SHAREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST);
     3426        vrc = pAreaData->Area.OpenTemp(uAreaID, SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST);
    34273427        if (RT_SUCCESS(vrc))
    34283428        {
     
    36353635/**
    36363636 * Returns the ID of the most recent (last created) clipboard area,
    3637  * or NIL_SHAREDCLIPBOARDAREAID if no clipboard area has been created yet.
     3637 * or NIL_SHCLAREAID if no clipboard area has been created yet.
    36383638 *
    36393639 * @returns Most recent clipboard area ID.
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