1 | /** @file
|
---|
2 | * Shared Folders: Main header - Common data and function prototypes definitions.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2020 Oracle Corporation
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | */
|
---|
16 |
|
---|
17 | #ifndef VBOX_INCLUDED_SRC_SharedFolders_shfl_h
|
---|
18 | #define VBOX_INCLUDED_SRC_SharedFolders_shfl_h
|
---|
19 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
20 | # pragma once
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | #include <VBox/err.h>
|
---|
24 | #include <VBox/hgcmsvc.h>
|
---|
25 | #include <VBox/shflsvc.h>
|
---|
26 |
|
---|
27 | #include <VBox/log.h>
|
---|
28 |
|
---|
29 | /** Shared Folders client flags.
|
---|
30 | * @{
|
---|
31 | */
|
---|
32 | /** Client has queried mappings at least once and, therefore, the service can
|
---|
33 | * process its other requests too. */
|
---|
34 | #define SHFL_CF_MAPPINGS_QUERIED (0x00000001)
|
---|
35 | /** Mappings have been changed since last query. */
|
---|
36 | #define SHFL_CF_MAPPINGS_CHANGED (0x00000002)
|
---|
37 | /** Client uses UTF8 encoding, if not set then unicode 16 bit (UCS2) is used. */
|
---|
38 | #define SHFL_CF_UTF8 (0x00000004)
|
---|
39 | /** Client both supports and wants to use symlinks. */
|
---|
40 | #define SHFL_CF_SYMLINKS (0x00000008)
|
---|
41 | /** The call to SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES will return immediately
|
---|
42 | * because of a SHFL_FN_CANCEL_MAPPINGS_CHANGES_WAITS call. */
|
---|
43 | #define SHFL_CF_CANCEL_NEXT_WAIT (0x00000010)
|
---|
44 | /** @} */
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * @note This structure is dumped directly into the saved state, so care must be
|
---|
48 | * taken when extending it!
|
---|
49 | */
|
---|
50 | typedef struct SHFLCLIENTDATA
|
---|
51 | {
|
---|
52 | /** Client flags */
|
---|
53 | uint32_t fu32Flags;
|
---|
54 | /** Path delimiter. */
|
---|
55 | RTUTF16 PathDelimiter;
|
---|
56 | /** The error style, SHFLERRORSTYLE. */
|
---|
57 | uint8_t enmErrorStyle;
|
---|
58 | /** Set if the client has mapping usage counts.
|
---|
59 | * This is for helping with saved state. */
|
---|
60 | uint8_t fHasMappingCounts;
|
---|
61 | /** Mapping counts for each root ID so we can unmap the folders when the
|
---|
62 | * session disconnects or the VM resets. */
|
---|
63 | uint16_t acMappings[SHFL_MAX_MAPPINGS];
|
---|
64 | } SHFLCLIENTDATA;
|
---|
65 | /** Pointer to a SHFLCLIENTDATA structure. */
|
---|
66 | typedef SHFLCLIENTDATA *PSHFLCLIENTDATA;
|
---|
67 |
|
---|
68 |
|
---|
69 | /** @def SHFL_CLIENT_NEED_WINDOWS_ERROR_STYLE_ADJUST_ON_POSIX
|
---|
70 | * Whether to make windows error style adjustments on a posix host.
|
---|
71 | * This always returns false on windows hosts. */
|
---|
72 | #ifdef RT_OS_WINDOWS
|
---|
73 | # define SHFL_CLIENT_NEED_WINDOWS_ERROR_STYLE_ADJUST_ON_POSIX(a_pClient) (false)
|
---|
74 | #else
|
---|
75 | # define SHFL_CLIENT_NEED_WINDOWS_ERROR_STYLE_ADJUST_ON_POSIX(a_pClient) ((a_pClient)->enmErrorStyle == kShflErrorStyle_Windows)
|
---|
76 | #endif
|
---|
77 |
|
---|
78 | #endif /* !VBOX_INCLUDED_SRC_SharedFolders_shfl_h */
|
---|
79 |
|
---|