GuestDirectoryImpl.cpp revision f044158ee9eb7045a43f2c4ef2fbc07cb11329ae
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync * VirtualBox Main - Guest directory handling.
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync * Copyright (C) 2012-2013 Oracle Corporation
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync * available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync/*******************************************************************************
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync* Header Files *
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync*******************************************************************************/
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync// constructor / destructor
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync/////////////////////////////////////////////////////////////////////////////
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync// public initializer/uninitializer for internal purposes only
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync/////////////////////////////////////////////////////////////////////////////
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsyncint GuestDirectory::init(Console *pConsole, GuestSession *pSession,
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync ULONG uDirID, const GuestDirectoryOpenInfo &openInfo)
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync LogFlowThisFunc(("pConsole=%p, pSession=%p, uDirID=%RU32, strPath=%s, strFilter=%s, uFlags=%x\n",
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync pConsole, pSession, uDirID, openInfo.mPath.c_str(), openInfo.mFilter.c_str(),
29bdc01040c07a3dd482a94a2cb8f0a90f8587a7vboxsync /* Enclose the state transition NotReady->InInit->Ready. */
return VINF_SUCCESS;
return vrc;
return vrc;
return S_OK;
return S_OK;
int GuestDirectory::i_callbackDispatcher(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb)
int vrc;
case GUEST_DIR_NOTIFY:
#ifdef DEBUG
return vrc;
switch (guestRc)
case VERR_DIR_NOT_EMPTY:
return strError;
return vrc;
return pInterface->setError(VBOX_E_IPRT_ERROR, GuestDirectory::i_guestErrorToString(guestRc).c_str());
#ifndef VBOX_WITH_GUEST_CONTROL
int guestRc;
switch (rc)
case VERR_GSTCTL_GUEST_ERROR:
case VERR_NOT_SUPPORTED:
return hr;
#ifndef VBOX_WITH_GUEST_CONTROL
int guestRc;
switch (rc)
case VERR_GSTCTL_GUEST_ERROR:
case VERR_ACCESS_DENIED:
hr = setError(VBOX_E_IPRT_ERROR, tr("Reading directory \"%s\" failed: Unable to read / access denied"),
case VERR_PATH_NOT_FOUND:
case VERR_NO_MORE_FILES:
return hr;