Re: [Tracker] [Fwd: Beagle and Tracker, letting Evolution feed those beasts RDF triples instead]



2008/12/8 Philip Van Hoof <spam pvanhoof be>
FYI

I will indeed be working on such a plugin and the tracker-side of such a
DBus API.

JFYI Aaron Bockover has been working on a harvesting interface for Banshee as well. There's a blog post here: http://abock.org/2008/10/09/a-few-updates-from-the-farm/, unfortunately I have not been successful in obtaining any more than this.

Anyway, this was just a heads up. Looking forward to see what you get to :-)

Cheers,
Mikkel
 

---------- Forwarded message ----------
From: Philip Van Hoof <spam pvanhoof be>
To: evolution-list gnome org
Date: Mon, 08 Dec 2008 18:59:31 +0100
Subject: Beagle and Tracker, letting Evolution feed those beasts RDF triples instead
All metadata engines are nowadays working on a method to let them get
their metadata fed by external applications.

For example the Xesam team at Freedesktop are putting together an API
like this: http://xesam.org/main/XesamMetadataAPI

Such APIs come down to storing RDF triples. A RDF triple comes down to a
URI, a property and a value.

For example (in Turtle format, which is SparQL's inline format and the
typical w3's RDF storage format):

<imap://user server/INBOX/001> <nmo:to> <some dude com> ;
       <nmo:messageSubject> "RE: Hello World" ;
       ... ;
       <nmo:from> <somebody somewhere com> .

Usually the API goes like this:

void
InsertRDFTriples (const char *subject,
                const char **predicates,
                const char **values);

For example:

static void
my_code (void) {
       char **predicates = malloc0 (sizeof (char*) * 4);
       char **values = malloc0 (sizeof (char*) * 4);
       char *subject = "imap://user server/INBOX/001";

       predicates[0] = "<nmo:to>";
       values[0] = "<some dude com>";

       predicates[1] = "<nmo:messageSubject>";
       values[1] = "\"RE: Hello World\"";

       predicates[2] = "<nmo:from>";
       values[2] = "<somebody somewhere com>";

       dbus_g_proxy_begin_call (prox,
                                "InsertRDFTriples",
                                on_finished,
                                NULL,
                                NULL,
                                G_TYPE_STRING, subject,
                                G_TYPE_STRV, predicates,
                                G_TYPE_STRV, values,
                                G_TYPE_INVALID);

       free (predicates);
       free (values);
}

We'd like to make an Evolution plugin that does this for Tracker.

Obviously would it be as easy as letting software like Beagle become an
implementer of "prox"'s InsertRDFTriples to start supporting Beagle with
the same code and Evolution plugin, this way.

I just don't know which EPlugin hooks I should use. Iterating all
accounts and foreach account all folders and foreach folder all
CamelMessageInfo instances is trivial and I know how to do this.

What I don't know is what reliable hooks are for:

 * Application started
 * Account added
 * Account removed
 * Folder created
 * Folder deleted
 * Folder moved
 * Message deleted (expunged)
 * Message flagged for removal
 * Message flagged as Read and as Unread
 * Message flagged (generic)
 * Message moved (ie. deleted + created)
 * New message received
   * Full message
   * Just the ENVELOPE

Note that the EPlugin documentation is by far not detailed enough to
distill these hooks out of that.

Who can help me with this? Where can I find a list? What source code
files do I have to crunch to know this? Will I have to read all of
the .c files in mail/ ?

--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be

_______________________________________________
tracker-list mailing list
tracker-list gnome org
http://mail.gnome.org/mailman/listinfo/tracker-list




--
Cheers,
Mikkel


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