Changeset 3348 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Jul 2, 2007 12:44:39 PM (18 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/AudioAdapterImpl.h
r2981 r3348 28 28 29 29 class ATL_NO_VTABLE AudioAdapter : 30 public VirtualBoxBaseNEXT, 30 31 public VirtualBoxSupportErrorInfoImpl <AudioAdapter, IAudioAdapter>, 31 32 public VirtualBoxSupportTranslation <AudioAdapter>, 32 public VirtualBoxBase,33 33 public IAudioAdapter 34 34 { … … 53 53 }; 54 54 55 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (AudioAdapter) 56 55 57 DECLARE_NOT_AGGREGATABLE(AudioAdapter) 56 58 … … 64 66 NS_DECL_ISUPPORTS 65 67 68 DECLARE_EMPTY_CTOR_DTOR (AudioAdapter) 69 66 70 HRESULT FinalConstruct(); 67 71 void FinalRelease(); 68 72 69 73 // public initializer/uninitializer for internal purposes only 70 HRESULT init (Machine * parent);71 HRESULT init (Machine * parent, AudioAdapter *that);72 HRESULT initCopy (Machine * parent, AudioAdapter *that);74 HRESULT init (Machine *aParent); 75 HRESULT init (Machine *aParent, AudioAdapter *aThat); 76 HRESULT initCopy (Machine *aParent, AudioAdapter *aThat); 73 77 void uninit(); 74 78 75 STDMETHOD(COMGETTER(Enabled))(BOOL * enabled);76 STDMETHOD(COMSETTER(Enabled))(BOOL enabled);77 STDMETHOD(COMGETTER(AudioDriver)) (AudioDriverType_T *a udioDriverType);78 STDMETHOD(COMSETTER(AudioDriver)) (AudioDriverType_T a udioDriverType);79 STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled); 80 STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled); 81 STDMETHOD(COMGETTER(AudioDriver)) (AudioDriverType_T *aAudioDriverType); 82 STDMETHOD(COMSETTER(AudioDriver)) (AudioDriverType_T aAudioDriverType); 79 83 80 84 // public methods only for internal purposes 81 85 82 const Backupable <Data> &data() const { return mData; }83 84 86 bool isModified() { AutoLock alock (this); return mData.isBackedUp(); } 85 87 bool isReallyModified() { AutoLock alock (this); return mData.hasActualChanges(); } 86 void rollback() { AutoLock alock (this); mData.rollback(); }88 bool rollback(); 87 89 void commit(); 88 90 void copyFrom (AudioAdapter *aThat); 91 92 // public methods for internal purposes only 93 // (ensure there is a caller and a read lock before calling them!) 94 95 const Backupable <Data> &data() const { return mData; } 89 96 90 97 // for VirtualBoxSupportErrorInfoImpl … … 93 100 private: 94 101 95 ComObjPtr <Machine, ComWeakRef> mParent; 96 ComObjPtr <AudioAdapter> mPeer; 102 const ComObjPtr <Machine, ComWeakRef> mParent; 103 const ComObjPtr <AudioAdapter> mPeer; 104 97 105 Backupable <Data> mData; 98 106 }; -
trunk/src/VBox/Main/include/NetworkAdapterImpl.h
r2981 r3348 29 29 30 30 class ATL_NO_VTABLE NetworkAdapter : 31 public VirtualBoxBase ,31 public VirtualBoxBaseNEXT, 32 32 public VirtualBoxSupportErrorInfoImpl <NetworkAdapter, INetworkAdapter>, 33 33 public VirtualBoxSupportTranslation <NetworkAdapter>, … … 86 86 }; 87 87 88 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (NetworkAdapter) 89 88 90 DECLARE_NOT_AGGREGATABLE(NetworkAdapter) 89 91 … … 97 99 NS_DECL_ISUPPORTS 98 100 101 DECLARE_EMPTY_CTOR_DTOR (NetworkAdapter) 102 99 103 HRESULT FinalConstruct(); 100 104 void FinalRelease(); 101 105 102 106 // public initializer/uninitializer for internal purposes only 103 HRESULT init (Machine * parent, ULONG slot);104 HRESULT init (Machine * parent, NetworkAdapter *that);105 HRESULT initCopy (Machine * parent, NetworkAdapter *that);107 HRESULT init (Machine *aParent, ULONG aSlot); 108 HRESULT init (Machine *aParent, NetworkAdapter *aThat); 109 HRESULT initCopy (Machine *aParent, NetworkAdapter *aThat); 106 110 void uninit(); 107 111 108 112 // INetworkAdapter properties 109 STDMETHOD(COMGETTER(AdapterType))(NetworkAdapterType_T *a dapterType);110 STDMETHOD(COMSETTER(AdapterType))(NetworkAdapterType_T a dapterType);111 STDMETHOD(COMGETTER(Slot)) (ULONG * slot);112 STDMETHOD(COMGETTER(Enabled)) (BOOL * enabled);113 STDMETHOD(COMSETTER(Enabled)) (BOOL enabled);114 STDMETHOD(COMGETTER(MACAddress)) (BSTR *macAddress);115 STDMETHOD(COMSETTER(MACAddress)) (INPTR BSTR macAddress);116 STDMETHOD(COMGETTER(AttachmentType)) (NetworkAttachmentType_T *attachmentType);117 STDMETHOD(COMGETTER(HostInterface)) (BSTR *hostInterface);118 STDMETHOD(COMSETTER(HostInterface)) (INPTR BSTR hostInterface);113 STDMETHOD(COMGETTER(AdapterType))(NetworkAdapterType_T *aAdapterType); 114 STDMETHOD(COMSETTER(AdapterType))(NetworkAdapterType_T aAdapterType); 115 STDMETHOD(COMGETTER(Slot)) (ULONG *aSlot); 116 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled); 117 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled); 118 STDMETHOD(COMGETTER(MACAddress)) (BSTR *aMACAddress); 119 STDMETHOD(COMSETTER(MACAddress)) (INPTR BSTR aMACAddress); 120 STDMETHOD(COMGETTER(AttachmentType)) (NetworkAttachmentType_T *aAttachmentType); 121 STDMETHOD(COMGETTER(HostInterface)) (BSTR *aHostInterface); 122 STDMETHOD(COMSETTER(HostInterface)) (INPTR BSTR aHostInterface); 119 123 #ifdef VBOX_WITH_UNIXY_TAP_NETWORKING 120 STDMETHOD(COMGETTER(TAPFileDescriptor)) (LONG *tapFileDescriptor);121 STDMETHOD(COMSETTER(TAPFileDescriptor)) (LONG tapFileDescriptor);122 STDMETHOD(COMGETTER(TAPSetupApplication)) (BSTR *tapSetupApplication);123 STDMETHOD(COMSETTER(TAPSetupApplication)) (INPTR BSTR tapSetupApplication);124 STDMETHOD(COMGETTER(TAPTerminateApplication)) (BSTR *tapTerminateApplication);125 STDMETHOD(COMSETTER(TAPTerminateApplication)) (INPTR BSTR tapTerminateApplication);124 STDMETHOD(COMGETTER(TAPFileDescriptor)) (LONG *aTAPFileDescriptor); 125 STDMETHOD(COMSETTER(TAPFileDescriptor)) (LONG aTAPFileDescriptor); 126 STDMETHOD(COMGETTER(TAPSetupApplication)) (BSTR *aTAPSetupApplication); 127 STDMETHOD(COMSETTER(TAPSetupApplication)) (INPTR BSTR aTAPSetupApplication); 128 STDMETHOD(COMGETTER(TAPTerminateApplication)) (BSTR *aTAPTerminateApplication); 129 STDMETHOD(COMSETTER(TAPTerminateApplication)) (INPTR BSTR aTAPTerminateApplication); 126 130 #endif 127 STDMETHOD(COMGETTER(InternalNetwork)) (BSTR *internalNetwork);128 STDMETHOD(COMSETTER(InternalNetwork)) (INPTR BSTR internalNetwork);129 STDMETHOD(COMGETTER(CableConnected)) (BOOL *connected);130 STDMETHOD(COMSETTER(CableConnected)) (BOOL connected);131 STDMETHOD(COMGETTER(TraceEnabled)) (BOOL *enabled);132 STDMETHOD(COMSETTER(TraceEnabled)) (BOOL enabled);133 STDMETHOD(COMGETTER(TraceFile)) (BSTR *traceFile);134 STDMETHOD(COMSETTER(TraceFile)) (INPTR BSTR traceFile);131 STDMETHOD(COMGETTER(InternalNetwork)) (BSTR *aInternalNetwork); 132 STDMETHOD(COMSETTER(InternalNetwork)) (INPTR BSTR aInternalNetwork); 133 STDMETHOD(COMGETTER(CableConnected)) (BOOL *aConnected); 134 STDMETHOD(COMSETTER(CableConnected)) (BOOL aConnected); 135 STDMETHOD(COMGETTER(TraceEnabled)) (BOOL *aEnabled); 136 STDMETHOD(COMSETTER(TraceEnabled)) (BOOL aEnabled); 137 STDMETHOD(COMGETTER(TraceFile)) (BSTR *aTraceFile); 138 STDMETHOD(COMSETTER(TraceFile)) (INPTR BSTR aTraceFile); 135 139 136 140 // INetworkAdapter methods … … 142 146 // public methods only for internal purposes 143 147 144 const Backupable <Data> &data() const { return mData; }145 146 148 bool isModified() { AutoLock alock (this); return mData.isBackedUp(); } 147 149 bool isReallyModified() { AutoLock alock (this); return mData.hasActualChanges(); } … … 149 151 void commit(); 150 152 void copyFrom (NetworkAdapter *aThat); 153 154 // public methods for internal purposes only 155 // (ensure there is a caller and a read lock before calling them!) 156 157 const Backupable <Data> &data() const { return mData; } 151 158 152 159 // for VirtualBoxSupportErrorInfoImpl … … 158 165 void generateMACAddress(); 159 166 160 ComObjPtr <Machine, ComWeakRef> mParent; 161 ComObjPtr <NetworkAdapter> mPeer; 167 const ComObjPtr <Machine, ComWeakRef> mParent; 168 const ComObjPtr <NetworkAdapter> mPeer; 169 162 170 Backupable <Data> mData; 163 171 };
Note:
See TracChangeset
for help on using the changeset viewer.