ExtPackManagerImpl.h revision 6f63267ae3ac590beee4c0e298774baf18e0fb84
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * Copyright (C) 2010 Oracle Corporation
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * available from http://www.virtualbox.org. This file is free software;
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * you can redistribute it and/or modify it under the terms of the GNU
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * General Public License (GPL) as published by the Free Software
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * An extension pack.
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** @name COM and internal init/term/mapping cruft.
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync HRESULT init(VirtualBox *a_pVirtualBox, const char *a_pszName, const char *a_pszParentDir);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** @name IExtPack interfaces
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
8479df0918362ee801608d4f48c6d8ee8fdf505evboxsync STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
8479df0918362ee801608d4f48c6d8ee8fdf505evboxsync STDMETHOD(QueryObject)(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** @name Internal interfaces used by ExtPackManager.
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync void callInstalledHook(IVirtualBox *a_pVirtualBox);
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync HRESULT callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync void callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox);
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync void callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine);
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync int callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM);
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync int callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM);
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync void callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM);
710d24589d0cbe0ea6e9ad143eda5bbd41000693vboxsync /** @name Internal helper methods.
710d24589d0cbe0ea6e9ad143eda5bbd41000693vboxsync bool findModule(const char *a_pszName, const char *a_pszExt,
8479df0918362ee801608d4f48c6d8ee8fdf505evboxsync Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const;
710d24589d0cbe0ea6e9ad143eda5bbd41000693vboxsync static bool objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2);
710d24589d0cbe0ea6e9ad143eda5bbd41000693vboxsync /** @name Extension Pack Helpers
710d24589d0cbe0ea6e9ad143eda5bbd41000693vboxsync static DECLCALLBACK(int) hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt,
8479df0918362ee801608d4f48c6d8ee8fdf505evboxsync static DECLCALLBACK(int) hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath);
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync static DECLCALLBACK(int) hlpRegisterVrde(PCVBOXEXTPACKHLP pHlp, const char *pszName, bool fSetDefault);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** Pointer to the private instance. */
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync * Extension pack manager.
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** @name COM and internal init/term/mapping cruft.
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)
6f63267ae3ac590beee4c0e298774baf18e0fb84vboxsync HRESULT init(VirtualBox *a_pVirtualBox, const char *a_pszDropZonePath, bool a_fCheckDropZone);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** @name IExtPack interfaces
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(Install)(IN_BSTR a_bstrTarball, BSTR *a_pbstrName);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval);
8479df0918362ee801608d4f48c6d8ee8fdf505evboxsync STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** @name Internal interfaces used by other Main classes.
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync int callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM);
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync int callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM);
d6835eb59b58420b98d9adf7b7f1f8f5ef6187bcvboxsync void callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
8d82d07fc2f7234b1e5a3ba544e1086a5a7a7c5fvboxsync HRESULT runSetUidToRootHelper(const char *a_pszCommand, ...);
8d82d07fc2f7234b1e5a3ba544e1086a5a7a7c5fvboxsync HRESULT refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack);
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync /** Pointer to the private instance. */
73045e3d71f04f3d399e70e89fbd6395c4402821vboxsync/* vi: set tabstop=4 shiftwidth=4 expandtab: */