HostImpl.h revision c8f4cca65d28ebb037ef27dced8c6bfa71d350ac
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * Implemenation of IHost.
c1980cd3f410c88b8f92f464c56ed987a15f44c1vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * available from http://www.virtualbox.org. This file is free software;
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * you can redistribute it and/or modify it under the terms of the GNU
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * General Public License (GPL) as published by the Free Software
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
c64777b77514bdc924249d2f9900be25079b0d84vboxsync * additional information or have any questions.
c64777b77514bdc924249d2f9900be25079b0d84vboxsync#endif /* VBOX_WITH_RESOURCE_USAGE_API */
c64777b77514bdc924249d2f9900be25079b0d84vboxsync public VirtualBoxSupportErrorInfoImpl <Host, IHost>,
c64777b77514bdc924249d2f9900be25079b0d84vboxsync // public initializer/uninitializer for internal purposes only
c64777b77514bdc924249d2f9900be25079b0d84vboxsync // IHost properties
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(DVDDrives))(IHostDVDDriveCollection **drives);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(FloppyDrives))(IHostFloppyDriveCollection **drives);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(USBDevices))(IHostUSBDeviceCollection **aUSBDevices);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(USBDeviceFilters))(IHostUSBDeviceFilterCollection ** aUSBDeviceFilters);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(NetworkInterfaces))(IHostNetworkInterfaceCollection **networkInterfaces);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(ProcessorCount))(ULONG *count);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(GetProcessorSpeed)(ULONG cpuId, ULONG *speed);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(GetProcessorDescription)(ULONG cpuId, BSTR *description);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(COMGETTER(MemoryAvailable))(ULONG *available);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync // IHost methods
c64777b77514bdc924249d2f9900be25079b0d84vboxsync STDMETHOD(CreateHostNetworkInterface) (INPTR BSTR aName,
3942acfaf590eaef4740d7b8a5311bb91e2bed0dvboxsync STDMETHOD(RemoveHostNetworkInterface) (INPTR GUIDPARAM aId,
9b828870d7acf28326746e3850098e579c590a44vboxsync STDMETHOD(CreateUSBDeviceFilter) (INPTR BSTR aName, IHostUSBDeviceFilter **aFilter);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync STDMETHOD(InsertUSBDeviceFilter) (ULONG aPosition, IHostUSBDeviceFilter *aFilter);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync STDMETHOD(RemoveUSBDeviceFilter) (ULONG aPosition, IHostUSBDeviceFilter **aFilter);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync // public methods only for internal purposes
6cac05f856d982151579a9d445a109960c2c07d2vboxsync HRESULT loadSettings (const settings::Key &aGlobal);
9b828870d7acf28326746e3850098e579c590a44vboxsync typedef std::list <ComObjPtr <HostUSBDeviceFilter> > USBDeviceFilterList;
9b828870d7acf28326746e3850098e579c590a44vboxsync /** Must be called from under this object's lock. */
9b828870d7acf28326746e3850098e579c590a44vboxsync USBProxyService *usbProxyService() { return mUSBProxyService; }
9b828870d7acf28326746e3850098e579c590a44vboxsync HRESULT onUSBDeviceFilterChange (HostUSBDeviceFilter *aFilter, BOOL aActiveChanged = FALSE);
9b828870d7acf28326746e3850098e579c590a44vboxsync void getUSBFilters(USBDeviceFilterList *aGlobalFiltes, VirtualBox::SessionMachineVector *aMachines);
9b828870d7acf28326746e3850098e579c590a44vboxsync#endif /* !VBOX_WITH_USB */
9b828870d7acf28326746e3850098e579c590a44vboxsync static int networkInterfaceHelperServer (SVCHlpClient *aClient,
9b828870d7acf28326746e3850098e579c590a44vboxsync // for VirtualBoxSupportErrorInfoImpl
6cac05f856d982151579a9d445a109960c2c07d2vboxsync static const wchar_t *getComponentName() { return L"Host"; }
6cac05f856d982151579a9d445a109960c2c07d2vboxsync bool getDVDInfoFromHal(std::list <ComObjPtr <HostDVDDrive> > &list);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync bool getFloppyInfoFromHal(std::list <ComObjPtr <HostFloppyDrive> > &list);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync void parseMountTable(char *mountTable, std::list <ComObjPtr <HostDVDDrive> > &list);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync bool validateDevice(const char *deviceNode, bool isCDROM);
6cac05f856d982151579a9d445a109960c2c07d2vboxsync /** specialization for IHostUSBDeviceFilter */
6cac05f856d982151579a9d445a109960c2c07d2vboxsync ComObjPtr <HostUSBDeviceFilter> getDependentChild (IHostUSBDeviceFilter *aFilter)
6cac05f856d982151579a9d445a109960c2c07d2vboxsync VirtualBoxBase *child = VirtualBoxBaseWithChildren::
6cac05f856d982151579a9d445a109960c2c07d2vboxsync return child ? dynamic_cast <HostUSBDeviceFilter *> (child)
6cac05f856d982151579a9d445a109960c2c07d2vboxsync#endif /* VBOX_WITH_USB */
6cac05f856d982151579a9d445a109960c2c07d2vboxsync static int createNetworkInterface (SVCHlpClient *aClient,
6cac05f856d982151579a9d445a109960c2c07d2vboxsync static int removeNetworkInterface (SVCHlpClient *aClient,
6cac05f856d982151579a9d445a109960c2c07d2vboxsync static HRESULT networkInterfaceHelperClient (SVCHlpClient *aClient,
9b828870d7acf28326746e3850098e579c590a44vboxsync void registerMetrics(PerformanceCollector *collector);
9b828870d7acf28326746e3850098e579c590a44vboxsync void unregisterMetrics(PerformanceCollector *collector);
c64777b77514bdc924249d2f9900be25079b0d84vboxsync#endif /* VBOX_WITH_RESOURCE_USAGE_API */
c64777b77514bdc924249d2f9900be25079b0d84vboxsync /** Pointer to the USBProxyService object. */
3942acfaf590eaef4740d7b8a5311bb91e2bed0dvboxsync#endif /* VBOX_WITH_USB */
c64777b77514bdc924249d2f9900be25079b0d84vboxsync#endif // ____H_HOSTIMPL