VBoxCalls.h revision 9413be9ca3bdc6836e954d07d4d17d08edf311e3
/** @file
*
* VBoxGuestLib - A support library for VirtualBox guest additions:
* Central calls header
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef __VBOXCALLS__H
#define __VBOXCALLS__H
#include <VBox/VBoxGuestLib.h>
#ifndef _NTIFS_
# ifdef RT_OS_WINDOWS
# include <ntddk.h>
# else
# include <ntddk.h>
# endif
# endif
#endif
#ifdef DEBUG
# define LOG_ENABLED
#endif
#include "VBoxGuestLog.h"
#define ASSERTVBSF AssertRelease
typedef struct _VBSFCLIENT
{
} VBSFCLIENT;
typedef VBSFCLIENT *PVBSFCLIENT;
typedef struct _VBSFMAP
{
#define VBSF_DRIVE_LETTER_FIRST L'A'
#define VBSF_DRIVE_LETTER_LAST L'Z'
/* Poller thread flags. */
#define VBSF_TF_NONE (0x0000)
#define VBSF_TF_STARTED (0x0001)
#define VBSF_TF_TERMINATE (0x0002)
#define VBSF_TF_START_PROCESSING (0x0004)
#define DRIVE_FLAG_WORKING (0x1)
#define DRIVE_FLAG_LOCKED (0x2)
#define DRIVE_FLAG_WRITE_PROTECTED (0x4)
#ifdef RT_OS_WINDOWS
/** Device extension structure for each drive letter we created. */
typedef struct _VBSFDRIVE
{
/* A pointer to the Driver object we created for the drive. */
/** Root handle to access the drive. */
/** Informational string - the resource name on host. */
/** Guest drive letter. */
/** DRIVE_FLAG_* */
/** Head of FCB list. */
/* Synchronise requests directed to the drive. */
} VBSFDRIVE;
typedef VBSFDRIVE *PVBSFDRIVE;
#endif /* RT_OS_WINDOWS */
/* forward decl */
struct _MRX_VBOX_DEVICE_EXTENSION;
typedef struct _MRX_VBOX_DEVICE_EXTENSION *PMRX_VBOX_DEVICE_EXTENSION;
DECLVBGL(void) vboxUninit (void);
DECLVBGL(int) vboxCallQueryMappings (PVBSFCLIENT pClient, SHFLMAPPING paMappings[], uint32_t *pcMappings);
DECLVBGL(int) vboxCallQueryMapName (PVBSFCLIENT pClient, SHFLROOT root, SHFLSTRING *pString, uint32_t size);
DECLVBGL(int) vboxCallCreate (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pParsedPath, PSHFLCREATEPARMS pCreateParms);
DECLVBGL(int) vboxCallRemove (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pParsedPath, uint32_t flags);
DECLVBGL(int) vboxCallRename (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pSrcPath, PSHFLSTRING pDestPath, uint32_t flags);
DECLVBGL(int) vboxCallRead (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer);
DECLVBGL(int) vboxCallWrite (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer);
DECLVBGL(int) vboxCallLock (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint64_t cbSize, uint32_t fLock);
DECLVBGL(int) vboxCallDirInfo (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,PSHFLSTRING ParsedPath, uint32_t flags,
DECLVBGL(int) vboxCallFSInfo (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint32_t flags, uint32_t *pcbBuffer, PSHFLDIRINFO pBuffer);
#endif /* __VBOXCALLS__H */