1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox XML utility class declaration
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 innotek GmbH
|
---|
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 as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ____H_VIRTUALBOXXMLUTIL
|
---|
19 | #define ____H_VIRTUALBOXXMLUTIL
|
---|
20 |
|
---|
21 | // for BSTR referred from VBox/cfgldr.h
|
---|
22 | #include "VBox/com/defs.h"
|
---|
23 |
|
---|
24 | #include <VBox/cdefs.h>
|
---|
25 | #include <VBox/cfgldr.h>
|
---|
26 | #include <iprt/file.h>
|
---|
27 |
|
---|
28 | /** VirtualBox XML settings namespace */
|
---|
29 | #define VBOX_XML_NAMESPACE "http://www.innotek.de/VirtualBox-settings"
|
---|
30 |
|
---|
31 | #define VBOX_XML_VERSION "1.2"
|
---|
32 |
|
---|
33 | /** VirtualBox XML settings version string */
|
---|
34 | #if defined (RT_OS_DARWIN)
|
---|
35 | # define VBOX_XML_PLATFORM "macosx"
|
---|
36 | #elif defined (RT_OS_FREEBSD)
|
---|
37 | # define VBOX_XML_PLATFORM "freebsd"
|
---|
38 | #elif defined (RT_OS_LINUX)
|
---|
39 | # define VBOX_XML_PLATFORM "linux"
|
---|
40 | #elif defined (RT_OS_NETBSD)
|
---|
41 | # define VBOX_XML_PLATFORM "netbsd"
|
---|
42 | #elif defined (RT_OS_OPENBSD)
|
---|
43 | # define VBOX_XML_PLATFORM "openbsd"
|
---|
44 | #elif defined (RT_OS_OS2)
|
---|
45 | # define VBOX_XML_PLATFORM "os2"
|
---|
46 | #elif defined (RT_OS_SOLARIS)
|
---|
47 | # define VBOX_XML_PLATFORM "solaris"
|
---|
48 | #elif defined (RT_OS_WINDOWS)
|
---|
49 | # define VBOX_XML_PLATFORM "windows"
|
---|
50 | #else
|
---|
51 | # error Unsupported platform!
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | /** VirtualBox XML common settings version string */
|
---|
55 | #define VBOX_XML_PLATFORM_COMMON "common"
|
---|
56 |
|
---|
57 | /** VirtualBox XML settings schema file */
|
---|
58 | #define VBOX_XML_SCHEMA "VirtualBox-settings-" VBOX_XML_PLATFORM ".xsd"
|
---|
59 | #define VBOX_XML_SCHEMA_COMMON "VirtualBox-settings-" VBOX_XML_PLATFORM_COMMON ".xsd"
|
---|
60 |
|
---|
61 | class VirtualBoxXMLUtil
|
---|
62 | {
|
---|
63 | protected:
|
---|
64 |
|
---|
65 | static DECLCALLBACK(int) cfgLdrEntityResolver (const char *pcszPublicId,
|
---|
66 | const char *pcszSystemId,
|
---|
67 | const char *pcszBaseURI,
|
---|
68 | PCFGLDRENTITY pEntity);
|
---|
69 |
|
---|
70 | /** VirtualBox XML settings "namespace schema" pair */
|
---|
71 | static const char *XmlSchemaNS;
|
---|
72 | };
|
---|
73 |
|
---|
74 |
|
---|
75 | #endif // ____H_VIRTUALBOXXMLUTIL
|
---|
76 |
|
---|