VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedFolders/shflhandle.h@ 77807

Last change on this file since 77807 was 77243, checked in by vboxsync, 6 years ago

HGCM,SharedFolders: Added new variation on the HGCM page list type that does not use a bounce buffer. bugref:9172

  • Added VMMDevHGCMParmType_NoBouncePageList.
  • Made VMMDevHGCMParmType_Embedded
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: shflhandle.h 77243 2019-02-10 22:44:00Z vboxsync $ */
2/** @file
3 * Shared Folders Host Service - Handles helper functions header.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef VBOX_INCLUDED_SRC_SharedFolders_shflhandle_h
19#define VBOX_INCLUDED_SRC_SharedFolders_shflhandle_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "shfl.h"
25#include <VBox/shflsvc.h>
26#include <iprt/dir.h>
27
28#define SHFL_HF_TYPE_MASK (0x000000FF)
29#define SHFL_HF_TYPE_DIR (0x00000001)
30#define SHFL_HF_TYPE_FILE (0x00000002)
31#define SHFL_HF_TYPE_VOLUME (0x00000004)
32#define SHFL_HF_TYPE_DONTUSE (0x00000080)
33
34#define SHFL_HF_VALID (0x80000000)
35
36#define SHFLHANDLE_MAX (4096)
37
38typedef struct _SHFLHANDLEHDR
39{
40 uint32_t u32Flags;
41} SHFLHANDLEHDR;
42
43#define ShflHandleType(__Handle) BIT_FLAG(((SHFLHANDLEHDR *)(__Handle))->u32Flags, SHFL_HF_TYPE_MASK)
44
45typedef struct _SHFLFILEHANDLE
46{
47 SHFLHANDLEHDR Header;
48 SHFLROOT root; /* Where the handle has been opened. */
49 union
50 {
51 struct
52 {
53 RTFILE Handle;
54 uint64_t fOpenFlags; /**< RTFILE_O_XXX. */
55 } file;
56 struct
57 {
58 RTDIR Handle;
59 RTDIR SearchHandle;
60 PRTDIRENTRYEX pLastValidEntry; /**< last found file in a directory search */
61 } dir;
62 };
63} SHFLFILEHANDLE;
64
65
66SHFLHANDLE vbsfAllocDirHandle(PSHFLCLIENTDATA pClient);
67SHFLHANDLE vbsfAllocFileHandle(PSHFLCLIENTDATA pClient);
68void vbsfFreeFileHandle (PSHFLCLIENTDATA pClient, SHFLHANDLE hHandle);
69
70
71int vbsfInitHandleTable();
72int vbsfFreeHandleTable();
73SHFLHANDLE vbsfAllocHandle(PSHFLCLIENTDATA pClient, uint32_t uType,
74 uintptr_t pvUserData);
75SHFLFILEHANDLE *vbsfQueryFileHandle(PSHFLCLIENTDATA pClient,
76 SHFLHANDLE handle);
77SHFLFILEHANDLE *vbsfQueryDirHandle(PSHFLCLIENTDATA pClient, SHFLHANDLE handle);
78uint32_t vbsfQueryHandleType(PSHFLCLIENTDATA pClient,
79 SHFLHANDLE handle);
80
81#endif /* !VBOX_INCLUDED_SRC_SharedFolders_shflhandle_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette