VirtualBox

source: vbox/trunk/include/VBox/VBoxGuestLibSharedFolders.h@ 90354

最後變更 在這個檔案從90354是 82968,由 vboxsync 提交於 5 年 前

Copyright year updates by scm.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.0 KB
 
1/* $Id: VBoxGuestLibSharedFolders.h 82968 2020-02-04 10:35:17Z vboxsync $ */
2/** @file
3 * VBoxGuestLib - Central calls header.
4 */
5
6/*
7 * Copyright (C) 2006-2020 Oracle Corporation
8 *
9 * Permission is hereby granted, free of charge, to any person
10 * obtaining a copy of this software and associated documentation
11 * files (the "Software"), to deal in the Software without
12 * restriction, including without limitation the rights to use,
13 * copy, modify, merge, publish, distribute, sublicense, and/or sell
14 * copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following
16 * conditions:
17 *
18 * The above copyright notice and this permission notice shall be
19 * included in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 * OTHER DEALINGS IN THE SOFTWARE.
29 */
30
31#ifndef VBOX_INCLUDED_VBoxGuestLibSharedFolders_h
32#define VBOX_INCLUDED_VBoxGuestLibSharedFolders_h
33#ifndef RT_WITHOUT_PRAGMA_ONCE
34# pragma once
35#endif
36
37#include <VBox/VBoxGuestLib.h>
38#include <VBox/shflsvc.h>
39
40#ifndef IN_RING0
41# error "ring-0 only"
42#endif
43
44RT_C_DECLS_BEGIN
45
46
47/** @addtogroup grp_vboxguest_lib_r0
48 * @{
49 */
50
51typedef struct VBGLSFCLIENT
52{
53 HGCMCLIENTID idClient;
54 VBGLHGCMHANDLE handle;
55} VBGLSFCLIENT;
56typedef VBGLSFCLIENT *PVBGLSFCLIENT;
57
58typedef struct VBGLSFMAP
59{
60 SHFLROOT root;
61} VBGLSFMAP, *PVBGLSFMAP;
62
63DECLVBGL(int) VbglR0SfInit(void);
64DECLVBGL(void) VbglR0SfTerm(void);
65DECLVBGL(int) VbglR0SfConnect(PVBGLSFCLIENT pClient);
66DECLVBGL(void) VbglR0SfDisconnect(PVBGLSFCLIENT pClient);
67
68DECLVBGL(int) VbglR0SfQueryMappings(PVBGLSFCLIENT pClient, SHFLMAPPING paMappings[], uint32_t *pcMappings);
69
70DECLVBGL(int) VbglR0SfQueryMapName(PVBGLSFCLIENT pClient, SHFLROOT root, SHFLSTRING *pString, uint32_t size);
71
72/**
73 * Create a new file or folder or open an existing one in a shared folder. Proxies
74 * to vbsfCreate in the host shared folder service.
75 *
76 * @returns IPRT status code, but see note below
77 * @param pClient Host-guest communication connection
78 * @param pMap The mapping for the shared folder in which the file
79 * or folder is to be created
80 * @param pParsedPath The path of the file or folder relative to the shared
81 * folder
82 * @param pCreateParms Parameters for file/folder creation. See the
83 * structure description in shflsvc.h
84 * @retval pCreateParms See the structure description in shflsvc.h
85 *
86 * @note This function reports errors as follows. The return value is always
87 * VINF_SUCCESS unless an exceptional condition occurs - out of
88 * memory, invalid arguments, etc. If the file or folder could not be
89 * opened or created, pCreateParms->Handle will be set to
90 * SHFL_HANDLE_NIL on return. In this case the value in
91 * pCreateParms->Result provides information as to why (e.g.
92 * SHFL_FILE_EXISTS). pCreateParms->Result is also set on success
93 * as additional information.
94 */
95DECLVBGL(int) VbglR0SfCreate(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, PSHFLSTRING pParsedPath, PSHFLCREATEPARMS pCreateParms);
96
97DECLVBGL(int) VbglR0SfClose(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE Handle);
98DECLVBGL(int) VbglR0SfRemove(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, PSHFLSTRING pParsedPath, uint32_t flags);
99DECLVBGL(int) VbglR0SfRename(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, PSHFLSTRING pSrcPath, PSHFLSTRING pDestPath, uint32_t flags);
100DECLVBGL(int) VbglR0SfFlush(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile);
101
102DECLVBGL(int) VbglR0SfRead(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer, bool fLocked);
103DECLVBGL(int) VbglR0SfReadPageList(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer,
104 uint16_t offFirstPage, uint16_t cPages, RTGCPHYS64 *paPages);
105DECLVBGL(int) VbglR0SfWrite(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint64_t offset,
106 uint32_t *pcbBuffer, uint8_t *pBuffer, bool fLocked);
107DECLVBGL(int) VbglR0SfWritePhysCont(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint64_t offset,
108 uint32_t *pcbBuffer, RTCCPHYS PhysBuffer);
109DECLVBGL(int) VbglR0SfWritePageList(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer,
110 uint16_t offFirstPage, uint16_t cPages, RTGCPHYS64 *paPages);
111
112DECLVBGL(int) VbglR0SfLock(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint64_t cbSize, uint32_t fLock);
113
114DECLVBGL(int) VbglR0SfDirInfo(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile,PSHFLSTRING ParsedPath, uint32_t flags,
115 uint32_t index, uint32_t *pcbBuffer, PSHFLDIRINFO pBuffer, uint32_t *pcFiles);
116DECLVBGL(int) VbglR0SfFsInfo(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile, uint32_t flags, uint32_t *pcbBuffer, PSHFLDIRINFO pBuffer);
117
118DECLVBGL(int) VbglR0SfMapFolder(PVBGLSFCLIENT pClient, PSHFLSTRING szFolderName, PVBGLSFMAP pMap);
119DECLVBGL(int) VbglR0SfUnmapFolder(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap);
120DECLVBGL(int) VbglR0SfSetUtf8(PVBGLSFCLIENT pClient);
121
122DECLVBGL(int) VbglR0SfReadLink(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, PSHFLSTRING ParsedPath, uint32_t pcbBuffer, uint8_t *pBuffer);
123DECLVBGL(int) VbglR0SfSymlink(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath, PSHFLFSOBJINFO pBuffer);
124DECLVBGL(int) VbglR0SfSetSymlinks(PVBGLSFCLIENT pClient);
125
126/** @} */
127
128RT_C_DECLS_END
129
130#endif /* !VBOX_INCLUDED_VBoxGuestLibSharedFolders_h */
131
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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