VirtualBox

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

Last change on this file since 30441 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

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