Changeset 49644 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Nov 25, 2013 4:57:15 PM (11 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/BandwidthControlImpl.h
r42551 r49644 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 19 19 #define ____H_BANDWIDTHCONTROLIMPL 20 20 21 #include " VirtualBoxBase.h"21 #include "BandwidthControlWrap.h" 22 22 23 23 class BandwidthGroup; … … 29 29 30 30 class ATL_NO_VTABLE BandwidthControl : 31 public VirtualBoxBase, 32 VBOX_SCRIPTABLE_IMPL(IBandwidthControl) 31 public BandwidthControlWrap 33 32 { 34 33 public: 35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(BandwidthControl, IBandwidthControl)36 34 37 DECLARE_ NOT_AGGREGATABLE(BandwidthControl)35 DECLARE_EMPTY_CTOR_DTOR(BandwidthControl) 38 36 39 DECLARE_PROTECT_FINAL_CONSTRUCT() 40 41 BEGIN_COM_MAP(BandwidthControl) 42 VBOX_DEFAULT_INTERFACE_ENTRIES(IBandwidthControl) 43 END_COM_MAP() 44 45 BandwidthControl() { }; 46 ~BandwidthControl() { }; 37 HRESULT FinalConstruct(); 38 void FinalRelease(); 47 39 48 40 // public initializer/uninitializer for internal purposes only … … 52 44 void uninit(); 53 45 54 STDMETHOD(CreateBandwidthGroup) (IN_BSTR aName, BandwidthGroupType_T aType, LONG64 aMaxBytesPerSec);55 STDMETHOD(DeleteBandwidthGroup) (IN_BSTR aName);56 STDMETHOD(COMGETTER(NumGroups)) (ULONG *aGroups);57 STDMETHOD(GetBandwidthGroup) (IN_BSTR aName, IBandwidthGroup **aBandwidthGroup);58 STDMETHOD(GetAllBandwidthGroups) (ComSafeArrayOut(IBandwidthGroup *, aBandwidthGroups));59 60 HRESULT FinalConstruct();61 void FinalRelease();62 63 46 // public internal methods 64 65 HRESULT loadSettings(const settings::IOSettings &data); 66 HRESULT saveSettings(settings::IOSettings &data); 67 68 void rollback(); 69 void commit(); 70 void copyFrom (BandwidthControl *aThat); 71 72 Machine *getMachine() const; 73 74 HRESULT getBandwidthGroupByName(const Utf8Str &aName, 75 ComObjPtr<BandwidthGroup> &aBandwidthGroup, 76 bool aSetError /* = false */); 47 HRESULT i_loadSettings(const settings::IOSettings &data); 48 HRESULT i_saveSettings(settings::IOSettings &data); 49 void i_rollback(); 50 void i_commit(); 51 void i_copyFrom(BandwidthControl *aThat); 52 Machine *i_getMachine() const; 53 HRESULT i_getBandwidthGroupByName(const Utf8Str &aName, 54 ComObjPtr<BandwidthGroup> &aBandwidthGroup, 55 bool aSetError /* = false */); 77 56 78 57 private: 79 struct Data; 58 59 // wrapped IBandwidthControl properties 60 HRESULT getNumGroups(ULONG *aNumGroups); 61 62 // wrapped IBandwidthControl methods 63 HRESULT createBandwidthGroup(const com::Utf8Str &aName, 64 BandwidthGroupType_T aType, 65 LONG64 aMaxBytesPerSec); 66 HRESULT deleteBandwidthGroup(const com::Utf8Str &aName); 67 HRESULT getBandwidthGroup(const com::Utf8Str &aName, 68 ComPtr<IBandwidthGroup> &aBandwidthGroup); 69 HRESULT getAllBandwidthGroups(std::vector<ComPtr<IBandwidthGroup> > &aBandwidthGroups); 70 71 // Data 72 typedef std::list< ComObjPtr<BandwidthGroup> > BandwidthGroupList; 73 74 struct Data 75 { 76 Data(Machine *pMachine) 77 : pParent(pMachine) 78 { } 79 80 ~Data() 81 {}; 82 83 Machine * const pParent; 84 85 // peer machine's bandwidth control 86 const ComObjPtr<BandwidthControl> pPeer; 87 88 // the following fields need special backup/rollback/commit handling, 89 // so they cannot be a part of BackupableData 90 Backupable<BandwidthGroupList> llBandwidthGroups; 91 }; 92 80 93 Data *m; 81 94 }; -
trunk/src/VBox/Main/include/BandwidthGroupImpl.h
r44528 r49644 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 19 19 #define ____H_BANDWIDTHGROUPIMPL 20 20 21 #include "VirtualBoxBase.h"22 21 #include "BandwidthControlImpl.h" 22 #include "BandwidthGroupWrap.h" 23 23 24 24 25 class ATL_NO_VTABLE BandwidthGroup : 25 public VirtualBoxBase, 26 VBOX_SCRIPTABLE_IMPL(IBandwidthGroup) 26 public BandwidthGroupWrap 27 27 { 28 28 public: 29 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(BandwidthGroup, IBandwidthGroup)30 29 31 DECLARE_ NOT_AGGREGATABLE(BandwidthGroup)30 DECLARE_EMPTY_CTOR_DTOR(BandwidthGroup) 32 31 33 DECLARE_PROTECT_FINAL_CONSTRUCT() 34 35 BEGIN_COM_MAP(BandwidthGroup) 36 VBOX_DEFAULT_INTERFACE_ENTRIES(IBandwidthGroup) 37 END_COM_MAP() 38 39 BandwidthGroup() { }; 40 ~BandwidthGroup() { }; 32 HRESULT FinalConstruct(); 33 void FinalRelease(); 41 34 42 35 // public initializer/uninitializer for internal purposes only … … 49 42 void uninit(); 50 43 51 HRESULT FinalConstruct(); 52 void FinalRelease(); 44 // public methods only for internal purposes 45 void i_rollback(); 46 void i_commit(); 47 void i_unshare(); 48 void i_reference(); 49 void i_release(); 53 50 54 STDMETHOD(COMGETTER(Name))(BSTR *aName); 55 STDMETHOD(COMGETTER(Type))(BandwidthGroupType_T *aType); 56 STDMETHOD(COMGETTER(Reference))(ULONG *aReferences); 57 STDMETHOD(COMGETTER(MaxBytesPerSec))(LONG64 *aMaxBytesPerSec); 58 STDMETHOD(COMSETTER(MaxBytesPerSec))(LONG64 aMaxBytesPerSec); 59 60 // public methods only for internal purposes 61 void rollback(); 62 void commit(); 63 void unshare(); 64 65 const Utf8Str &getName() const; 66 BandwidthGroupType_T getType() const; 67 LONG64 getMaxBytesPerSec() const; 68 ULONG getReferences() const; 69 70 void reference(); 71 void release(); 72 73 ComObjPtr<BandwidthGroup> getPeer(); 51 ComObjPtr<BandwidthGroup> i_getPeer() { return m->pPeer; } 52 const Utf8Str &i_getName() const { return m->bd->strName; } 53 BandwidthGroupType_T i_getType() const { return m->bd->enmType; } 54 LONG64 i_getMaxBytesPerSec() const { return m->bd->aMaxBytesPerSec; } 55 ULONG i_getReferences() const { return m->bd->cReferences; } 74 56 75 57 private: 76 struct Data; 58 59 // wrapped IBandwidthGroup properties 60 HRESULT getName(com::Utf8Str &aName); 61 HRESULT getType(BandwidthGroupType_T *aType); 62 HRESULT getReference(ULONG *aReferences); 63 HRESULT getMaxBytesPerSec(LONG64 *aMaxBytesPerSec); 64 HRESULT setMaxBytesPerSec(LONG64 MaxBytesPerSec); 65 66 //////////////////////////////////////////////////////////////////////////////// 67 //// 68 //// private member data definition 69 //// 70 ////////////////////////////////////////////////////////////////////////////////// 71 // 72 struct BackupableBandwidthGroupData 73 { 74 BackupableBandwidthGroupData() 75 : enmType(BandwidthGroupType_Null), 76 aMaxBytesPerSec(0), 77 cReferences(0) 78 { } 79 80 Utf8Str strName; 81 BandwidthGroupType_T enmType; 82 LONG64 aMaxBytesPerSec; 83 ULONG cReferences; 84 }; 85 86 struct Data 87 { 88 Data(BandwidthControl * const aBandwidthControl) 89 : pParent(aBandwidthControl), 90 pPeer(NULL) 91 { } 92 93 BandwidthControl * const pParent; 94 ComObjPtr<BandwidthGroup> pPeer; 95 96 // use the XML settings structure in the members for simplicity 97 Backupable<BackupableBandwidthGroupData> bd; 98 }; 99 77 100 Data *m; 78 101 }; -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r49618 r49644 7 7 8 8 /* 9 * Copyright (C) 2006-201 1Oracle Corporation9 * Copyright (C) 2006-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 21 21 #define ____H_H_DHCPSERVERIMPL 22 22 23 #include " VirtualBoxBase.h"23 #include "DHCPServerWrap.h" 24 24 25 25 #ifdef VBOX_WITH_HOSTNETIF_API … … 73 73 74 74 class ATL_NO_VTABLE DHCPServer : 75 public VirtualBoxBase, 76 VBOX_SCRIPTABLE_IMPL(IDHCPServer) 75 public DHCPServerWrap 77 76 { 78 77 public: 79 80 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(DHCPServer, IDHCPServer)81 82 DECLARE_NOT_AGGREGATABLE (DHCPServer)83 84 DECLARE_PROTECT_FINAL_CONSTRUCT()85 86 BEGIN_COM_MAP (DHCPServer)87 VBOX_DEFAULT_INTERFACE_ENTRIES(IDHCPServer)88 END_COM_MAP()89 78 90 79 DECLARE_EMPTY_CTOR_DTOR (DHCPServer) … … 97 86 HRESULT init(VirtualBox *aVirtualBox, 98 87 const settings::DHCPServer &data); 99 HRESULT saveSettings(settings::DHCPServer &data);100 101 88 void uninit(); 102 89 103 // IDHCPServer properties 104 STDMETHOD(COMGETTER(NetworkName))(BSTR *aName); 105 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled); 106 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled); 107 STDMETHOD(COMGETTER(IPAddress))(BSTR *aIPAddress); 108 STDMETHOD(COMGETTER(NetworkMask))(BSTR *aNetworkMask); 109 STDMETHOD(COMGETTER(LowerIP))(BSTR *aIPAddress); 110 STDMETHOD(COMGETTER(UpperIP))(BSTR *aIPAddress); 111 112 STDMETHOD(AddGlobalOption)(DhcpOpt_T aOption, IN_BSTR aValue); 113 STDMETHOD(COMGETTER(GlobalOptions))(ComSafeArrayOut(BSTR, aValue)); 114 STDMETHOD(COMGETTER(VmConfigs))(ComSafeArrayOut(BSTR, aValue)); 115 STDMETHOD(AddVmSlotOption)(IN_BSTR aVmName, LONG aSlot, DhcpOpt_T aOption, IN_BSTR aValue); 116 STDMETHOD(RemoveVmSlotOptions)(IN_BSTR aVmName, LONG aSlot); 117 STDMETHOD(GetVmSlotOptions)(IN_BSTR aVmName, LONG aSlot, ComSafeArrayOut(BSTR, aValues)); 118 STDMETHOD(GetMacOptions)(IN_BSTR aMAC, ComSafeArrayOut(BSTR, aValues)); 119 STDMETHOD(COMGETTER(EventSource))(IEventSource **aEventSource); 120 121 STDMETHOD(SetConfiguration)(IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress); 122 123 STDMETHOD(Start)(IN_BSTR aNetworkName, IN_BSTR aTrunkName, IN_BSTR aTrunkType); 124 STDMETHOD(Stop)(); 90 // Public internal methids. 91 HRESULT i_saveSettings(settings::DHCPServer &data); 92 DhcpOptionMap& i_findOptMapByVmNameSlot(const com::Utf8Str& aVmName, 93 LONG Slot); 125 94 126 95 private: 127 struct Data; 128 Data *m; 96 97 // wrapped IDHCPServer properties 98 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource); 99 HRESULT getEnabled(BOOL *aEnabled); 100 HRESULT setEnabled(BOOL aEnabled); 101 HRESULT getIPAddress(com::Utf8Str &aIPAddress); 102 HRESULT getNetworkMask(com::Utf8Str &aNetworkMask); 103 HRESULT getNetworkName(com::Utf8Str &aName); 104 HRESULT getLowerIP(com::Utf8Str &aIPAddress); 105 HRESULT getUpperIP(com::Utf8Str &aIPAddress); 106 HRESULT getGlobalOptions(std::vector<com::Utf8Str> &aGlobalOptions); 107 HRESULT getVmConfigs(std::vector<com::Utf8Str> &aVmConfigs); 108 HRESULT getMacOptions(const com::Utf8Str &aMAC, std::vector<com::Utf8Str> &aValues); 109 HRESULT setConfiguration(const com::Utf8Str &aIPAddress, 110 const com::Utf8Str &aNetworkMask, 111 const com::Utf8Str &aFromIPAddress, 112 const com::Utf8Str &aToIPAddress); 113 HRESULT getVmSlotOptions(const com::Utf8Str &aVmName, 114 LONG aSlot, 115 std::vector<com::Utf8Str> &aValue); 116 117 // Wrapped IDHCPServer Methods 118 HRESULT addGlobalOption(DhcpOpt_T aOption, 119 const com::Utf8Str &aValue); 120 HRESULT addVmSlotOption(const com::Utf8Str &aVmName, 121 LONG aSlot, 122 DhcpOpt_T aOption, 123 const com::Utf8Str &aValue); 124 HRESULT removeVmSlotOptions(const com::Utf8Str &aVmName, 125 LONG aSlot); 126 HRESULT start(const com::Utf8Str &aNetworkName, 127 const com::Utf8Str &aTrunkName, 128 const com::Utf8Str &aTrunkType); 129 HRESULT stop(); 130 131 132 struct Data 133 { 134 Data() : enabled(FALSE) {} 135 136 Bstr IPAddress; 137 Bstr lowerIP; 138 Bstr upperIP; 139 140 BOOL enabled; 141 DHCPServerRunner dhcp; 142 143 DhcpOptionMap GlobalDhcpOptions; 144 VmSlot2OptionsMap VmSlot2Options; 145 }; 146 147 Data m; 129 148 /** weak VirtualBox parent */ 130 149 VirtualBox * const mVirtualBox; 131 150 const Bstr mName; 132 151 133 DhcpOptionMap& findOptMapByVmNameSlot(const com::Utf8Str& aVmName,134 LONG Slot);135 152 }; 136 153 -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r49074 r49644 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 // static int i_vrdpServerVerifyPortsString(com::Utf8Str portRange); 18 19 #ifndef ____H_GUESTOSTYPEIMPL 19 20 #define ____H_GUESTOSTYPEIMPL 20 21 21 #include "VirtualBoxBase.h"22 22 #include "Global.h" 23 24 #include <VBox/ostypes.h> 23 #include "GuestOSTypeWrap.h" 25 24 26 25 class ATL_NO_VTABLE GuestOSType : 27 public VirtualBoxBase, 28 VBOX_SCRIPTABLE_IMPL(IGuestOSType) 26 public GuestOSTypeWrap 29 27 { 30 28 public: 31 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestOSType, IGuestOSType)32 33 DECLARE_NOT_AGGREGATABLE(GuestOSType)34 35 DECLARE_PROTECT_FINAL_CONSTRUCT()36 37 BEGIN_COM_MAP(GuestOSType)38 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestOSType)39 END_COM_MAP()40 29 41 30 DECLARE_EMPTY_CTOR_DTOR(GuestOSType) … … 48 37 void uninit(); 49 38 50 // IGuestOSType properties51 STDMETHOD(COMGETTER(FamilyId))(BSTR *aFamilyId);52 STDMETHOD(COMGETTER(FamilyDescription))(BSTR *aFamilyDescription);53 STDMETHOD(COMGETTER(Id))(BSTR *aId);54 STDMETHOD(COMGETTER(Description))(BSTR *aDescription);55 STDMETHOD(COMGETTER(Is64Bit))(BOOL *aIs64Bit);56 STDMETHOD(COMGETTER(RecommendedIOAPIC))(BOOL *aRecommendedIOAPIC);57 STDMETHOD(COMGETTER(RecommendedVirtEx))(BOOL *aRecommendedVirtEx);58 STDMETHOD(COMGETTER(RecommendedRAM))(ULONG *aRAMSize);59 STDMETHOD(COMGETTER(RecommendedVRAM))(ULONG *aVRAMSize);60 STDMETHOD(COMGETTER(Recommended2DVideoAcceleration))(BOOL *aRecommended2DVideoAcceleration);61 STDMETHOD(COMGETTER(Recommended3DAcceleration))(BOOL *aRecommended3DAcceleration);62 STDMETHOD(COMGETTER(RecommendedHDD))(LONG64 *aHDDSize);63 STDMETHOD(COMGETTER(AdapterType))(NetworkAdapterType_T *aNetworkAdapterType);64 STDMETHOD(COMGETTER(RecommendedFirmware))(FirmwareType_T *aFirmwareType);65 STDMETHOD(COMGETTER(RecommendedDVDStorageBus))(StorageBus_T *aStorageBusType);66 STDMETHOD(COMGETTER(RecommendedDVDStorageController))(StorageControllerType_T *aStorageControllerType);67 STDMETHOD(COMGETTER(RecommendedHDStorageBus))(StorageBus_T *aStorageBusType);68 STDMETHOD(COMGETTER(RecommendedHDStorageController))(StorageControllerType_T *aStorageControllerType);69 STDMETHOD(COMGETTER(RecommendedPAE))(BOOL *aRecommendedExtHw);70 STDMETHOD(COMGETTER(RecommendedUSBHID))(BOOL *aRecommendedUSBHID);71 STDMETHOD(COMGETTER(RecommendedHPET))(BOOL *aRecommendedHPET);72 STDMETHOD(COMGETTER(RecommendedUSBTablet))(BOOL *aRecommendedUSBTablet);73 STDMETHOD(COMGETTER(RecommendedRTCUseUTC))(BOOL *aRecommendedRTCUseUTC);74 STDMETHOD(COMGETTER(RecommendedChipset))(ChipsetType_T *aChipsetType);75 STDMETHOD(COMGETTER(RecommendedAudioController))(AudioControllerType_T *aAudioController);76 STDMETHOD(COMGETTER(RecommendedFloppy))(BOOL *aRecommendedFloppy);77 STDMETHOD(COMGETTER(RecommendedUSB))(BOOL *aRecommendedUSB);78 STDMETHOD(COMGETTER(RecommendedTFReset))(BOOL *aRecommendedTFReset);79 80 39 // public methods only for internal purposes 81 const Bstr &i d() const { return mID; }82 bool i s64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }83 bool recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_IOAPIC); }84 bool recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_HWVIRTEX); }85 bool recommendedEFI() const { return !!(mOSHint & VBOXOSHINT_EFI); }86 NetworkAdapterType_T networkAdapterType() const { return mNetworkAdapterType; }87 uint32_t numSerialEnabled() const { return mNumSerialEnabled; }40 const Bstr &i_id() const { return mID; } 41 bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); } 42 bool i_recommendedIOAPIC() const { return !!(mOSHint & VBOXOSHINT_IOAPIC); } 43 bool i_recommendedVirtEx() const { return !!(mOSHint & VBOXOSHINT_HWVIRTEX); } 44 bool i_recommendedEFI() const { return !!(mOSHint & VBOXOSHINT_EFI); } 45 NetworkAdapterType_T i_networkAdapterType() const { return mNetworkAdapterType; } 46 uint32_t i_numSerialEnabled() const { return mNumSerialEnabled; } 88 47 89 48 private: 49 50 // Wrapped IGuestOSType properties 51 HRESULT getFamilyId(com::Utf8Str &aFamilyId); 52 HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription); 53 HRESULT getId(com::Utf8Str &aId); 54 HRESULT getDescription(com::Utf8Str &aDescription); 55 HRESULT getIs64Bit(BOOL *aIs64Bit); 56 HRESULT getRecommendedIOAPIC(BOOL *aRecommendedIOAPIC); 57 HRESULT getRecommendedVirtEx(BOOL *aRecommendedVirtEx); 58 HRESULT getRecommendedRAM(ULONG *RAMSize); 59 HRESULT getRecommendedVRAM(ULONG *aVRAMSize); 60 HRESULT getRecommended2DVideoAcceleration(BOOL *aRecommended2DVideoAcceleration); 61 HRESULT getRecommended3DAcceleration(BOOL *aRecommended3DAcceleration); 62 HRESULT getRecommendedHDD(LONG64 *aHDDSize); 63 HRESULT getAdapterType(NetworkAdapterType_T *aNetworkAdapterType); 64 HRESULT getRecommendedPAE(BOOL *aRecommendedPAE); 65 HRESULT getRecommendedDVDStorageController(StorageControllerType_T *aStorageControllerType); 66 HRESULT getRecommendedFirmware(FirmwareType_T *aFirmwareType); 67 HRESULT getRecommendedDVDStorageBus(StorageBus_T *aStorageBusType); 68 HRESULT getRecommendedHDStorageController(StorageControllerType_T *aStorageControllerType); 69 HRESULT getRecommendedHDStorageBus(StorageBus_T *aStorageBusType); 70 HRESULT getRecommendedUSBHID(BOOL *aRecommendedUSBHID); 71 HRESULT getRecommendedHPET(BOOL *aRecommendedHPET); 72 HRESULT getRecommendedUSBTablet(BOOL *aRecommendedUSBTablet); 73 HRESULT getRecommendedRTCUseUTC(BOOL *aRecommendedRTCUseUTC); 74 HRESULT getRecommendedChipset(ChipsetType_T *aChipsetType); 75 HRESULT getRecommendedAudioController(AudioControllerType_T *aAudioController); 76 HRESULT getRecommendedFloppy(BOOL *aRecommendedFloppy); 77 HRESULT getRecommendedUSB(BOOL *aRecommendedUSB); 78 HRESULT getRecommendedTFReset(BOOL *aRecommendedTFReset); 79 90 80 91 81 const Bstr mFamilyID; -
trunk/src/VBox/Main/include/MachineImpl.h
r49059 r49644 814 814 bool fSetError = false) 815 815 { 816 return mBandwidthControl-> getBandwidthGroupByName(strBandwidthGroup,817 pBandwidthGroup,818 fSetError);816 return mBandwidthControl->i_getBandwidthGroupByName(strBandwidthGroup, 817 pBandwidthGroup, 818 fSetError); 819 819 } 820 820 -
trunk/src/VBox/Main/include/SerialPortImpl.h
r41214 r49644 7 7 8 8 /* 9 * Copyright (C) 2006-201 2Oracle Corporation9 * Copyright (C) 2006-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 21 21 #define ____H_SERIALPORTIMPL 22 22 23 #include " VirtualBoxBase.h"23 #include "SerialPortWrap.h" 24 24 25 25 class GuestOSType; … … 31 31 32 32 class ATL_NO_VTABLE SerialPort : 33 public VirtualBoxBase, 34 VBOX_SCRIPTABLE_IMPL(ISerialPort) 33 public SerialPortWrap 35 34 { 36 35 public: 37 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(SerialPort, ISerialPort)38 36 39 DECLARE_NOT_AGGREGATABLE(SerialPort) 40 41 DECLARE_PROTECT_FINAL_CONSTRUCT() 42 43 BEGIN_COM_MAP(SerialPort) 44 VBOX_DEFAULT_INTERFACE_ENTRIES (ISerialPort) 45 END_COM_MAP() 46 47 DECLARE_EMPTY_CTOR_DTOR (SerialPort) 37 DECLARE_EMPTY_CTOR_DTOR(SerialPort) 48 38 49 39 HRESULT FinalConstruct(); … … 56 46 void uninit(); 57 47 58 // ISerialPort properties 59 STDMETHOD(COMGETTER(Slot)) (ULONG *aSlot); 60 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled); 61 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled); 62 STDMETHOD(COMGETTER(HostMode)) (PortMode_T *aHostMode); 63 STDMETHOD(COMSETTER(HostMode)) (PortMode_T aHostMode); 64 STDMETHOD(COMGETTER(IRQ)) (ULONG *aIRQ); 65 STDMETHOD(COMSETTER(IRQ)) (ULONG aIRQ); 66 STDMETHOD(COMGETTER(IOBase) ) (ULONG *aIOBase); 67 STDMETHOD(COMSETTER(IOBase)) (ULONG aIOBase); 68 STDMETHOD(COMGETTER(Path)) (BSTR *aPath); 69 STDMETHOD(COMSETTER(Path)) (IN_BSTR aPath); 70 STDMETHOD(COMGETTER(Server)) (BOOL *aServer); 71 STDMETHOD(COMSETTER(Server)) (BOOL aServer); 48 // public methods only for internal purposes 49 HRESULT i_loadSettings(const settings::SerialPort &data); 50 HRESULT i_saveSettings(settings::SerialPort &data); 72 51 73 // public methods only for internal purposes 52 bool i_isModified(); 53 void i_rollback(); 54 void i_commit(); 55 void i_copyFrom(SerialPort *aThat); 74 56 75 HRESULT loadSettings(const settings::SerialPort &data); 76 HRESULT saveSettings(settings::SerialPort &data); 77 78 bool isModified(); 79 void rollback(); 80 void commit(); 81 void copyFrom(SerialPort *aThat); 82 83 void applyDefaults (GuestOSType *aOsType); 57 void i_applyDefaults (GuestOSType *aOsType); 84 58 85 59 // public methods for internal purposes only … … 87 61 88 62 private: 89 HRESULT checkSetPath(const Utf8Str &str);90 63 91 struct Data; 64 HRESULT i_checkSetPath(const Utf8Str &str); 65 66 // Wrapped ISerialPort properties 67 HRESULT getEnabled(BOOL *aEnabled); 68 HRESULT setEnabled(BOOL aEnabled); 69 HRESULT getHostMode(PortMode_T *aHostMode); 70 HRESULT setHostMode(PortMode_T aHostMode); 71 HRESULT getSlot(ULONG *aSlot); 72 HRESULT getIRQ(ULONG *aIRQ); 73 HRESULT setIRQ(ULONG aIRQ); 74 HRESULT getIOBase(ULONG *aIOBase); 75 HRESULT setIOBase(ULONG aIOBase); 76 HRESULT getServer(BOOL *aServer); 77 HRESULT setServer(BOOL aServer); 78 HRESULT getPath(com::Utf8Str &aPath); 79 HRESULT setPath(const com::Utf8Str &aPath); 80 81 //////////////////////////////////////////////////////////////////////////////// 82 //// 83 //// SerialPort private data definition 84 //// 85 ////////////////////////////////////////////////////////////////////////////////// 86 // 87 struct Data 88 { 89 Data() 90 : fModified(false), 91 pMachine(NULL) 92 { } 93 94 bool fModified; 95 Machine * const pMachine; 96 const ComObjPtr<SerialPort> pPeer; 97 Backupable<settings::SerialPort> bd; 98 }; 99 92 100 Data *m; 93 101 }; -
trunk/src/VBox/Main/include/StorageControllerImpl.h
r44529 r49644 7 7 8 8 /* 9 * Copyright (C) 2008-201 2Oracle Corporation9 * Copyright (C) 2008-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #ifndef ____H_STORAGECONTROLLERIMPL 21 21 #define ____H_STORAGECONTROLLERIMPL 22 23 #include "VirtualBoxBase.h" 22 #include "StorageControllerWrap.h" 24 23 25 24 class ATL_NO_VTABLE StorageController : 26 public VirtualBoxBase, 27 VBOX_SCRIPTABLE_IMPL(IStorageController) 25 public StorageControllerWrap 28 26 { 29 27 public: 30 28 31 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(StorageController, IStorageController) 32 33 DECLARE_NOT_AGGREGATABLE (StorageController) 34 35 DECLARE_PROTECT_FINAL_CONSTRUCT() 36 37 BEGIN_COM_MAP(StorageController) 38 VBOX_DEFAULT_INTERFACE_ENTRIES (IStorageController) 39 END_COM_MAP() 40 41 StorageController() { }; 42 ~StorageController() { }; 29 DECLARE_EMPTY_CTOR_DTOR(StorageController) 43 30 44 31 HRESULT FinalConstruct(); … … 58 45 void uninit(); 59 46 60 // IStorageController properties61 STDMETHOD(COMGETTER(Name)) (BSTR *aName);62 STDMETHOD(COMGETTER(Bus)) (StorageBus_T *aBus);63 STDMETHOD(COMGETTER(ControllerType)) (StorageControllerType_T *aControllerType);64 STDMETHOD(COMSETTER(ControllerType)) (StorageControllerType_T aControllerType);65 STDMETHOD(COMGETTER(MaxDevicesPerPortCount)) (ULONG *aMaxDevices);66 STDMETHOD(COMGETTER(MinPortCount)) (ULONG *aMinPortCount);67 STDMETHOD(COMGETTER(MaxPortCount)) (ULONG *aMaxPortCount);68 STDMETHOD(COMGETTER(PortCount)) (ULONG *aPortCount);69 STDMETHOD(COMSETTER(PortCount)) (ULONG aPortCount);70 STDMETHOD(COMGETTER(Instance)) (ULONG *aInstance);71 STDMETHOD(COMSETTER(Instance)) (ULONG aInstance);72 STDMETHOD(COMGETTER(UseHostIOCache)) (BOOL *fUseHostIOCache);73 STDMETHOD(COMSETTER(UseHostIOCache)) (BOOL fUseHostIOCache);74 STDMETHOD(COMGETTER(Bootable)) (BOOL *fBootable);75 76 47 // public methods only for internal purposes 77 78 const Utf8Str &getName() const; 79 StorageControllerType_T getControllerType() const; 80 StorageBus_T getStorageBus() const; 81 ULONG getInstance() const; 82 bool getBootable() const; 83 84 HRESULT checkPortAndDeviceValid(LONG aControllerPort, 85 LONG aDevice); 86 87 void setBootable(BOOL fBootable); 88 89 void rollback(); 90 void commit(); 91 HRESULT getIDEEmulationPort (LONG DevicePosition, LONG *aPortNumber); 92 HRESULT setIDEEmulationPort (LONG DevicePosition, LONG aPortNumber); 48 const Utf8Str &i_getName() const; 49 StorageControllerType_T i_getControllerType() const; 50 StorageBus_T i_getStorageBus() const; 51 ULONG i_getInstance() const; 52 bool i_getBootable() const; 53 HRESULT i_checkPortAndDeviceValid(LONG aControllerPort, 54 LONG aDevice); 55 void i_setBootable(BOOL fBootable); 56 void i_rollback(); 57 void i_commit(); 58 HRESULT i_getIDEEmulationPort (LONG DevicePosition, LONG *aPortNumber); 59 HRESULT i_setIDEEmulationPort (LONG DevicePosition, LONG aPortNumber); 93 60 94 61 // public methods for internal purposes only 95 62 // (ensure there is a caller and a read lock before calling them!) 96 63 97 void unshare();64 void i_unshare(); 98 65 99 66 /** @note this doesn't require a read lock since mParent is constant. */ 100 Machine* getMachine(); 101 102 ComObjPtr<StorageController> getPeer(); 67 Machine* i_getMachine(); 68 ComObjPtr<StorageController> i_getPeer(); 103 69 104 70 private: 105 71 106 void printList(); 72 // Wrapped IStorageController properties 73 HRESULT getName(com::Utf8Str &aName); 74 HRESULT getMaxDevicesPerPortCount(ULONG *aMaxDevicesPerPortCount); 75 HRESULT getMinPortCount(ULONG *aMinPortCount); 76 HRESULT getMaxPortCount(ULONG *aMaxPortCount); 77 HRESULT getInstance(ULONG *aInstance); 78 HRESULT setInstance(ULONG aInstance); 79 HRESULT getPortCount(ULONG *aPortCount); 80 HRESULT setPortCount(ULONG aPortCount); 81 HRESULT getBus(StorageBus_T *aBus); 82 HRESULT getControllerType(StorageControllerType_T *aControllerType); 83 HRESULT setControllerType(StorageControllerType_T aControllerType); 84 HRESULT getUseHostIOCache(BOOL *aUseHostIOCache); 85 HRESULT setUseHostIOCache(BOOL aUseHostIOCache); 86 HRESULT getBootable(BOOL *aBootable); 87 88 void i_printList(); 107 89 108 90 struct Data; -
trunk/src/VBox/Main/include/VFSExplorerImpl.h
r47922 r49644 7 7 8 8 /* 9 * Copyright (C) 2009-201 1Oracle Corporation9 * Copyright (C) 2009-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 21 21 #define ____H_VFSEXPLORERIMPL 22 22 23 #include "V irtualBoxBase.h"23 #include "VFSExplorerWrap.h" 24 24 25 25 class ATL_NO_VTABLE VFSExplorer : 26 public VirtualBoxBase, 27 VBOX_SCRIPTABLE_IMPL(IVFSExplorer) 26 public VFSExplorerWrap 28 27 { 29 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VFSExplorer, IVFSExplorer) 30 31 DECLARE_NOT_AGGREGATABLE(VFSExplorer) 32 33 DECLARE_PROTECT_FINAL_CONSTRUCT() 34 35 BEGIN_COM_MAP(VFSExplorer) 36 VBOX_DEFAULT_INTERFACE_ENTRIES(IVFSExplorer) 37 END_COM_MAP() 28 public: 38 29 39 30 DECLARE_EMPTY_CTOR_DTOR(VFSExplorer) … … 46 37 void uninit(); 47 38 48 /* IVFSExplorer properties */49 STDMETHOD(COMGETTER(Path))(BSTR *aPath);50 STDMETHOD(COMGETTER(Type))(VFSType_T *aType);51 52 /* IVFSExplorer methods */53 STDMETHOD(Update)(IProgress **aProgress);54 55 STDMETHOD(Cd)(IN_BSTR aDir, IProgress **aProgress);56 STDMETHOD(CdUp)(IProgress **aProgress);57 58 STDMETHOD(EntryList)(ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(VFSFileType_T, aTypes), ComSafeArrayOut(LONG64, aSizes), ComSafeArrayOut(ULONG, aModes));59 60 STDMETHOD(Exists)(ComSafeArrayIn(IN_BSTR, aNames), ComSafeArrayOut(BSTR, aExists));61 62 STDMETHOD(Remove)(ComSafeArrayIn(IN_BSTR, aNames), IProgress **aProgress);63 64 39 /* public methods only for internal purposes */ 65 66 40 static HRESULT setErrorStatic(HRESULT aResultCode, 67 41 const Utf8Str &aText) … … 71 45 72 46 private: 47 48 // wrapped IVFSExplorer properties 49 HRESULT getPath(com::Utf8Str &aPath); 50 HRESULT getType(VFSType_T *aType); 51 52 // wrapped IVFSExplorer methods 53 HRESULT update(ComPtr<IProgress> &aProgress); 54 HRESULT cd(const com::Utf8Str &aDir, ComPtr<IProgress> &aProgress); 55 HRESULT cdUp(ComPtr<IProgress> &aProgress); 56 HRESULT entryList(std::vector<com::Utf8Str> &aNames, 57 std::vector<ULONG> &aTypes, 58 std::vector<LONG64> &aSizes, 59 std::vector<ULONG> &aModes); 60 HRESULT exists(const std::vector<com::Utf8Str> &aNames, 61 std::vector<com::Utf8Str> &aExists); 62 HRESULT remove(const std::vector<com::Utf8Str> &aNames, 63 ComPtr<IProgress> &aProgress); 64 73 65 /* Private member vars */ 74 66 VirtualBox * const mVirtualBox; 75 67 68 //////////////////////////////////////////////////////////////////////////////// 69 //// 70 //// VFSExplorer definitions 71 //// 72 ////////////////////////////////////////////////////////////////////////////////// 73 // 76 74 struct TaskVFSExplorer; /* Worker thread helper */ 77 struct Data; 75 struct Data 76 { 77 struct DirEntry 78 { 79 DirEntry(Utf8Str strName, VFSFileType_T fileType, uint64_t cbSize, uint32_t fMode) 80 : name(strName) 81 , type(fileType) 82 , size(cbSize) 83 , mode(fMode) {} 84 85 Utf8Str name; 86 VFSFileType_T type; 87 uint64_t size; 88 uint32_t mode; 89 }; 90 91 VFSType_T storageType; 92 Utf8Str strUsername; 93 Utf8Str strPassword; 94 Utf8Str strHostname; 95 Utf8Str strPath; 96 Utf8Str strBucket; 97 std::list<DirEntry> entryList; 98 }; 99 78 100 Data *m; 79 101 80 102 /* Private member methods */ 81 VFSFileType_T RTToVFSFileType(int aType) const;103 VFSFileType_T i_RTToVFSFileType(int aType) const; 82 104 83 HRESULT updateFS(TaskVFSExplorer *aTask); 84 HRESULT deleteFS(TaskVFSExplorer *aTask); 85 HRESULT updateS3(TaskVFSExplorer *aTask); 86 HRESULT deleteS3(TaskVFSExplorer *aTask); 105 HRESULT i_updateFS(TaskVFSExplorer *aTask); 106 HRESULT i_deleteFS(TaskVFSExplorer *aTask); 107 HRESULT i_updateS3(TaskVFSExplorer *aTask); 108 HRESULT i_deleteS3(TaskVFSExplorer *aTask); 109 87 110 }; 88 111 -
trunk/src/VBox/Main/include/VRDEServerImpl.h
r45680 r49644 21 21 #define ____H_VRDPSERVER 22 22 23 #include "VirtualBoxBase.h"24 25 #include <VBox/VBoxAuth.h>26 23 #include <VBox/settings.h> 24 #include "VRDEServerWrap.h" 27 25 28 26 class ATL_NO_VTABLE VRDEServer : 29 public VirtualBoxBase, 30 VBOX_SCRIPTABLE_IMPL(IVRDEServer) 27 public VRDEServerWrap 31 28 { 32 29 public: 33 30 34 struct Data 35 { 36 BOOL mEnabled; 37 Bstr mAuthLibrary; 38 AuthType_T mAuthType; 39 ULONG mAuthTimeout; 40 BOOL mAllowMultiConnection; 41 BOOL mReuseSingleConnection; 42 Utf8Str mVrdeExtPack; 43 settings::StringsMap mProperties; 44 }; 45 46 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VRDEServer, IVRDEServer) 47 48 DECLARE_NOT_AGGREGATABLE(VRDEServer) 49 50 DECLARE_PROTECT_FINAL_CONSTRUCT() 51 52 BEGIN_COM_MAP(VRDEServer) 53 VBOX_DEFAULT_INTERFACE_ENTRIES(IVRDEServer) 54 END_COM_MAP() 31 typedef std::map<com::Utf8Str, com::Utf8Str> StringsMap; 55 32 56 33 DECLARE_EMPTY_CTOR_DTOR(VRDEServer) … … 65 42 void uninit(); 66 43 67 // IVRDEServer properties68 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);69 STDMETHOD(COMSETTER(Enabled))(BOOL aEnable);70 STDMETHOD(COMGETTER(AuthType))(AuthType_T *aType);71 STDMETHOD(COMSETTER(AuthType))(AuthType_T aType);72 STDMETHOD(COMGETTER(AuthTimeout))(ULONG *aTimeout);73 STDMETHOD(COMSETTER(AuthTimeout))(ULONG aTimeout);74 STDMETHOD(COMGETTER(AllowMultiConnection))(BOOL *aAllowMultiConnection);75 STDMETHOD(COMSETTER(AllowMultiConnection))(BOOL aAllowMultiConnection);76 STDMETHOD(COMGETTER(ReuseSingleConnection))(BOOL *aReuseSingleConnection);77 STDMETHOD(COMSETTER(ReuseSingleConnection))(BOOL aReuseSingleConnection);78 STDMETHOD(COMGETTER(VRDEExtPack))(BSTR *aExtPack);79 STDMETHOD(COMSETTER(VRDEExtPack))(IN_BSTR aExtPack);80 STDMETHOD(COMGETTER(AuthLibrary))(BSTR *aValue);81 STDMETHOD(COMSETTER(AuthLibrary))(IN_BSTR aValue);82 STDMETHOD(COMGETTER(VRDEProperties))(ComSafeArrayOut(BSTR, aProperties));83 84 // IVRDEServer methods85 STDMETHOD(SetVRDEProperty)(IN_BSTR aKey, IN_BSTR aValue);86 STDMETHOD(GetVRDEProperty)(IN_BSTR aKey, BSTR *aValue);87 88 44 // public methods only for internal purposes 89 90 HRESULT loadSettings(const settings::VRDESettings &data); 91 HRESULT saveSettings(settings::VRDESettings &data); 92 93 void rollback(); 94 void commit(); 95 void copyFrom(VRDEServer *aThat); 45 HRESULT i_loadSettings(const settings::VRDESettings &data); 46 HRESULT i_saveSettings(settings::VRDESettings &data); 47 void i_rollback(); 48 void i_commit(); 49 void i_copyFrom(VRDEServer *aThat); 96 50 97 51 private: 52 53 // wrapped IVRDEServer properties 54 HRESULT getEnabled(BOOL *aEnabled); 55 HRESULT setEnabled(BOOL aEnabled); 56 HRESULT getAuthType(AuthType_T *aAuthType); 57 HRESULT setAuthType(AuthType_T aAuthType); 58 HRESULT getAuthTimeout(ULONG *aAuthTimeout); 59 HRESULT setAuthTimeout(ULONG aAuthTimeout); 60 HRESULT getAllowMultiConnection(BOOL *aAllowMultiConnection); 61 HRESULT setAllowMultiConnection(BOOL aAllowMultiConnection); 62 HRESULT getReuseSingleConnection(BOOL *aReuseSingleConnection); 63 HRESULT setReuseSingleConnection(BOOL aReuseSingleConnection); 64 HRESULT getVRDEExtPack(com::Utf8Str &aVRDEExtPack); 65 HRESULT setVRDEExtPack(const com::Utf8Str &aVRDEExtPack); 66 HRESULT getAuthLibrary(com::Utf8Str &aAuthLibrary); 67 HRESULT setAuthLibrary(const com::Utf8Str &aAuthLibrary); 68 HRESULT getVRDEProperties(std::vector<com::Utf8Str> &aVRDEProperties); 69 70 // wrapped IVRDEServer methods 71 HRESULT setVRDEProperty(const com::Utf8Str &aKey, 72 const com::Utf8Str &aValue); 73 HRESULT getVRDEProperty(const com::Utf8Str &aKey, 74 com::Utf8Str &aValue); 75 76 struct Data 77 { 78 BOOL mEnabled; 79 com::Utf8Str mAuthLibrary; 80 AuthType_T mAuthType; 81 ULONG mAuthTimeout; 82 BOOL mAllowMultiConnection; 83 BOOL mReuseSingleConnection; 84 Utf8Str mVrdeExtPack; 85 StringsMap mProperties; 86 }; 98 87 99 88 Machine * const mParent;
Note:
See TracChangeset
for help on using the changeset viewer.