1 | /* $Id: ExtPackUtil.h 33693 2010-11-02 14:52:24Z 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 | /** @name VBOX_EXTPACK_SUFFIX
|
---|
24 | * The suffix of a extension pack tarball. */
|
---|
25 | #define VBOX_EXTPACK_SUFFIX ".vbox-extpack"
|
---|
26 |
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Description of an extension pack.
|
---|
30 | *
|
---|
31 | * This is the internal representation of the ExtPack.xml.
|
---|
32 | */
|
---|
33 | typedef struct VBOXEXTPACKDESC
|
---|
34 | {
|
---|
35 | /** The name. */
|
---|
36 | iprt::MiniString strName;
|
---|
37 | /** The description. */
|
---|
38 | iprt::MiniString strDescription;
|
---|
39 | /** The version string. */
|
---|
40 | iprt::MiniString strVersion;
|
---|
41 | /** The internal revision number. */
|
---|
42 | uint32_t uRevision;
|
---|
43 | /** The name of the main module. */
|
---|
44 | iprt::MiniString strMainModule;
|
---|
45 | } VBOXEXTPACKDESC;
|
---|
46 |
|
---|
47 | /** Pointer to a extension pack description. */
|
---|
48 | typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
|
---|
49 | /** Pointer to a const extension pack description. */
|
---|
50 | typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
|
---|
51 |
|
---|
52 |
|
---|
53 | iprt::MiniString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
|
---|
54 | bool VBoxExtPackIsValidName(const char *pszName);
|
---|
55 | bool VBoxExtPackIsValidVersionString(const char *pszName);
|
---|
56 | bool VBoxExtPackIsValidMainModuleString(const char *pszMainModule);
|
---|
57 |
|
---|
58 |
|
---|
59 | #endif
|
---|
60 |
|
---|