Changeset 78390 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- May 6, 2019 1:49:30 PM (6 years ago)
- Location:
- trunk/src/VBox/GuestHost/SharedClipboard
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardFiles.cpp
r78307 r78390 1 1 /* $Id$ */ 2 2 /** @file 3 * DnD- Directory handling.3 * Shared Clipboard - Directory handling. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 201 4-2019 Oracle Corporation7 * Copyright (C) 2019 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_ GUEST_DND23 #include <VBox/GuestHost/ DragAndDrop.h>22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 23 #include <VBox/GuestHost/SharedClipboard-uri.h> 24 24 25 25 #include <iprt/assert.h> … … 33 33 #include <VBox/log.h> 34 34 35 DnDDroppedFiles::DnDDroppedFiles(void)35 SharedClipboardDroppedFiles::SharedClipboardDroppedFiles(void) 36 36 : m_fOpen(0) 37 37 , m_hDir(NULL) { } 38 38 39 DnDDroppedFiles::DnDDroppedFiles(const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */) 39 SharedClipboardDroppedFiles::SharedClipboardDroppedFiles(const char *pszPath, 40 SHAREDCLIPBOARDURIDROPPEDFILEFLAGS fFlags /* = SHAREDCLIPBOARDURIDROPPEDFILE_FLAGS_NONE */) 40 41 : m_fOpen(0) 41 42 , m_hDir(NULL) … … 44 45 } 45 46 46 DnDDroppedFiles::~DnDDroppedFiles(void)47 SharedClipboardDroppedFiles::~SharedClipboardDroppedFiles(void) 47 48 { 48 49 /* Only make sure to not leak any handles and stuff, don't delete any … … 51 52 } 52 53 53 int DnDDroppedFiles::AddFile(const char *pszFile)54 int SharedClipboardDroppedFiles::AddFile(const char *pszFile) 54 55 { 55 56 AssertPtrReturn(pszFile, VERR_INVALID_POINTER); … … 60 61 } 61 62 62 int DnDDroppedFiles::AddDir(const char *pszDir)63 int SharedClipboardDroppedFiles::AddDir(const char *pszDir) 63 64 { 64 65 AssertPtrReturn(pszDir, VERR_INVALID_POINTER); … … 69 70 } 70 71 71 int DnDDroppedFiles::closeInternal(void)72 int SharedClipboardDroppedFiles::closeInternal(void) 72 73 { 73 74 int rc; … … 85 86 } 86 87 87 int DnDDroppedFiles::Close(void)88 int SharedClipboardDroppedFiles::Close(void) 88 89 { 89 90 return closeInternal(); 90 91 } 91 92 92 const char * DnDDroppedFiles::GetDirAbs(void) const93 const char *SharedClipboardDroppedFiles::GetDirAbs(void) const 93 94 { 94 95 return this->m_strPathAbs.c_str(); 95 96 } 96 97 97 bool DnDDroppedFiles::IsOpen(void) const98 bool SharedClipboardDroppedFiles::IsOpen(void) const 98 99 { 99 100 return (this->m_hDir != NULL); 100 101 } 101 102 102 int DnDDroppedFiles::OpenEx(const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)103 int SharedClipboardDroppedFiles::OpenEx(const char *pszPath, SHAREDCLIPBOARDURIDROPPEDFILEFLAGS fFlags /* = SHAREDCLIPBOARDURIDROPPEDFILE_FLAGS_NONE */) 103 104 { 104 105 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); … … 117 118 118 119 /* Append our base drop directory. */ 119 rc = RTPathAppend(pszDropDir, sizeof(pszDropDir), "VirtualBox Dropped Files"); /** @todo Make this tag configurable? */120 rc = RTPathAppend(pszDropDir, sizeof(pszDropDir), "VirtualBox Shared Clipboard Files"); /** @todo Make this tag configurable? */ 120 121 if (RT_FAILURE(rc)) 121 122 break; … … 139 140 } 140 141 141 rc = DnDPathSanitizeFilename(pszTime, sizeof(pszTime));142 rc = SharedClipboardPathSanitizeFilename(pszTime, sizeof(pszTime)); 142 143 if (RT_FAILURE(rc)) 143 144 break; … … 167 168 } 168 169 169 int DnDDroppedFiles::OpenTemp(DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)170 int SharedClipboardDroppedFiles::OpenTemp(SHAREDCLIBOARDURIDROPPEDFILEFLAGS fFlags /* = SHAREDCLIPBOARDURIDROPPEDFILE_FLAGS_NONE */) 170 171 { 171 172 AssertReturn(fFlags == 0, VERR_INVALID_PARAMETER); /* Flags not supported yet. */ … … 184 185 } 185 186 186 int DnDDroppedFiles::Reset(bool fRemoveDropDir)187 int SharedClipboardDroppedFiles::Reset(bool fRemoveDropDir) 187 188 { 188 189 int rc = closeInternal(); … … 204 205 } 205 206 206 int DnDDroppedFiles::Reopen(void)207 int SharedClipboardDroppedFiles::Reopen(void) 207 208 { 208 209 if (this->m_strPathAbs.isEmpty()) … … 212 213 } 213 214 214 int DnDDroppedFiles::Rollback(void)215 int SharedClipboardDroppedFiles::Rollback(void) 215 216 { 216 217 if (this->m_strPathAbs.isEmpty()) -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardMIME.cpp
r78307 r78390 1 1 /* $Id$ */ 2 2 /** @file 3 * DnD- Path list class.3 * Shared Clipboard - Path list class. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 201 4-2019 Oracle Corporation7 * Copyright (C) 2019 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_ GUEST_DND23 #include <VBox/GuestHost/ DragAndDrop.h>22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 23 #include <VBox/GuestHost/SharedClipboard-uri.h> 24 24 25 25 #include <iprt/string.h> 26 26 27 27 28 bool DnDMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax)28 bool SharedClipboardMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax) 29 29 { 30 30 /** @todo "text/uri" also an official variant? */ … … 33 33 } 34 34 35 bool DnDMIMENeedsDropDir(const char *pcszFormat, size_t cchFormatMax)35 bool SharedClipboardMIMENeedsDropDir(const char *pcszFormat, size_t cchFormatMax) 36 36 { 37 37 bool fNeedsDropDir = false; -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
r78307 r78390 1 1 /* $Id$ */ 2 2 /** @file 3 * DnD- Path handling.3 * Shared Clipboard - Path handling. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 201 4-2019 Oracle Corporation7 * Copyright (C) 2019 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_ GUEST_DND23 #include <VBox/GuestHost/ DragAndDrop.h>22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 23 #include <VBox/GuestHost/SharedClipboard-uri.h> 24 24 25 25 #include <iprt/err.h> … … 36 36 * @param cbPath Size (in bytes) of path to sanitize. 37 37 */ 38 int DnDPathSanitizeFilename(char *pszPath, size_t cbPath)38 int SharedClipboardPathSanitizeFilename(char *pszPath, size_t cbPath) 39 39 { 40 40 int rc = VINF_SUCCESS; … … 64 64 } 65 65 66 int DnDPathSanitize(char *pszPath, size_t cbPath)66 int SharedClipboardPathSanitize(char *pszPath, size_t cbPath) 67 67 { 68 68 /** @todo */ -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp
r78307 r78390 1 1 /* $Id$ */ 2 2 /** @file 3 * DnD- URI list class.3 * Shared Clipboard - URI list class. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 201 4-2019 Oracle Corporation7 * Copyright (C) 2019 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_ GUEST_DND23 #include <VBox/GuestHost/ DragAndDrop.h>22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 23 #include <VBox/GuestHost/SharedClipboard-uri.h> 24 24 25 25 #include <iprt/dir.h> … … 35 35 36 36 37 DnDURIList::DnDURIList(void)37 SharedClipboardURIList::SharedClipboardURIList(void) 38 38 : m_cTotal(0) 39 39 , m_cbTotal(0) … … 41 41 } 42 42 43 DnDURIList::~DnDURIList(void)43 SharedClipboardURIList::~SharedClipboardURIList(void) 44 44 { 45 45 Clear(); 46 46 } 47 47 48 int DnDURIList::addEntry(const char *pcszSource, const char *pcszTarget, DNDURILISTFLAGS fFlags)48 int SharedClipboardURIList::addEntry(const char *pcszSource, const char *pcszTarget, SHAREDCLIPBOARDURILISTFLAGS fFlags) 49 49 { 50 50 AssertPtrReturn(pcszSource, VERR_INVALID_POINTER); … … 62 62 pcszSource, pcszTarget, (uint64_t)objInfo.cbObject, objInfo.Attr.fMode)); 63 63 64 DnDURIObject *pObjFile = new DnDURIObject(DnDURIObject::Type_File, pcszSource, pcszTarget);64 SharedClipboardURIObject *pObjFile = new SharedClipboardURIObject(SharedClipboardURIObject::Type_File, pcszSource, pcszTarget); 65 65 if (pObjFile) 66 66 { 67 67 /** @todo Add a standard fOpen mode for this list. */ 68 rc = pObjFile->Open( DnDURIObject::View_Source, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE);68 rc = pObjFile->Open(SharedClipboardURIObject::View_Source, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE); 69 69 if (RT_SUCCESS(rc)) 70 70 { … … 74 74 m_cbTotal += pObjFile->GetSize(); 75 75 76 if (!(fFlags & DNDURILIST_FLAGS_KEEP_OPEN)) /* Shall we keep the file open while being added to this list? */76 if (!(fFlags & SHAREDCLIPBOARDURILIST_FLAGS_KEEP_OPEN)) /* Shall we keep the file open while being added to this list? */ 77 77 pObjFile->Close(); 78 78 } … … 87 87 LogFlowFunc(("Directory '%s' -> '%s' (file mode 0x%x)\n", pcszSource, pcszTarget, objInfo.Attr.fMode)); 88 88 89 DnDURIObject *pObjDir = new DnDURIObject(DnDURIObject::Type_Directory, pcszSource, pcszTarget);89 SharedClipboardURIObject *pObjDir = new SharedClipboardURIObject(SharedClipboardURIObject::Type_Directory, pcszSource, pcszTarget); 90 90 if (pObjDir) 91 91 { 92 92 m_lstTree.append(pObjDir); 93 93 94 /** @todo Add DNDURILIST_FLAGS_KEEP_OPEN handling? */94 /** @todo Add SHAREDCLIPBOARDURILIST_FLAGS_KEEP_OPEN handling? */ 95 95 m_cTotal++; 96 96 } … … 107 107 } 108 108 109 int DnDURIList::appendPathRecursive(const char *pcszSrcPath,109 int SharedClipboardURIList::appendPathRecursive(const char *pcszSrcPath, 110 110 const char *pcszDstPath, const char *pcszDstBase, size_t cchDstBase, 111 DNDURILISTFLAGS fFlags)111 SHAREDCLIPBOARDURILISTFLAGS fFlags) 112 112 { 113 113 AssertPtrReturn(pcszSrcPath, VERR_INVALID_POINTER); … … 192 192 case RTFS_TYPE_SYMLINK: 193 193 { 194 if (fFlags & DNDURILIST_FLAGS_RESOLVE_SYMLINKS)194 if (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS) 195 195 { 196 196 char *pszSrc = RTPathRealDup(pcszDstBase); … … 239 239 else if (RTFS_IS_SYMLINK(objInfo.Attr.fMode)) 240 240 { 241 if (fFlags & DNDURILIST_FLAGS_RESOLVE_SYMLINKS)241 if (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS) 242 242 { 243 243 char *pszSrc = RTPathRealDup(pcszSrcPath); … … 275 275 } 276 276 277 int DnDURIList::AppendNativePath(const char *pszPath, DNDURILISTFLAGS fFlags)277 int SharedClipboardURIList::AppendNativePath(const char *pszPath, SHAREDCLIPBOARDURILISTFLAGS fFlags) 278 278 { 279 279 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); … … 303 303 } 304 304 305 int DnDURIList::AppendNativePathsFromList(const char *pszNativePaths, size_t cbNativePaths,306 DNDURILISTFLAGS fFlags)305 int SharedClipboardURIList::AppendNativePathsFromList(const char *pszNativePaths, size_t cbNativePaths, 306 SHAREDCLIPBOARDURILISTFLAGS fFlags) 307 307 { 308 308 AssertPtrReturn(pszNativePaths, VERR_INVALID_POINTER); … … 314 314 } 315 315 316 int DnDURIList::AppendNativePathsFromList(const RTCList<RTCString> &lstNativePaths,317 DNDURILISTFLAGS fFlags)316 int SharedClipboardURIList::AppendNativePathsFromList(const RTCList<RTCString> &lstNativePaths, 317 SHAREDCLIPBOARDURILISTFLAGS fFlags) 318 318 { 319 319 int rc = VINF_SUCCESS; … … 331 331 } 332 332 333 int DnDURIList::AppendURIPath(const char *pszURI, DNDURILISTFLAGS fFlags)333 int SharedClipboardURIList::AppendURIPath(const char *pszURI, SHAREDCLIPBOARDURILISTFLAGS fFlags) 334 334 { 335 335 AssertPtrReturn(pszURI, VERR_INVALID_POINTER); 336 AssertReturn(!(fFlags & ~ DNDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);336 AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS); 337 337 /** @todo Check for string termination? */ 338 338 … … 380 380 { 381 381 Assert(pszFileName >= pszSrcPath); 382 size_t cchDstBase = (fFlags & DNDURILIST_FLAGS_ABSOLUTE_PATHS)382 size_t cchDstBase = (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_ABSOLUTE_PATHS) 383 383 ? 0 /* Use start of path as root. */ 384 384 : pszFileName - pszSrcPath; … … 404 404 } 405 405 406 int DnDURIList::AppendURIPathsFromList(const char *pszURIPaths, size_t cbURIPaths,407 DNDURILISTFLAGS fFlags)406 int SharedClipboardURIList::AppendURIPathsFromList(const char *pszURIPaths, size_t cbURIPaths, 407 SHAREDCLIPBOARDURILISTFLAGS fFlags) 408 408 { 409 409 AssertPtrReturn(pszURIPaths, VERR_INVALID_POINTER); … … 415 415 } 416 416 417 int DnDURIList::AppendURIPathsFromList(const RTCList<RTCString> &lstURI,418 DNDURILISTFLAGS fFlags)417 int SharedClipboardURIList::AppendURIPathsFromList(const RTCList<RTCString> &lstURI, 418 SHAREDCLIPBOARDURILISTFLAGS fFlags) 419 419 { 420 420 int rc = VINF_SUCCESS; … … 433 433 } 434 434 435 void DnDURIList::Clear(void)435 void SharedClipboardURIList::Clear(void) 436 436 { 437 437 m_lstRoot.clear(); … … 439 439 for (size_t i = 0; i < m_lstTree.size(); i++) 440 440 { 441 DnDURIObject *pCurObj = m_lstTree.at(i);441 SharedClipboardURIObject *pCurObj = m_lstTree.at(i); 442 442 AssertPtr(pCurObj); 443 443 RTMemFree(pCurObj); … … 449 449 } 450 450 451 void DnDURIList::RemoveFirst(void)451 void SharedClipboardURIList::RemoveFirst(void) 452 452 { 453 453 if (m_lstTree.isEmpty()) 454 454 return; 455 455 456 DnDURIObject *pCurObj = m_lstTree.first();456 SharedClipboardURIObject *pCurObj = m_lstTree.first(); 457 457 AssertPtr(pCurObj); 458 458 … … 467 467 } 468 468 469 int DnDURIList::SetFromURIData(const void *pvData, size_t cbData, DNDURILISTFLAGS fFlags)469 int SharedClipboardURIList::SetFromURIData(const void *pvData, size_t cbData, SHAREDCLIPBOARDURILISTFLAGS fFlags) 470 470 { 471 471 Assert(fFlags == 0); RT_NOREF1(fFlags); … … 494 494 if (pszFilePath) 495 495 { 496 rc = DnDPathSanitize(pszFilePath, strlen(pszFilePath));496 rc = SharedClipboardPathSanitize(pszFilePath, strlen(pszFilePath)); 497 497 if (RT_SUCCESS(rc)) 498 498 { … … 513 513 } 514 514 515 RTCString DnDURIList::GetRootEntries(const RTCString &strPathBase /* = "" */,515 RTCString SharedClipboardURIList::GetRootEntries(const RTCString &strPathBase /* = "" */, 516 516 const RTCString &strSeparator /* = "\r\n" */) const 517 517 { -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp
r78307 r78390 1 1 /* $Id$ */ 2 2 /** @file 3 * DnD- URI object class. For handling creation/reading/writing to files and directories on host or guest side.3 * Shared Clipboard - URI object class. For handling creation/reading/writing to files and directories on host or guest side. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 201 4-2019 Oracle Corporation7 * Copyright (C) 2019 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_ GUEST_DND23 #include <VBox/GuestHost/ DragAndDrop.h>22 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD 23 #include <VBox/GuestHost/SharedClipboard-uri.h> 24 24 25 25 #include <iprt/dir.h> … … 33 33 34 34 35 DnDURIObject::DnDURIObject(void)35 SharedClipboardURIObject::SharedClipboardURIObject(void) 36 36 : m_enmType(Type_Unknown) 37 37 , m_enmView(View_Unknown) … … 40 40 } 41 41 42 DnDURIObject::DnDURIObject(Type enmType,43 const RTCString &strSrcPathAbs /* = 0 */,44 const RTCString &strDstPathAbs /* = 0 */)42 SharedClipboardURIObject::SharedClipboardURIObject(Type enmType, 43 const RTCString &strSrcPathAbs /* = 0 */, 44 const RTCString &strDstPathAbs /* = 0 */) 45 45 : m_enmType(enmType) 46 46 , m_enmView(View_Unknown) … … 69 69 } 70 70 71 DnDURIObject::~DnDURIObject(void)71 SharedClipboardURIObject::~SharedClipboardURIObject(void) 72 72 { 73 73 closeInternal(); … … 78 78 * 79 79 */ 80 void DnDURIObject::closeInternal(void)80 void SharedClipboardURIObject::closeInternal(void) 81 81 { 82 82 LogFlowThisFuncEnter(); … … 109 109 * This also closes the internal handles associated with the object (to files / ...). 110 110 */ 111 void DnDURIObject::Close(void)111 void SharedClipboardURIObject::Close(void) 112 112 { 113 113 closeInternal(); … … 119 119 * @return File / directory mode. 120 120 */ 121 RTFMODE DnDURIObject::GetMode(void) const121 RTFMODE SharedClipboardURIObject::GetMode(void) const 122 122 { 123 123 switch (m_enmType) … … 140 140 * Returns the bytes already processed (read / written). 141 141 * 142 * Note: Only applies if the object is of type DnDURIObject::Type_File.142 * Note: Only applies if the object is of type SharedClipboardURIObject::Type_File. 143 143 * 144 144 * @return Bytes already processed (read / written). 145 145 */ 146 uint64_t DnDURIObject::GetProcessed(void) const146 uint64_t SharedClipboardURIObject::GetProcessed(void) const 147 147 { 148 148 if (m_enmType == Type_File) … … 155 155 * Returns the file's logical size (in bytes). 156 156 * 157 * Note: Only applies if the object is of type DnDURIObject::Type_File.157 * Note: Only applies if the object is of type SharedClipboardURIObject::Type_File. 158 158 * 159 159 * @return The file's logical size (in bytes). 160 160 */ 161 uint64_t DnDURIObject::GetSize(void) const161 uint64_t SharedClipboardURIObject::GetSize(void) const 162 162 { 163 163 if (m_enmType == Type_File) … … 173 173 * @return True if complete, False if not. 174 174 */ 175 bool DnDURIObject::IsComplete(void) const175 bool SharedClipboardURIObject::IsComplete(void) const 176 176 { 177 177 bool fComplete; … … 199 199 * Returns whether the object is in an open state or not. 200 200 */ 201 bool DnDURIObject::IsOpen(void) const201 bool SharedClipboardURIObject::IsOpen(void) const 202 202 { 203 203 switch (m_enmType) … … 219 219 * @param fMode File mode to use. 220 220 */ 221 int DnDURIObject::Open(View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */)221 int SharedClipboardURIObject::Open(View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */) 222 222 { 223 223 return OpenEx( enmView == View_Source 224 224 ? m_strSrcPathAbs : m_strTgtPathAbs 225 , enmView, fOpen, fMode, DNDURIOBJECT_FLAGS_NONE);225 , enmView, fOpen, fMode, SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE); 226 226 } 227 227 … … 234 234 * @param fOpen Open mode to use; only valid for file objects. 235 235 * @param fMode File mode to use; only valid for file objects. 236 * @param fFlags Additional DnDURI object flags.237 */ 238 int DnDURIObject::OpenEx(const RTCString &strPathAbs, View enmView,239 uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */, DNDURIOBJECTFLAGS fFlags /* = DNDURIOBJECT_FLAGS_NONE */)240 { 241 AssertReturn(!(fFlags & ~ DNDURIOBJECT_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);236 * @param fFlags Additional Shared Clipboard URI object flags. 237 */ 238 int SharedClipboardURIObject::OpenEx(const RTCString &strPathAbs, View enmView, 239 uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */, SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */) 240 { 241 AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURIOBJECT_FLAGS_VALID_MASK), VERR_INVALID_FLAGS); 242 242 RT_NOREF1(fFlags); 243 243 … … 328 328 * @param enmView View to use for querying information. Currently ignored. 329 329 */ 330 int DnDURIObject::queryInfoInternal(View enmView)330 int SharedClipboardURIObject::queryInfoInternal(View enmView) 331 331 { 332 332 RT_NOREF(enmView); … … 360 360 * @param enmView View to use for querying information. 361 361 */ 362 int DnDURIObject::QueryInfo(View enmView)362 int SharedClipboardURIObject::QueryInfo(View enmView) 363 363 { 364 364 return queryInfoInternal(enmView); … … 374 374 * @param strBaseNew New base path to rebase to. 375 375 * 376 ** @todo Put this into an own class like DnDURIPath : public RTCString?376 ** @todo Put this into an own class like SharedClipboardURIPath : public RTCString? 377 377 */ 378 378 /* static */ 379 int DnDURIObject::RebaseURIPath(RTCString &strPathAbs,379 int SharedClipboardURIObject::RebaseURIPath(RTCString &strPathAbs, 380 380 const RTCString &strBaseOld /* = "" */, 381 381 const RTCString &strBaseNew /* = "" */) … … 439 439 * @param pcbRead Pointer where to store how many bytes were read. Optional. 440 440 */ 441 int DnDURIObject::Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead)441 int SharedClipboardURIObject::Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead) 442 442 { 443 443 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); … … 495 495 * Resets the object's state and closes all related handles. 496 496 */ 497 void DnDURIObject::Reset(void)497 void SharedClipboardURIObject::Reset(void) 498 498 { 499 499 LogFlowThisFuncEnter(); … … 512 512 * Sets the bytes to process by the object. 513 513 * 514 * Note: Only applies if the object is of type DnDURIObject::Type_File.514 * Note: Only applies if the object is of type SharedClipboardURIObject::Type_File. 515 515 * 516 516 * @return IPRT return code. 517 517 * @param cbSize Size (in bytes) to process. 518 518 */ 519 int DnDURIObject::SetSize(uint64_t cbSize)519 int SharedClipboardURIObject::SetSize(uint64_t cbSize) 520 520 { 521 521 AssertReturn(m_enmType == Type_File, VERR_INVALID_PARAMETER); … … 535 535 * @param pcbWritten Pointer where to store how many bytes were written. Optional. 536 536 */ 537 int DnDURIObject::Write(const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten)537 int SharedClipboardURIObject::Write(const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten) 538 538 { 539 539 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
Note:
See TracChangeset
for help on using the changeset viewer.