Re: [Evolution] Example of accessing wombat from script available ?



On Sun, 2002-02-03 at 18:06, Nicholas Piper wrote:
I'm looking for an example of how to access calendar/contacts/todo
details from a python (or perl) script. I know this has to be via
corba/bonobo, but apart from that I'm pretty lost.

I've had a look at the Evo .oaf files, but have little clue how to
continue. I've installed bonobo-python ready.

I'm not sure that anyone who understands the Evolution corba interfaces
is also familiar with the Python/Perl corba bindings. :-}

The basic thing to understand is that most of the interfaces are
asynchronous. The client has to create "listener" objects that listen
for responses from the backend. So something like:

    factory = [Get the GNOME:Addressbook:BookFactory object from oaf]
    listener = [Create your own GNOME:Addressbook:BookListener object]
    factory.openBook ("file:/.../addressbook.db", listener);

Then your listener object's "notifyBookOpened" method will be called at
some point and given a GNOME:Addressbook:Book object. And you can invoke
the getVCard method on that, which will eventually cause your listener's
notifyCardRequested method to be called with the card data.

-- Dan




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