Changeset 85309 in vbox
- Timestamp:
- Jul 13, 2020 12:56:56 PM (4 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 10 edited
-
include/ConsoleImpl.h (modified) (1 diff)
-
include/GuestImpl.h (modified) (1 diff)
-
include/MachineImpl.h (modified) (2 diffs)
-
include/VirtualBoxImpl.h (modified) (1 diff)
-
src-client/ConsoleImpl.cpp (modified) (4 diffs)
-
src-client/GuestImpl.cpp (modified) (2 diffs)
-
src-client/VMMDevInterface.cpp (modified) (1 diff)
-
src-server/MachineImpl.cpp (modified) (1 diff)
-
src-server/NATEngineImpl.cpp (modified) (2 diffs)
-
src-server/VirtualBoxImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ConsoleImpl.h
r85307 r85309 291 291 static HRESULT i_storageBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun); 292 292 // Called from event listener 293 HRESULT i_onNATRedirectRuleChange (ULONG ulInstance, BOOL aNatRuleRemove,294 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort);293 HRESULT i_onNATRedirectRuleChanged(ULONG ulInstance, BOOL aNatRuleRemove, 294 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort); 295 295 HRESULT i_onNATDnsChanged(); 296 296 -
trunk/src/VBox/Main/include/GuestImpl.h
r84554 r85309 95 95 void i_setAdditionsStatus(VBoxGuestFacilityType a_enmFacility, VBoxGuestFacilityStatus a_enmStatus, 96 96 uint32_t a_fFlags, PCRTTIMESPEC a_pTimeSpecTS); 97 void i_onUserStateChange(Bstr aUser, Bstr aDomain, VBoxGuestUserState enmState, const uint8_t *puDetails, uint32_t cbDetails); 97 void i_onUserStateChanged(const Utf8Str &aUser, const Utf8Str &aDomain, VBoxGuestUserState enmState, 98 const uint8_t *puDetails, uint32_t cbDetails); 98 99 void i_setSupportedFeatures(uint32_t aCaps); 99 100 HRESULT i_setStatistic(ULONG aCpuId, GUESTSTATTYPE enmType, ULONG aVal); -
trunk/src/VBox/Main/include/MachineImpl.h
r84618 r85309 512 512 // callback handlers 513 513 virtual HRESULT i_onNetworkAdapterChange(INetworkAdapter * /* networkAdapter */, BOOL /* changeAdapter */) { return S_OK; } 514 virtual HRESULT i_onNATRedirectRuleChange (ULONG /* slot */, BOOL /* fRemove */ , IN_BSTR/* name */,515 NATProtocol_T /* protocol */, IN_BSTR/* host ip */, LONG /* host port */,516 IN_BSTR/* guest port */, LONG /* guest port */ ) { return S_OK; }514 virtual HRESULT i_onNATRedirectRuleChanged(ULONG /* slot */, BOOL /* fRemove */ , const Utf8Str & /* name */, 515 NATProtocol_T /* protocol */, const Utf8Str & /* host ip */, LONG /* host port */, 516 const Utf8Str & /* guest port */, LONG /* guest port */ ) { return S_OK; } 517 517 virtual HRESULT i_onAudioAdapterChange(IAudioAdapter * /* audioAdapter */) { return S_OK; } 518 518 virtual HRESULT i_onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; } … … 1319 1319 1320 1320 HRESULT i_onNetworkAdapterChange(INetworkAdapter *networkAdapter, BOOL changeAdapter); 1321 HRESULT i_onNATRedirectRuleChange (ULONG ulSlot, BOOL aNatRuleRemove, IN_BSTRaRuleName,1322 NATProtocol_T aProto, IN_BSTRaHostIp, LONG aHostPort,1323 IN_BSTR aGuestIp, LONG aGuestPort);1321 HRESULT i_onNATRedirectRuleChanged(ULONG ulSlot, BOOL aNatRuleRemove, const Utf8Str &aRuleName, 1322 NATProtocol_T aProto, const Utf8Str &aHostIp, LONG aHostPort, 1323 const Utf8Str &aGuestIp, LONG aGuestPort) RT_OVERRIDE; 1324 1324 HRESULT i_onStorageControllerChange(const com::Guid &aMachineId, const com::Utf8Str &aControllerName); 1325 1325 HRESULT i_onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce); -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r85307 r85309 192 192 193 193 void i_onGuestPropertyChanged(const Guid &aMachineId, const Utf8Str &aName, const Utf8Str &aValue, const Utf8Str &aFlags); 194 void i_onNatRedirectChanged(const Guid &aMachineId, ULONG ulSlot, bool fRemove, IN_BSTRaName,195 NATProtocol_T aProto, IN_BSTRaHostIp, uint16_t aHostPort,196 IN_BSTRaGuestIp, uint16_t aGuestPort);194 void i_onNatRedirectChanged(const Guid &aMachineId, ULONG ulSlot, bool fRemove, const Utf8Str &aName, 195 NATProtocol_T aProto, const Utf8Str &aHostIp, uint16_t aHostPort, 196 const Utf8Str &aGuestIp, uint16_t aGuestPort); 197 197 void i_onNATNetworkChanged(const Utf8Str &aNetworkName); 198 198 void i_onNATNetworkStartStop(const Utf8Str &aNetworkName, BOOL aStart); -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r85307 r85309 299 299 case VBoxEventType_OnNATRedirect: 300 300 { 301 Bstr id;302 301 ComPtr<IMachine> pMachine = mConsole->i_machine(); 303 302 ComPtr<INATRedirectEvent> pNREv = aEvent; … … 305 304 Assert(pNREv); 306 305 306 Bstr id; 307 307 rc = pNREv->COMGETTER(MachineId)(id.asOutParam()); 308 308 AssertComRC(rc); 309 309 if (id != mConsole->i_getId()) 310 310 break; 311 311 312 /* now we can operate with redirects */ 312 NATProtocol_T proto ;313 NATProtocol_T proto = (NATProtocol_T)0; 313 314 pNREv->COMGETTER(Proto)(&proto); 314 315 BOOL fRemove; 315 316 pNREv->COMGETTER(Remove)(&fRemove); 316 Bstr hostIp, guestIp; 317 LONG hostPort, guestPort; 317 Bstr hostIp; 318 318 pNREv->COMGETTER(HostIP)(hostIp.asOutParam()); 319 LONG hostPort = 0; 319 320 pNREv->COMGETTER(HostPort)(&hostPort); 321 Bstr guestIp; 320 322 pNREv->COMGETTER(GuestIP)(guestIp.asOutParam()); 323 LONG guestPort = 0; 321 324 pNREv->COMGETTER(GuestPort)(&guestPort); 322 325 ULONG ulSlot; … … 325 328 if (FAILED(rc)) 326 329 break; 327 mConsole->i_onNATRedirectRuleChange (ulSlot, fRemove, proto, hostIp.raw(), hostPort, guestIp.raw(), guestPort);330 mConsole->i_onNATRedirectRuleChanged(ulSlot, fRemove, proto, hostIp.raw(), hostPort, guestIp.raw(), guestPort); 328 331 break; 329 332 } … … 4078 4081 * @note Locks this object for writing. 4079 4082 */ 4080 HRESULT Console::i_onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove, 4081 NATProtocol_T aProto, IN_BSTR aHostIP, 4082 LONG aHostPort, IN_BSTR aGuestIP, 4083 LONG aGuestPort) 4083 HRESULT Console::i_onNATRedirectRuleChanged(ULONG ulInstance, BOOL aNatRuleRemove, NATProtocol_T aProto, IN_BSTR aHostIP, 4084 LONG aHostPort, IN_BSTR aGuestIP, LONG aGuestPort) 4084 4085 { 4085 4086 LogFlowThisFunc(("\n")); -
trunk/src/VBox/Main/src-client/GuestImpl.cpp
r85300 r85309 1073 1073 * @param cbDetails Size (in bytes) of state details. Pass 0 if not used. 1074 1074 */ 1075 void Guest::i_onUserStateChange (Bstr aUser, BstraDomain, VBoxGuestUserState enmState,1076 const uint8_t *pbDetails, uint32_t cbDetails)1075 void Guest::i_onUserStateChanged(const Utf8Str &aUser, const Utf8Str &aDomain, VBoxGuestUserState enmState, 1076 const uint8_t *pbDetails, uint32_t cbDetails) 1077 1077 { 1078 1078 RT_NOREF(pbDetails, cbDetails); … … 1082 1082 AssertComRCReturnVoid(autoCaller.rc()); 1083 1083 1084 Bstr strDetails; /** @todo Implement state details here. */1085 1086 ::FireGuestUserStateChangedEvent(mEventSource, aUser .raw(), aDomain.raw(), (GuestUserState_T)enmState, strDetails.raw());1084 Utf8Str strDetails; /** @todo Implement state details here. */ 1085 1086 ::FireGuestUserStateChangedEvent(mEventSource, aUser, aDomain, (GuestUserState_T)enmState, strDetails); 1087 1087 LogFlowFuncLeave(); 1088 1088 } -
trunk/src/VBox/Main/src-client/VMMDevInterface.cpp
r84564 r85309 187 187 AssertPtrReturnVoid(pGuest); 188 188 189 pGuest->i_onUserStateChange(Bstr(pszUser), Bstr(pszDomain), (VBoxGuestUserState)uState, 190 pabDetails, cbDetails); 189 pGuest->i_onUserStateChanged(Utf8Str(pszUser), Utf8Str(pszDomain), (VBoxGuestUserState)uState, pabDetails, cbDetails); 191 190 } 192 191 -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r85306 r85309 13853 13853 * @note Locks this object for reading. 13854 13854 */ 13855 HRESULT SessionMachine::i_onNATRedirectRuleChange (ULONG ulSlot, BOOL aNatRuleRemove, IN_BSTRaRuleName,13856 NATProtocol_T aProto, IN_BSTRaHostIp, LONG aHostPort,13857 IN_BSTRaGuestIp, LONG aGuestPort)13855 HRESULT SessionMachine::i_onNATRedirectRuleChanged(ULONG ulSlot, BOOL aNatRuleRemove, const Utf8Str &aRuleName, 13856 NATProtocol_T aProto, const Utf8Str &aHostIp, LONG aHostPort, 13857 const Utf8Str &aGuestIp, LONG aGuestPort) 13858 13858 { 13859 13859 LogFlowThisFunc(("\n")); -
trunk/src/VBox/Main/src-server/NATEngineImpl.cpp
r82968 r85309 326 326 327 327 alock.release(); 328 mParent->i_onNATRedirectRuleChange(ulSlot, FALSE, Bstr(name).raw(), aProto, Bstr(r.strHostIP).raw(), 329 r.u16HostPort, Bstr(r.strGuestIP).raw(), r.u16GuestPort); 328 mParent->i_onNATRedirectRuleChanged(ulSlot, FALSE, name, aProto, r.strHostIP, r.u16HostPort, r.strGuestIP, r.u16GuestPort); 330 329 return S_OK; 331 330 } … … 350 349 mParent->i_setModified(Machine::IsModified_NetworkAdapters); 351 350 alock.release(); 352 mParent->i_onNATRedirectRuleChange(ulSlot, TRUE, Bstr(aName).raw(), r.proto, Bstr(r.strHostIP).raw(), 353 r.u16HostPort, Bstr(r.strGuestIP).raw(), r.u16GuestPort); 351 mParent->i_onNATRedirectRuleChanged(ulSlot, TRUE, aName, r.proto, r.strHostIP, r.u16HostPort, r.strGuestIP, r.u16GuestPort); 354 352 return S_OK; 355 353 } -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r85307 r85309 3723 3723 * @note Doesn't lock any object. 3724 3724 */ 3725 void VirtualBox::i_onNatRedirectChanged(const Guid &aMachineId, ULONG ulSlot, bool fRemove, IN_BSTRaName,3726 NATProtocol_T aProto, IN_BSTRaHostIp, uint16_t aHostPort,3727 IN_BSTRaGuestIp, uint16_t aGuestPort)3728 { 3729 ::FireNATRedirectEvent(m->pEventSource, aMachineId.to Utf16().raw(), ulSlot, fRemove, aName, aProto, aHostIp,3725 void VirtualBox::i_onNatRedirectChanged(const Guid &aMachineId, ULONG ulSlot, bool fRemove, const Utf8Str &aName, 3726 NATProtocol_T aProto, const Utf8Str &aHostIp, uint16_t aHostPort, 3727 const Utf8Str &aGuestIp, uint16_t aGuestPort) 3728 { 3729 ::FireNATRedirectEvent(m->pEventSource, aMachineId.toString(), ulSlot, fRemove, aName, aProto, aHostIp, 3730 3730 aHostPort, aGuestIp, aGuestPort); 3731 3731 }
Note:
See TracChangeset
for help on using the changeset viewer.

