VirtualBox

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

Last change on this file since 22902 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/** @file
2 *
3 * Shared Folders:
4 * Handles helper functions header.
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __SHFLHANDLE__H
24#define __SHFLHANDLE__H
25
26#include "shfl.h"
27#include <VBox/shflsvc.h>
28#include <iprt/dir.h>
29
30#define SHFL_HF_TYPE_MASK (0x000000FF)
31#define SHFL_HF_TYPE_DIR (0x00000001)
32#define SHFL_HF_TYPE_FILE (0x00000002)
33#define SHFL_HF_TYPE_VOLUME (0x00000004)
34#define SHFL_HF_TYPE_DONTUSE (0x00000080)
35
36#define SHFL_HF_VALID (0x80000000)
37
38#define SHFLHANDLE_MAX (4096)
39
40typedef struct _SHFLHANDLEHDR
41{
42 uint32_t u32Flags;
43} SHFLHANDLEHDR;
44
45#define ShflHandleType(__Handle) BIT_FLAG(((SHFLHANDLEHDR *)(__Handle))->u32Flags, SHFL_HF_TYPE_MASK)
46
47typedef struct _SHFLFILEHANDLE
48{
49 SHFLHANDLEHDR Header;
50 union
51 {
52 struct
53 {
54 RTFILE Handle;
55 } file;
56 struct
57 {
58 PRTDIR Handle;
59 PRTDIR SearchHandle;
60 PRTDIRENTRYEX pLastValidEntry; /* last found file in a directory search */
61 } dir;
62 };
63} SHFLFILEHANDLE;
64
65
66SHFLHANDLE vbsfAllocDirHandle (void);
67SHFLHANDLE vbsfAllocFileHandle (void);
68void vbsfFreeFileHandle (SHFLHANDLE hHandle);
69
70
71int vbsfInitHandleTable();
72int vbsfFreeHandleTable();
73SHFLHANDLE vbsfAllocHandle(uint32_t uType, uintptr_t pvUserData);
74uintptr_t vbsfQueryHandle(SHFLHANDLE handle, uint32_t uType);
75int vbsfFreeHandle(SHFLHANDLE handle);
76
77#endif /* __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