VirtualBox

source: vbox/trunk/src/VBox/Main/include/ExtPackUtil.h@ 34575

Last change on this file since 34575 was 34391, checked in by vboxsync, 14 years ago

More extension pack code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1/* $Id: ExtPackUtil.h 34391 2010-11-26 11:12:17Z vboxsync $ */
2/** @file
3 * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
4 */
5
6/*
7 * Copyright (C) 2010 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 ____H_EXTPACKUTIL
19#define ____H_EXTPACKUTIL
20
21#include <iprt/cpp/ministring.h>
22#include <iprt/fs.h>
23
24
25/** @name VBOX_EXTPACK_DESCRIPTION_NAME
26 * The name of the description file in an extension pack. */
27#define VBOX_EXTPACK_DESCRIPTION_NAME "ExtPack.xml"
28/** @name VBOX_EXTPACK_DESCRIPTION_NAME
29 * The name of the manifest file in an extension pack. */
30#define VBOX_EXTPACK_MANIFEST_NAME "ExtPack.manifest"
31/** @name VBOX_EXTPACK_SIGNATURE_NAME
32 * The name of the signature file in an extension pack. */
33#define VBOX_EXTPACK_SIGNATURE_NAME "ExtPack.signature"
34/** @name VBOX_EXTPACK_SUFFIX
35 * The suffix of a extension pack tarball. */
36#define VBOX_EXTPACK_SUFFIX ".vbox-extpack"
37
38/** The minimum length (strlen) of a extension pack name. */
39#define VBOX_EXTPACK_NAME_MIN_LEN 3
40/** The max length (strlen) of a extension pack name. */
41#define VBOX_EXTPACK_NAME_MAX_LEN 64
42
43/** The architecture-dependent application data subdirectory where the
44 * extension packs are installed. Relative to RTPathAppPrivateArch. */
45#define VBOX_EXTPACK_INSTALL_DIR "ExtensionPacks"
46/** The architecture-independent application data subdirectory where the
47 * certificates are installed. Relative to RTPathAppPrivateNoArch. */
48#define VBOX_EXTPACK_CERT_DIR "ExtPackCertificates"
49
50
51/**
52 * Plug-in descriptor.
53 */
54typedef struct VBOXEXTPACKPLUGINDESC
55{
56 /** The name. */
57 iprt::MiniString strName;
58 /** The module name. */
59 iprt::MiniString strModule;
60 /** The description. */
61 iprt::MiniString strDescription;
62 /** The frontend or component which it plugs into. */
63 iprt::MiniString strFrontend;
64} VBOXEXTPACKPLUGINDESC;
65/** Pointer to a plug-in descriptor. */
66typedef VBOXEXTPACKPLUGINDESC *PVBOXEXTPACKPLUGINDESC;
67
68/**
69 * Extension pack descriptor
70 *
71 * This is the internal representation of the ExtPack.xml.
72 */
73typedef struct VBOXEXTPACKDESC
74{
75 /** The name. */
76 iprt::MiniString strName;
77 /** The description. */
78 iprt::MiniString strDescription;
79 /** The version string. */
80 iprt::MiniString strVersion;
81 /** The internal revision number. */
82 uint32_t uRevision;
83 /** The name of the main module. */
84 iprt::MiniString strMainModule;
85 /** The name of the VRDE module, empty if none. */
86 iprt::MiniString strVrdeModule;
87 /** The number of plug-in descriptors. */
88 uint32_t cPlugIns;
89 /** Pointer to an array of plug-in descriptors. */
90 PVBOXEXTPACKPLUGINDESC paPlugIns;
91} VBOXEXTPACKDESC;
92
93/** Pointer to a extension pack descriptor. */
94typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
95/** Pointer to a const extension pack descriptor. */
96typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
97
98
99iprt::MiniString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
100iprt::MiniString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
101void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
102bool VBoxExtPackIsValidName(const char *pszName);
103bool VBoxExtPackIsValidVersionString(const char *pszName);
104bool VBoxExtPackIsValidModuleString(const char *pszModule);
105
106
107#endif
108
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