VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedFolders/mappings.h@ 107464

Last change on this file since 107464 was 106061, checked in by vboxsync, 4 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1/* $Id: mappings.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * Shared folders service - Mappings header.
4 */
5
6/*
7 * Copyright (C) 2006-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef VBOX_INCLUDED_SRC_SharedFolders_mappings_h
29#define VBOX_INCLUDED_SRC_SharedFolders_mappings_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "shfl.h"
35#include <VBox/shflsvc.h>
36
37typedef struct
38{
39 char *pszFolderName; /**< Directory at the host to share with the guest. */
40 PSHFLSTRING pMapName; /**< Share name for the guest. */
41 uint32_t cMappings; /**< Number of mappings. */
42 bool fValid; /**< Mapping entry is used/valid. */
43 bool fHostCaseSensitive; /**< Host file name space is case-sensitive. */
44 bool fGuestCaseSensitive; /**< Guest file name space is case-sensitive. */
45 bool fWritable; /**< Folder is writable for the guest. */
46 PSHFLSTRING pAutoMountPoint; /**< Where the guest should try auto-mount the folder. */
47 bool fAutoMount; /**< Folder will be auto-mounted by the guest. */
48 bool fSymlinksCreate; /**< Guest is able to create symlinks. */
49 bool fMissing; /**< Mapping not invalid but host path does not exist.
50 Any guest operation on such a folder fails! */
51 bool fPlaceholder; /**< Mapping does not exist in the VM settings but the guest
52 still has. fMissing is always true for this mapping. */
53 bool fLoadedRootId; /**< Set if vbsfMappingLoaded has found this mapping already. */
54 SymlinkPolicy_T enmSymlinkPolicy; /**< Symbolic link creation policy within the guest. */
55} MAPPING;
56/** Pointer to a MAPPING structure. */
57typedef MAPPING *PMAPPING;
58
59void vbsfMappingInit(void);
60
61bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping);
62
63int vbsfMappingsAdd(const char *pszFolderName, PSHFLSTRING pMapName, bool fWritable,
64 bool fAutoMount, PSHFLSTRING pAutoMountPoint, bool fCreateSymlinks, bool fMissing, bool fPlaceholder,
65 SymlinkPolicy_T enmSymlinkPolicy);
66int vbsfMappingsRemove(PSHFLSTRING pMapName);
67
68int vbsfMappingsQuery(PSHFLCLIENTDATA pClient, bool fOnlyAutoMounts, PSHFLMAPPING pMappings, uint32_t *pcMappings);
69int vbsfMappingsQueryName(PSHFLCLIENTDATA pClient, SHFLROOT root, SHFLSTRING *pString);
70int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWritable);
71int vbsfMappingsQueryAutoMount(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fAutoMount);
72int vbsfMappingsQuerySymlinksCreate(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fSymlinksCreate);
73int vbsfMappingsQuerySymlinkPolicy(PSHFLCLIENTDATA pClient, SHFLROOT root, SymlinkPolicy_T *enmSymlinkPolicy);
74int vbsfMappingsQueryInfo(PSHFLCLIENTDATA pClient, SHFLROOT root, PSHFLSTRING pNameBuf, PSHFLSTRING pMntPtBuf,
75 uint64_t *pfFlags, uint32_t *puVersion);
76
77int vbsfMapFolder(PSHFLCLIENTDATA pClient, PSHFLSTRING pszMapName, RTUTF16 delimiter,
78 bool fCaseSensitive, SHFLROOT *pRoot);
79int vbsfUnmapFolder(PSHFLCLIENTDATA pClient, SHFLROOT root);
80
81int vbsfMappingsWaitForChanges(PSHFLCLIENTDATA pClient, VBOXHGCMCALLHANDLE hCall, PVBOXHGCMSVCPARM pParm, bool fRestored);
82int vbsfMappingsCancelChangesWaits(PSHFLCLIENTDATA pClient);
83
84const char* vbsfMappingsQueryHostRoot(SHFLROOT root);
85int vbsfMappingsQueryHostRootEx(SHFLROOT hRoot, const char **ppszRoot, uint32_t *pcbRootLen);
86bool vbsfIsGuestMappingCaseSensitive(SHFLROOT root);
87bool vbsfIsHostMappingCaseSensitive(SHFLROOT root);
88
89void vbsfMappingLoadingStart(void);
90int vbsfMappingLoaded(MAPPING const *pLoadedMapping, SHFLROOT root);
91void vbsfMappingLoadingDone(void);
92PMAPPING vbsfMappingGetByRoot(SHFLROOT root);
93
94#endif /* !VBOX_INCLUDED_SRC_SharedFolders_mappings_h */
95
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