VirtualBox

Ignore:
Timestamp:
Mar 1, 2024 11:00:38 AM (11 months ago)
Author:
vboxsync
Message:

Shared Clipboard: More cleanups (renaming Windows parts to match the other platforms). bugref:9437

Location:
trunk/src/VBox/GuestHost/SharedClipboard
Files:
4 edited

Legend:

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

    r103615 r103631  
    6262//#define VBOX_CLIPBOARD_WITH_UNICODE_SUPPORT 1
    6363
    64 SharedClipboardWinDataObject::SharedClipboardWinDataObject(void)
     64ShClWinDataObject::ShClWinDataObject(void)
    6565    : m_pCtx(NULL)
    6666    , m_enmStatus(Uninitialized)
     
    8080}
    8181
    82 SharedClipboardWinDataObject::~SharedClipboardWinDataObject(void)
     82ShClWinDataObject::~ShClWinDataObject(void)
    8383{
    8484    Destroy();
     
    102102 * @param   cFormats            Number of formats in \a pFormatEtc and \a pStgMed. Optional.
    103103 */
    104 int SharedClipboardWinDataObject::Init(PSHCLCONTEXT pCtx, SharedClipboardWinDataObject::PCALLBACKS pCallbacks,
    105                                        LPFORMATETC pFormatEtc /* = NULL */, LPSTGMEDIUM pStgMed /* = NULL */,
    106                                        ULONG cFormats /* = 0 */)
     104int ShClWinDataObject::Init(PSHCLCONTEXT pCtx, ShClWinDataObject::PCALLBACKS pCallbacks,
     105                            LPFORMATETC pFormatEtc /* = NULL */, LPSTGMEDIUM pStgMed /* = NULL */,
     106                            ULONG cFormats /* = 0 */)
    107107{
    108108    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    117117     * Set up callback context + table.
    118118     */
    119     memcpy(&m_Callbacks, pCallbacks, sizeof(SharedClipboardWinDataObject::CALLBACKS));
     119    memcpy(&m_Callbacks, pCallbacks, sizeof(ShClWinDataObject::CALLBACKS));
    120120    m_CallbackCtx.pvUser = pCtx;
    121121    m_CallbackCtx.pThis  = this;
     
    199199 * Uninitialized a data object instance, internal version.
    200200 */
    201 void SharedClipboardWinDataObject::uninitInternal(void)
     201void ShClWinDataObject::uninitInternal(void)
    202202{
    203203    LogFlowFuncEnter();
     
    230230 * Uninitialized a data object instance.
    231231 */
    232 void SharedClipboardWinDataObject::Uninit(void)
     232void ShClWinDataObject::Uninit(void)
    233233{
    234234    LogFlowFuncEnter();
     
    240240 * Destroys a data object instance.
    241241 */
    242 void SharedClipboardWinDataObject::Destroy(void)
     242void ShClWinDataObject::Destroy(void)
    243243{
    244244    LogFlowFuncEnter();
     
    295295 ********************************************************************************************************************************/
    296296
    297 STDMETHODIMP_(ULONG) SharedClipboardWinDataObject::AddRef(void)
     297STDMETHODIMP_(ULONG) ShClWinDataObject::AddRef(void)
    298298{
    299299    ULONG ulCount = InterlockedIncrement(&m_lRefCount);
     
    302302}
    303303
    304 STDMETHODIMP_(ULONG) SharedClipboardWinDataObject::Release(void)
     304STDMETHODIMP_(ULONG) ShClWinDataObject::Release(void)
    305305{
    306306    ULONG ulCount = InterlockedDecrement(&m_lRefCount);
     
    315315}
    316316
    317 STDMETHODIMP SharedClipboardWinDataObject::QueryInterface(REFIID iid, void **ppvObject)
     317STDMETHODIMP ShClWinDataObject::QueryInterface(REFIID iid, void **ppvObject)
    318318{
    319319    AssertPtrReturn(ppvObject, E_INVALIDARG);
     
    340340 * @param   phGlobal            Where to store the allocated HGLOBAL object.
    341341 */
    342 int SharedClipboardWinDataObject::copyToHGlobal(const void *pvData, size_t cbData, UINT fFlags, HGLOBAL *phGlobal)
     342int ShClWinDataObject::copyToHGlobal(const void *pvData, size_t cbData, UINT fFlags, HGLOBAL *phGlobal)
    343343{
    344344    AssertPtrReturn(phGlobal, VERR_INVALID_POINTER);
     
    363363}
    364364
    365 inline int SharedClipboardWinDataObject::lock(void)
     365inline int ShClWinDataObject::lock(void)
    366366{
    367367    int rc = RTCritSectEnter(&m_CritSect);
     
    371371}
    372372
    373 inline int SharedClipboardWinDataObject::unlock(void)
     373inline int ShClWinDataObject::unlock(void)
    374374{
    375375    int rc = RTCritSectLeave(&m_CritSect);
     
    387387 * @param   strDir              Directory path to handle.
    388388 */
    389 int SharedClipboardWinDataObject::readDir(PSHCLTRANSFER pTransfer, const Utf8Str &strDir)
     389int ShClWinDataObject::readDir(PSHCLTRANSFER pTransfer, const Utf8Str &strDir)
    390390{
    391391    LogFlowFunc(("strDir=%s\n", strDir.c_str()));
     
    482482 * @returns VBox status code.
    483483 * @param   pTransfer           Pointer to transfer.
    484  * @param   pvUser              Pointer to user-provided data. Of type SharedClipboardWinDataObject.
     484 * @param   pvUser              Pointer to user-provided data. Of type ShClWinDataObject.
    485485 */
    486486/* static */
    487 DECLCALLBACK(int) SharedClipboardWinDataObject::readThread(PSHCLTRANSFER pTransfer, void *pvUser)
     487DECLCALLBACK(int) ShClWinDataObject::readThread(PSHCLTRANSFER pTransfer, void *pvUser)
    488488{
    489489    LogFlowFuncEnter();
    490490
    491     SharedClipboardWinDataObject *pThis = (SharedClipboardWinDataObject *)pvUser;
     491    ShClWinDataObject *pThis = (ShClWinDataObject *)pvUser;
    492492
    493493    LogRel2(("Shared Clipboard: Calculating transfer ...\n"));
     
    639639 * @param   phGlobal            Where to store the allocated HGLOBAL object on success.
    640640 */
    641 int SharedClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSHCLTRANSFER pTransfer,
     641int ShClWinDataObject::createFileGroupDescriptorFromTransfer(PSHCLTRANSFER pTransfer,
    642642                                                                        bool fUnicode, HGLOBAL *phGlobal)
    643643{
     
    764764 * @thread  Windows event thread.
    765765 */
    766 STDMETHODIMP SharedClipboardWinDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium)
     766STDMETHODIMP ShClWinDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium)
    767767{
    768768    AssertPtrReturn(pFormatEtc, DV_E_FORMATETC);
     
    861861                    if (RT_SUCCESS(rc))
    862862                    {
    863                         rc = ShClTransferRun(m_pTransfer, &SharedClipboardWinDataObject::readThread, this /* pvUser */);
     863                        rc = ShClTransferRun(m_pTransfer, &ShClWinDataObject::readThread, this /* pvUser */);
    864864                        if (RT_SUCCESS(rc))
    865865                        {
     
    932932
    933933                /* Hand-in the provider so that our IStream implementation can continue working with it. */
    934                 hr = SharedClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer,
     934                hr = ShClWinStreamImpl::Create(this /* pParent */, m_pTransfer,
    935935                                                          fsObjEntry.pszPath /* File name */, &fsObjEntry.objInfo /* PSHCLFSOBJINFO */,
    936936                                                          &m_pStream);
     
    978978 * @param   pMedium
    979979 */
    980 STDMETHODIMP SharedClipboardWinDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium)
     980STDMETHODIMP ShClWinDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium)
    981981{
    982982    RT_NOREF(pFormatEtc, pMedium);
     
    992992 * @param   pFormatEtc
    993993 */
    994 STDMETHODIMP SharedClipboardWinDataObject::QueryGetData(LPFORMATETC pFormatEtc)
     994STDMETHODIMP ShClWinDataObject::QueryGetData(LPFORMATETC pFormatEtc)
    995995{
    996996    LogFlowFunc(("\n"));
     
    998998}
    999999
    1000 STDMETHODIMP SharedClipboardWinDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEtc, LPFORMATETC pFormatEtcOut)
     1000STDMETHODIMP ShClWinDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEtc, LPFORMATETC pFormatEtcOut)
    10011001{
    10021002    RT_NOREF(pFormatEtc);
     
    10081008}
    10091009
    1010 STDMETHODIMP SharedClipboardWinDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease)
     1010STDMETHODIMP ShClWinDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease)
    10111011{
    10121012    if (   pFormatEtc == NULL
     
    10551055}
    10561056
    1057 STDMETHODIMP SharedClipboardWinDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc)
     1057STDMETHODIMP ShClWinDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc)
    10581058{
    10591059    LogFlowFunc(("dwDirection=%RI32, mcFormats=%RI32, mpFormatEtc=%p\n", dwDirection, m_cFormats, m_pFormatEtc));
     
    10611061    HRESULT hr;
    10621062    if (dwDirection == DATADIR_GET)
    1063         hr = SharedClipboardWinEnumFormatEtc::CreateEnumFormatEtc(m_cFormats, m_pFormatEtc, ppEnumFormatEtc);
     1063        hr = ShClWinEnumFormatEtc::CreateEnumFormatEtc(m_cFormats, m_pFormatEtc, ppEnumFormatEtc);
    10641064    else
    10651065        hr = E_NOTIMPL;
     
    10691069}
    10701070
    1071 STDMETHODIMP SharedClipboardWinDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD fAdvise, IAdviseSink *pAdvSink, DWORD *pdwConnection)
     1071STDMETHODIMP ShClWinDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD fAdvise, IAdviseSink *pAdvSink, DWORD *pdwConnection)
    10721072{
    10731073    RT_NOREF(pFormatEtc, fAdvise, pAdvSink, pdwConnection);
     
    10751075}
    10761076
    1077 STDMETHODIMP SharedClipboardWinDataObject::DUnadvise(DWORD dwConnection)
     1077STDMETHODIMP ShClWinDataObject::DUnadvise(DWORD dwConnection)
    10781078{
    10791079    RT_NOREF(dwConnection);
     
    10811081}
    10821082
    1083 STDMETHODIMP SharedClipboardWinDataObject::EnumDAdvise(IEnumSTATDATA **ppEnumAdvise)
     1083STDMETHODIMP ShClWinDataObject::EnumDAdvise(IEnumSTATDATA **ppEnumAdvise)
    10841084{
    10851085    RT_NOREF(ppEnumAdvise);
     
    10921092 */
    10931093
    1094 STDMETHODIMP SharedClipboardWinDataObject::EndOperation(HRESULT hResult, IBindCtx *pbcReserved, DWORD dwEffects)
     1094STDMETHODIMP ShClWinDataObject::EndOperation(HRESULT hResult, IBindCtx *pbcReserved, DWORD dwEffects)
    10951095{
    10961096     RT_NOREF(hResult, pbcReserved, dwEffects);
     
    10981098}
    10991099
    1100 STDMETHODIMP SharedClipboardWinDataObject::GetAsyncMode(BOOL *pfIsOpAsync)
     1100STDMETHODIMP ShClWinDataObject::GetAsyncMode(BOOL *pfIsOpAsync)
    11011101{
    11021102     RT_NOREF(pfIsOpAsync);
     
    11041104}
    11051105
    1106 STDMETHODIMP SharedClipboardWinDataObject::InOperation(BOOL *pfInAsyncOp)
     1106STDMETHODIMP ShClWinDataObject::InOperation(BOOL *pfInAsyncOp)
    11071107{
    11081108     RT_NOREF(pfInAsyncOp);
     
    11101110}
    11111111
    1112 STDMETHODIMP SharedClipboardWinDataObject::SetAsyncMode(BOOL fDoOpAsync)
     1112STDMETHODIMP ShClWinDataObject::SetAsyncMode(BOOL fDoOpAsync)
    11131113{
    11141114     RT_NOREF(fDoOpAsync);
     
    11161116}
    11171117
    1118 STDMETHODIMP SharedClipboardWinDataObject::StartOperation(IBindCtx *pbcReserved)
     1118STDMETHODIMP ShClWinDataObject::StartOperation(IBindCtx *pbcReserved)
    11191119{
    11201120     RT_NOREF(pbcReserved);
     
    11341134 *                              When set to NULL, the transfer will be released from the object.
    11351135 */
    1136 int SharedClipboardWinDataObject::setTransferLocked(PSHCLTRANSFER pTransfer)
     1136int ShClWinDataObject::setTransferLocked(PSHCLTRANSFER pTransfer)
    11371137{
    11381138    AssertReturn(RTCritSectIsOwned(&m_CritSect), VERR_WRONG_ORDER);
     
    11501150            m_pTransfer = pTransfer;
    11511151
    1152             SharedClipboardWinTransferCtx *pWinURITransferCtx = (SharedClipboardWinTransferCtx *)pTransfer->pvUser;
     1152            ShClWinTransferCtx *pWinURITransferCtx = (ShClWinTransferCtx *)pTransfer->pvUser;
    11531153            AssertPtr(pWinURITransferCtx);
    11541154
     
    11641164        if (m_pTransfer)
    11651165        {
    1166             SharedClipboardWinTransferCtx *pWinURITransferCtx = (SharedClipboardWinTransferCtx *)m_pTransfer->pvUser;
     1166            ShClWinTransferCtx *pWinURITransferCtx = (ShClWinTransferCtx *)m_pTransfer->pvUser;
    11671167            AssertPtr(pWinURITransferCtx);
    11681168
     
    11881188 *                              When set to NULL, the transfer will be released from the object.
    11891189 */
    1190 int SharedClipboardWinDataObject::SetTransfer(PSHCLTRANSFER pTransfer)
     1190int ShClWinDataObject::SetTransfer(PSHCLTRANSFER pTransfer)
    11911191{
    11921192    lock();
     
    12061206 * @param   rcSts               Result code. Optional.
    12071207 *
    1208  * @note    Called by the main clipboard thread + SharedClipboardWinStreamImpl.
    1209  */
    1210 int SharedClipboardWinDataObject::SetStatus(Status enmStatus, int rcSts /* = VINF_SUCCESS */)
     1208 * @note    Called by the main clipboard thread + ShClWinStreamImpl.
     1209 */
     1210int ShClWinDataObject::SetStatus(Status enmStatus, int rcSts /* = VINF_SUCCESS */)
    12111211{
    12121212    lock();
     
    12191219
    12201220/* static */
    1221 void SharedClipboardWinDataObject::logFormat(CLIPFORMAT fmt)
     1221void ShClWinDataObject::logFormat(CLIPFORMAT fmt)
    12221222{
    12231223    char szFormat[128];
     
    12301230}
    12311231
    1232 bool SharedClipboardWinDataObject::lookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex)
     1232bool ShClWinDataObject::lookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex)
    12331233{
    12341234    AssertReturn(pFormatEtc, false);
     
    12581258}
    12591259
    1260 void SharedClipboardWinDataObject::registerFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat,
     1260void ShClWinDataObject::registerFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat,
    12611261                                                  TYMED tyMed, LONG lIndex, DWORD dwAspect,
    12621262                                                  DVTARGETDEVICE *pTargetDevice)
     
    12851285 * @note    Caller must have taken the critical section.
    12861286 */
    1287 int SharedClipboardWinDataObject::setStatusLocked(Status enmStatus, int rc /* = VINF_SUCCESS */)
     1287int ShClWinDataObject::setStatusLocked(Status enmStatus, int rc /* = VINF_SUCCESS */)
    12881288{
    12891289    AssertReturn(enmStatus == Error || RT_SUCCESS(rc), VERR_INVALID_PARAMETER);
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardEnumFormatEtcImpl-win.cpp

    r100665 r103631  
    5656
    5757
    58 SharedClipboardWinEnumFormatEtc::SharedClipboardWinEnumFormatEtc(void)
     58ShClWinEnumFormatEtc::ShClWinEnumFormatEtc(void)
    5959    : m_lRefCount(1),
    6060      m_nIndex(0)
     
    6666}
    6767
    68 SharedClipboardWinEnumFormatEtc::~SharedClipboardWinEnumFormatEtc(void)
     68ShClWinEnumFormatEtc::~ShClWinEnumFormatEtc(void)
    6969{
    7070    Destroy();
     
    8585 * @param   cFormats            Number of formats in \a pFormatEtc.
    8686 */
    87 int SharedClipboardWinEnumFormatEtc::Init(LPFORMATETC pFormatEtc, ULONG cFormats)
     87int ShClWinEnumFormatEtc::Init(LPFORMATETC pFormatEtc, ULONG cFormats)
    8888{
    8989    LogFlowFunc(("pFormatEtc=%p, cFormats=%RU32\n", pFormatEtc, cFormats));
     
    9696                     i, pFormatEtc[i].cfFormat, pFormatEtc[i].tymed, pFormatEtc[i].dwAspect));
    9797
    98         SharedClipboardWinDataObject::logFormat(pFormatEtc[i].cfFormat);
    99 
    100         SharedClipboardWinEnumFormatEtc::CopyFormat(&m_pFormatEtc[i], &pFormatEtc[i]);
     98        ShClWinDataObject::logFormat(pFormatEtc[i].cfFormat);
     99
     100        ShClWinEnumFormatEtc::CopyFormat(&m_pFormatEtc[i], &pFormatEtc[i]);
    101101    }
    102102
     
    109109 * Destroys an IEnumFORMATETC instance.
    110110 */
    111 void SharedClipboardWinEnumFormatEtc::Destroy(void)
     111void ShClWinEnumFormatEtc::Destroy(void)
    112112{
    113113    if (m_pFormatEtc)
     
    130130 */
    131131
    132 STDMETHODIMP_(ULONG) SharedClipboardWinEnumFormatEtc::AddRef(void)
     132STDMETHODIMP_(ULONG) ShClWinEnumFormatEtc::AddRef(void)
    133133{
    134134    return InterlockedIncrement(&m_lRefCount);
    135135}
    136136
    137 STDMETHODIMP_(ULONG) SharedClipboardWinEnumFormatEtc::Release(void)
     137STDMETHODIMP_(ULONG) ShClWinEnumFormatEtc::Release(void)
    138138{
    139139    LONG lCount = InterlockedDecrement(&m_lRefCount);
     
    148148}
    149149
    150 STDMETHODIMP SharedClipboardWinEnumFormatEtc::QueryInterface(REFIID iid, void **ppvObject)
     150STDMETHODIMP ShClWinEnumFormatEtc::QueryInterface(REFIID iid, void **ppvObject)
    151151{
    152152    if (   iid == IID_IEnumFORMATETC
     
    162162}
    163163
    164 STDMETHODIMP SharedClipboardWinEnumFormatEtc::Next(ULONG cFormats, LPFORMATETC pFormatEtc, ULONG *pcFetched)
     164STDMETHODIMP ShClWinEnumFormatEtc::Next(ULONG cFormats, LPFORMATETC pFormatEtc, ULONG *pcFetched)
    165165{
    166166    ULONG ulCopied  = 0;
     
    172172           && ulCopied < cFormats)
    173173    {
    174         SharedClipboardWinEnumFormatEtc::CopyFormat(&pFormatEtc[ulCopied], &m_pFormatEtc[m_nIndex]);
     174        ShClWinEnumFormatEtc::CopyFormat(&pFormatEtc[ulCopied], &m_pFormatEtc[m_nIndex]);
    175175        ulCopied++;
    176176        m_nIndex++;
     
    183183}
    184184
    185 STDMETHODIMP SharedClipboardWinEnumFormatEtc::Skip(ULONG cFormats)
     185STDMETHODIMP ShClWinEnumFormatEtc::Skip(ULONG cFormats)
    186186{
    187187    m_nIndex += cFormats;
     
    189189}
    190190
    191 STDMETHODIMP SharedClipboardWinEnumFormatEtc::Reset(void)
     191STDMETHODIMP ShClWinEnumFormatEtc::Reset(void)
    192192{
    193193    m_nIndex = 0;
     
    195195}
    196196
    197 STDMETHODIMP SharedClipboardWinEnumFormatEtc::Clone(IEnumFORMATETC **ppEnumFormatEtc)
     197STDMETHODIMP ShClWinEnumFormatEtc::Clone(IEnumFORMATETC **ppEnumFormatEtc)
    198198{
    199199    HRESULT hResult = CreateEnumFormatEtc(m_nNumFormats, m_pFormatEtc, ppEnumFormatEtc);
    200200    if (hResult == S_OK)
    201         ((SharedClipboardWinEnumFormatEtc *) *ppEnumFormatEtc)->m_nIndex = m_nIndex;
     201        ((ShClWinEnumFormatEtc *) *ppEnumFormatEtc)->m_nIndex = m_nIndex;
    202202
    203203    return hResult;
     
    205205
    206206/* static */
    207 void SharedClipboardWinEnumFormatEtc::CopyFormat(LPFORMATETC pDest, LPFORMATETC pSource)
     207void ShClWinEnumFormatEtc::CopyFormat(LPFORMATETC pDest, LPFORMATETC pSource)
    208208{
    209209    AssertPtrReturnVoid(pDest);
     
    220220
    221221/* static */
    222 HRESULT SharedClipboardWinEnumFormatEtc::CreateEnumFormatEtc(UINT nNumFormats, LPFORMATETC pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc)
     222HRESULT ShClWinEnumFormatEtc::CreateEnumFormatEtc(UINT nNumFormats, LPFORMATETC pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc)
    223223{
    224224    AssertReturn(nNumFormats, E_INVALIDARG);
     
    228228    HRESULT hr;
    229229
    230     SharedClipboardWinEnumFormatEtc *pEnumFormatEtc = new SharedClipboardWinEnumFormatEtc();
     230    ShClWinEnumFormatEtc *pEnumFormatEtc = new ShClWinEnumFormatEtc();
    231231    if (pEnumFormatEtc)
    232232    {
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp

    r103480 r103631  
    6060
    6161
    62 SharedClipboardWinStreamImpl::SharedClipboardWinStreamImpl(SharedClipboardWinDataObject *pParent, PSHCLTRANSFER pTransfer,
    63                                                            const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo)
     62ShClWinStreamImpl::ShClWinStreamImpl(ShClWinDataObject *pParent, PSHCLTRANSFER pTransfer,
     63                                     const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo)
    6464    : m_pParent(pParent)
    6565    , m_lRefCount(1) /* Our IDataObjct *always* holds the last reference to this object; needed for the callbacks. */
     
    8181}
    8282
    83 SharedClipboardWinStreamImpl::~SharedClipboardWinStreamImpl(void)
     83ShClWinStreamImpl::~ShClWinStreamImpl(void)
    8484{
    8585    LogFlowThisFuncEnter();
     
    9595 */
    9696
    97 STDMETHODIMP SharedClipboardWinStreamImpl::QueryInterface(REFIID iid, void **ppvObject)
     97STDMETHODIMP ShClWinStreamImpl::QueryInterface(REFIID iid, void **ppvObject)
    9898{
    9999    AssertPtrReturn(ppvObject, E_INVALIDARG);
     
    124124}
    125125
    126 STDMETHODIMP_(ULONG) SharedClipboardWinStreamImpl::AddRef(void)
     126STDMETHODIMP_(ULONG) ShClWinStreamImpl::AddRef(void)
    127127{
    128128    LONG lCount = InterlockedIncrement(&m_lRefCount);
     
    131131}
    132132
    133 STDMETHODIMP_(ULONG) SharedClipboardWinStreamImpl::Release(void)
     133STDMETHODIMP_(ULONG) ShClWinStreamImpl::Release(void)
    134134{
    135135    LONG lCount = InterlockedDecrement(&m_lRefCount);
     
    148148 */
    149149
    150 STDMETHODIMP SharedClipboardWinStreamImpl::Clone(IStream** ppStream)
     150STDMETHODIMP ShClWinStreamImpl::Clone(IStream** ppStream)
    151151{
    152152    RT_NOREF(ppStream);
     
    156156}
    157157
    158 STDMETHODIMP SharedClipboardWinStreamImpl::Commit(DWORD dwFrags)
     158STDMETHODIMP ShClWinStreamImpl::Commit(DWORD dwFrags)
    159159{
    160160    RT_NOREF(dwFrags);
     
    164164}
    165165
    166 STDMETHODIMP SharedClipboardWinStreamImpl::CopyTo(IStream *pDestStream, ULARGE_INTEGER nBytesToCopy, ULARGE_INTEGER *nBytesRead,
     166STDMETHODIMP ShClWinStreamImpl::CopyTo(IStream *pDestStream, ULARGE_INTEGER nBytesToCopy, ULARGE_INTEGER *nBytesRead,
    167167                                                  ULARGE_INTEGER *nBytesWritten)
    168168{
     
    173173}
    174174
    175 STDMETHODIMP SharedClipboardWinStreamImpl::LockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes,DWORD dwFlags)
     175STDMETHODIMP ShClWinStreamImpl::LockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes,DWORD dwFlags)
    176176{
    177177    RT_NOREF(nStart, nBytes, dwFlags);
     
    182182
    183183/* Note: Windows seems to assume EOF if nBytesRead < nBytesToRead. */
    184 STDMETHODIMP SharedClipboardWinStreamImpl::Read(void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead)
     184STDMETHODIMP ShClWinStreamImpl::Read(void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead)
    185185{
    186186    LogFlowThisFunc(("Enter: m_cbProcessed=%RU64\n", m_cbProcessed));
     
    249249
    250250            if (m_pParent)
    251                 m_pParent->SetStatus(SharedClipboardWinDataObject::Completed);
     251                m_pParent->SetStatus(ShClWinDataObject::Completed);
    252252        }
    253253    }
     
    256256    {
    257257        if (m_pParent)
    258             m_pParent->SetStatus(SharedClipboardWinDataObject::Error, rc /* Propagate rc */);
     258            m_pParent->SetStatus(ShClWinDataObject::Error, rc /* Propagate rc */);
    259259    }
    260260
     
    271271}
    272272
    273 STDMETHODIMP SharedClipboardWinStreamImpl::Revert(void)
    274 {
    275     LogFlowThisFuncEnter();
    276     return E_NOTIMPL;
    277 }
    278 
    279 STDMETHODIMP SharedClipboardWinStreamImpl::Seek(LARGE_INTEGER nMove, DWORD dwOrigin, ULARGE_INTEGER* nNewPos)
     273STDMETHODIMP ShClWinStreamImpl::Revert(void)
     274{
     275    LogFlowThisFuncEnter();
     276    return E_NOTIMPL;
     277}
     278
     279STDMETHODIMP ShClWinStreamImpl::Seek(LARGE_INTEGER nMove, DWORD dwOrigin, ULARGE_INTEGER* nNewPos)
    280280{
    281281    RT_NOREF(nMove, dwOrigin, nNewPos);
     
    286286}
    287287
    288 STDMETHODIMP SharedClipboardWinStreamImpl::SetSize(ULARGE_INTEGER nNewSize)
     288STDMETHODIMP ShClWinStreamImpl::SetSize(ULARGE_INTEGER nNewSize)
    289289{
    290290    RT_NOREF(nNewSize);
     
    294294}
    295295
    296 STDMETHODIMP SharedClipboardWinStreamImpl::Stat(STATSTG *pStatStg, DWORD dwFlags)
     296STDMETHODIMP ShClWinStreamImpl::Stat(STATSTG *pStatStg, DWORD dwFlags)
    297297{
    298298    HRESULT hr = S_OK;
     
    355355}
    356356
    357 STDMETHODIMP SharedClipboardWinStreamImpl::UnlockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes, DWORD dwFlags)
     357STDMETHODIMP ShClWinStreamImpl::UnlockRegion(ULARGE_INTEGER nStart, ULARGE_INTEGER nBytes, DWORD dwFlags)
    358358{
    359359    RT_NOREF(nStart, nBytes, dwFlags);
     
    363363}
    364364
    365 STDMETHODIMP SharedClipboardWinStreamImpl::Write(const void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead)
     365STDMETHODIMP ShClWinStreamImpl::Write(const void *pvBuffer, ULONG nBytesToRead, ULONG *nBytesRead)
    366366{
    367367    RT_NOREF(pvBuffer, nBytesToRead, nBytesRead);
     
    386386 */
    387387/* static */
    388 HRESULT SharedClipboardWinStreamImpl::Create(SharedClipboardWinDataObject *pParent, PSHCLTRANSFER pTransfer,
     388HRESULT ShClWinStreamImpl::Create(ShClWinDataObject *pParent, PSHCLTRANSFER pTransfer,
    389389                                             const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo,
    390390                                             IStream **ppStream)
     
    392392    AssertPtrReturn(pTransfer, E_POINTER);
    393393
    394     SharedClipboardWinStreamImpl *pStream = new SharedClipboardWinStreamImpl(pParent, pTransfer, strPath, pObjInfo);
     394    ShClWinStreamImpl *pStream = new ShClWinStreamImpl(pParent, pTransfer, strPath, pObjInfo);
    395395    if (pStream)
    396396    {
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp

    r103615 r103631  
    5454
    5555#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    56 int SharedClipboardWinTransferDropFilesToStringList(DROPFILES *pDropFiles, char **ppszList, uint32_t *pcbList);
     56int ShClWinTransferDropFilesToStringList(DROPFILES *pDropFiles, char **ppszList, uint32_t *pcbList);
    5757#endif
    5858
     
    6464 * @param   hWnd                Handle of window to open clipboard for.
    6565 */
    66 int SharedClipboardWinOpen(HWND hWnd)
     66int ShClWinOpen(HWND hWnd)
    6767{
    6868    /* "OpenClipboard fails if another window has the clipboard open."
     
    112112 * @returns VBox status code.
    113113 */
    114 int SharedClipboardWinClose(void)
     114int ShClWinClose(void)
    115115{
    116116    int rc;
     
    142142 * @returns VBox status code.
    143143 */
    144 int SharedClipboardWinClear(void)
     144int ShClWinClear(void)
    145145{
    146146    LogFlowFuncEnter();
     
    164164 * @param   pWinCtx             Shared Clipboard Windows context to initialize.
    165165 */
    166 int SharedClipboardWinCtxInit(PSHCLWINCTX pWinCtx)
     166int ShClWinCtxInit(PSHCLWINCTX pWinCtx)
    167167{
    168168    int rc = RTCritSectInit(&pWinCtx->CritSect);
     
    170170    {
    171171        /* Check that new Clipboard API is available. */
    172         SharedClipboardWinCheckAndInitNewAPI(&pWinCtx->newAPI);
     172        ShClWinCheckAndInitNewAPI(&pWinCtx->newAPI);
    173173        /* Do *not* check the rc, as the call might return VERR_SYMBOL_NOT_FOUND is the new API isn't available. */
    174174
     
    191191 * @param   pWinCtx             Shared Clipboard Windows context to destroy.
    192192 */
    193 void SharedClipboardWinCtxDestroy(PSHCLWINCTX pWinCtx)
     193void ShClWinCtxDestroy(PSHCLWINCTX pWinCtx)
    194194{
    195195    if (!pWinCtx)
     
    213213 *                              Will be set to NULL if the new API is not available.
    214214 */
    215 int SharedClipboardWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI)
     215int ShClWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI)
    216216{
    217217    RTLDRMOD hUser32 = NIL_RTLDRMOD;
     
    248248 * @param   pAPI                Structure used for checking if the new clipboard API is available or not.
    249249 */
    250 bool SharedClipboardWinIsNewAPI(PSHCLWINAPINEW pAPI)
     250bool ShClWinIsNewAPI(PSHCLWINAPINEW pAPI)
    251251{
    252252    if (!pAPI)
     
    261261 * @param   pCtx                Windows clipboard context to use to add ourselves.
    262262 */
    263 int SharedClipboardWinChainAdd(PSHCLWINCTX pCtx)
     263int ShClWinChainAdd(PSHCLWINCTX pCtx)
    264264{
    265265    const PSHCLWINAPINEW pAPI = &pCtx->newAPI;
    266266
    267267    BOOL fRc;
    268     if (SharedClipboardWinIsNewAPI(pAPI))
     268    if (ShClWinIsNewAPI(pAPI))
    269269        fRc = pAPI->pfnAddClipboardFormatListener(pCtx->hWnd);
    270270    else
     
    293293 * @param   pCtx                Windows clipboard context to use to remove ourselves.
    294294 */
    295 int SharedClipboardWinChainRemove(PSHCLWINCTX pCtx)
     295int ShClWinChainRemove(PSHCLWINCTX pCtx)
    296296{
    297297    if (!pCtx->hWnd)
     
    301301
    302302    BOOL fRc;
    303     if (SharedClipboardWinIsNewAPI(pAPI))
     303    if (ShClWinIsNewAPI(pAPI))
    304304    {
    305305        fRc = pAPI->pfnRemoveClipboardFormatListener(pCtx->hWnd);
     
    335335 * @param   lResult             Additional data to pass. Not used currently.
    336336 */
    337 VOID CALLBACK SharedClipboardWinChainPingProc(HWND hWnd, UINT uMsg, ULONG_PTR dwData, LRESULT lResult) RT_NOTHROW_DEF
     337VOID CALLBACK ShClWinChainPingProc(HWND hWnd, UINT uMsg, ULONG_PTR dwData, LRESULT lResult) RT_NOTHROW_DEF
    338338{
    339339    RT_NOREF(hWnd);
     
    357357 * @param   lParam              LPARAM to pass.
    358358 */
    359 LRESULT SharedClipboardWinChainPassToNext(PSHCLWINCTX pWinCtx,
     359LRESULT ShClWinChainPassToNext(PSHCLWINCTX pWinCtx,
    360360                                          UINT msg, WPARAM wParam, LPARAM lParam)
    361361{
     
    386386 * @param   uFormat             Windows clipboard format to convert.
    387387 */
    388 SHCLFORMAT SharedClipboardWinClipboardFormatToVBox(UINT uFormat)
     388SHCLFORMAT ShClWinClipboardFormatToVBox(UINT uFormat)
    389389{
    390390    /* Insert the requested clipboard format data into the clipboard. */
     
    445445 * @param   pfFormats           Where to store the retrieved formats.
    446446 */
    447 int SharedClipboardWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATS pfFormats)
     447int ShClWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATS pfFormats)
    448448{
    449449    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     
    453453
    454454    /* Query list of available formats and report to host. */
    455     int rc = SharedClipboardWinOpen(pCtx->hWnd);
     455    int rc = ShClWinOpen(pCtx->hWnd);
    456456    if (RT_SUCCESS(rc))
    457457    {
    458458        UINT uCurFormat = 0; /* Must be set to zero for EnumClipboardFormats(). */
    459459        while ((uCurFormat = EnumClipboardFormats(uCurFormat)) != 0)
    460             fFormats |= SharedClipboardWinClipboardFormatToVBox(uCurFormat);
    461 
    462         int rc2 = SharedClipboardWinClose();
     460            fFormats |= ShClWinClipboardFormatToVBox(uCurFormat);
     461
     462        int rc2 = ShClWinClose();
    463463        AssertRC(rc2);
    464464        LogFlowFunc(("fFormats=%#x\n", fFormats));
     
    479479 * @param   puValue     Where to return extracted value of CF_HTML field.
    480480 */
    481 int SharedClipboardWinGetCFHTMLHeaderValue(const char *pszSrc, const char *pszOption, uint32_t *puValue)
     481int ShClWinGetCFHTMLHeaderValue(const char *pszSrc, const char *pszOption, uint32_t *puValue)
    482482{
    483483    AssertPtrReturn(pszSrc, VERR_INVALID_POINTER);
     
    503503 * @param   pszSource   Source string to check.
    504504 */
    505 bool SharedClipboardWinIsCFHTML(const char *pszSource)
     505bool ShClWinIsCFHTML(const char *pszSource)
    506506{
    507507    return    RTStrStr(pszSource, "Version:") != NULL
     
    520520 * @param   pcbOutput   Where to the return length of the result (bytes/chars).
    521521 */
    522 int SharedClipboardWinConvertCFHTMLToMIME(const char *pszSource, const uint32_t cch, char **ppszOutput, uint32_t *pcbOutput)
     522int ShClWinConvertCFHTMLToMIME(const char *pszSource, const uint32_t cch, char **ppszOutput, uint32_t *pcbOutput)
    523523{
    524524    Assert(pszSource);
     
    528528
    529529    uint32_t offStart;
    530     int rc = SharedClipboardWinGetCFHTMLHeaderValue(pszSource, "StartFragment:", &offStart);
     530    int rc = ShClWinGetCFHTMLHeaderValue(pszSource, "StartFragment:", &offStart);
    531531    if (RT_SUCCESS(rc))
    532532    {
    533533        uint32_t offEnd;
    534         rc = SharedClipboardWinGetCFHTMLHeaderValue(pszSource, "EndFragment:", &offEnd);
     534        rc = ShClWinGetCFHTMLHeaderValue(pszSource, "EndFragment:", &offEnd);
    535535        if (RT_SUCCESS(rc))
    536536        {
     
    612612 * @note    Everything inside of fragment can be UTF8. Windows allows it. Everything in header should be Latin1.
    613613 */
    614 int SharedClipboardWinConvertMIMEToCFHTML(const char *pszSource, size_t cb, char **ppszOutput, uint32_t *pcbOutput)
     614int ShClWinConvertMIMEToCFHTML(const char *pszSource, size_t cb, char **ppszOutput, uint32_t *pcbOutput)
    615615{
    616616    Assert(ppszOutput);
     
    709709 * @param   lParam              lParam to pass on.
    710710 */
    711 LRESULT SharedClipboardWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx,
     711LRESULT ShClWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx,
    712712                                              HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
    713713{
     
    716716    LogFlowFuncEnter();
    717717
    718     if (SharedClipboardWinIsNewAPI(&pWinCtx->newAPI))
     718    if (ShClWinIsNewAPI(&pWinCtx->newAPI))
    719719    {
    720720        lresultRc = DefWindowProc(hWnd, msg, wParam, lParam);
     
    757757 * @param   pWinCtx             Windows context to use.
    758758 */
    759 int SharedClipboardWinHandleWMDestroy(PSHCLWINCTX pWinCtx)
     759int ShClWinHandleWMDestroy(PSHCLWINCTX pWinCtx)
    760760{
    761761    LogFlowFuncEnter();
     
    764764
    765765    /* MS recommends to remove from Clipboard chain in this callback. */
    766     SharedClipboardWinChainRemove(pWinCtx);
     766    ShClWinChainRemove(pWinCtx);
    767767
    768768    if (pWinCtx->oldAPI.timerRefresh)
     
    783783 * @param   hWnd                Window handle to use.
    784784 */
    785 int SharedClipboardWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd)
     785int ShClWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd)
    786786{
    787787    RT_NOREF(pWinCtx);
     
    792792     * windows is to be destroyed and therefore the guest side becomes inactive.
    793793     */
    794     int rc = SharedClipboardWinOpen(hWnd);
     794    int rc = ShClWinOpen(hWnd);
    795795    if (RT_SUCCESS(rc))
    796796    {
    797         SharedClipboardWinClear();
    798         SharedClipboardWinClose();
     797        ShClWinClear();
     798        ShClWinClose();
    799799    }
    800800
     
    810810 * @param   pWinCtx             Windows context to use.
    811811 */
    812 int SharedClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx)
     812int ShClWinHandleWMTimer(PSHCLWINCTX pWinCtx)
    813813{
    814814    int rc = VINF_SUCCESS;
    815815
    816     if (!SharedClipboardWinIsNewAPI(&pWinCtx->newAPI)) /* Only run when using the "old" Windows API. */
     816    if (!ShClWinIsNewAPI(&pWinCtx->newAPI)) /* Only run when using the "old" Windows API. */
    817817    {
    818818        LogFlowFuncEnter();
     
    824824        if (!hViewer || pWinCtx->oldAPI.fCBChainPingInProcess)
    825825        {
    826             SharedClipboardWinChainRemove(pWinCtx);
    827             SharedClipboardWinChainAdd(pWinCtx);
     826            ShClWinChainRemove(pWinCtx);
     827            ShClWinChainAdd(pWinCtx);
    828828       }
    829829
     
    835835       if (hViewer)
    836836           SendMessageCallback(hViewer, WM_CHANGECBCHAIN, (WPARAM)pWinCtx->hWndNextInChain, (LPARAM)pWinCtx->hWndNextInChain,
    837                                SharedClipboardWinChainPingProc, (ULONG_PTR)pWinCtx);
     837                               ShClWinChainPingProc, (ULONG_PTR)pWinCtx);
    838838    }
    839839
     
    853853 * @param   fFormats            Clipboard format(s) to announce.
    854854 */
    855 static int sharedClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats)
     855static int shClWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats)
    856856{
    857857    LogFunc(("fFormats=0x%x\n", fFormats));
     
    960960 * @param   hWnd        The window handle to use as owner.
    961961 */
    962 int SharedClipboardWinClearAndAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats, HWND hWnd)
    963 {
    964     int rc = SharedClipboardWinOpen(hWnd);
     962int ShClWinClearAndAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats, HWND hWnd)
     963{
     964    int rc = ShClWinOpen(hWnd);
    965965    if (RT_SUCCESS(rc))
    966966    {
    967         SharedClipboardWinClear();
    968 
    969         rc = sharedClipboardWinAnnounceFormats(pWinCtx, fFormats);
     967        ShClWinClear();
     968
     969        rc = shClWinAnnounceFormats(pWinCtx, fFormats);
    970970        Assert(pWinCtx->hWndClipboardOwnerUs == hWnd || pWinCtx->hWndClipboardOwnerUs == NULL);
    971971
    972         SharedClipboardWinClose();
     972        ShClWinClose();
    973973    }
    974974    return rc;
     
    985985 * @note    ASSUMES that the clipboard has already been opened.
    986986 */
    987 int SharedClipboardWinDataWrite(UINT cfFormat, void *pvData, uint32_t cbData)
     987int ShClWinDataWrite(UINT cfFormat, void *pvData, uint32_t cbData)
    988988{
    989989    AssertPtrReturn(pvData, VERR_INVALID_POINTER);
     
    10531053 * @param   pCallbacks          Callbacks table to use.
    10541054 */
    1055 int SharedClipboardWinTransferCreateAndSetDataObject(PSHCLWINCTX pWinCtx,
    1056                                                      PSHCLCONTEXT pCtx, SharedClipboardWinDataObject::PCALLBACKS pCallbacks)
     1055int ShClWinTransferCreateAndSetDataObject(PSHCLWINCTX pWinCtx,
     1056                                                     PSHCLCONTEXT pCtx, ShClWinDataObject::PCALLBACKS pCallbacks)
    10571057{
    10581058    AssertPtrReturn(pWinCtx, VERR_INVALID_POINTER);
     
    10721072         * The data object will be deleted automatically once its refcount reaches 0.
    10731073         */
    1074         SharedClipboardWinDataObject *pObj = new SharedClipboardWinDataObject();
     1074        ShClWinDataObject *pObj = new ShClWinDataObject();
    10751075        if (pObj)
    10761076        {
     
    10871087        if (RT_SUCCESS(rc))
    10881088        {
    1089             SharedClipboardWinClose();
     1089            ShClWinClose();
    10901090            /* Note: Clipboard must be closed first before calling OleSetClipboard(). */
    10911091
    1092             /** @todo There is a potential race between SharedClipboardWinClose() and OleSetClipboard(),
     1092            /** @todo There is a potential race between ShClWinClose() and OleSetClipboard(),
    10931093             *        where another application could own the clipboard (open), and thus the call to
    10941094             *        OleSetClipboard() will fail. Needs (better) fixing. */
     
    11391139 * @param   pTransfer           Shared Clipboard transfer to create implementation-specific data for.
    11401140 */
    1141 int SharedClipboardWinTransferCreate(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
     1141int ShClWinTransferCreate(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
    11421142{
    11431143    RT_NOREF(pWinCtx);
     
    11461146                    && pTransfer->cbUser == 0, ("Already initialized Windows-specific data\n"), VERR_WRONG_ORDER);
    11471147
    1148     pTransfer->pvUser = new SharedClipboardWinTransferCtx();  /** @todo Can this throw? */
     1148    pTransfer->pvUser = new ShClWinTransferCtx();  /** @todo Can this throw? */
    11491149    AssertPtrReturn(pTransfer->pvUser, VERR_INVALID_POINTER);
    1150     pTransfer->cbUser = sizeof(SharedClipboardWinTransferCtx);
     1150    pTransfer->cbUser = sizeof(ShClWinTransferCtx);
    11511151
    11521152    return VINF_SUCCESS;
     
    11601160 * @param   pTransfer           Shared Clipboard transfer to destroy implementation-specific data for.
    11611161 */
    1162 void SharedClipboardWinTransferDestroy(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
     1162void ShClWinTransferDestroy(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
    11631163{
    11641164    RT_NOREF(pWinCtx);
     
    11711171    if (pTransfer->pvUser)
    11721172    {
    1173         Assert(pTransfer->cbUser == sizeof(SharedClipboardWinTransferCtx));
    1174         SharedClipboardWinTransferCtx *pWinURITransferCtx = (SharedClipboardWinTransferCtx *)pTransfer->pvUser;
     1173        Assert(pTransfer->cbUser == sizeof(ShClWinTransferCtx));
     1174        ShClWinTransferCtx *pWinURITransferCtx = (ShClWinTransferCtx *)pTransfer->pvUser;
    11751175        AssertPtr(pWinURITransferCtx);
    11761176
     
    11991199 * @param   pObj                Data object to initialize transfer for.
    12001200 */
    1201 static int sharedClipboardWinTransferInitializeInternal(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer,
    1202                                                         SharedClipboardWinDataObject *pObj)
     1201static int shClWinTransferInitializeInternal(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer,
     1202                                             ShClWinDataObject *pObj)
    12031203{
    12041204    RT_NOREF(pWinCtx);
     
    12151215 * @param   pTransfer           Transfer to initialize for the data object.
    12161216 */
    1217 int SharedClipboardWinTransferInitialize(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
     1217int ShClWinTransferInitialize(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
    12181218{
    12191219    int rc = RTCritSectEnter(&pWinCtx->CritSect);
    12201220    if (RT_SUCCESS(rc))
    12211221    {
    1222         SharedClipboardWinDataObject *pObj = pWinCtx->pDataObjInFlight;
     1222        ShClWinDataObject *pObj = pWinCtx->pDataObjInFlight;
    12231223        if (pObj)
    12241224        {
    1225             rc = sharedClipboardWinTransferInitializeInternal(pWinCtx, pTransfer, pObj);
     1225            rc = shClWinTransferInitializeInternal(pWinCtx, pTransfer, pObj);
    12261226        }
    12271227        else /* No current in-flight data object. */
     
    12421242 * @param   pObj                Data object to start transfer for.
    12431243 */
    1244 static int sharedClipboardWinTransferStartInternal(PSHCLWINCTX pWinCtx, SharedClipboardWinDataObject *pObj)
     1244static int shClWinTransferStartInternal(PSHCLWINCTX pWinCtx, ShClWinDataObject *pObj)
    12451245{
    12461246    RT_NOREF(pWinCtx);
    12471247
    1248     return pObj->SetStatus(SharedClipboardWinDataObject::Running);
     1248    return pObj->SetStatus(ShClWinDataObject::Running);
    12491249}
    12501250
     
    12591259 * @param   pTransfer           Transfer to initialize for the data object.
    12601260 */
    1261 int SharedClipboardWinTransferStart(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
     1261int ShClWinTransferStart(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
    12621262{
    12631263    RT_NOREF(pTransfer);
     
    12661266    if (RT_SUCCESS(rc))
    12671267    {
    1268         SharedClipboardWinDataObject *pObj = pWinCtx->pDataObjInFlight;
     1268        ShClWinDataObject *pObj = pWinCtx->pDataObjInFlight;
    12691269        if (pObj)
    12701270        {
    1271             rc = sharedClipboardWinTransferStartInternal(pWinCtx, pObj);
     1271            rc = shClWinTransferStartInternal(pWinCtx, pObj);
    12721272            if (RT_SUCCESS(rc))
    12731273                pWinCtx->pDataObjInFlight = NULL; /* Hand off to Windows on success. */
     
    12911291 * @param   pTransfer           Transfer to get roots for.
    12921292 */
    1293 int SharedClipboardWinTransferGetRootsFromClipboard(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
     1293int ShClWinTransferGetRootsFromClipboard(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer)
    12941294{
    12951295    AssertPtrReturn(pWinCtx,   VERR_INVALID_POINTER);
     
    12981298    Assert(ShClTransferGetSource(pTransfer) == SHCLSOURCE_LOCAL); /* Sanity. */
    12991299
    1300     int rc = SharedClipboardWinOpen(pWinCtx->hWnd);
     1300    int rc = ShClWinOpen(pWinCtx->hWnd);
    13011301    if (RT_SUCCESS(rc))
    13021302    {
     
    13111311                char    *pszList = NULL;
    13121312                uint32_t cbList;
    1313                 rc = SharedClipboardWinTransferDropFilesToStringList((DROPFILES *)hDrop, &pszList, &cbList);
     1313                rc = ShClWinTransferDropFilesToStringList((DROPFILES *)hDrop, &pszList, &cbList);
    13141314
    13151315                GlobalUnlock(hClip);
     
    13281328                    GetLastError()));
    13291329
    1330         SharedClipboardWinClose();
     1330        ShClWinClose();
    13311331    }
    13321332
     
    13461346 *                              Includes zero terminator.
    13471347 */
    1348 int SharedClipboardWinTransferDropFilesToStringList(DROPFILES *pDropFiles, char **ppszList, uint32_t *pcbList)
     1348int ShClWinTransferDropFilesToStringList(DROPFILES *pDropFiles, char **ppszList, uint32_t *pcbList)
    13491349{
    13501350    AssertPtrReturn(pDropFiles, VERR_INVALID_POINTER);
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