VirtualBox

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

Last change on this file since 33907 was 33806, checked in by vboxsync, 15 years ago

ExtPack changes, related IPRT changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: ExtPackUtil.h 33806 2010-11-05 17:20:15Z 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/** The minimum length (strlen) of a extension pack name. */
28#define VBOX_EXTPACK_NAME_MIN_LEN 6
29/** The max length (strlen) of a extension pack name. */
30#define VBOX_EXTPACK_NAME_MAX_LEN 64
31
32/** The architecture-dependent application data subdirectory where the
33 * extension packs are installed. Relative to RTPathAppPrivateArch. */
34#define VBOX_EXTPACK_INSTALL_DIR "ExtensionPacks"
35/** The architecture-independent application data subdirectory where the
36 * certificates are installed. Relative to RTPathAppPrivateNoArch. */
37#define VBOX_EXTPACK_CERT_DIR "Certificates"
38
39
40/**
41 * Description of an extension pack.
42 *
43 * This is the internal representation of the ExtPack.xml.
44 */
45typedef struct VBOXEXTPACKDESC
46{
47 /** The name. */
48 iprt::MiniString strName;
49 /** The description. */
50 iprt::MiniString strDescription;
51 /** The version string. */
52 iprt::MiniString strVersion;
53 /** The internal revision number. */
54 uint32_t uRevision;
55 /** The name of the main module. */
56 iprt::MiniString strMainModule;
57} VBOXEXTPACKDESC;
58
59/** Pointer to a extension pack description. */
60typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
61/** Pointer to a const extension pack description. */
62typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
63
64
65iprt::MiniString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
66iprt::MiniString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
67bool VBoxExtPackIsValidName(const char *pszName);
68bool VBoxExtPackIsValidVersionString(const char *pszName);
69bool VBoxExtPackIsValidMainModuleString(const char *pszMainModule);
70
71
72#endif
73
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette