VirtualBox

Changeset 79299 in vbox for trunk/include


Ignore:
Timestamp:
Jun 24, 2019 10:18:19 AM (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

    r79267 r79299  
    503503
    504504/**
    505  * Enumeration to specify the Shared Clipboard provider source type.
    506  */
    507 typedef enum SHAREDCLIPBOARDPROVIDERSOURCE
     505 * Enumeration to specify the Shared Clipboard URI provider source type.
     506 */
     507typedef enum SHAREDCLIPBOARDURIPROVIDERSOURCE
    508508{
    509509    /** Invalid source type. */
    510     SHAREDCLIPBOARDPROVIDERSOURCE_INVALID = 0,
     510    SHAREDCLIPBOARDURIPROVIDERSOURCE_INVALID = 0,
    511511    /** Source is VbglR3. */
    512     SHAREDCLIPBOARDPROVIDERSOURCE_VBGLR3,
     512    SHAREDCLIPBOARDURIPROVIDERSOURCE_VBGLR3,
    513513    /** Source is the host service. */
    514     SHAREDCLIPBOARDPROVIDERSOURCE_HOSTSERVICE
    515 } SHAREDCLIPBOARDPROVIDERSOURCE;
     514    SHAREDCLIPBOARDURIPROVIDERSOURCE_HOSTSERVICE
     515} SHAREDCLIPBOARDURIPROVIDERSOURCE;
    516516
    517517class SharedClipboardProvider;
     
    553553{
    554554    /** Specifies what the source of the provider is. */
    555     SHAREDCLIPBOARDPROVIDERSOURCE     enmSource;
     555    SHAREDCLIPBOARDURIPROVIDERSOURCE  enmSource;
     556    /** Specifies whether the provider will read or write data. */
     557    SHAREDCLIPBOARDURITRANSFERDIR     enmDir;
    556558    /** Optional callback table; can be NULL if not needed. */
    557559    PSHAREDCLIPBOARDPROVIDERCALLBACKS pCallbacks;
     
    625627public: /* Interface to be implemented. */
    626628
     629    virtual int Prepare(void);
     630
    627631    virtual int ReadDataHdr(PVBOXCLIPBOARDDATAHDR *ppDataHdr);
    628632    virtual int WriteDataHdr(const PVBOXCLIPBOARDDATAHDR pDataHdr);
     
    697701    /** Number of references to this instance. */
    698702    volatile uint32_t                m_cRefs;
     703    /** The provider's transfer direction. */
     704    SHAREDCLIPBOARDURITRANSFERDIR    m_enmDir;
    699705    /** The provider's callback table. */
    700706    SHAREDCLIPBOARDPROVIDERCALLBACKS m_Callbacks;
     
    759765public:
    760766
     767    int Prepare(void);
     768
    761769    int ReadDataHdr(PVBOXCLIPBOARDDATAHDR *ppDataHdr);
    762770    int WriteDataHdr(const PVBOXCLIPBOARDDATAHDR pDataHdr);
     
    811819typedef FNSHAREDCLIPBOARDURITRANSFERSTARTED *PFNSHAREDCLIPBOARDURITRANSFERSTARTED;
    812820
     821typedef DECLCALLBACK(void) FNSHAREDCLIPBOARDURITRANSFERPREPARE(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
     822/** Pointer to a FNSHAREDCLIPBOARDURITRANSFERPREPARE function. */
     823typedef FNSHAREDCLIPBOARDURITRANSFERPREPARE *PFNSHAREDCLIPBOARDURITRANSFERPREPARE;
     824
     825typedef DECLCALLBACK(void) FNSHAREDCLIPBOARDURIMETADATACOMPLETE(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
     826/** Pointer to a FNSHAREDCLIPBOARDURIMETADATACOMPLETE function. */
     827typedef FNSHAREDCLIPBOARDURIMETADATACOMPLETE *PFNSHAREDCLIPBOARDURIMETADATACOMPLETE;
     828
    813829typedef DECLCALLBACK(void) FNSHAREDCLIPBOARDURITRANSFERCANCELED(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
    814830/** Pointer to a FNSHAREDCLIPBOARDURITRANSFERCANCELED function. */
     
    831847    /** Saved user pointer. */
    832848    void                                 *pvUser;
     849    /** Function pointer, called when the transfer is going to be prepared. */
     850    PFNSHAREDCLIPBOARDURITRANSFERPREPARE  pfnTransferPrepare;
    833851    /** Function pointer, called when the transfer has been started. */
    834852    PFNSHAREDCLIPBOARDURITRANSFERSTARTED  pfnTransferStarted;
     853    /** Function pointer, called when reading / writing meta data is complete. */
     854    PFNSHAREDCLIPBOARDURIMETADATACOMPLETE pfnMetaDataComplete;
    835855    /** Function pointer, called when the transfer is complete. */
    836856    PFNSHAREDCLIPBOARDURITRANSFERCOMPLETE pfnTransferComplete;
     
    933953SharedClipboardURIObject *SharedClipboardURITransferGetObject(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint64_t uIdx);
    934954int SharedClipboardURITransferRun(PSHAREDCLIPBOARDURITRANSFER pTransfer, bool fAsync);
    935 void SharedClipboardURITransferSetCallbacks(PSHAREDCLIPBOARDURITRANSFER pTransfer, PSHAREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks);
     955void SharedClipboardURITransferSetCallbacks(PSHAREDCLIPBOARDURITRANSFER pTransfer,
     956                                            PSHAREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks);
    936957
    937958int SharedClipboardURITransferMetaDataAdd(PSHAREDCLIPBOARDURITRANSFER pTransfer, const void *pvMeta, uint32_t cbMeta);
    938959bool SharedClipboardURITransferMetaDataIsComplete(PSHAREDCLIPBOARDURITRANSFER pTransfer);
    939 int SharedClipboardURITransferMetaGet(PSHAREDCLIPBOARDURITRANSFER pTransfer, const void *pvMeta, uint32_t cbMeta);
    940960int SharedClipboardURITransferMetaDataRead(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint32_t *pcbRead);
    941961int SharedClipboardURITransferMetaDataWrite(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint32_t *pcbWritten);
  • trunk/include/VBox/GuestHost/SharedClipboard-win.h

    r79267 r79299  
    216216
    217217    int copyToHGlobal(const void *pvData, size_t cbData, UINT fFlags, HGLOBAL *phGlobal);
    218     int createFileGroupDescriptorFromURIList(const SharedClipboardURIList &URIList, bool fUnicode, HGLOBAL *phGlobal);
     218    int createFileGroupDescriptorFromTransfer(PSHAREDCLIPBOARDURITRANSFER pTransfer,
     219                                              bool fUnicode, HGLOBAL *phGlobal);
    219220
    220221    bool lookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex);
    221222    void registerFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat, TYMED tyMed = TYMED_HGLOBAL,
    222223                        LONG lindex = -1, DWORD dwAspect = DVASPECT_CONTENT, DVTARGETDEVICE *pTargetDevice = NULL);
     224
     225protected: /* URI transfer callbacks */
     226
     227    static DECLCALLBACK(void) onMetaDataCompleteCallback(PSHAREDCLIPBOARDURITRANSFERCALLBACKDATA pData);
    223228
    224229protected:
     
    232237    IStream                    *m_pStream;
    233238    ULONG                       m_uObjIdx;
     239    /** Event being triggered when reading the meta data has been completed.*/
     240    RTSEMEVENT                  m_EventMetaDataComplete;
    234241};
    235242
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r79267 r79299  
    449449#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    450450int VBoxSvcClipboardURIReadDataHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDDATAHDR pDataHdr);
     451int VBoxSvcClipboardURIWriteDataHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDDATAHDR pDataHdr);
    451452int VBoxSvcClipboardURIReadDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDDATACHUNK pDataChunk);
     453int VBoxSvcClipboardURIWriteDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDDATACHUNK pDataChunk);
    452454int VBoxSvcClipboardURIReadDir(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDDIRDATA pDirData);
     455int VBoxSvcClipboardURIWriteDir(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDDIRDATA pDirData);
    453456int VBoxSvcClipboardURIReadFileHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDFILEHDR pFileHdr);
     457int VBoxSvcClipboardURIWriteFileHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDFILEHDR pFileHdr);
    454458int VBoxSvcClipboardURIReadFileData(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDFILEDATA pFileData);
     459int VBoxSvcClipboardURIWriteFileData(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PVBOXCLIPBOARDFILEDATA pFileData);
    455460#endif
    456461
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