Changeset 78809 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/ClipboardProvider.cpp
- Timestamp:
- May 28, 2019 10:54:53 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardProvider.cpp
r78727 r78809 34 34 #include <VBox/log.h> 35 35 36 37 36 38 SharedClipboardProvider::SharedClipboardProvider(void) 37 39 : m_cRefs(0) 38 40 { 41 LogFlowFuncEnter(); 39 42 } 40 43 41 44 SharedClipboardProvider::~SharedClipboardProvider(void) 42 45 { 46 LogFlowFuncEnter(); 43 47 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 */ 57 SharedClipboardProvider *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; 44 80 } 45 81 … … 51 87 uint32_t SharedClipboardProvider::AddRef(void) 52 88 { 89 LogFlowFuncEnter(); 53 90 return ASMAtomicIncU32(&m_cRefs); 54 91 } … … 61 98 uint32_t SharedClipboardProvider::Release(void) 62 99 { 100 LogFlowFuncEnter(); 63 101 Assert(m_cRefs); 64 102 return ASMAtomicDecU32(&m_cRefs); 65 103 } 66 104 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.