VirtualBox

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

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

*: scm --fix-header-guard-endif

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.1 KB
Line 
1/* $Id: CFGMInternal.h 76585 2019-01-01 06:31:29Z vboxsync $ */
2/** @file
3 * CFGM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef VMM_INCLUDED_SRC_include_CFGMInternal_h
19#define VMM_INCLUDED_SRC_include_CFGMInternal_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/cdefs.h>
25#include <VBox/types.h>
26
27
28/** @defgroup grp_cfgm_int Internals.
29 * @ingroup grp_cfgm
30 * @{
31 */
32
33
34/**
35 * Configuration manager propertype value.
36 */
37typedef union CFGMVALUE
38{
39 /** Integer value. */
40 struct CFGMVALUE_INTEGER
41 {
42 /** The integer represented as 64-bit unsigned. */
43 uint64_t u64;
44 } Integer;
45
46 /** String value. (UTF-8 of course) */
47 struct CFGMVALUE_STRING
48 {
49 /** Length of string. (In bytes, including the terminator.) */
50 size_t cb;
51 /** Pointer to the string. */
52 char *psz;
53 } String;
54
55 /** Byte string value. */
56 struct CFGMVALUE_BYTES
57 {
58 /** Length of byte string. (in bytes) */
59 size_t cb;
60 /** Pointer to the byte string. */
61 uint8_t *pau8;
62 } Bytes;
63} CFGMVALUE;
64/** Pointer to configuration manager property value. */
65typedef CFGMVALUE *PCFGMVALUE;
66
67
68/**
69 * Configuration manager tree node.
70 */
71typedef struct CFGMLEAF
72{
73 /** Pointer to the next leaf. */
74 PCFGMLEAF pNext;
75 /** Pointer to the previous leaf. */
76 PCFGMLEAF pPrev;
77
78 /** Property type. */
79 CFGMVALUETYPE enmType;
80 /** Property value. */
81 CFGMVALUE Value;
82
83 /** Name length. (exclusive) */
84 size_t cchName;
85 /** Name. */
86 char szName[1];
87} CFGMLEAF;
88
89
90/**
91 * Configuration manager tree node.
92 */
93typedef struct CFGMNODE
94{
95 /** Pointer to the next node (on this level). */
96 PCFGMNODE pNext;
97 /** Pointer to the previous node (on this level). */
98 PCFGMNODE pPrev;
99 /** Pointer Parent node. */
100 PCFGMNODE pParent;
101 /** Pointer to first child node. */
102 PCFGMNODE pFirstChild;
103 /** Pointer to first property leaf. */
104 PCFGMLEAF pFirstLeaf;
105
106 /** Pointer to the VM owning this node. */
107 PVM pVM;
108
109 /** The root of a 'restricted' subtree, i.e. the parent is
110 * invisible to non-trusted users.
111 */
112 bool fRestrictedRoot;
113
114 /** Name length. (exclusive) */
115 size_t cchName;
116 /** Name. */
117 char szName[1];
118} CFGMNODE;
119
120
121
122/**
123 * CFGM VM Instance data.
124 * Changes to this must checked against the padding of the cfgm union in VM!
125 */
126typedef struct CFGM
127{
128 /** Pointer to root node. */
129 R3PTRTYPE(PCFGMNODE) pRoot;
130} CFGM;
131
132/** @} */
133
134#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