VirtualBox

Ignore:
Timestamp:
Jun 4, 2019 4:51:48 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp

    r78897 r78974  
    4545#define VBOX_CLIPBOARD_WITH_UNICODE_SUPPORT 1
    4646
    47 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(SharedClipboardProvider *pProvider,
     47VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSHAREDCLIPBOARDURITRANSFER pTransfer,
    4848                                                       LPFORMATETC pFormatEtc, LPSTGMEDIUM pStgMed, ULONG cFormats)
    4949    : m_enmStatus(Uninitialized)
    5050    , m_lRefCount(0)
    5151    , m_cFormats(0)
    52     , m_pProvider(pProvider)
     52    , m_pTransfer(pTransfer)
    5353    , m_pStream(NULL)
    5454    , m_uObjIdx(0)
    5555{
    56     AssertPtr(pProvider);
     56    AssertPtr(m_pTransfer);
    5757
    5858    HRESULT hr;
     
    121121        m_enmStatus = Initialized;
    122122
    123         m_pProvider->AddRef();
     123        AssertPtr(m_pTransfer->pProvider);
     124        m_pTransfer->pProvider->AddRef();
    124125    }
    125126
     
    129130VBoxClipboardWinDataObject::~VBoxClipboardWinDataObject(void)
    130131{
    131     if (m_pProvider)
    132         m_pProvider->Release();
     132    if (m_pTransfer->pProvider)
     133        m_pTransfer->pProvider->Release();
    133134
    134135    if (m_pStream)
     
    394395            LogFlowFunc(("FormatIndex_FileDescriptor%s\n", fUnicode ? "W" : "A"));
    395396
    396             int rc = m_pProvider->ReadMetaData(); /** @todo Do this asynchronously some time earlier? */
     397            int rc = m_pTransfer->pProvider->ReadMetaData(); /** @todo Do this asynchronously some time earlier? */
    397398            if (   RT_SUCCESS(rc)
    398                 && !m_pProvider->GetURIList().IsEmpty())
     399                && !m_pTransfer->pProvider->GetURIList().IsEmpty())
    399400            {
    400401                HGLOBAL hGlobal;
    401                 rc = createFileGroupDescriptorFromURIList(m_pProvider->GetURIList(), fUnicode, &hGlobal);
     402                rc = createFileGroupDescriptorFromURIList(m_pTransfer->pProvider->GetURIList(), fUnicode, &hGlobal);
    402403                if (RT_SUCCESS(rc))
    403404                {
     
    416417            LogFlowFunc(("FormatIndex_FileContents: m_uObjIdx=%u\n", m_uObjIdx));
    417418
    418             SharedClipboardURIObject *pURIObj = m_pProvider->GetURIList().At(m_uObjIdx);
     419            SharedClipboardURIObject *pURIObj = m_pTransfer->pProvider->GetURIList().At(m_uObjIdx);
    419420            if (pURIObj)
    420421            {
    421422                /* Hand-in the provider so that our IStream implementation can continue working with it. */
    422                 hr = VBoxClipboardWinStreamImpl::Create(m_pProvider, pURIObj, &m_pStream);
     423                hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer, pURIObj, &m_pStream);
    423424                if (SUCCEEDED(hr))
    424425                {
     
    578579    LogFlowFuncLeaveRC(VINF_SUCCESS);
    579580    return VINF_SUCCESS;
     581}
     582
     583void VBoxClipboardWinDataObject::OnTransferComplete(int rc /* = VINF_SUCESS */)
     584{
     585    RT_NOREF(rc);
     586
     587    LogFlowFuncLeaveRC(rc);
     588}
     589
     590void VBoxClipboardWinDataObject::OnTransferCanceled(void)
     591{
     592    LogFlowFuncLeave();
    580593}
    581594
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