Index: /trunk/include/VBox/GuestHost/SharedClipboard-uri.h
===================================================================
--- /trunk/include/VBox/GuestHost/SharedClipboard-uri.h	(revision 79630)
+++ /trunk/include/VBox/GuestHost/SharedClipboard-uri.h	(revision 79631)
@@ -342,206 +342,4 @@
 } VBOXCLIPBOARDCREATEPARMS, *PVBOXCLIPBOARDCREATEPARMS;
 #pragma pack()
-
-/** Clipboard area ID. A valid area is >= 1.
- *  If 0 is specified, the last (most recent) area is meant.
- *  Set to UINT32_MAX if not initialized. */
-typedef uint32_t SHAREDCLIPBOARDAREAID;
-
-/** Defines a non-initialized (nil) clipboard area. */
-#define NIL_SHAREDCLIPBOARDAREAID       UINT32_MAX
-
-/** SharedClipboardArea open flags. */
-typedef uint32_t SHAREDCLIPBOARDAREAOPENFLAGS;
-
-/** No clipboard area open flags specified. */
-#define SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE               0
-/** The clipboard area must not exist yet. */
-#define SHAREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST     RT_BIT(0)
-/** Mask of all valid clipboard area open flags.  */
-#define SHAREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK         0x1
-
-/** SharedClipboardURIObject flags. */
-typedef uint32_t SHAREDCLIPBOARDURIOBJECTFLAGS;
-
-/** No flags specified. */
-#define SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE                   0
-
-/** Mask of all valid Shared Clipboard URI object flags. */
-#define SHAREDCLIPBOARDURIOBJECT_FLAGS_VALID_MASK             UINT32_C(0x0)
-
-/**
- * Class for handling Shared Clipboard URI objects.
- * This class abstracts the access and handling objects when performing Shared Clipboard actions.
- */
-class SharedClipboardURIObject
-{
-public:
-
-    /**
-     * Enumeration for specifying an URI object type.
-     */
-    enum Type
-    {
-        /** Unknown type, do not use. */
-        Type_Unknown = 0,
-        /** Object is a file. */
-        Type_File,
-        /** Object is a directory. */
-        Type_Directory,
-        /** The usual 32-bit hack. */
-        Type_32Bit_Hack = 0x7fffffff
-    };
-
-    enum Storage
-    {
-        Storage_Unknown = 0,
-        Storage_Local,
-        Storage_Temporary,
-        /** The usual 32-bit hack. */
-        Storage_32Bit_Hack = 0x7fffffff
-    };
-
-    /**
-     * Enumeration for specifying an URI object view
-     * for representing its data accordingly.
-     */
-    enum View
-    {
-        /** Unknown view, do not use. */
-        View_Unknown = 0,
-        /** Handle data from the source point of view. */
-        View_Source,
-        /** Handle data from the destination point of view. */
-        View_Target,
-        /** The usual 32-bit hack. */
-        View_Dest_32Bit_Hack = 0x7fffffff
-    };
-
-    SharedClipboardURIObject(void);
-    SharedClipboardURIObject(Type type, const RTCString &strSrcPathAbs = "", const RTCString &strDstPathAbs = "");
-    virtual ~SharedClipboardURIObject(void);
-
-public:
-
-    /**
-     * Returns the given absolute source path of the object.
-     *
-     * @return  Absolute source path of the object.
-     */
-    const RTCString &GetSourcePathAbs(void) const { return m_strSrcPathAbs; }
-
-    /**
-     * Returns the given, absolute destination path of the object.
-     *
-     * @return  Absolute destination path of the object.
-     */
-    const RTCString &GetDestPathAbs(void) const { return m_strTgtPathAbs; }
-
-    RTFMODE GetMode(void) const;
-
-    uint64_t GetProcessed(void) const;
-
-    uint64_t GetSize(void) const;
-
-    /**
-     * Returns the object's type.
-     *
-     * @return  The object's type.
-     */
-    Type GetType(void) const { return m_enmType; }
-
-    /**
-     * Returns the object's view.
-     *
-     * @return  The object's view.
-     */
-    View GetView(void) const { return m_enmView; }
-
-public:
-
-    int SetSize(uint64_t cbSize);
-
-public:
-
-    void Close(void);
-    bool IsComplete(void) const;
-    bool IsOpen(void) const;
-    int OpenDirectory(View enmView, uint32_t fCreate = 0, RTFMODE fMode = 0);
-    int OpenDirectoryEx(const RTCString &strPathAbs, View enmView,
-                        uint32_t fCreate = 0, RTFMODE fMode = 0,
-                        SHAREDCLIPBOARDURIOBJECTFLAGS fFlags = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-    int OpenFile(View enmView, uint64_t fOpen = 0, RTFMODE fMode = 0);
-    int OpenFileEx(const RTCString &strPathAbs, View enmView,
-                   uint64_t fOpen = 0, RTFMODE fMode = 0,
-                   SHAREDCLIPBOARDURIOBJECTFLAGS fFlags  = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-    int QueryInfo(View enmView);
-    int Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead);
-    void Reset(void);
-    int SetDirectoryData(const RTCString &strPathAbs, View enmView, uint32_t fOpen = 0, RTFMODE fMode = 0,
-                         SHAREDCLIPBOARDURIOBJECTFLAGS fFlags = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-    int SetFileData(const RTCString &strPathAbs, View enmView, uint64_t fOpen = 0, RTFMODE fMode = 0,
-                    SHAREDCLIPBOARDURIOBJECTFLAGS fFlags = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-    int Write(const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten);
-
-public:
-
-    static int RebaseURIPath(RTCString &strPath, const RTCString &strBaseOld = "", const RTCString &strBaseNew = "");
-
-protected:
-
-    void closeInternal(void);
-    int setDirectoryDataInternal(const RTCString &strPathAbs, View enmView, uint32_t fCreate = 0, RTFMODE fMode = 0,
-                                 SHAREDCLIPBOARDURIOBJECTFLAGS fFlags = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-    int setFileDataInternal(const RTCString &strPathAbs, View enmView, uint64_t fOpen = 0, RTFMODE fMode = 0,
-                            SHAREDCLIPBOARDURIOBJECTFLAGS fFlags = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-    int queryInfoInternal(View enmView);
-
-protected:
-
-    /** The object's type. */
-    Type      m_enmType;
-    /** The object's view. */
-    View      m_enmView;
-    /** Where the object is being stored to. */
-    Storage   m_enmStorage;
-    /** Absolute path (base) for the source. */
-    RTCString m_strSrcPathAbs;
-    /** Absolute path (base) for the target. */
-    RTCString m_strTgtPathAbs;
-    /** Saved SHAREDCLIPBOARDURIOBJECT_FLAGS. */
-    uint32_t  m_fFlags;
-    /** Requested file mode.
-     *  Note: The actual file mode of an opened file will be in objInfo. */
-    RTFMODE   m_fModeRequested;
-
-    /** Union containing data depending on the object's type. */
-    union
-    {
-        /** Structure containing members for objects that
-         *  are files. */
-        struct
-        {
-            /** File handle. */
-            RTFILE      hFile;
-            /** File system object information of this file. */
-            RTFSOBJINFO objInfo;
-            /** Requested file open flags. */
-            uint32_t    fOpenRequested;
-            /** Bytes to proces for reading/writing. */
-            uint64_t    cbToProcess;
-            /** Bytes processed reading/writing. */
-            uint64_t    cbProcessed;
-        } File;
-        struct
-        {
-            /** Directory handle. */
-            RTDIR       hDir;
-            /** File system object information of this directory. */
-            RTFSOBJINFO objInfo;
-            /** Requested directory creation flags. */
-            uint32_t    fCreateRequested;
-        } Dir;
-    } u;
-};
 
 /**
@@ -644,4 +442,22 @@
 } SHAREDCLIPBOARDAREAOBJTYPE;
 
+/** Clipboard area ID. A valid area is >= 1.
+ *  If 0 is specified, the last (most recent) area is meant.
+ *  Set to UINT32_MAX if not initialized. */
+typedef uint32_t SHAREDCLIPBOARDAREAID;
+
+/** Defines a non-initialized (nil) clipboard area. */
+#define NIL_SHAREDCLIPBOARDAREAID       UINT32_MAX
+
+/** SharedClipboardArea open flags. */
+typedef uint32_t SHAREDCLIPBOARDAREAOPENFLAGS;
+
+/** No clipboard area open flags specified. */
+#define SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE               0
+/** The clipboard area must not exist yet. */
+#define SHAREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST     RT_BIT(0)
+/** Mask of all valid clipboard area open flags.  */
+#define SHAREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK         0x1
+
 /** Defines a clipboard area object state. */
 typedef uint32_t SHAREDCLIPBOARDAREAOBJSTATE;
@@ -739,77 +555,4 @@
 int SharedClipboardPathSanitizeFilename(char *pszPath, size_t cbPath);
 int SharedClipboardPathSanitize(char *pszPath, size_t cbPath);
-
-/** SharedClipboardURIList flags. */
-typedef uint32_t SHAREDCLIPBOARDURILISTFLAGS;
-
-/** No flags specified. */
-#define SHAREDCLIPBOARDURILIST_FLAGS_NONE                   0
-/** Keep the original paths, don't convert paths to relative ones. */
-#define SHAREDCLIPBOARDURILIST_FLAGS_ABSOLUTE_PATHS         RT_BIT(0)
-/** Resolve all symlinks. */
-#define SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS       RT_BIT(1)
-/** Keep the files + directory entries open while
- *  being in this list. */
-#define SHAREDCLIPBOARDURILIST_FLAGS_KEEP_OPEN              RT_BIT(2)
-/** Lazy loading: Only enumerate sub directories when needed.
- ** @todo Implement lazy loading.  */
-#define SHAREDCLIPBOARDURILIST_FLAGS_LAZY                   RT_BIT(3)
-
-/** Mask of all valid Shared Clipboard URI list flags. */
-#define SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK             UINT32_C(0xF)
-
-class SharedClipboardURIList
-{
-public:
-
-    SharedClipboardURIList(void);
-    virtual ~SharedClipboardURIList(void);
-
-public:
-
-    int AppendNativePath(const char *pszPath, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-    int AppendNativePathsFromList(const char *pszNativePaths, size_t cbNativePaths, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-    int AppendNativePathsFromList(const RTCList<RTCString> &lstNativePaths, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-    int AppendURIObject(SharedClipboardURIObject *pObject);
-    int AppendURIPath(const char *pszURI, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-    int AppendURIPathsFromList(const char *pszURIPaths, size_t cbURIPaths, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-    int AppendURIPathsFromList(const RTCList<RTCString> &lstURI, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-
-    void Clear(void);
-    SharedClipboardURIObject *At(size_t i) const { return m_lstTree.at(i); }
-    SharedClipboardURIObject *First(void) const { return m_lstTree.first(); }
-    bool IsEmpty(void) const { return m_lstTree.isEmpty(); }
-    void RemoveFirst(void);
-    int SetFromURIData(const void *pvData, size_t cbData, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-
-    RTCString GetRootEntries(const RTCString &strPathBase = "", const RTCString &strSeparator = "\r\n") const;
-    uint64_t GetRootCount(void) const { return m_lstRoot.size(); }
-    uint64_t GetTotalCount(void) const { return m_cTotal; }
-    uint64_t GetTotalBytes(void) const { return m_cbTotal; }
-
-protected:
-
-    int appendEntry(const char *pcszSource, const char *pcszTarget, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-    int appendObject(SharedClipboardURIObject *pObject);
-    int appendPathRecursive(const char *pcszSrcPath, const char *pcszDstPath, const char *pcszDstBase, size_t cchDstBase, SHAREDCLIPBOARDURILISTFLAGS fFlags);
-
-protected:
-
-    /** List of all top-level file/directory entries.
-     *  Note: All paths are kept internally as UNIX paths for
-     *        easier conversion/handling!  */
-    RTCList<RTCString>                  m_lstRoot;
-    /** List of all URI objects added. The list's content
-     *  might vary depending on how the objects are being
-     *  added (lazy or not). */
-    RTCList<SharedClipboardURIObject *> m_lstTree;
-    /** Total number of all URI objects. */
-    uint64_t                            m_cTotal;
-    /** Total size of all URI objects, that is, the file
-     *  size of all objects (in bytes).
-     *  Note: Do *not* size_t here, as we also want to support large files
-     *        on 32-bit guests. */
-    uint64_t                            m_cbTotal;
-};
 
 int SharedClipboardURIListHdrAlloc(PVBOXCLIPBOARDLISTHDR *ppListHdr);
Index: /trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk	(revision 79630)
+++ /trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk	(revision 79631)
@@ -62,6 +62,4 @@
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp \
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp \
-	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp \
-	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp \
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-uri.cpp
Index: unk/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp
===================================================================
--- /trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp	(revision 79630)
+++ 	(revision )
@@ -1,567 +1,0 @@
-/* $Id$ */
-/** @file
- * Shared Clipboard - URI list class.
- */
-
-/*
- * Copyright (C) 2019 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
-#include <VBox/GuestHost/SharedClipboard-uri.h>
-
-#include <iprt/dir.h>
-#include <iprt/err.h>
-#include <iprt/file.h>
-#include <iprt/fs.h>
-#include <iprt/path.h>
-#include <iprt/string.h>
-#include <iprt/symlink.h>
-#include <iprt/uri.h>
-
-#include <VBox/log.h>
-
-
-SharedClipboardURIList::SharedClipboardURIList(void)
-    : m_cTotal(0)
-    , m_cbTotal(0)
-{
-}
-
-SharedClipboardURIList::~SharedClipboardURIList(void)
-{
-    Clear();
-}
-
-int SharedClipboardURIList::appendEntry(const char *pcszSource, const char *pcszTarget, SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pcszSource, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcszTarget, VERR_INVALID_POINTER);
-    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
-
-    LogFlowFunc(("pcszSource=%s, pcszTarget=%s, fFlags=0x%x\n", pcszSource, pcszTarget, fFlags));
-
-    RTFSOBJINFO objInfo;
-    int rc = RTPathQueryInfo(pcszSource, &objInfo, RTFSOBJATTRADD_NOTHING);
-    if (RT_SUCCESS(rc))
-    {
-        if (RTFS_IS_FILE(objInfo.Attr.fMode))
-        {
-            LogFlowFunc(("File '%s' -> '%s' (%RU64 bytes, file mode 0x%x)\n",
-                         pcszSource, pcszTarget, (uint64_t)objInfo.cbObject, objInfo.Attr.fMode));
-
-            SharedClipboardURIObject *pObjFile = new SharedClipboardURIObject(SharedClipboardURIObject::Type_File,
-                                                                              pcszSource, pcszTarget);
-            if (pObjFile)
-            {
-                /** @todo Add a standard fOpen mode for this list. */
-                rc = pObjFile->OpenFile(SharedClipboardURIObject::View_Source,
-                                        RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE);
-                if (RT_SUCCESS(rc))
-                {
-                    rc = appendObject(pObjFile);
-                    if (!(fFlags & SHAREDCLIPBOARDURILIST_FLAGS_KEEP_OPEN)) /* Shall we keep the file open while being added to this list? */
-                        pObjFile->Close();
-                }
-                else
-                    delete pObjFile;
-            }
-            else
-                rc = VERR_NO_MEMORY;
-        }
-        else if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
-        {
-            LogFlowFunc(("Directory '%s' -> '%s' (file mode 0x%x)\n", pcszSource, pcszTarget, objInfo.Attr.fMode));
-
-            SharedClipboardURIObject *pObjDir = new SharedClipboardURIObject(SharedClipboardURIObject::Type_Directory,
-                                                                             pcszSource, pcszTarget);
-            if (pObjDir)
-            {
-                m_lstTree.append(pObjDir);
-
-                /** @todo Add SHAREDCLIPBOARDURILIST_FLAGS_KEEP_OPEN handling? */
-                m_cTotal++;
-            }
-            else
-                rc = VERR_NO_MEMORY;
-        }
-        /* Note: Symlinks already should have been resolved at this point. */
-        else
-            rc = VERR_NOT_SUPPORTED;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int SharedClipboardURIList::appendPathRecursive(const char *pcszSrcPath,
-                                                const char *pcszDstPath, const char *pcszDstBase, size_t cchDstBase,
-                                                SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pcszSrcPath, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcszDstBase, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcszDstPath, VERR_INVALID_POINTER);
-    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
-
-    LogFlowFunc(("pcszSrcPath=%s, pcszDstPath=%s, pcszDstBase=%s, cchDstBase=%zu, fFlags=0x%x\n",
-                 pcszSrcPath, pcszDstPath, pcszDstBase, cchDstBase, fFlags));
-
-    RTFSOBJINFO objInfo;
-    int rc = RTPathQueryInfo(pcszSrcPath, &objInfo, RTFSOBJATTRADD_NOTHING);
-    if (RT_SUCCESS(rc))
-    {
-        if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
-        {
-            rc = appendEntry(pcszSrcPath, &pcszDstPath[cchDstBase], fFlags);
-            if (RT_SUCCESS(rc))
-            {
-                RTDIR hDir;
-                rc = RTDirOpen(&hDir, pcszSrcPath);
-                if (RT_SUCCESS(rc))
-                {
-                    size_t        cbDirEntry = 0;
-                    PRTDIRENTRYEX pDirEntry  = NULL;
-                    do
-                    {
-                        /* Retrieve the next directory entry. */
-                        rc = RTDirReadExA(hDir, &pDirEntry, &cbDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
-                        if (RT_FAILURE(rc))
-                        {
-                            if (rc == VERR_NO_MORE_FILES)
-                                rc = VINF_SUCCESS;
-                            break;
-                        }
-
-                        switch (pDirEntry->Info.Attr.fMode & RTFS_TYPE_MASK)
-                        {
-                            case RTFS_TYPE_DIRECTORY:
-                            {
-                                /* Skip "." and ".." entries. */
-                                if (RTDirEntryExIsStdDotLink(pDirEntry))
-                                    break;
-
-                                char *pszSrc = RTPathJoinA(pcszSrcPath, pDirEntry->szName);
-                                if (pszSrc)
-                                {
-                                    char *pszDst = RTPathJoinA(pcszDstPath, pDirEntry->szName);
-                                    if (pszDst)
-                                    {
-                                        rc = appendPathRecursive(pszSrc, pszDst, pcszDstBase, cchDstBase, fFlags);
-                                        RTStrFree(pszDst);
-                                    }
-                                    else
-                                        rc = VERR_NO_MEMORY;
-
-                                    RTStrFree(pszSrc);
-                                }
-                                else
-                                    rc = VERR_NO_MEMORY;
-                                break;
-                            }
-
-                            case RTFS_TYPE_FILE:
-                            {
-                                char *pszSrc = RTPathJoinA(pcszSrcPath, pDirEntry->szName);
-                                if (pszSrc)
-                                {
-                                    char *pszDst = RTPathJoinA(pcszDstPath, pDirEntry->szName);
-                                    if (pszDst)
-                                    {
-                                        rc = appendEntry(pszSrc, &pszDst[cchDstBase], fFlags);
-                                        RTStrFree(pszDst);
-                                    }
-                                    else
-                                        rc = VERR_NO_MEMORY;
-                                    RTStrFree(pszSrc);
-                                }
-                                else
-                                    rc = VERR_NO_MEMORY;
-                                break;
-                            }
-                            case RTFS_TYPE_SYMLINK:
-                            {
-                                if (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS)
-                                {
-                                    char *pszSrc = RTPathRealDup(pcszDstBase);
-                                    if (pszSrc)
-                                    {
-                                        rc = RTPathQueryInfo(pszSrc, &objInfo, RTFSOBJATTRADD_NOTHING);
-                                        if (RT_SUCCESS(rc))
-                                        {
-                                            if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
-                                            {
-                                                LogFlowFunc(("Directory entry is symlink to directory\n"));
-                                                rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags);
-                                            }
-                                            else if (RTFS_IS_FILE(objInfo.Attr.fMode))
-                                            {
-                                                LogFlowFunc(("Directory entry is symlink to file\n"));
-                                                rc = appendEntry(pszSrc, &pcszDstPath[cchDstBase], fFlags);
-                                            }
-                                            else
-                                                rc = VERR_NOT_SUPPORTED;
-                                        }
-
-                                        RTStrFree(pszSrc);
-                                    }
-                                    else
-                                        rc = VERR_NO_MEMORY;
-                                }
-                                break;
-                            }
-
-                            default:
-                                break;
-                        }
-
-                    } while (RT_SUCCESS(rc));
-
-                    RTDirReadExAFree(&pDirEntry, &cbDirEntry);
-                    RTDirClose(hDir);
-                }
-            }
-        }
-        else if (RTFS_IS_FILE(objInfo.Attr.fMode))
-        {
-            rc = appendEntry(pcszSrcPath, &pcszDstPath[cchDstBase], fFlags);
-        }
-        else if (RTFS_IS_SYMLINK(objInfo.Attr.fMode))
-        {
-            if (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_RESOLVE_SYMLINKS)
-            {
-                char *pszSrc = RTPathRealDup(pcszSrcPath);
-                if (pszSrc)
-                {
-                    rc = RTPathQueryInfo(pszSrc, &objInfo, RTFSOBJATTRADD_NOTHING);
-                    if (RT_SUCCESS(rc))
-                    {
-                        if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode))
-                        {
-                            LogFlowFunc(("Symlink to directory\n"));
-                            rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags);
-                        }
-                        else if (RTFS_IS_FILE(objInfo.Attr.fMode))
-                        {
-                            LogFlowFunc(("Symlink to file\n"));
-                            rc = appendEntry(pszSrc, &pcszDstPath[cchDstBase], fFlags);
-                        }
-                        else
-                            rc = VERR_NOT_SUPPORTED;
-                    }
-
-                    RTStrFree(pszSrc);
-                }
-                else
-                    rc = VERR_NO_MEMORY;
-            }
-        }
-        else
-            rc = VERR_NOT_SUPPORTED;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int SharedClipboardURIList::appendObject(SharedClipboardURIObject *pObject)
-{
-    int rc = VINF_SUCCESS;
-
-    m_lstTree.append(pObject);
-    m_lstRoot.append(pObject->GetSourcePathAbs());
-
-    m_cTotal++;
-    m_cbTotal += pObject->GetSize();
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int SharedClipboardURIList::AppendNativePath(const char *pszPath, SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
-
-    RT_NOREF(fFlags);
-
-    return VERR_NOT_IMPLEMENTED;
-}
-
-int SharedClipboardURIList::AppendNativePathsFromList(const char *pszNativePaths, size_t cbNativePaths,
-                                                      SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pszNativePaths, VERR_INVALID_POINTER);
-    AssertReturn(cbNativePaths, VERR_INVALID_PARAMETER);
-
-    RTCList<RTCString> lstPaths
-        = RTCString(pszNativePaths, cbNativePaths - 1).split("\r\n");
-    return AppendNativePathsFromList(lstPaths, fFlags);
-}
-
-int SharedClipboardURIList::AppendNativePathsFromList(const RTCList<RTCString> &lstNativePaths,
-                                                      SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    int rc = VINF_SUCCESS;
-
-    for (size_t i = 0; i < lstNativePaths.size(); i++)
-    {
-        const RTCString &strPath = lstNativePaths.at(i);
-        rc = AppendNativePath(strPath.c_str(), fFlags);
-        if (RT_FAILURE(rc))
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int SharedClipboardURIList::AppendURIObject(SharedClipboardURIObject *pObject)
-{
-    AssertPtrReturn(pObject, VERR_INVALID_POINTER);
-
-    return appendObject(pObject);
-}
-
-int SharedClipboardURIList::AppendURIPath(const char *pszURI, SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pszURI, VERR_INVALID_POINTER);
-    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
-    /** @todo Check for string termination?  */
-
-    RTURIPARSED Parsed;
-    int rc = RTUriParse(pszURI, &Parsed);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    char *pszSrcPath = NULL;
-
-    /* file://host.example.com/path/to/file.txt */
-    const char *pszParsedAuthority = RTUriParsedAuthority(pszURI, &Parsed);
-    if (   pszParsedAuthority
-        && pszParsedAuthority[0] != '\0') /* Authority present? */
-    {
-        const char *pszParsedPath = RTUriParsedPath(pszURI, &Parsed);
-        if (pszParsedPath)
-        {
-            /* Always use UNIXy paths internally. */
-            if (RTStrAPrintf(&pszSrcPath,  "//%s%s", pszParsedAuthority, pszParsedPath) == -1)
-                rc = VERR_NO_MEMORY;
-        }
-        else
-            rc = VERR_INVALID_PARAMETER;
-    }
-    else
-    {
-        pszSrcPath = RTUriFilePath(pszURI);
-        if (!pszSrcPath)
-            rc = VERR_INVALID_PARAMETER;
-    }
-
-    LogFlowFunc(("pszURI=%s, fFlags=0x%x -> pszParsedAuthority=%s, pszSrcPath=%s, rc=%Rrc\n",
-                 pszURI, fFlags, pszParsedAuthority ? pszParsedAuthority : "<None>", pszSrcPath, rc));
-
-    if (RT_SUCCESS(rc))
-    {
-        /* Add the path to our internal file list (recursive in
-         * the case of a directory). */
-        size_t cbPathLen = RTPathStripTrailingSlash(pszSrcPath);
-        if (cbPathLen)
-        {
-            char *pszFileName = RTPathFilename(pszSrcPath);
-            if (pszFileName)
-            {
-                Assert(pszFileName >= pszSrcPath);
-                size_t cchDstBase = (fFlags & SHAREDCLIPBOARDURILIST_FLAGS_ABSOLUTE_PATHS)
-                                  ? 0 /* Use start of path as root. */
-                                  : pszFileName - pszSrcPath;
-                char *pszDstPath = &pszSrcPath[cchDstBase];
-
-                m_lstRoot.append(pszDstPath);
-
-                LogFlowFunc(("pszSrcPath=%s, pszFileName=%s, pszRoot=%s\n", pszSrcPath, pszFileName, pszDstPath));
-                rc = appendPathRecursive(pszSrcPath, pszSrcPath, pszSrcPath, cchDstBase, fFlags);
-            }
-            else
-                rc = VERR_PATH_NOT_FOUND;
-        }
-        else
-            rc = VERR_INVALID_PARAMETER;
-    }
-
-    RTStrFree(pszSrcPath);
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-int SharedClipboardURIList::AppendURIPathsFromList(const char *pszURIPaths, size_t cbURIPaths,
-                                                   SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pszURIPaths, VERR_INVALID_POINTER);
-    AssertReturn(cbURIPaths, VERR_INVALID_PARAMETER);
-
-    RTCList<RTCString> lstPaths
-        = RTCString(pszURIPaths, cbURIPaths - 1).split("\r\n");
-    return AppendURIPathsFromList(lstPaths, fFlags);
-}
-
-int SharedClipboardURIList::AppendURIPathsFromList(const RTCList<RTCString> &lstURI,
-                                                   SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    int rc = VINF_SUCCESS;
-
-    for (size_t i = 0; i < lstURI.size(); i++)
-    {
-        RTCString strURI = lstURI.at(i);
-        rc = AppendURIPath(strURI.c_str(), fFlags);
-
-        if (RT_FAILURE(rc))
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-void SharedClipboardURIList::Clear(void)
-{
-    LogFlowThisFuncEnter();
-
-    m_lstRoot.clear();
-
-    for (size_t i = 0; i < m_lstTree.size(); i++)
-    {
-        SharedClipboardURIObject *pCurObj = m_lstTree.at(i);
-        AssertPtr(pCurObj);
-        delete pCurObj;
-    }
-
-    m_lstTree.clear();
-
-    m_cTotal  = 0;
-    m_cbTotal = 0;
-
-    LogFlowThisFuncLeave();
-}
-
-void SharedClipboardURIList::RemoveFirst(void)
-{
-    if (m_lstTree.isEmpty())
-        return;
-
-    SharedClipboardURIObject *pCurObj = m_lstTree.first();
-    AssertPtr(pCurObj);
-
-    uint64_t cbSize = pCurObj->GetSize();
-    Assert(m_cbTotal >= cbSize);
-    m_cbTotal -= cbSize; /* Adjust total size. */
-
-    pCurObj->Close();
-    delete pCurObj;
-
-    m_lstTree.removeFirst();
-}
-
-int SharedClipboardURIList::SetFromURIData(const void *pvData, size_t cbData, SHAREDCLIPBOARDURILISTFLAGS fFlags)
-{
-    AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-    AssertReturn(cbData, VERR_INVALID_PARAMETER);
-    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURILIST_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
-
-    RTCList<RTCString> lstURI =
-        RTCString(static_cast<const char *>(pvData), cbData - 1).split("\r\n");
-    if (lstURI.isEmpty())
-        return VINF_SUCCESS;
-
-    int rc = VINF_SUCCESS;
-
-    for (size_t i = 0; i < lstURI.size(); ++i)
-    {
-        /* Query the path component of a file URI. If this hasn't a
-         * file scheme, NULL is returned. */
-        const char *pszURI = lstURI.at(i).c_str();
-        char *pszFilePath = RTUriFilePath(pszURI);
-#ifdef DEBUG_andy
-        LogFlowFunc(("pszURI=%s, pszFilePath=%s\n", pszURI, pszFilePath));
-#endif
-        if (pszFilePath)
-        {
-            rc = SharedClipboardPathSanitize(pszFilePath, strlen(pszFilePath));
-            if (RT_SUCCESS(rc))
-            {
-                m_lstRoot.append(pszFilePath);
-                m_cTotal++;
-            }
-
-            RTStrFree(pszFilePath);
-        }
-        else
-            rc = VERR_INVALID_PARAMETER;
-
-        if (RT_FAILURE(rc))
-            break;
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-RTCString SharedClipboardURIList::GetRootEntries(const RTCString &strPathBase /* = "" */,
-                                                 const RTCString &strSeparator /* = "\r\n" */) const
-{
-    RTCString strRet;
-    for (size_t i = 0; i < m_lstRoot.size(); i++)
-    {
-        const char *pszCurRoot = m_lstRoot.at(i).c_str();
-#ifdef DEBUG_andy
-        LogFlowFunc(("pszCurRoot=%s\n", pszCurRoot));
-#endif
-        if (strPathBase.isNotEmpty())
-        {
-            char *pszPath = RTPathJoinA(strPathBase.c_str(), pszCurRoot);
-            if (pszPath)
-            {
-                char *pszPathURI = RTUriFileCreate(pszPath);
-                if (pszPathURI)
-                {
-                    strRet += RTCString(pszPathURI) + strSeparator;
-                    LogFlowFunc(("URI (Base): %s\n", strRet.c_str()));
-                    RTStrFree(pszPathURI);
-                }
-
-                RTStrFree(pszPath);
-
-                if (!pszPathURI)
-                    break;
-            }
-            else
-                break;
-        }
-        else
-        {
-            char *pszPathURI = RTUriFileCreate(pszCurRoot);
-            if (pszPathURI)
-            {
-                strRet += RTCString(pszPathURI) + strSeparator;
-                LogFlowFunc(("URI: %s\n", strRet.c_str()));
-                RTStrFree(pszPathURI);
-            }
-            else
-                break;
-        }
-    }
-
-    return strRet;
-}
-
Index: unk/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp
===================================================================
--- /trunk/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp	(revision 79630)
+++ 	(revision )
@@ -1,681 +1,0 @@
-/* $Id$ */
-/** @file
- * Shared Clipboard - URI object class. For handling creation/reading/writing to files and directories on host or guest side.
- */
-
-/*
- * Copyright (C) 2019 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
-#include <VBox/GuestHost/SharedClipboard-uri.h>
-
-#include <iprt/dir.h>
-#include <iprt/err.h>
-#include <iprt/file.h>
-#include <iprt/fs.h>
-#include <iprt/path.h>
-#include <iprt/uri.h>
-
-#include <VBox/log.h>
-
-
-SharedClipboardURIObject::SharedClipboardURIObject(void)
-    : m_enmType(Type_Unknown)
-    , m_enmView(View_Unknown)
-    , m_fFlags(SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE)
-    , m_fModeRequested(0)
-{
-    RT_ZERO(u);
-}
-
-SharedClipboardURIObject::SharedClipboardURIObject(Type enmType,
-                                                   const RTCString &strSrcPathAbs /* = 0 */,
-                                                   const RTCString &strDstPathAbs /* = 0 */)
-    : m_enmType(enmType)
-    , m_enmView(View_Unknown)
-    , m_strSrcPathAbs(strSrcPathAbs)
-    , m_strTgtPathAbs(strDstPathAbs)
-    , m_fFlags(SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE)
-    , m_fModeRequested(0)
-{
-    RT_ZERO(u);
-
-    switch (m_enmType)
-    {
-        case Type_File:
-        {
-            u.File.hFile = NIL_RTFILE;
-            break;
-        }
-
-        case Type_Directory:
-        {
-            u.Dir.hDir = NIL_RTDIR;
-            break;
-        }
-
-        default:
-            break;
-    }
-}
-
-SharedClipboardURIObject::~SharedClipboardURIObject(void)
-{
-    closeInternal();
-}
-
-/**
- * Closes the object's internal handles (to files / ...).
- *
- */
-void SharedClipboardURIObject::closeInternal(void)
-{
-    LogFlowThisFuncEnter();
-
-    switch (m_enmType)
-    {
-        case Type_File:
-        {
-            if (RTFileIsValid(u.File.hFile))
-            {
-                RTFileClose(u.File.hFile);
-                u.File.hFile = NIL_RTFILE;
-            }
-            RT_ZERO(u.File.objInfo);
-            break;
-        }
-
-        case Type_Directory:
-        {
-            if (RTDirIsValid(u.Dir.hDir))
-            {
-                RTDirClose(u.Dir.hDir);
-                u.Dir.hDir = NIL_RTDIR;
-            }
-            RT_ZERO(u.Dir.objInfo);
-            break;
-        }
-
-        default:
-            break;
-    }
-}
-
-/**
- * Closes the object.
- * This also closes the internal handles associated with the object (to files / ...).
- */
-void SharedClipboardURIObject::Close(void)
-{
-    LogFlowFuncEnter();
-
-    closeInternal();
-}
-
-/**
- * Returns the directory / file mode of the object.
- *
- * @return  File / directory mode.
- */
-RTFMODE SharedClipboardURIObject::GetMode(void) const
-{
-    switch (m_enmType)
-    {
-        case Type_File:
-            return u.File.objInfo.Attr.fMode;
-
-        case Type_Directory:
-            return u.Dir.objInfo.Attr.fMode;
-
-        default:
-            break;
-    }
-
-    AssertFailed();
-    return 0;
-}
-
-/**
- * Returns the bytes already processed (read / written).
- *
- * Note: Only applies if the object is of type SharedClipboardURIObject::Type_File.
- *
- * @return  Bytes already processed (read / written).
- */
-uint64_t SharedClipboardURIObject::GetProcessed(void) const
-{
-    if (m_enmType == Type_File)
-        return u.File.cbProcessed;
-
-    return 0;
-}
-
-/**
- * Returns the file's logical size (in bytes).
- *
- * Note: Only applies if the object is of type SharedClipboardURIObject::Type_File.
- *
- * @return  The file's logical size (in bytes).
- */
-uint64_t SharedClipboardURIObject::GetSize(void) const
-{
-    if (m_enmType == Type_File)
-        return u.File.cbToProcess;
-
-    return 0;
-}
-
-/**
- * Returns whether the processing of the object is complete or not.
- * For file objects this means that all bytes have been processed.
- *
- * @return  True if complete, False if not.
- */
-bool SharedClipboardURIObject::IsComplete(void) const
-{
-    bool fComplete;
-
-    switch (m_enmType)
-    {
-        case Type_File:
-            Assert(u.File.cbProcessed <= u.File.cbToProcess);
-            fComplete = u.File.cbProcessed == u.File.cbToProcess;
-            break;
-
-        case Type_Directory:
-            fComplete = true;
-            break;
-
-        default:
-            fComplete = true;
-            break;
-    }
-
-    return fComplete;
-}
-
-/**
- * Returns whether the object is in an open state or not.
- */
-bool SharedClipboardURIObject::IsOpen(void) const
-{
-    switch (m_enmType)
-    {
-        case Type_File:      return RTFileIsValid(u.File.hFile);
-        case Type_Directory: return RTDirIsValid(u.Dir.hDir);
-        default:             break;
-    }
-
-    return false;
-}
-
-/**
- * (Re-)Opens the object as a directory with a specific view, open and file mode.
- *
- * @return  IPRT status code.
- * @param   enmView             View to use for opening the object.
- * @param   fCreate             Directory creation flags to use.
- * @param   fMode               File mode to use.
- */
-int SharedClipboardURIObject::OpenDirectory(View enmView, uint32_t fCreate /* = 0 */, RTFMODE fMode /* = 0 */)
-{
-    return OpenDirectoryEx(  enmView == View_Source
-                           ? m_strSrcPathAbs : m_strTgtPathAbs
-                           , enmView, fCreate, fMode, SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-}
-
-/**
- * Open the object as a file with a specific file type, and, depending on the type, specifying additional parameters.
- *
- * @return  IPRT status code.
- * @param   strPathAbs          Absolute path of the directory.
- * @param   enmView             View of the object.
- * @param   fCreate             Directory creation flags to use.
- * @param   fMode               File mode to use; only valid for file objects.
- * @param   fFlags              Additional Shared Clipboard URI object flags.
- */
-int SharedClipboardURIObject::OpenDirectoryEx(const RTCString &strPathAbs, View enmView,
-                                              uint32_t fCreate /* = 0 */, RTFMODE fMode /* = 0 */,
-                                              SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */)
-{
-    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURIOBJECT_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
-
-    AssertMsgReturn(m_enmType == Type_Directory, ("Object is not a directory\n"), VERR_INVALID_STATE);
-
-    LogFlowThisFunc(("strPath=%s, enmView=%RU32, fCreate=0x%x, fMode=0x%x, fFlags=0x%x\n",
-                     strPathAbs.c_str(), enmView, fCreate, fMode, fFlags));
-
-    int rc = setDirectoryDataInternal(strPathAbs, enmView, fCreate, fMode, fFlags);
-    if (RT_SUCCESS(rc))
-    {
-        rc = RTDirOpen(&u.Dir.hDir, strPathAbs.c_str());
-        if (RT_SUCCESS(rc))
-            rc = queryInfoInternal(enmView);
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * (Re-)Opens the object as a file with a specific view, open and file mode.
- *
- * @return  IPRT status code.
- * @param   enmView             View to use for opening the object.
- * @param   fOpen               File open flags to use.
- * @param   fMode               File mode to use.
- */
-int SharedClipboardURIObject::OpenFile(View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */)
-{
-    return OpenFileEx(  enmView == View_Source
-                      ? m_strSrcPathAbs : m_strTgtPathAbs
-                      , enmView, fOpen, fMode, SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE);
-}
-
-/**
- * Opens the object as a file with a specific file type, and, depending on the type, specifying additional parameters.
- *
- * @return  IPRT status code.
- * @param   strPathAbs          Absolute path of the file.
- * @param   enmView             View of the object.
- * @param   fOpen               Open mode to use; only valid for file objects.
- * @param   fMode               File mode to use; only valid for file objects.
- * @param   fFlags              Additional Shared Clipboard URI object flags.
- */
-int SharedClipboardURIObject::OpenFileEx(const RTCString &strPathAbs, View enmView,
-                                         uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */,
-                                         SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */)
-{
-    AssertReturn(!(fFlags & ~SHAREDCLIPBOARDURIOBJECT_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
-
-    AssertMsgReturn(m_enmType == Type_File, ("Object is not a file\n"), VERR_INVALID_STATE);
-
-    LogFlowThisFunc(("strPath=%s, enmView=%RU32, fOpen=0x%x, fMode=0x%x, fFlags=0x%x\n",
-                     strPathAbs.c_str(), enmView, fOpen, fMode, fFlags));
-
-    int rc = setFileDataInternal(strPathAbs, enmView, fOpen, fMode, fFlags);
-    if (RT_SUCCESS(rc))
-    {
-        if (fOpen) /* Opening mode specified? */
-        {
-            /*
-             * Open files on the source with RTFILE_O_DENY_WRITE to prevent races
-             * where the OS writes to the file while the destination side transfers
-             * it over.
-             */
-            LogFlowThisFunc(("Opening ...\n"));
-            rc = RTFileOpen(&u.File.hFile, strPathAbs.c_str(), fOpen);
-            if (RT_SUCCESS(rc))
-            {
-                if (   (fOpen & RTFILE_O_WRITE) /* Only set the file mode on write. */
-                    &&  fMode                   /* Some file mode to set specified? */)
-                {
-                    rc = RTFileSetMode(u.File.hFile, fMode);
-                }
-                else if (fOpen & RTFILE_O_READ)
-                {
-                    rc = queryInfoInternal(enmView);
-                }
-            }
-        }
-
-        if (RT_SUCCESS(rc))
-        {
-            LogFlowThisFunc(("File cbObject=%RU64, fMode=0x%x\n",
-                             u.File.objInfo.cbObject, u.File.objInfo.Attr.fMode));
-            u.File.cbToProcess = u.File.objInfo.cbObject;
-            u.File.cbProcessed = 0;
-
-            m_enmView = enmView;
-        }
-    }
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-
-/**
- * Queries information about the object using a specific view, internal version.
- *
- * @return  IPRT status code.
- * @param   enmView             View to use for querying information. Currently ignored.
- */
-int SharedClipboardURIObject::queryInfoInternal(View enmView)
-{
-    RT_NOREF(enmView);
-
-    int rc;
-
-    switch (m_enmType)
-    {
-        case Type_File:
-            AssertMsgReturn(RTFileIsValid(u.File.hFile), ("Object has invalid file handle\n"), VERR_INVALID_STATE);
-            rc = RTFileQueryInfo(u.File.hFile, &u.File.objInfo, RTFSOBJATTRADD_NOTHING);
-            break;
-
-        case Type_Directory:
-            AssertMsgReturn(RTDirIsValid(u.Dir.hDir), ("Object has invalid directory handle\n"), VERR_INVALID_STATE);
-            rc = RTDirQueryInfo(u.Dir.hDir, &u.Dir.objInfo, RTFSOBJATTRADD_NOTHING);
-            break;
-
-        default:
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    return rc;
-}
-
-/**
- * Queries information about the object using a specific view.
- *
- * @return  IPRT status code.
- * @param   enmView             View to use for querying information.
- */
-int SharedClipboardURIObject::QueryInfo(View enmView)
-{
-    return queryInfoInternal(enmView);
-}
-
-/**
- * Rebases an absolute URI path from an old path base to a new path base.
- * This function is needed in order to transform path from the source side to the target side.
- *
- * @return  IPRT status code.
- * @param   strPathAbs          Absolute URI path to rebase.
- * @param   strBaseOld          Old base path to rebase from.
- * @param   strBaseNew          New base path to rebase to.
- *
- ** @todo Put this into an own class like SharedClipboardURIPath : public RTCString?
- */
-/* static */
-int SharedClipboardURIObject::RebaseURIPath(RTCString &strPathAbs,
-                                            const RTCString &strBaseOld /* = "" */,
-                                            const RTCString &strBaseNew /* = "" */)
-{
-    char *pszPath = RTUriFilePath(strPathAbs.c_str());
-    if (!pszPath) /* No URI? */
-         pszPath = RTStrDup(strPathAbs.c_str());
-
-    int rc;
-
-    if (pszPath)
-    {
-        const char *pszPathStart = pszPath;
-        const char *pszBaseOld = strBaseOld.c_str();
-        if (   pszBaseOld
-            && RTPathStartsWith(pszPath, pszBaseOld))
-        {
-            pszPathStart += strlen(pszBaseOld);
-        }
-
-        rc = VINF_SUCCESS;
-
-        if (RT_SUCCESS(rc))
-        {
-            char *pszPathNew = RTPathJoinA(strBaseNew.c_str(), pszPathStart);
-            if (pszPathNew)
-            {
-                char *pszPathURI = RTUriCreate("file" /* pszScheme */, "/" /* pszAuthority */,
-                                               pszPathNew /* pszPath */,
-                                               NULL /* pszQuery */, NULL /* pszFragment */);
-                if (pszPathURI)
-                {
-                    LogFlowFunc(("Rebasing \"%s\" to \"%s\"\n", strPathAbs.c_str(), pszPathURI));
-
-                    strPathAbs = RTCString(pszPathURI) + "\r\n";
-                    RTStrFree(pszPathURI);
-                }
-                else
-                    rc = VERR_INVALID_PARAMETER;
-
-                RTStrFree(pszPathNew);
-            }
-            else
-                rc = VERR_NO_MEMORY;
-        }
-
-        RTStrFree(pszPath);
-    }
-    else
-        rc = VERR_NO_MEMORY;
-
-    return rc;
-}
-
-/**
- * Reads data from the object. Only applies to files objects.
- *
- * @return  IPRT status code.
- * @param   pvBuf               Buffer where to store the read data.
- * @param   cbBuf               Size (in bytes) of the buffer.
- * @param   pcbRead             Pointer where to store how many bytes were read. Optional.
- */
-int SharedClipboardURIObject::Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead)
-{
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    AssertReturn(cbBuf, VERR_INVALID_PARAMETER);
-    /* pcbRead is optional. */
-
-    AssertMsgReturn(m_enmView == View_Source, ("Cannot read from an object which is not in source view (is 0x%x)\n", m_enmView),
-                    VERR_INVALID_STATE);
-
-    size_t cbRead = 0;
-
-    int rc;
-    switch (m_enmType)
-    {
-        case Type_File:
-        {
-            rc = RTFileRead(u.File.hFile, pvBuf, cbBuf, &cbRead);
-            if (RT_SUCCESS(rc))
-            {
-                u.File.cbProcessed += cbRead;
-                Assert(u.File.cbProcessed <= u.File.cbToProcess);
-
-                /* End of file reached or error occurred? */
-                if (   u.File.cbToProcess
-                    && u.File.cbProcessed == u.File.cbToProcess)
-                {
-                    rc = VINF_EOF;
-                }
-            }
-            break;
-        }
-
-        case Type_Directory:
-        {
-            rc = VINF_SUCCESS;
-            break;
-        }
-
-        default:
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbRead)
-            *pcbRead = (uint32_t)cbRead;
-    }
-
-    LogFlowFunc(("Returning strSourcePath=%s, cbRead=%zu, rc=%Rrc\n", m_strSrcPathAbs.c_str(), cbRead, rc));
-    return rc;
-}
-
-/**
- * Resets the object's state and closes all related handles.
- */
-void SharedClipboardURIObject::Reset(void)
-{
-    LogFlowThisFuncEnter();
-
-    Close();
-
-    m_enmType        = Type_Unknown;
-    m_enmView        = View_Unknown;
-    m_fModeRequested = 0;
-    m_fFlags         = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE;
-    m_strSrcPathAbs  = "";
-    m_strTgtPathAbs  = "";
-
-    RT_ZERO(u);
-}
-
-int SharedClipboardURIObject::setDirectoryDataInternal(const RTCString &strPathAbs, View enmView, uint32_t fCreate /* = 0 */, RTFMODE fMode /* = 0 */,
-                                                       SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */)
-{
-    int rc = VINF_SUCCESS;
-
-    switch (enmView)
-    {
-        case View_Source:
-            m_strSrcPathAbs = strPathAbs;
-            break;
-
-        case View_Target:
-            m_strTgtPathAbs = strPathAbs;
-            break;
-
-        default:
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    if (RT_FAILURE(rc))
-        return rc;
-
-    m_fFlags         = fFlags;
-    m_fModeRequested = fMode;
-
-    u.Dir.fCreateRequested = fCreate;
-
-    return rc;
-}
-
-int SharedClipboardURIObject::SetDirectoryData(const RTCString &strPathAbs, View enmView, uint32_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */,
-                                               SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */)
-{
-    return setDirectoryDataInternal(strPathAbs, enmView, fOpen, fMode, fFlags);
-}
-
-int SharedClipboardURIObject::setFileDataInternal(const RTCString &strPathAbs, View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */,
-                                                  SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */)
-{
-    int rc = VINF_SUCCESS;
-
-    switch (enmView)
-    {
-        case View_Source:
-            m_strSrcPathAbs = strPathAbs;
-            break;
-
-        case View_Target:
-            m_strTgtPathAbs = strPathAbs;
-            break;
-
-        default:
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    if (RT_FAILURE(rc))
-        return rc;
-
-    m_fFlags         = fFlags;
-    m_fModeRequested = fMode;
-
-    u.File.fOpenRequested = fOpen;
-
-    return rc;
-}
-
-int SharedClipboardURIObject::SetFileData(const RTCString &strPathAbs, View enmView, uint64_t fOpen /* = 0 */, RTFMODE fMode /* = 0 */,
-                                          SHAREDCLIPBOARDURIOBJECTFLAGS fFlags /* = SHAREDCLIPBOARDURIOBJECT_FLAGS_NONE */)
-{
-    return setFileDataInternal(strPathAbs, enmView, fOpen, fMode, fFlags);
-}
-
-/**
- * Sets the bytes to process by the object.
- *
- * Note: Only applies if the object is of type SharedClipboardURIObject::Type_File.
- *
- * @return  IPRT return code.
- * @param   cbSize          Size (in bytes) to process.
- */
-int SharedClipboardURIObject::SetSize(uint64_t cbSize)
-{
-    AssertReturn(m_enmType == Type_File, VERR_INVALID_PARAMETER);
-
-    /** @todo Implement sparse file support here. */
-
-    u.File.cbToProcess = cbSize;
-    return VINF_SUCCESS;
-}
-
-/**
- * Writes data to an object. Only applies to file objects.
- *
- * @return  IPRT status code.
- * @param   pvBuf               Buffer of data to write.
- * @param   cbBuf               Size (in bytes) of data to write.
- * @param   pcbWritten          Pointer where to store how many bytes were written. Optional.
- */
-int SharedClipboardURIObject::Write(const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten)
-{
-    AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-    AssertReturn(cbBuf, VERR_INVALID_PARAMETER);
-    /* pcbWritten is optional. */
-
-    AssertMsgReturn(m_enmView == View_Target, ("Cannot write to an object which is not in target view\n"),
-                    VERR_INVALID_STATE);
-
-    size_t cbWritten = 0;
-
-    int rc;
-    switch (m_enmType)
-    {
-        case Type_File:
-        {
-            rc = RTFileWrite(u.File.hFile, pvBuf, cbBuf, &cbWritten);
-            if (RT_SUCCESS(rc))
-                u.File.cbProcessed += cbWritten;
-            break;
-        }
-
-        case Type_Directory:
-        {
-            rc = VINF_SUCCESS;
-            break;
-        }
-
-        default:
-            rc = VERR_NOT_IMPLEMENTED;
-            break;
-    }
-
-    if (RT_SUCCESS(rc))
-    {
-        if (pcbWritten)
-            *pcbWritten = (uint32_t)cbWritten;
-    }
-
-    LogFlowThisFunc(("Returning strSourcePathAbs=%s, cbWritten=%zu, rc=%Rrc\n", m_strSrcPathAbs.c_str(), cbWritten, rc));
-    return rc;
-}
-
Index: /trunk/src/VBox/HostServices/SharedClipboard/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/Makefile.kmk	(revision 79630)
+++ /trunk/src/VBox/HostServices/SharedClipboard/Makefile.kmk	(revision 79631)
@@ -51,6 +51,4 @@
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardArea.cpp \
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp \
-	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardURIList.cpp \
-	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardURIObject.cpp \
 	$(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-uri.cpp
  VBoxSharedClipboard_SOURCES.win += \
Index: /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h	(revision 79630)
+++ /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h	(revision 79631)
@@ -42,13 +42,4 @@
 
 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
-/**
- * Structure for handling a single URI object context.
- */
-typedef struct _VBOXCLIPBOARDCLIENTURIOBJCTX
-{
-    /** Pointer to current object being processed. */
-    SharedClipboardURIObject      *pObj;
-} VBOXCLIPBOARDCLIENTURIOBJCTX, *PVBOXCLIPBOARDCLIENTURIOBJCTX;
-
 struct VBOXCLIPBOARDCLIENTSTATE;
 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
