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://[EMAIL PROTECTED]/INBOX/001> <nmo:to> <[EMAIL PROTECTED]> ; <nmo:messageSubject> "RE: Hello World" ; ... ; <nmo:from> <[EMAIL PROTECTED]> . 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://[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, "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 _______________________________________________ Evolution-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/evolution-list
