how to access data from dataEngine::query in javascript?

Aaron J. Seigo aseigo at kde.org
Tue Jun 29 18:06:05 CEST 2010


On June 29, 2010, Thomas Fjellstrom wrote:
> Basically the way the DataEngine is setup right now is each "Host Source"
> is given a single Data Source, with a type of "source", and a QStringList
> "hosts" property listing the hosts owned by this source. After that each
> host that the host source provides is its own source with a number of
> other properties (address, type, mac, name, isUp).

so there are discovery mechanisms (zeroconf, e.g.) and hosts, correct? given 
discovery mechs d1, d2 and d3 and hosts h1..h6, the DataEngine looks something 
like this:

d1
	hosts  = h1, h2
d2
	hosts = h4, h5
d3
	hosts = h6, h7
h1
	address =
	type =
	mac =
	name =
	isUp =
h2
	address =
	type =
	mac =
	name =
	isUp =
h3
	address =
	type =
	mac =
	name =
	isUp =
h4
	address =
	type =
	mac =
	name =
	isUp =
h5
	address =
	type =
	mac =
	name =
	isUp =
h6
	address =
	type =
	mac =
	name =
	isUp =


is there any reason not just just skip the d1, d2 and d3 sources and just list 
the hosts directly? does the visualiation need to list "all hosts that were 
found using libvirt" such that it warrants the above structure?

to me, it would seem more natural to just list the hosts and the visualization 
can initially iterate over all sources() and then connect to the sourceAdded 
and sourceRemoved signals to be notified when hosts come and go.

that would resolve your issue fairly neatly?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100629/183d900e/attachment.sig 


More information about the Plasma-devel mailing list