Forwarding this E-mail to the hackers mailing list.

I just noticed that I mailed this to the Evolution user's mailing list
by accident instead of the Hackers mailing list.

Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org
--- Begin Message ---
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:

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://[EMAIL PROTECTED]/INBOX/001> <nmo:to> <[EMAIL PROTECTED]> ;
        <nmo:messageSubject> "RE: Hello World" ;
        ... ;
        <nmo:from> <[EMAIL PROTECTED]> .

Usually the API goes like this:

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://[EMAIL PROTECTED]/INBOX/001";

        predicates[0] = "<nmo:to>";
        values[0] = "<[EMAIL PROTECTED]>";

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

        predicates[2] = "<nmo:from>";
        values[2] = "<[EMAIL PROTECTED]>";

        dbus_g_proxy_begin_call (prox,
                                 G_TYPE_STRING, subject,
                                 G_TYPE_STRV, predicates,
                                 G_TYPE_STRV, values,

        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

Evolution-list mailing list

--- End Message ---
Evolution-hackers mailing list

Reply via email to