Re: Proposing Tracker for inclusion into GNOME 2.18



On Tue, 2006-10-24 at 20:04 +0100, Jamie McCracken wrote:
> Only Files at the moment. We have preliminary Email support but its not 
> complete yet. The Api would be specific to each object and would be 
> analogous to the methods on a class.

Can you point to the API in the source?

> > I'm curious as to how this would work for contacts, as a backend for the
> > EDS addressbook instead of Berkeley DB.  
> 
> For each fisrt class object, the plan is to create a dedicated dbus 
> interface so in this case we would create a 
> org.freedesktop.tracker.contact interface and add various methods that 
> would be required (EG Get, Create, Delete etc)
> 
> For the Db, we would either reuse the Services Table or create a new one 
> for contacts depending on what makes a contact unique - if its a uri 
> then the services table would be reused. Is email address the unique 
> field for a contact?

Contacts don't have a URI, and contacts have have none, one, or many
email addresses.  In EDS, contacts have UIDs which are their unique
keys.

> Next up we would define the basic metadata or properties of the object 
> (EG Contact.FirstName, Contact.Surname, Contact.EmailAddress etc along 
> with their types) and add these to the metadata types table

$ grep EVC_ e-vcard.h| wc -l
61

Two of those are false positives, but that means that there are
currently 59 defined keys in EDS.  The version in Maemo adds another
three keys, but vCards allow arbitrary keys.  Does Tracker handle this
programatically?  If I add a vCard that has a number of custom fields,
can they be stored and indexed?

> > I'm working on a program now
> > that had added a custom field to every contact in EDS, which needs to be
> > indexed.  Adding a custom field is no effort with the current EDS API as
> > it stores vCards literally, and indexing the field was achieved by
> > hacking the summary index code and adding the field to the summary
> > files.  With the "first class" contact objects in tracker, can new
> > fields be added and indexed as required?
> 
> of course - everything but blob data is indexed (that is db indexed not 
> full text indexed)
> 
> Metadata is stored in a separate table according to its data type (IE 
> string, numeric, Date etc). We use a composite primary key (ServiceID, 
> MetaDataID) and the value itself is indexed.

vCard types are quite complicated...  The spec is something along the
lines of:

FIELD;PARAM=VALUE,VALUE,...;PARAM=VALUE,VALUE;...:VALUE;VALUE;...

i.e.

N:Burton;Ross;;;

N is name, a structured field.  Surname, given name, title, prefix,
suffix iirc.

X-JABBER;TYPE=WORK,PREF;X-EVOLUTION-UI-SLOT=1:ross burtonini com

A Jabber account, which is the preferred entry and the work entry (TYPE
is a list of values), which appears in the first slot in the Evolution
interface (shame on Evolution for putting that in the vCard), with the
value ross burtonini com

EMAIL;TYPE=INTERNET,HOME:ross burtonini com

An email address for home that uses the Internet as transfer.

Would I be able to search for all contacts that have an X-JABBER field
where TYPE contains HOME (so FOOHOMEBAR won't match)?   A real-world
example from the Nokia 770: give me all contacts with an X-JABBER field
where the X-OSSO-BOUND parameter is "ross burtonini com".

Is all of this possible with Tracker, or can tracker not efficiently
store vCard data?

Ross
-- 
Ross Burton                                 mail: ross burtonini com
                                          jabber: ross burtonini com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]