VirtualBox

Ignore:
Timestamp:
May 6, 2019 1:49:30 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Updated GuestHost (common) code.

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

Legend:

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

    r78307 r78390  
    11/* $Id$ */
    22/** @file
    3  * DnD - Directory handling.
     3 * Shared Clipboard - Directory handling.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2019 Oracle Corporation
     7 * Copyright (C) 2019 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #define LOG_GROUP LOG_GROUP_GUEST_DND
    23 #include <VBox/GuestHost/DragAndDrop.h>
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
     23#include <VBox/GuestHost/SharedClipboard-uri.h>
    2424
    2525#include <iprt/assert.h>
     
    3333#include <VBox/log.h>
    3434
    35 DnDDroppedFiles::DnDDroppedFiles(void)
     35SharedClipboardDroppedFiles::SharedClipboardDroppedFiles(void)
    3636    : m_fOpen(0)
    3737    , m_hDir(NULL) { }
    3838
    39 DnDDroppedFiles::DnDDroppedFiles(const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)
     39SharedClipboardDroppedFiles::SharedClipboardDroppedFiles(const char *pszPath,
     40                                                         SHAREDCLIPBOARDURIDROPPEDFILEFLAGS fFlags /* = SHAREDCLIPBOARDURIDROPPEDFILE_FLAGS_NONE */)
    4041    : m_fOpen(0)
    4142    , m_hDir(NULL)
     
    4445}
    4546
    46 DnDDroppedFiles::~DnDDroppedFiles(void)
     47SharedClipboardDroppedFiles::~SharedClipboardDroppedFiles(void)
    4748{
    4849    /* Only make sure to not leak any handles and stuff, don't delete any
     
    5152}
    5253
    53 int DnDDroppedFiles::AddFile(const char *pszFile)
     54int SharedClipboardDroppedFiles::AddFile(const char *pszFile)
    5455{
    5556    AssertPtrReturn(pszFile, VERR_INVALID_POINTER);
     
    6061}
    6162
    62 int DnDDroppedFiles::AddDir(const char *pszDir)
     63int SharedClipboardDroppedFiles::AddDir(const char *pszDir)
    6364{
    6465    AssertPtrReturn(pszDir, VERR_INVALID_POINTER);
     
    6970}
    7071
    71 int DnDDroppedFiles::closeInternal(void)
     72int SharedClipboardDroppedFiles::closeInternal(void)
    7273{
    7374    int rc;
     
    8586}
    8687
    87 int DnDDroppedFiles::Close(void)
     88int SharedClipboardDroppedFiles::Close(void)
    8889{
    8990    return closeInternal();
    9091}
    9192
    92 const char *DnDDroppedFiles::GetDirAbs(void) const
     93const char *SharedClipboardDroppedFiles::GetDirAbs(void) const
    9394{
    9495    return this->m_strPathAbs.c_str();
    9596}
    9697
    97 bool DnDDroppedFiles::IsOpen(void) const
     98bool SharedClipboardDroppedFiles::IsOpen(void) const
    9899{
    99100    return (this->m_hDir != NULL);
    100101}
    101102
    102 int DnDDroppedFiles::OpenEx(const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)
     103int SharedClipboardDroppedFiles::OpenEx(const char *pszPath, SHAREDCLIPBOARDURIDROPPEDFILEFLAGS fFlags /* = SHAREDCLIPBOARDURIDROPPEDFILE_FLAGS_NONE */)
    103104{
    104105    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
     
    117118
    118119        /* 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? */
    120121        if (RT_FAILURE(rc))
    121122            break;
     
    139140        }
    140141
    141         rc = DnDPathSanitizeFilename(pszTime, sizeof(pszTime));
     142        rc = SharedClipboardPathSanitizeFilename(pszTime, sizeof(pszTime));
    142143        if (RT_FAILURE(rc))
    143144            break;
     
    167168}
    168169
    169 int DnDDroppedFiles::OpenTemp(DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)
     170int SharedClipboardDroppedFiles::OpenTemp(SHAREDCLIBOARDURIDROPPEDFILEFLAGS fFlags /* = SHAREDCLIPBOARDURIDROPPEDFILE_FLAGS_NONE */)
    170171{
    171172    AssertReturn(fFlags == 0, VERR_INVALID_PARAMETER); /* Flags not supported yet. */
     
    184185}
    185186
    186 int DnDDroppedFiles::Reset(bool fRemoveDropDir)
     187int SharedClipboardDroppedFiles::Reset(bool fRemoveDropDir)
    187188{
    188189    int rc = closeInternal();
     
    204205}
    205206
    206 int DnDDroppedFiles::Reopen(void)
     207int SharedClipboardDroppedFiles::Reopen(void)
    207208{
    208209    if (this->m_strPathAbs.isEmpty())
     
    212213}
    213214
    214 int DnDDroppedFiles::Rollback(void)
     215int SharedClipboardDroppedFiles::Rollback(void)
    215216{
    216217    if (this->m_strPathAbs.isEmpty())
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardMIME.cpp

    r78307 r78390  
    11/* $Id$ */
    22/** @file
    3  * DnD - Path list class.
     3 * Shared Clipboard - Path list class.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2019 Oracle Corporation
     7 * Copyright (C) 2019 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #define LOG_GROUP LOG_GROUP_GUEST_DND
    23 #include <VBox/GuestHost/DragAndDrop.h>
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
     23#include <VBox/GuestHost/SharedClipboard-uri.h>
    2424
    2525#include <iprt/string.h>
    2626
    2727
    28 bool DnDMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax)
     28bool SharedClipboardMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax)
    2929{
    3030    /** @todo "text/uri" also an official variant? */
     
    3333}
    3434
    35 bool DnDMIMENeedsDropDir(const char *pcszFormat, size_t cchFormatMax)
     35bool SharedClipboardMIMENeedsDropDir(const char *pcszFormat, size_t cchFormatMax)
    3636{
    3737    bool fNeedsDropDir = false;
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp

    r78307 r78390  
    11/* $Id$ */
    22/** @file
    3  * DnD - Path handling.
     3 * Shared Clipboard - Path handling.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2019 Oracle Corporation
     7 * Copyright (C) 2019 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #define LOG_GROUP LOG_GROUP_GUEST_DND
    23 #include <VBox/GuestHost/DragAndDrop.h>
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
     23#include <VBox/GuestHost/SharedClipboard-uri.h>
    2424
    2525#include <iprt/err.h>
     
    3636 * @param   cbPath              Size (in bytes) of path to sanitize.
    3737 */
    38 int DnDPathSanitizeFilename(char *pszPath, size_t cbPath)
     38int SharedClipboardPathSanitizeFilename(char *pszPath, size_t cbPath)
    3939{
    4040    int rc = VINF_SUCCESS;
     
    6464}
    6565
    66 int DnDPathSanitize(char *pszPath, size_t cbPath)
     66int SharedClipboardPathSanitize(char *pszPath, size_t cbPath)
    6767{
    6868    /** @todo */
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp

    r78307 r78390  
    11/* $Id$ */
    22/** @file
    3  * DnD - URI list class.
     3 * Shared Clipboard - URI list class.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2019 Oracle Corporation
     7 * Copyright (C) 2019 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #define LOG_GROUP LOG_GROUP_GUEST_DND
    23 #include <VBox/GuestHost/DragAndDrop.h>
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
     23#include <VBox/GuestHost/SharedClipboard-uri.h>
    2424
    2525#include <iprt/dir.h>
     
    3535
    3636
    37 DnDURIList::DnDURIList(void)
     37SharedClipboardURIList::SharedClipboardURIList(void)
    3838    : m_cTotal(0)
    3939    , m_cbTotal(0)
     
    4141}
    4242
    43 DnDURIList::~DnDURIList(void)
     43SharedClipboardURIList::~SharedClipboardURIList(void)
    4444{
    4545    Clear();
    4646}
    4747
    48 int DnDURIList::addEntry(const char *pcszSource, const char *pcszTarget, DNDURILISTFLAGS fFlags)
     48int SharedClipboardURIList::addEntry(const char *pcszSource, const char *pcszTarget, SHAREDCLIPBOARDURILISTFLAGS fFlags)
    4949{
    5050    AssertPtrReturn(pcszSource, VERR_INVALID_POINTER);
     
    6262                         pcszSource, pcszTarget, (uint64_t)objInfo.cbObject, objInfo.Attr.fMode));
    6363
    64             DnDURIObject *pObjFile = new DnDURIObject(DnDURIObject::Type_File, pcszSource, pcszTarget);
     64            SharedClipboardURIObject *pObjFile = new SharedClipboardURIObject(SharedClipboardURIObject::Type_File, pcszSource, pcszTarget);
    6565            if (pObjFile)
    6666            {
    6767                /** @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);
    6969                if (RT_SUCCESS(rc))
    7070                {
     
    7474                    m_cbTotal += pObjFile->GetSize();
    7575
    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? */
    7777                        pObjFile->Close();
    7878                }
     
    8787            LogFlowFunc(("Directory '%s' -> '%s' (file mode 0x%x)\n", pcszSource, pcszTarget, objInfo.Attr.fMode));
    8888
    89             DnDURIObject *pObjDir = new DnDURIObject(DnDURIObject::Type_Directory, pcszSource, pcszTarget);
     89            SharedClipboardURIObject *pObjDir = new SharedClipboardURIObject(SharedClipboardURIObject::Type_Directory, pcszSource, pcszTarget);
    9090            if (pObjDir)
    9191            {
    9292                m_lstTree.append(pObjDir);
    9393
    94                 /** @todo Add DNDURILIST_FLAGS_KEEP_OPEN handling? */
     94                /** @todo Add SHAREDCLIPBOARDURILIST_FLAGS_KEEP_OPEN handling? */
    9595                m_cTotal++;
    9696            }
     
    107107}
    108108
    109 int DnDURIList::appendPathRecursive(const char *pcszSrcPath,
     109int SharedClipboardURIList::appendPathRecursive(const char *pcszSrcPath,
    110110                                    const char *pcszDstPath, const char *pcszDstBase, size_t cchDstBase,
    111                                     DNDURILISTFLAGS fFlags)
     111                                    SHAREDCLIPBOARDURILISTFLAGS fFlags)
    112112{
    113113    AssertPtrReturn(pcszSrcPath, VERR_INVALID_POINTER);
     
    192192                            case RTFS_TYPE_SYMLINK:
    193193                            {
    194                                 if (fFlags & DNDURILIST_FLAGS_RESOLVE_SYMLINKS)
     194                                if (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS)
    195195                                {
    196196                                    char *pszSrc = RTPathRealDup(pcszDstBase);
     
    239239        else if (RTFS_IS_SYMLINK(objInfo.Attr.fMode))
    240240        {
    241             if (fFlags & DNDURILIST_FLAGS_RESOLVE_SYMLINKS)
     241            if (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS)
    242242            {
    243243                char *pszSrc = RTPathRealDup(pcszSrcPath);
     
    275275}
    276276
    277 int DnDURIList::AppendNativePath(const char *pszPath, DNDURILISTFLAGS fFlags)
     277int SharedClipboardURIList::AppendNativePath(const char *pszPath, SHAREDCLIPBOARDURILISTFLAGS fFlags)
    278278{
    279279    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
     
    303303}
    304304
    305 int DnDURIList::AppendNativePathsFromList(const char *pszNativePaths, size_t cbNativePaths,
    306                                           DNDURILISTFLAGS fFlags)
     305int SharedClipboardURIList::AppendNativePathsFromList(const char *pszNativePaths, size_t cbNativePaths,
     306                                          SHAREDCLIPBOARDURILISTFLAGS fFlags)
    307307{
    308308    AssertPtrReturn(pszNativePaths, VERR_INVALID_POINTER);
     
    314314}
    315315
    316 int DnDURIList::AppendNativePathsFromList(const RTCList<RTCString> &lstNativePaths,
    317                                           DNDURILISTFLAGS fFlags)
     316int SharedClipboardURIList::AppendNativePathsFromList(const RTCList<RTCString> &lstNativePaths,
     317                                          SHAREDCLIPBOARDURILISTFLAGS fFlags)
    318318{
    319319    int rc = VINF_SUCCESS;
     
    331331}
    332332
    333 int DnDURIList::AppendURIPath(const char *pszURI, DNDURILISTFLAGS fFlags)
     333int SharedClipboardURIList::AppendURIPath(const char *pszURI, SHAREDCLIPBOARDURILISTFLAGS fFlags)
    334334{
    335335    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);
    337337    /** @todo Check for string termination?  */
    338338
     
    380380            {
    381381                Assert(pszFileName >= pszSrcPath);
    382                 size_t cchDstBase = (fFlags & DNDURILIST_FLAGS_ABSOLUTE_PATHS)
     382                size_t cchDstBase = (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_ABSOLUTE_PATHS)
    383383                                  ? 0 /* Use start of path as root. */
    384384                                  : pszFileName - pszSrcPath;
     
    404404}
    405405
    406 int DnDURIList::AppendURIPathsFromList(const char *pszURIPaths, size_t cbURIPaths,
    407                                        DNDURILISTFLAGS fFlags)
     406int SharedClipboardURIList::AppendURIPathsFromList(const char *pszURIPaths, size_t cbURIPaths,
     407                                       SHAREDCLIPBOARDURILISTFLAGS fFlags)
    408408{
    409409    AssertPtrReturn(pszURIPaths, VERR_INVALID_POINTER);
     
    415415}
    416416
    417 int DnDURIList::AppendURIPathsFromList(const RTCList<RTCString> &lstURI,
    418                                        DNDURILISTFLAGS fFlags)
     417int SharedClipboardURIList::AppendURIPathsFromList(const RTCList<RTCString> &lstURI,
     418                                       SHAREDCLIPBOARDURILISTFLAGS fFlags)
    419419{
    420420    int rc = VINF_SUCCESS;
     
    433433}
    434434
    435 void DnDURIList::Clear(void)
     435void SharedClipboardURIList::Clear(void)
    436436{
    437437    m_lstRoot.clear();
     
    439439    for (size_t i = 0; i < m_lstTree.size(); i++)
    440440    {
    441         DnDURIObject *pCurObj = m_lstTree.at(i);
     441        SharedClipboardURIObject *pCurObj = m_lstTree.at(i);
    442442        AssertPtr(pCurObj);
    443443        RTMemFree(pCurObj);
     
    449449}
    450450
    451 void DnDURIList::RemoveFirst(void)
     451void SharedClipboardURIList::RemoveFirst(void)
    452452{
    453453    if (m_lstTree.isEmpty())
    454454        return;
    455455
    456     DnDURIObject *pCurObj = m_lstTree.first();
     456    SharedClipboardURIObject *pCurObj = m_lstTree.first();
    457457    AssertPtr(pCurObj);
    458458
     
    467467}
    468468
    469 int DnDURIList::SetFromURIData(const void *pvData, size_t cbData, DNDURILISTFLAGS fFlags)
     469int SharedClipboardURIList::SetFromURIData(const void *pvData, size_t cbData, SHAREDCLIPBOARDURILISTFLAGS fFlags)
    470470{
    471471    Assert(fFlags == 0); RT_NOREF1(fFlags);
     
    494494        if (pszFilePath)
    495495        {
    496             rc = DnDPathSanitize(pszFilePath, strlen(pszFilePath));
     496            rc = SharedClipboardPathSanitize(pszFilePath, strlen(pszFilePath));
    497497            if (RT_SUCCESS(rc))
    498498            {
     
    513513}
    514514
    515 RTCString DnDURIList::GetRootEntries(const RTCString &strPathBase /* = "" */,
     515RTCString SharedClipboardURIList::GetRootEntries(const RTCString &strPathBase /* = "" */,
    516516                                   const RTCString &strSeparator /* = "\r\n" */) const
    517517{
  • trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp

    r78307 r78390  
    11/* $Id$ */
    22/** @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.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2019 Oracle Corporation
     7 * Copyright (C) 2019 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #define LOG_GROUP LOG_GROUP_GUEST_DND
    23 #include <VBox/GuestHost/DragAndDrop.h>
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
     23#include <VBox/GuestHost/SharedClipboard-uri.h>
    2424
    2525#include <iprt/dir.h>
     
    3333
    3434
    35 DnDURIObject::DnDURIObject(void)
     35SharedClipboardURIObject::SharedClipboardURIObject(void)
    3636    : m_enmType(Type_Unknown)
    3737    , m_enmView(View_Unknown)
     
    4040}
    4141
    42 DnDURIObject::DnDURIObject(Type enmType,
    43                            const RTCString &strSrcPathAbs /* = 0 */,
    44                            const RTCString &strDstPathAbs /* = 0 */)
     42SharedClipboardURIObject::SharedClipboardURIObject(Type enmType,
     43                                                   const RTCString &strSrcPathAbs /* = 0 */,
     44                                                   const RTCString &strDstPathAbs /* = 0 */)
    4545    : m_enmType(enmType)
    4646    , m_enmView(View_Unknown)
     
    6969}
    7070
    71 DnDURIObject::~DnDURIObject(void)
     71SharedClipboardURIObject::~SharedClipboardURIObject(void)
    7272{
    7373    closeInternal();
     
    7878 *
    7979 */
    80 void DnDURIObject::closeInternal(void)
     80void SharedClipboardURIObject::closeInternal(void)
    8181{
    8282    LogFlowThisFuncEnter();
     
    109109 * This also closes the internal handles associated with the object (to files / ...).
    110110 */
    111 void DnDURIObject::Close(void)
     111void SharedClipboardURIObject::Close(void)
    112112{
    113113    closeInternal();
     
    119119 * @return  File / directory mode.
    120120 */
    121 RTFMODE DnDURIObject::GetMode(void) const
     121RTFMODE SharedClipboardURIObject::GetMode(void) const
    122122{
    123123    switch (m_enmType)
     
    140140 * Returns the bytes already processed (read / written).
    141141 *
    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.
    143143 *
    144144 * @return  Bytes already processed (read / written).
    145145 */
    146 uint64_t DnDURIObject::GetProcessed(void) const
     146uint64_t SharedClipboardURIObject::GetProcessed(void) const
    147147{
    148148    if (m_enmType == Type_File)
     
    155155 * Returns the file's logical size (in bytes).
    156156 *
    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.
    158158 *
    159159 * @return  The file's logical size (in bytes).
    160160 */
    161 uint64_t DnDURIObject::GetSize(void) const
     161uint64_t SharedClipboardURIObject::GetSize(void) const
    162162{
    163163    if (m_enmType == Type_File)
     
    173173 * @return  True if complete, False if not.
    174174 */
    175 bool DnDURIObject::IsComplete(void) const
     175bool SharedClipboardURIObject::IsComplete(void) const
    176176{
    177177    bool fComplete;
     
    199199 * Returns whether the object is in an open state or not.
    200200 */
    201 bool DnDURIObject::IsOpen(void) const
     201bool SharedClipboardURIObject::IsOpen(void) const
    202202{
    203203    switch (m_enmType)
     
    219219 * @param   fMode               File mode to use.
    220220 */
    221 int DnDURIObject::Open(View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */)
     221int SharedClipboardURIObject::Open(View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */)
    222222{
    223223    return OpenEx(  enmView == View_Source
    224224                  ? m_strSrcPathAbs : m_strTgtPathAbs
    225                   , enmView, fOpen, fMode, DNDURIOBJECT_FLAGS_NONE);
     225                  , enmView, fOpen, fMode, SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
    226226}
    227227
     
    234234 * @param   fOpen               Open mode to use; only valid for file objects.
    235235 * @param   fMode               File mode to use; only valid for file objects.
    236  * @param   fFlags              Additional DnD URI 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 */
     238int 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);
    242242    RT_NOREF1(fFlags);
    243243
     
    328328 * @param   enmView             View to use for querying information. Currently ignored.
    329329 */
    330 int DnDURIObject::queryInfoInternal(View enmView)
     330int SharedClipboardURIObject::queryInfoInternal(View enmView)
    331331{
    332332    RT_NOREF(enmView);
     
    360360 * @param   enmView             View to use for querying information.
    361361 */
    362 int DnDURIObject::QueryInfo(View enmView)
     362int SharedClipboardURIObject::QueryInfo(View enmView)
    363363{
    364364    return queryInfoInternal(enmView);
     
    374374 * @param   strBaseNew          New base path to rebase to.
    375375 *
    376  ** @todo Put this into an own class like DnDURIPath : public RTCString?
     376 ** @todo Put this into an own class like SharedClipboardURIPath : public RTCString?
    377377 */
    378378/* static */
    379 int DnDURIObject::RebaseURIPath(RTCString &strPathAbs,
     379int SharedClipboardURIObject::RebaseURIPath(RTCString &strPathAbs,
    380380                                const RTCString &strBaseOld /* = "" */,
    381381                                const RTCString &strBaseNew /* = "" */)
     
    439439 * @param   pcbRead             Pointer where to store how many bytes were read. Optional.
    440440 */
    441 int DnDURIObject::Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead)
     441int SharedClipboardURIObject::Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead)
    442442{
    443443    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
     
    495495 * Resets the object's state and closes all related handles.
    496496 */
    497 void DnDURIObject::Reset(void)
     497void SharedClipboardURIObject::Reset(void)
    498498{
    499499    LogFlowThisFuncEnter();
     
    512512 * Sets the bytes to process by the object.
    513513 *
    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.
    515515 *
    516516 * @return  IPRT return code.
    517517 * @param   cbSize          Size (in bytes) to process.
    518518 */
    519 int DnDURIObject::SetSize(uint64_t cbSize)
     519int SharedClipboardURIObject::SetSize(uint64_t cbSize)
    520520{
    521521    AssertReturn(m_enmType == Type_File, VERR_INVALID_PARAMETER);
     
    535535 * @param   pcbWritten          Pointer where to store how many bytes were written. Optional.
    536536 */
    537 int DnDURIObject::Write(const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten)
     537int SharedClipboardURIObject::Write(const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten)
    538538{
    539539    AssertPtrReturn(pvBuf, 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