VirtualBox

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

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

Main,VBoxManage,FE/Qt: Extended the createSharedFolder and ISharedFolder methods with a mount poit parameter/attribute for use when auto-mounting. This is especially useful for Windows and OS/2 guests which operates with drive letters. The change has not yet trickled down to the guest interface and VBoxService.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: mappings.h 75380 2018-11-09 22:25:30Z vboxsync $ */
2/** @file
3 * Shared folders service - Mappings header.
4 */
5
6/*
7 * Copyright (C) 2006-2017 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 ___MAPPINGS_H
19#define ___MAPPINGS_H
20
21#include "shfl.h"
22#include <VBox/shflsvc.h>
23
24typedef struct
25{
26 char *pszFolderName; /**< Directory at the host to share with the guest. */
27 PSHFLSTRING pMapName; /**< Share name for the guest. */
28 uint32_t cMappings; /**< Number of mappings. */
29 bool fValid; /**< Mapping entry is used/valid. */
30 bool fHostCaseSensitive; /**< Host file name space is case-sensitive. */
31 bool fGuestCaseSensitive; /**< Guest file name space is case-sensitive. */
32 bool fWritable; /**< Folder is writable for the guest. */
33 PSHFLSTRING pAutoMountPoint; /**< Where the guest should try auto-mount the folder. */
34 bool fAutoMount; /**< Folder will be auto-mounted by the guest. */
35 bool fSymlinksCreate; /**< Guest is able to create symlinks. */
36 bool fMissing; /**< Mapping not invalid but host path does not exist.
37 Any guest operation on such a folder fails! */
38 bool fPlaceholder; /**< Mapping does not exist in the VM settings but the guest
39 still has. fMissing is always true for this mapping. */
40} MAPPING;
41/** Pointer to a MAPPING structure. */
42typedef MAPPING *PMAPPING;
43
44void vbsfMappingInit(void);
45
46bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping);
47
48int vbsfMappingsAdd(const char *pszFolderName, PSHFLSTRING pMapName, bool fWritable,
49 bool fAutoMount, PSHFLSTRING pAutoMountPoint, bool fCreateSymlinks, bool fMissing, bool fPlaceholder);
50int vbsfMappingsRemove(PSHFLSTRING pMapName);
51
52int vbsfMappingsQuery(PSHFLCLIENTDATA pClient, PSHFLMAPPING pMappings, uint32_t *pcMappings);
53int vbsfMappingsQueryName(PSHFLCLIENTDATA pClient, SHFLROOT root, SHFLSTRING *pString);
54int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWritable);
55int vbsfMappingsQueryAutoMount(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fAutoMount);
56int vbsfMappingsQuerySymlinksCreate(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fSymlinksCreate);
57
58int vbsfMapFolder(PSHFLCLIENTDATA pClient, PSHFLSTRING pszMapName, RTUTF16 delimiter,
59 bool fCaseSensitive, SHFLROOT *pRoot);
60int vbsfUnmapFolder(PSHFLCLIENTDATA pClient, SHFLROOT root);
61
62const char* vbsfMappingsQueryHostRoot(SHFLROOT root);
63int vbsfMappingsQueryHostRootEx(SHFLROOT hRoot, const char **ppszRoot, uint32_t *pcbRootLen);
64bool vbsfIsGuestMappingCaseSensitive(SHFLROOT root);
65bool vbsfIsHostMappingCaseSensitive(SHFLROOT root);
66
67int vbsfMappingLoaded(const PMAPPING pLoadedMapping, SHFLROOT root);
68PMAPPING vbsfMappingGetByRoot(SHFLROOT root);
69
70#endif /* !___MAPPINGS_H */
71
Note: See TracBrowser for help on using the repository browser.

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