VirtualBox

source: vbox/trunk/src/VBox/Main/VirtualBoxImplExtra.cpp@ 6096

Last change on this file since 6096 was 6076, checked in by vboxsync, 17 years ago

Merged dmik/s2 branch (r25959:26751) to the trunk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.0 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation extra definitions
4 *
5 * This file pulls in generated entities that may be rather big but rarely
6 * changed. Separating them from VirtualBoxImpl.cpp should speed up
7 * compilation a bit.
8 */
9
10/*
11 * Copyright (C) 2006-2007 innotek GmbH
12 *
13 * This file is part of VirtualBox Open Source Edition (OSE), as
14 * available from http://www.virtualbox.org. This file is free software;
15 * you can redistribute it and/or modify it under the terms of the GNU
16 * General Public License as published by the Free Software Foundation,
17 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
18 * distribution. VirtualBox OSE is distributed in the hope that it will
19 * be useful, but WITHOUT ANY WARRANTY of any kind.
20 */
21
22#include "VirtualBoxImpl.h"
23
24#include "VirtualBoxXMLUtil.h"
25
26/* embedded XML Schema documents for validating XML settings files */
27#include "VirtualBoxXMLUtil_entities.h"
28#include "VirtualBoxXMLUtil_common_entities.h"
29
30/**
31 * Resolves external entities while parting and validating XML settings files.
32 *
33 * @param aURI URI of the external entity.
34 * @param aID ID of the external entity (may be NULL).
35 *
36 * @return Input stream created using @c new or NULL to indicate
37 * a wrong URI/ID pair.
38 */
39settings::Input *
40VirtualBox::SettingsInputResolver::resolveEntity (const char *aURI, const char *aID)
41{
42 if (strcmp (aURI, VBOX_XML_SCHEMA_COMMON) == 0)
43 {
44 return new settings::
45 MemoryBuf ((const char *) g_abVirtualBox_settings_common_xsd,
46 g_cbVirtualBox_settings_common_xsd, aURI);
47 }
48
49 if (strcmp (aURI, VBOX_XML_SCHEMA) == 0)
50 {
51 return new settings::
52 MemoryBuf ((const char *) g_abVirtualBox_settings_xsd,
53 g_cbVirtualBox_settings_xsd, aURI);
54 }
55
56 AssertMsgFailed (("Unexpected entity: '%s' - knows: '%s' and '%s'\n", aURI,
57 VBOX_XML_SCHEMA_COMMON, VBOX_XML_SCHEMA));
58 return NULL;
59}
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