1 | /* $Id: ExtPackUtil.h 33656 2010-11-01 14:18:11Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010 Oracle Corporation
|
---|
8 | *
|
---|
9 | * Oracle Corporation confidential
|
---|
10 | * All rights reserved
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef ____H_EXTPACKUTIL
|
---|
14 | #define ____H_EXTPACKUTIL
|
---|
15 |
|
---|
16 | #include <iprt/cpp/ministring.h>
|
---|
17 | #include <iprt/fs.h>
|
---|
18 |
|
---|
19 |
|
---|
20 | /** @name VBOX_EXTPACK_DESCRIPTION_NAME
|
---|
21 | * The name of the description file in an extension pack. */
|
---|
22 | #define VBOX_EXTPACK_DESCRIPTION_NAME "ExtPack.xml"
|
---|
23 |
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Description of an extension pack.
|
---|
27 | *
|
---|
28 | * This is the internal representation of the ExtPack.xml.
|
---|
29 | */
|
---|
30 | typedef struct VBOXEXTPACKDESC
|
---|
31 | {
|
---|
32 | /** The name. */
|
---|
33 | iprt::MiniString strName;
|
---|
34 | /** The description. */
|
---|
35 | iprt::MiniString strDescription;
|
---|
36 | /** The version string. */
|
---|
37 | iprt::MiniString strVersion;
|
---|
38 | /** The internal revision number. */
|
---|
39 | uint32_t uRevision;
|
---|
40 | /** The name of the main module. */
|
---|
41 | iprt::MiniString strMainModule;
|
---|
42 | } VBOXEXTPACKDESC;
|
---|
43 |
|
---|
44 | /** Pointer to a extension pack description. */
|
---|
45 | typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
|
---|
46 | /** Pointer to a const extension pack description. */
|
---|
47 | typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
|
---|
48 |
|
---|
49 |
|
---|
50 | iprt::MiniString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
|
---|
51 | bool VBoxExtPackIsValidName(const char *pszName);
|
---|
52 | bool VBoxExtPackIsValidVersionString(const char *pszName);
|
---|
53 | bool VBoxExtPackIsValidMainModuleString(const char *pszMainModule);
|
---|
54 |
|
---|
55 |
|
---|
56 | #endif
|
---|
57 |
|
---|