VirtualBox

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

Last change on this file since 56962 was 56962, checked in by vboxsync, 9 years ago

HostServices/SharedFolders: enable guest to host path conversion

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