VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedFolders/shfl.h@ 75407

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

VBoxSharedFolders,VBoxService,VBoxTray: New go at auto mounting shared folders, now also at runtime. bugref:3544

  • Added three new functions to the shared folders service:
    1. query mountpoint and everything else about a shared folder.
    2. wait for folder (mappings) config changes.
    3. cancel such waits.
  • Relaxed some of the check wrt placeholder folders so that the GUI can succesfully make changes to a folder while it is being used. The old code would end up failing if the guest was using the folder because of a (placeholder) duplicate.
  • Ran into some weird weird flag passing between service.cpp and vbsfMappingsQuery via pClient->fu32Flags. Didn't make sense to me and clashed with a new flag I added for the wait cancellation, so I changed it to use a parameter (fOnlyAutoMounts) for the purpose.
  • Pointed out that vbsfMappingsQuery is weird in a the way it doesn't return an overflow indicator, meaning that the guest library wrapper's checks for VINF_BUFFER_OVERFLOW is pointless.
  • In VBoxService I've reimplemented the automounter subservice. Only tested with a windows 7 guest so far. Highlights:
    • Use host specified mount points / drive letters.
    • Adjust to changes in mapping configuration.
    • Mappings should be global on windows guests, given that VBoxService runs under the System user (only verified on Win7).
  • One TODO is that I would like to try relocate a mapping that's not on the specified mount point once the mount point is freed up.
  • VBoxTray no longer maps shared folder on startup.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/** @file
2 * Shared Folders: Main header - Common data and function prototypes definitions.
3 */
4
5/*
6 * Copyright (C) 2006-2017 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 ___SHFL_H
18#define ___SHFL_H
19
20#include <VBox/err.h>
21#include <VBox/hgcmsvc.h>
22
23#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
24#include <VBox/log.h>
25
26/**
27 * Shared Folders client flags.
28 * @{
29 */
30
31/** Client has queried mappings at least once and, therefore,
32 * the service can process its other requests too.
33 */
34#define SHFL_CF_MAPPINGS_QUERIED (0x00000001)
35
36/** Mappings have been changed since last query. */
37#define SHFL_CF_MAPPINGS_CHANGED (0x00000002)
38
39/** Client uses UTF8 encoding, if not set then unicode 16 bit (UCS2) is used. */
40#define SHFL_CF_UTF8 (0x00000004)
41
42/** Client both supports and wants to use symlinks. */
43#define SHFL_CF_SYMLINKS (0x00000008)
44
45/** The call to SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES will return immediately
46 * because of a SHFL_FN_CANCEL_MAPPINGS_CHANGES_WAITS call. */
47#define SHFL_CF_CANCEL_NEXT_WAIT (0x00000010)
48
49/** @} */
50
51typedef struct _SHFLCLIENTDATA
52{
53 /** Client flags */
54 uint32_t fu32Flags;
55 /** Path delimiter. */
56 RTUTF16 PathDelimiter;
57} SHFLCLIENTDATA;
58/** Pointer to a SHFLCLIENTDATA structure. */
59typedef SHFLCLIENTDATA *PSHFLCLIENTDATA;
60
61#endif /* !___SHFL_H */
62
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