VirtualBox

Changeset 79702 in vbox for trunk/include


Ignore:
Timestamp:
Jul 11, 2019 7:34:05 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Update.

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r79688 r79702  
    382382    /** Size (in bytes) of string list. */
    383383    uint32_t cbRoots;
    384     /** String list (separated with CRLF) containing the root items. */
     384    /** String list (separated with \r\n) containing the root items. */
    385385    char    *pszRoots;
    386386} VBOXCLIPBOARDROOTS, *PVBOXCLIPBOARDROOTS;
     
    699699    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_LIST_ENTRY_READ,
    700700    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_LIST_ENTRY_WRITE,
    701     SHAREDCLIPBOARDURITRANSFEREVENTTYPE_FILE_OPEN,
    702     SHAREDCLIPBOARDURITRANSFEREVENTTYPE_FILE_CLOSE,
    703     SHAREDCLIPBOARDURITRANSFEREVENTTYPE_FILE_READ,
    704     SHAREDCLIPBOARDURITRANSFEREVENTTYPE_FILE_WRITE,
     701    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_OBJ_OPEN,
     702    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_OBJ_CLOSE,
     703    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_OBJ_READ,
     704    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_OBJ_WRITE,
    705705    SHAREDCLIPBOARDURITRANSFEREVENTTYPE_ERROR,
    706706    /** Marks the end of the event list. */
     
    814814SHAREDCLIPBOARDPROVIDERFUNCDECL(OBJREAD, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
    815815SHAREDCLIPBOARDPROVIDERFUNCDECL(OBJWRITE, SHAREDCLIPBOARDOBJHANDLE hObj, void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
    816 SHAREDCLIPBOARDPROVIDERFUNCDECLRET(uint64_t, OBJGETSIZE, SHAREDCLIPBOARDOBJHANDLE hObj)
    817 SHAREDCLIPBOARDPROVIDERFUNCDECLRET(uint64_t, OBJGETPROCESSED, SHAREDCLIPBOARDOBJHANDLE hObj)
    818 SHAREDCLIPBOARDPROVIDERFUNCDECLRET(const char *, OBJGETPATH, SHAREDCLIPBOARDOBJHANDLE hObj)
    819816
    820817/**
     
    836833    SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJREAD, pfnObjRead);
    837834    SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJWRITE, pfnObjWrite);
    838     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJGETSIZE, pfnObjGetSize);
    839     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJGETPROCESSED, pfnObjGetProcessed);
    840     SHAREDCLIPBOARDPROVIDERFUNCMEMBER(OBJGETPATH, pfnObjGetPath);
    841835} SHAREDCLIPBOARDPROVIDERINTERFACE, *PSHAREDCLIPBOARDPROVIDERINTERFACE;
    842836
     
    10561050
    10571051#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_uri_h */
     1052
  • trunk/include/VBox/GuestHost/SharedClipboard-win.h

    r79630 r79702  
    3636
    3737# ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
     38#  include <vector>
     39
    3840#  include <iprt/cpp/ministring.h> /* For RTCString. */
    39 #  include <iprt/win/shlobj.h> /* For DROPFILES and friends. */
     41#  include <iprt/win/shlobj.h>     /* For DROPFILES and friends. */
     42#  include <VBox/com/string.h>     /* For Utf8Str. */
    4043#  include <oleidl.h>
    4144
    4245# include <VBox/GuestHost/SharedClipboard-uri.h>
    43 # endif
     46
     47using namespace com;
     48# endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    4449
    4550#ifndef WM_CLIPBOARDUPDATE
     
    163168    };
    164169
    165     enum FormatIndex
    166     {
    167         /** File descriptor, ANSI version. */
    168         FormatIndex_FileDescriptorA = 0,
    169         /** File descriptor, Unicode version. */
    170         FormatIndex_FileDescriptorW,
    171         /** File contents. */
    172         FormatIndex_FileContents
    173     };
    174 
    175170public:
    176171
     
    232227protected:
    233228
     229    /**
     230     * Structure for keeping a single file system object entry.
     231     */
     232    struct FSOBJENTRY
     233    {
     234        /** Relative path of the object. */
     235        Utf8Str                  strPath;
     236        /** Related (cached) object information. */
     237        SHAREDCLIPBOARDFSOBJINFO objInfo;
     238    };
     239
     240    /** Vector containing file system objects with its (cached) objection information. */
     241    typedef std::vector<FSOBJENTRY> FsObjEntryList;
     242
    234243    Status                      m_enmStatus;
    235244    LONG                        m_lRefCount;
     
    240249    IStream                    *m_pStream;
    241250    ULONG                       m_uObjIdx;
    242     /** Event being triggered when reading the transfer list been completed.*/
     251    /** List of (cached) file system root objects. */
     252    FsObjEntryList              m_lstRootEntries;
     253    /** Event being triggered when reading the transfer list been completed. */
    243254    RTSEMEVENT                  m_EventListComplete;
     255    /** Event being triggered when the transfer has been completed. */
    244256    RTSEMEVENT                  m_EventTransferComplete;
     257    UINT                        m_cfFileDescriptorA;
     258    UINT                        m_cfFileDescriptorW;
     259    UINT                        m_cfFileContents;
    245260};
    246261
     
    286301public:
    287302
    288     VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent,
    289                                PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj);
     303    VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHAREDCLIPBOARDURITRANSFER pTransfer,
     304                               const Utf8Str &strPath, PSHAREDCLIPBOARDFSOBJINFO pObjInfo);
    290305    virtual ~VBoxClipboardWinStreamImpl(void);
    291306
     
    312327public: /* Own methods. */
    313328
    314     static HRESULT Create(VBoxClipboardWinDataObject *pParent,
    315                           PSHAREDCLIPBOARDURITRANSFER pTransfer, uint64_t uObjIdx, IStream **ppStream);
    316 
     329    static HRESULT Create(VBoxClipboardWinDataObject *pParent, PSHAREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strPath,
     330                          PSHAREDCLIPBOARDFSOBJINFO pObjInfo, IStream **ppStream);
    317331private:
    318332
     
    323337    /** Pointer to the associated URI transfer. */
    324338    PSHAREDCLIPBOARDURITRANSFER    m_pURITransfer;
    325     /** Handle to the associated URI object. */
     339    /** The object handle to use. */
    326340    SHAREDCLIPBOARDOBJHANDLE       m_hObj;
     341    /** Object path. */
     342    Utf8Str                        m_strPath;
     343    /** (Cached) object information. */
     344    SHAREDCLIPBOARDFSOBJINFO       m_objInfo;
     345    /** Number of bytes already processed. */
     346    uint64_t                       m_cbProcessed;
     347    /** Whether we already notified the parent of completion or not. */
     348    bool                           m_fNotifiedComplete;
    327349};
    328350
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r79688 r79702  
    361361#define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_INVALID           0
    362362#define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN         1
    363 #define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN          2
     363#define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE        2
     364#define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN          3
     365#define VBOX_SHAREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE         4
    364366
    365367/**
     
    413415    /** uin32_t, out: Size (in bytes) of string list. */
    414416    HGCMFunctionParameter cbRoots;
    415     /** pointer, out: string list (separated with CRLF) containing the root items. */
     417    /** pointer, out: string list (separated with \r\n) containing the root items. */
    416418    HGCMFunctionParameter pvRoots;
    417419} VBoxClipboardRootsMsg;
     
    650652
    651653#endif /* !VBOX_INCLUDED_HostServices_VBoxClipboardSvc_h */
     654
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