[vbox-dev] Question about IEvent capabilities in v4.x.x

Nikolay Igotti nikolay.igotti at oracle.com
Mon Feb 14 08:58:19 GMT 2011


   Hi Joseph,

Joseph Smith wrote:
> The IEvent capabilities that have been introduced in v4.x.x work quite 
> nicely.
 Hope so, previous callback approach was indeed quite hard to work with, 
so we redesigned it.

>
> I have a question about how much information is available when an 
> event is triggered.
 It's all depends on particular event, and how it's raised.
>
> Does the IMachineDataChangedEvent (OnMachineDataChanged) provide a 
> means of determining the specific data that has changed?
>
 In current implementation - no. The only available information is 
machine ID. What kind of information would you like to
see in this event?

> Other events (e.g: INATRedirectEvent) provide a means of determining 
> that information without retrieving  entire data-set.

 Yes, because historically INATRedirectEvent was introduced recently, 
and IMachineDataChangedEvent is quite old (in form of 
onMachineDataChanged callback). Reason behind it, is that data may be 
changed in multiple places, so IMachineDataChangedEvent
is fired from the saveSettings() method, and usually it's up to consumer 
to figure out exact details of the change.

> Thus far, since I am unable to determine which specific machine data 
> changed, it seems the only way to ensure I am in-sync is to retrieve 
> all the machine data (attached storage controllers, audio settings, 
> serial-port settings, VRDEServer settings, etc).  If that is the case 
> ... that's a lot of overhead if there are many machines that are 
> frequently being modified.
What's your exact usecase?  Maybe you can only keep in sync settings 
indeed relevant for you, and rely upon lazy update (that is, retrieve
data only when they are actually needed)?

   Nikolay




More information about the vbox-dev mailing list