VirtualBox

source: vbox/trunk/src/VBox/VMM/include/CFGMInternal.h@ 100746

Last change on this file since 100746 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.4 KB
Line 
1/* $Id: CFGMInternal.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * CFGM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2006-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 VMM_INCLUDED_SRC_include_CFGMInternal_h
29#define VMM_INCLUDED_SRC_include_CFGMInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <VBox/cdefs.h>
35#include <VBox/types.h>
36
37
38/** @defgroup grp_cfgm_int Internals.
39 * @ingroup grp_cfgm
40 * @{
41 */
42
43
44/**
45 * Configuration manager propertype value.
46 */
47typedef union CFGMVALUE
48{
49 /** Integer value. */
50 struct CFGMVALUE_INTEGER
51 {
52 /** The integer represented as 64-bit unsigned. */
53 uint64_t u64;
54 } Integer;
55
56 /** String or password value. (UTF-8 of course) */
57 struct CFGMVALUE_STRING
58 {
59 /** Length of string. (In bytes, including the terminator.) */
60 size_t cb;
61 /** Pointer to the string. */
62 char *psz;
63 } String;
64
65 /** Byte string value. */
66 struct CFGMVALUE_BYTES
67 {
68 /** Length of byte string. (in bytes) */
69 size_t cb;
70 /** Pointer to the byte string. */
71 uint8_t *pau8;
72 } Bytes;
73} CFGMVALUE;
74/** Pointer to configuration manager property value. */
75typedef CFGMVALUE *PCFGMVALUE;
76
77
78/**
79 * Configuration manager tree node.
80 */
81typedef struct CFGMLEAF
82{
83 /** Pointer to the next leaf. */
84 PCFGMLEAF pNext;
85 /** Pointer to the previous leaf. */
86 PCFGMLEAF pPrev;
87
88 /** Property type. */
89 CFGMVALUETYPE enmType;
90 /** Property value. */
91 CFGMVALUE Value;
92
93 /** Name length. (exclusive) */
94 size_t cchName;
95 /** Name. */
96 char szName[1];
97} CFGMLEAF;
98
99
100/**
101 * Configuration manager tree node.
102 */
103typedef struct CFGMNODE
104{
105 /** Pointer to the next node (on this level). */
106 PCFGMNODE pNext;
107 /** Pointer to the previous node (on this level). */
108 PCFGMNODE pPrev;
109 /** Pointer Parent node. */
110 PCFGMNODE pParent;
111 /** Pointer to first child node. */
112 PCFGMNODE pFirstChild;
113 /** Pointer to first property leaf. */
114 PCFGMLEAF pFirstLeaf;
115
116 /** Pointer to the VM owning this node. */
117 PVM pVM;
118
119 /** The root of a 'restricted' subtree, i.e. the parent is
120 * invisible to non-trusted users.
121 */
122 bool fRestrictedRoot;
123
124 /** Name length. (exclusive) */
125 size_t cchName;
126 /** Name. */
127 char szName[1];
128} CFGMNODE;
129
130
131
132/**
133 * CFGM VM Instance data.
134 * Changes to this must checked against the padding of the cfgm union in VM!
135 */
136typedef struct CFGM
137{
138 /** Pointer to root node. */
139 R3PTRTYPE(PCFGMNODE) pRoot;
140} CFGM;
141
142/** @} */
143
144#endif /* !VMM_INCLUDED_SRC_include_CFGMInternal_h */
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