Changeset 55255 in vbox
- Timestamp:
- Apr 14, 2015 3:45:46 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/SDKRef.xml
r55235 r55255 3920 3920 <xref linkend="MachineState__OnlineSnapshotting" xreflabel="MachineState::OnlineSnapshotting" /> 3921 3921 is used when an online snapshot is taken.</para> 3922 </listitem> 3923 3924 <listitem> 3925 <para>A new event has been introduced, which signals when a snapshot has been 3926 restored: 3927 <xref linkend="ISnapshotRestoredEvent" xreflabel="ISnapshotRestoredEvent"/>. 3928 Previously the event 3929 <xref linkend="ISnapshotDeletedEvent" xreflabel="ISnapshotDeletedEvent"/> was 3930 signalled, which isn't logical (but could be distinguished from actual deletion 3931 by the fact that the snapshot was still there).</para> 3922 3932 </listitem> 3923 3933 -
trunk/include/VBox/log.h
r52921 r55255 4 4 5 5 /* 6 * Copyright (C) 2006-201 4Oracle Corporation6 * Copyright (C) 2006-2015 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 563 563 LOG_GROUP_MAIN_SNAPSHOTEVENT, 564 564 /** Main group, ISnapshotTakenEvent. */ 565 LOG_GROUP_MAIN_SNAPSHOTRESTOREDEVENT, 566 /** Main group, ISnapshotRestoredEvent. */ 565 567 LOG_GROUP_MAIN_SNAPSHOTTAKENEVENT, 566 568 /** Main group, IStateChangedEvent. */ … … 1026 1028 "MAIN_SNAPSHOTDELETEDEVENT", \ 1027 1029 "MAIN_SNAPSHOTEVENT", \ 1030 "MAIN_SNAPSHOTRESTOREDEVENT", \ 1028 1031 "MAIN_SNAPSHOTTAKENEVENT", \ 1029 1032 "MAIN_STATECHANGEDEVENT", \ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r55218 r55255 20111 20111 <enum 20112 20112 name="VBoxEventType" 20113 uuid=" 1622f8d2-6c76-4410-9e78-86e083046efc"20113 uuid="b2ddb312-2f9e-4e69-98df-7235e43b2149" 20114 20114 > 20115 20115 … … 20490 20490 </desc> 20491 20491 </const> 20492 <!-- OnHostNameResolutionConfigurationChange --> 20492 <const name="OnSnapshotRestored" value="95"> 20493 <desc> 20494 See <link to="ISnapshotRestoredEvent">ISnapshotRestoredEvent</link>. 20495 </desc> 20496 </const> 20493 20497 <!-- Last event marker --> 20494 <const name="Last" value="9 5">20498 <const name="Last" value="96"> 20495 20499 <desc> 20496 20500 Must be last event, used for iterations and structures relying on numerical event values. … … 20987 20991 </note> 20988 20992 20993 <see><link to="ISnapshot"/></see> 20994 </desc> 20995 <attribute name="midlDoesNotLikEmptyInterfaces" readonly="yes" type="boolean"/> 20996 </interface> 20997 20998 <interface 20999 name="ISnapshotRestoredEvent" extends="ISnapshotEvent" 21000 uuid="f4d803b4-9b2d-4377-bfe6-9702e881516b" 21001 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotRestored" 21002 > 21003 <desc> 21004 Snapshot of the given machine has been restored. 20989 21005 <see><link to="ISnapshot"/></see> 20990 21006 </desc> -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r54948 r55255 141 141 void i_onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId); 142 142 void i_onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId); 143 void i_onSnapshotRestored(const Guid &aMachineId, const Guid &aSnapshotId); 143 144 void i_onSnapshotChange(const Guid &aMachineId, const Guid &aSnapshotId); 144 145 void i_onGuestPropertyChange(const Guid &aMachineId, IN_BSTR aName, IN_BSTR aValue, -
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r55233 r55255 2173 2173 i_setMachineState(MachineState_PoweredOff); 2174 2174 2175 i_updateMachineStateOnClient();2176 2175 stateRestored = true; 2177 2176 … … 2265 2264 /* restore the machine state */ 2266 2265 i_setMachineState(task.m_machineStateBackup); 2267 i_updateMachineStateOnClient();2268 2266 } 2269 2267 } … … 2275 2273 2276 2274 if (SUCCEEDED(rc)) 2277 mParent->i_onSnapshot Deleted(mData->mUuid, Guid());2275 mParent->i_onSnapshotRestored(mData->mUuid, Guid()); 2278 2276 2279 2277 LogFlowThisFunc(("Done restoring snapshot (rc=%08X)\n", rc)); … … 2488 2486 // set the proper machine state here now (note: after creating a Task instance) 2489 2487 if (mData->mMachineState == MachineState_Running) 2488 { 2490 2489 i_setMachineState(MachineState_DeletingSnapshotOnline); 2490 i_updateMachineStateOnClient(); 2491 } 2491 2492 else if (mData->mMachineState == MachineState_Paused) 2493 { 2492 2494 i_setMachineState(MachineState_DeletingSnapshotPaused); 2495 i_updateMachineStateOnClient(); 2496 } 2493 2497 else 2494 2498 i_setMachineState(MachineState_DeletingSnapshot); 2495 i_updateMachineStateOnClient();2496 2499 2497 2500 /* return the progress to the caller */ … … 3166 3169 // task was started 3167 3170 i_setMachineState(task.m_machineStateBackup); 3168 i_updateMachineStateOnClient(); 3171 if (Global::IsOnline(mData->mMachineState)) 3172 i_updateMachineStateOnClient(); 3169 3173 3170 3174 mParent->i_saveModifiedRegistries(); -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r55209 r55255 2814 2814 } 2815 2815 2816 /** Event for onSnapshotTaken(), onSnapshotDeleted() andonSnapshotChange() */2816 /** Event for i_onSnapshotTaken(), i_onSnapshotDeleted(), i_onSnapshotRestored() and i_onSnapshotChange() */ 2817 2817 struct SnapshotEvent : public VirtualBox::CallbackEvent 2818 2818 { … … 2839 2839 { 2840 2840 i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, 2841 VBoxEventType_OnSnapshotTaken));2841 VBoxEventType_OnSnapshotTaken)); 2842 2842 } 2843 2843 … … 2848 2848 { 2849 2849 i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, 2850 VBoxEventType_OnSnapshotDeleted));2850 VBoxEventType_OnSnapshotDeleted)); 2851 2851 } 2852 2852 … … 2854 2854 * @note Doesn't lock any object. 2855 2855 */ 2856 void VirtualBox::i_onSnapshotRestored(const Guid &aMachineId, const Guid &aSnapshotId) 2857 { 2858 i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, 2859 VBoxEventType_OnSnapshotRestored)); 2860 } 2861 2862 /** 2863 * @note Doesn't lock any object. 2864 */ 2856 2865 void VirtualBox::i_onSnapshotChange(const Guid &aMachineId, const Guid &aSnapshotId) 2857 2866 { 2858 2867 i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, 2859 VBoxEventType_OnSnapshotChanged));2868 VBoxEventType_OnSnapshotChanged)); 2860 2869 } 2861 2870
Note:
See TracChangeset
for help on using the changeset viewer.