VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h@ 105840

Last change on this file since 105840 was 98709, checked in by vboxsync, 22 months ago

Guest Control: Implemented directory handling / walking as non-toolbox variants. bugref:9783

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: VBoxServiceUtils.h 98709 2023-02-24 08:49:40Z vboxsync $ */
2/** @file
3 * VBoxServiceUtils - Guest Additions Services (Utilities).
4 */
5
6/*
7 * Copyright (C) 2009-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef GA_INCLUDED_SRC_common_VBoxService_VBoxServiceUtils_h
29#define GA_INCLUDED_SRC_common_VBoxService_VBoxServiceUtils_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "VBoxServiceInternal.h"
35
36/** ID cache entry. */
37typedef struct VGSVCUIDENTRY
38{
39 /** The identifier name. */
40 uint32_t id;
41 /** Set if UID, clear if GID. */
42 bool fIsUid;
43 /** The name. */
44 char szName[128 - 4 - 1];
45} VGSVCUIDENTRY;
46typedef VGSVCUIDENTRY *PVGSVCUIDENTRY;
47
48
49/** ID cache. */
50typedef struct VGSVCIDCACHE
51{
52 /** Number of valid cache entries. */
53 uint32_t cEntries;
54 /** The next entry to replace. */
55 uint32_t iNextReplace;
56 /** The cache entries. */
57 VGSVCUIDENTRY aEntries[16];
58} VGSVCIDCACHE;
59typedef VGSVCIDCACHE *PVGSVCIDCACHE;
60
61#ifdef VBOX_WITH_GUEST_PROPS
62int VGSvcReadProp(uint32_t u32ClientId, const char *pszPropName, char **ppszValue, char **ppszFlags, uint64_t *puTimestamp);
63int VGSvcReadPropUInt32(uint32_t u32ClientId, const char *pszPropName, uint32_t *pu32, uint32_t u32Min, uint32_t u32Max);
64int VGSvcReadHostProp(uint32_t u32ClientId, const char *pszPropName, bool fReadOnly, char **ppszValue, char **ppszFlags,
65 uint64_t *puTimestamp);
66int VGSvcWritePropF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...);
67#endif
68
69#ifdef RT_OS_WINDOWS
70int VGSvcUtilWinGetFileVersionString(const char *pszPath, const char *pszFileName, char *pszVersion, size_t cbVersion);
71#endif
72
73const char *VGSvcIdCacheGetUidName(PVGSVCIDCACHE pIdCache, RTUID uid, const char *pszEntry, const char *pszRelativeTo);
74const char *VGSvcIdCacheGetGidName(PVGSVCIDCACHE pIdCache, RTGID gid, const char *pszEntry, const char *pszRelativeTo);
75
76#endif /* !GA_INCLUDED_SRC_common_VBoxService_VBoxServiceUtils_h */
77
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