VirtualBox

Ignore:
Timestamp:
May 28, 2019 10:54:53 AM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardProvider.cpp

    r78727 r78809  
    3434#include <VBox/log.h>
    3535
     36
     37
    3638SharedClipboardProvider::SharedClipboardProvider(void)
    3739    : m_cRefs(0)
    3840{
     41    LogFlowFuncEnter();
    3942}
    4043
    4144SharedClipboardProvider::~SharedClipboardProvider(void)
    4245{
     46    LogFlowFuncEnter();
    4347    Assert(m_cRefs == 0);
     48}
     49
     50/**
     51 * Creates a Shared Clipboard provider.
     52 *
     53 * @returns New Shared Clipboard provider instance.
     54 * @param   enmSource           Source type to create provider for.
     55 */
     56/* static */
     57SharedClipboardProvider *SharedClipboardProvider::Create(SourceType enmSource)
     58{
     59    SharedClipboardProvider *pProvider = NULL;
     60
     61    switch (enmSource)
     62    {
     63#ifdef VBOX_WITH_SHARED_CLIPBOARD_GUEST
     64        case SourceType_VbglR3:
     65            pProvider = new SharedClipboardProviderVbglR3();
     66            break;
     67#endif
     68
     69#ifdef VBOX_WITH_SHARED_CLIPBOARD_HOST
     70        case SourceType_HostService:
     71            pProvider = new SharedClipboardProviderHostService();
     72            break;
     73#endif
     74        default:
     75            AssertFailed();
     76            break;
     77    }
     78
     79    return pProvider;
    4480}
    4581
     
    5187uint32_t SharedClipboardProvider::AddRef(void)
    5288{
     89    LogFlowFuncEnter();
    5390    return ASMAtomicIncU32(&m_cRefs);
    5491}
     
    6198uint32_t SharedClipboardProvider::Release(void)
    6299{
     100    LogFlowFuncEnter();
    63101    Assert(m_cRefs);
    64102    return ASMAtomicDecU32(&m_cRefs);
    65103}
    66104
    67 int SharedClipboardProvider::SetSource(SourceType enmSource)
    68 {
    69     return m_enmSource = enmSource;
    70 }
    71 
    72 int SharedClipboardProvider::ReadMetaData(SharedClipboardURIList &URIList, uint32_t fFlags /* = 0 */)
    73 {
    74     int rc = VINF_SUCCESS;
    75 
    76     RT_NOREF(URIList, fFlags);
    77 
    78     return rc;
    79 }
    80 
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