VirtualBox

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

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

HostServices: Use VBOX_INCLUDED_SRC_ as header guard prefix with scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/* $Id: mappings.h 76570 2019-01-01 04:36:36Z vboxsync $ */
2/** @file
3 * Shared folders service - Mappings 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_mappings_h
19#define VBOX_INCLUDED_SRC_SharedFolders_mappings_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "shfl.h"
25#include <VBox/shflsvc.h>
26
27typedef struct
28{
29 char *pszFolderName; /**< Directory at the host to share with the guest. */
30 PSHFLSTRING pMapName; /**< Share name for the guest. */
31 uint32_t cMappings; /**< Number of mappings. */
32 bool fValid; /**< Mapping entry is used/valid. */
33 bool fHostCaseSensitive; /**< Host file name space is case-sensitive. */
34 bool fGuestCaseSensitive; /**< Guest file name space is case-sensitive. */
35 bool fWritable; /**< Folder is writable for the guest. */
36 PSHFLSTRING pAutoMountPoint; /**< Where the guest should try auto-mount the folder. */
37 bool fAutoMount; /**< Folder will be auto-mounted by the guest. */
38 bool fSymlinksCreate; /**< Guest is able to create symlinks. */
39 bool fMissing; /**< Mapping not invalid but host path does not exist.
40 Any guest operation on such a folder fails! */
41 bool fPlaceholder; /**< Mapping does not exist in the VM settings but the guest
42 still has. fMissing is always true for this mapping. */
43 bool fLoadedRootId; /**< Set if vbsfMappingLoaded has found this mapping already. */
44} MAPPING;
45/** Pointer to a MAPPING structure. */
46typedef MAPPING *PMAPPING;
47
48void vbsfMappingInit(void);
49
50bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping);
51
52int vbsfMappingsAdd(const char *pszFolderName, PSHFLSTRING pMapName, bool fWritable,
53 bool fAutoMount, PSHFLSTRING pAutoMountPoint, bool fCreateSymlinks, bool fMissing, bool fPlaceholder);
54int vbsfMappingsRemove(PSHFLSTRING pMapName);
55
56int vbsfMappingsQuery(PSHFLCLIENTDATA pClient, bool fOnlyAutoMounts, PSHFLMAPPING pMappings, uint32_t *pcMappings);
57int vbsfMappingsQueryName(PSHFLCLIENTDATA pClient, SHFLROOT root, SHFLSTRING *pString);
58int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWritable);
59int vbsfMappingsQueryAutoMount(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fAutoMount);
60int vbsfMappingsQuerySymlinksCreate(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fSymlinksCreate);
61int vbsfMappingsQueryInfo(PSHFLCLIENTDATA pClient, SHFLROOT root, PSHFLSTRING pNameBuf, PSHFLSTRING pMntPtBuf,
62 uint64_t *pfFlags, uint32_t *puVersion);
63
64int vbsfMapFolder(PSHFLCLIENTDATA pClient, PSHFLSTRING pszMapName, RTUTF16 delimiter,
65 bool fCaseSensitive, SHFLROOT *pRoot);
66int vbsfUnmapFolder(PSHFLCLIENTDATA pClient, SHFLROOT root);
67
68int vbsfMappingsWaitForChanges(PSHFLCLIENTDATA pClient, VBOXHGCMCALLHANDLE hCall, PVBOXHGCMSVCPARM pParm, bool fRestored);
69int vbsfMappingsCancelChangesWaits(PSHFLCLIENTDATA pClient);
70
71const char* vbsfMappingsQueryHostRoot(SHFLROOT root);
72int vbsfMappingsQueryHostRootEx(SHFLROOT hRoot, const char **ppszRoot, uint32_t *pcbRootLen);
73bool vbsfIsGuestMappingCaseSensitive(SHFLROOT root);
74bool vbsfIsHostMappingCaseSensitive(SHFLROOT root);
75
76int vbsfMappingLoaded(MAPPING const *pLoadedMapping, SHFLROOT root);
77PMAPPING vbsfMappingGetByRoot(SHFLROOT root);
78
79#endif /* !VBOX_INCLUDED_SRC_SharedFolders_mappings_h */
80
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