On Friday 23 October 2009, Arigead wrote: > Sorry it's a newbie question I'm afraid. > > I've been looking at org.freesmartphone.PIM.Contact with a view to > getting contact details for a phone number. I'm really trying to get my > hands on the contact's name given a number so that went a call or sms or > something arrives you can quickly query opimd for a name, if it's got one. > > The GetContent() method takes no parameters so I'm not sure I understand > it's intended use, obviously I'm missing the point. Anyhow if somebody > could advise me I'd be very grateful. Pulling back all the contacts and > searching through don't seem the ideal way of doing this. > > Thanks for any help and sorry if this is a bit on the basic side
I think you're confusing PIM.Contact and PIM.Contacts. PIM.Contact is the interface to an individual contact whose path you have found by another means. GetContent returns all the fields for that contact. PIM.Contacts is the interface to the set of contacts, and has a Query method that allows complex searches to be performed. PIM.ContactQuery is the interface to the results from PIM.Contacts.Query. You probably want to use GetResult or GetMultipleResults to access the matching fields directly. I'm not sure where documentation for the query language is, but there have been a few examples on the list. _______________________________________________ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland