VirtualBox

source: vbox/trunk/src/VBox/Main/include/ExtPackManagerImpl.h@ 33505

Last change on this file since 33505 was 33474, checked in by vboxsync, 14 years ago

ExtPack: Sketches and some code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: ExtPackManagerImpl.h 33474 2010-10-26 16:44:17Z vboxsync $ */
2/** @file
3 * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
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_EXTPACKMANAGERIMPL
19#define ____H_EXTPACKMANAGERIMPL
20
21#include "VirtualBoxBase.h"
22#include <VBox/ExtPack/ExtPack.h>
23
24
25/**
26 * An extension pack.
27 *
28 * This
29 */
30class ATL_NO_VTABLE ExtPack :
31 public VirtualBoxBase,
32 VBOX_SCRIPTABLE_IMPL(IExtPack)
33{
34public:
35 /** @name COM and internal init/term/mapping cruft.
36 * @{ */
37 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)
38 DECLARE_NOT_AGGREGATABLE(ExtPack)
39 DECLARE_PROTECT_FINAL_CONSTRUCT()
40 BEGIN_COM_MAP(ExtPack)
41 COM_INTERFACE_ENTRY(ISupportErrorInfo)
42 COM_INTERFACE_ENTRY(IExtPack)
43 COM_INTERFACE_ENTRY(IDispatch)
44 END_COM_MAP()
45 DECLARE_EMPTY_CTOR_DTOR(ExtPack)
46
47 HRESULT FinalConstruct();
48 void FinalRelease();
49 HRESULT init(const char *a_pszName, const char *a_pszParentDir);
50 void uninit();
51 /** @} */
52
53 /** @name IExtPack interfaces
54 * @{ */
55 STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
56 STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
57 STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
58 STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
59 STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
60 /** @} */
61
62 /** @name Internal interfaces used by ExtPackManager.
63 * @{ */
64 void *getCallbackTable();
65 /** @} */
66
67private:
68 struct Data;
69 /** Pointer to the private instance. */
70 Data *m;
71
72 friend class ExtPackManager;
73};
74
75
76/**
77 * Extension pack manager.
78 */
79class ATL_NO_VTABLE ExtPackManager :
80 public VirtualBoxBase,
81 VBOX_SCRIPTABLE_IMPL(IExtPackManager)
82{
83 /** @name COM and internal init/term/mapping cruft.
84 * @{ */
85 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)
86 DECLARE_NOT_AGGREGATABLE(ExtPackManager)
87 DECLARE_PROTECT_FINAL_CONSTRUCT()
88 BEGIN_COM_MAP(ExtPackManager)
89 COM_INTERFACE_ENTRY(ISupportErrorInfo)
90 COM_INTERFACE_ENTRY(IExtPackManager)
91 COM_INTERFACE_ENTRY(IDispatch)
92 END_COM_MAP()
93 DECLARE_EMPTY_CTOR_DTOR(ExtPackManager)
94
95 HRESULT FinalConstruct();
96 void FinalRelease();
97 HRESULT init();
98 void uninit();
99 /** @} */
100
101 /** @name IExtPack interfaces
102 * @{ */
103 STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));
104 STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);
105 STDMETHOD(Install)(IN_BSTR a_bstrTarball, BSTR *a_pbstrName);
106 STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval);
107 /** @} */
108
109 /** @name Internal interfaces used by other Main classes.
110 * @{ */
111 int callAllConfigHooks(IConsole *a_pConsole, PVM a_pVM);
112 int callAllNewMachineHooks(IMachine *a_pMachine);
113 /** @} */
114
115private:
116 struct Data;
117 /** Pointer to the private instance. */
118 Data *m;
119};
120
121#endif
122/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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