2007/1/18, Jean-Francois Dockes <<a href="mailto:jean-francois.dockes@wanadoo.fr">jean-francois.dockes@wanadoo.fr</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Magnus Bergman writes:<br> > On Fri, 12 Jan 2007 08:41:10 +0100<br> > Jean-Francois Dockes <<a href="mailto:jean-francois.dockes@wanadoo.fr">jean-francois.dockes@wanadoo.fr</a>> wrote:<br> > > I think that the sequence number can be kept implicit:
<br> > ><br> > > Query (in s query_string, out i query_handle)<br> > > GetHitProperties ( in s query_handle, in i offset, in i limit,<br> > > in as properties, out (sequence of maps)
<br> > > response )<br> ><br> > What you call "offset" is exactly what I meant by "sequence number", if<br> > I didn't misunderstand something. The alternative (really keeping it<br>
> implicit) would be to completely leave it out and just return the bunch<br> > of hits (much like how read(2) works. But that would also require a<br> > function similar to lseek(2), so I guess it wouldn't be simpler anyway.
<br><br>What I mean by:<br><br> GetHitProperties ( in s query_handle, in i offset, in i limit,<br> in as properties, out (sequence of maps) response);<br><br>is: return "limit" hits starting from offset "offset". This is a
<br>combined lseek/read call.<br><br>I propose that the hit numbers should be implicit *in the response*. We<br>know that it contains an ordered list of hits from number "offset" to<br>"offset+limit-1", so I think that there is no point in repeating the hit
<br>number for every entry, as would (in your words): "A map mapping each hit<br>(sequence number) to a map of property-list of values pairs"<br><br>Or did I not understand you ?</blockquote><div><br>I'm pretty sure that we actually agree everybody :-)
<br><br>The return value is an array of arrays of properties. There are not maps involved anywhere. Fx: a search with a single hit and one prop: [[value]]. A search with two hits and three properties: [[value1, value2, value3], [value1, value2, value3]] - here valueN is the value of the N'th property in the GetHits request.
<br><br>The tricky part is what a "property" is then. Since we should allow multivalued properties (think "email:cc") we have two choices:<br><br>1) The type of a property is a dbus Variant. Meaning a container type with a value and a type. This would allow accessing fx file:size an integer and email:cc as an array of strings. The dbus signature of the return type is then "aav".
<br><br>2) A property is an array of strings representing the value(s). This gives a dbus signature for the return type "aaas".<br><br>I'm inclined towards 2), but I know that not everybody agrees with me :-) Please speak up.
<br><br>Cheers,<br>Mikkel <br></div><br></div>