VirtualBox

Changeset 97523 in vbox


Ignore:
Timestamp:
Nov 14, 2022 8:58:36 AM (2 years ago)
Author:
vboxsync
Message:

Main: Add new OnMachineGroupsChanged event which fires when the groups of a machine change, bugref:10276

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r97395 r97523  
    2673326733      </desc>
    2673426734    </const>
     26735    <const name="OnMachineGroupsChanged" value="118">
     26736      <desc>
     26737        See <link to="IMachineGroupsChangedEvent">IMachineGroupsChangedEvent</link>.
     26738      </desc>
     26739    </const>
    2673526740    <!-- End event marker -->
    26736     <const name="End" value="118">
     26741    <const name="End" value="119">
    2673726742      <desc>
    2673826743        Must be last event, used for iterations and structures relying on numerical event values.
     
    2908329088      <desc>
    2908429089        Guest debug control object that is subject to change.
     29090      </desc>
     29091    </attribute>
     29092  </interface>
     29093
     29094  <interface
     29095    name="IMachineGroupsChangedEvent" extends="IMachineEvent"
     29096    uuid="ee37afb5-7002-4786-a5c4-a9c29e1cce75"
     29097    wsmap="managed" autogen="VBoxEvent" id="OnMachineGroupsChanged"
     29098    >
     29099    <desc>
     29100      The groups of the machine have changed.
     29101    </desc>
     29102
     29103    <attribute name="dummy" type="boolean" readonly="yes">
     29104      <desc>
     29105        Dummy state because you can't have an event without attributes apparently.
    2908529106      </desc>
    2908629107    </attribute>
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r96407 r97523  
    177177    void i_onMachineStateChanged(const Guid &aId, MachineState_T aState);
    178178    void i_onMachineDataChanged(const Guid &aId, BOOL aTemporary = FALSE);
     179    void i_onMachineGroupsChanged(const Guid &aId);
    179180    BOOL i_onExtraDataCanChange(const Guid &aId, const Utf8Str &aKey, const Utf8Str &aValue, Bstr &aError);
    180181    void i_onExtraDataChanged(const Guid &aId, const Utf8Str &aKey, const Utf8Str &aValue);
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r97367 r97523  
    13711371    mUserData->s.llGroups = llGroups;
    13721372
     1373    mParent->i_onMachineGroupsChanged(mData->mUuid);
    13731374    return S_OK;
    13741375}
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r97168 r97523  
    34753475
    34763476/**
     3477 *  @note Doesn't lock any object.
     3478 */
     3479void VirtualBox::i_onMachineGroupsChanged(const Guid &aId)
     3480{
     3481    ComPtr<IEvent> ptrEvent;
     3482    HRESULT hrc = ::CreateMachineGroupsChangedEvent(ptrEvent.asOutParam(), m->pEventSource, aId.toString(), FALSE /*aDummy*/);
     3483    AssertComRCReturnVoid(hrc);
     3484    i_postEvent(new AsyncEvent(this, ptrEvent));
     3485}
     3486
     3487/**
    34773488 *  @note Locks this object for reading.
    34783489 */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette