VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedFolders/teststubs.h@ 105016

最後變更 在這個檔案從105016是 105016,由 vboxsync 提交於 9 月 前

doc/manual,include/VBox,Frontends/VBoxManage,HostServices/SharedFolders,
Main/{include,SharedFolder,Console,Machine,VirtualBox.xidl}: Add a
new attribute to ISharedFolder for specifying a symbolic link creation
policy to restrict the source pathname when creating symbolic links
within a guest. The symbolic link policies are represented by a new
enumeration of type SymlinkPolicy_T which includes values for no
restrictions ('any'), symlink sources only within the subtree of the
share ('subtree'), symlink sources as any relative path ('relative'),
and no symlinks allowed ('forbidden'). The symlink policy can only be
applied to permanent shared folders at this stage. bugref:10619

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 5.6 KB
 
1/** @file
2 * VBox Shared Folders testcase stub redefinitions.
3 */
4
5/*
6 * Copyright (C) 2011-2023 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.alldomusa.eu.org.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * SPDX-License-Identifier: GPL-3.0-only
25 */
26
27/**
28 * Macros for renaming iprt file operations to redirect them to testcase
29 * stub functions (mocks). The religiously correct way to do this would be
30 * to make the service use a file operations structure with function pointers
31 * but I'm not sure that would be universally appreciated. */
32
33#ifndef VBOX_INCLUDED_SRC_SharedFolders_teststubs_h
34#define VBOX_INCLUDED_SRC_SharedFolders_teststubs_h
35#ifndef RT_WITHOUT_PRAGMA_ONCE
36# pragma once
37#endif
38
39#include <iprt/dir.h>
40#include <iprt/file.h>
41#include <iprt/time.h>
42
43#define RTDirClose testRTDirClose
44extern int testRTDirClose(RTDIR hDir);
45#define RTDirCreate testRTDirCreate
46extern int testRTDirCreate(const char *pszPath, RTFMODE fMode, uint32_t fCreate);
47#define RTDirOpen testRTDirOpen
48extern int testRTDirOpen(RTDIR *phDir, const char *pszPath);
49#define RTDirOpenFiltered testRTDirOpenFiltered
50extern int testRTDirOpenFiltered(RTDIR *phDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fFlags);
51#define RTDirQueryInfo testRTDirQueryInfo
52extern int testRTDirQueryInfo(RTDIR hDir, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs);
53#define RTDirRemove testRTDirRemove
54extern int testRTDirRemove(const char *pszPath);
55#define RTDirReadEx testRTDirReadEx
56extern int testRTDirReadEx(RTDIR hDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags);
57#define RTDirSetMode testRTDirSetMode
58extern int testRTDirSetMode(RTDIR hDir, RTFMODE fMode);
59#define RTDirSetTimes testRTDirSetTimes
60extern int testRTDirSetTimes(RTDIR hDir, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime);
61#define RTFileClose testRTFileClose
62extern int testRTFileClose(RTFILE hFile);
63#define RTFileDelete testRTFileDelete
64extern int testRTFileDelete(const char *pszFilename);
65#define RTFileFlush testRTFileFlush
66extern int testRTFileFlush(RTFILE hFile);
67#define RTFileLock testRTFileLock
68extern int testRTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock);
69#define RTFileOpenEx testRTFileOpenEx
70extern int testRTFileOpenEx(const char *pszFilename, uint64_t fOpen, PRTFILE phFile, PRTFILEACTION penmActionTaken);
71#define RTFileQueryInfo testRTFileQueryInfo
72extern int testRTFileQueryInfo(RTFILE hFile, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs);
73#define RTFileRead testRTFileRead
74extern int testRTFileRead(RTFILE hFile, void *pvBuf, size_t cbToRead, size_t *pcbRead);
75#define RTFileReadAt testRTFileReadAt
76extern int testRTFileReadAt(RTFILE hFile, uint64_t offFile, void *pvBuf, size_t cbToRead, size_t *pcbRead);
77#define RTFileSetMode testRTFileSetMode
78extern int testRTFileSetMode(RTFILE hFile, RTFMODE fMode);
79#define RTFileSetSize testRTFileSetSize
80extern int testRTFileSetSize(RTFILE hFile, uint64_t cbSize);
81#define RTFileSetTimes testRTFileSetTimes
82extern int testRTFileSetTimes(RTFILE hFile, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime);
83#define RTFileSeek testRTFileSeek
84extern int testRTFileSeek(RTFILE hFile, int64_t offSeek, unsigned uMethod, uint64_t *poffActual);
85#define RTFileUnlock testRTFileUnlock
86extern int testRTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock);
87#define RTFileWrite testRTFileWrite
88extern int testRTFileWrite(RTFILE hFile, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten);
89#define RTFileWriteAt testRTFileWriteAt
90extern int testRTFileWriteAt(RTFILE hFile, uint64_t offFile, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten);
91#define RTFsQueryProperties testRTFsQueryProperties
92extern int testRTFsQueryProperties(const char *pszFsPath, PRTFSPROPERTIES pProperties);
93#define RTFsQuerySerial testRTFsQuerySerial
94extern int testRTFsQuerySerial(const char *pszFsPath, uint32_t *pu32Serial);
95#define RTFsQuerySizes testRTFsQuerySizes
96extern int testRTFsQuerySizes(const char *pszFsPath, RTFOFF *pcbTotal, RTFOFF *pcbFree, uint32_t *pcbBlock, uint32_t *pcbSector);
97#define RTPathQueryInfoEx testRTPathQueryInfoEx
98extern int testRTPathQueryInfoEx(const char *pszPath, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags);
99#define RTSymlinkDelete testRTSymlinkDelete
100extern int testRTSymlinkDelete(const char *pszSymlink, uint32_t fDelete);
101#define RTSymlinkRead testRTSymlinkRead
102extern int testRTSymlinkRead(const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead);
103#define RTSymlinkCreate testRTSymlinkCreate
104extern int testRTSymlinkCreate(const char *pszSymlink, const char *pszTarget, RTSYMLINKTYPE enmType, uint32_t fCreate);
105
106#endif /* !VBOX_INCLUDED_SRC_SharedFolders_teststubs_h */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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