From kde-pim Fri Sep 24 20:09:27 1999 From: Rik Hemsley Date: Fri, 24 Sep 1999 20:09:27 +0000 To: kde-pim Subject: Success w/ corba X-MARC-Message: https://marc.info/?l=kde-pim&m=93820325931117 Thanks to the excellent work done by the cuteidl team, I've finally managed to create a working model for a kabII CORBA server. You'll have to play around a little if you want to get things compiled. You need to generate the .cc and .h files from the .idl using cuteidl rather than idl. Just do this by hand. Example from my system: /x/cvs/kde/pim/corba/kab/server > cuteidl kaddressbook.idl Next you can just compile normally. Sometime makefiles will be fixed to use cuteidl instead of idl. The only other thing you need is a backend plugin. The only one in existence at the moment is the gdbm one. /x/cvs/kde/pim/corba/kab/server > cd ../../../kab2/backends/gdbm/ /x/cvs/kde/pim/kab2/backends/gdbm > make install /x/cvs/kde/pim/kab2/backends/gdbm > cd - /x/cvs/kde/pim/corba/kab/server > Now you need to compile the client program. /x/cvs/kde/pim/corba/kab/server > g++ -c -o client.o client.cc -I$KDEDIR/include -I$QTDIR/include /x/cvs/kde/pim/corba/kab/server > g++ o client client.o kaddressbook.o -L$KDEDI R/lib -L$QTDIR/lib -lcutesti -lmico2.3.0 This should give you a 'kab_server' and 'client' executables. The script 'test' will start the server, and use the client to talk to the addressbook it provides. I haven't actually done any more than get it to print any more than the following, but it's nice to see it work. ------------------------------------------------------------------------------- Activating 'IDL:KAddressBook/AddressBook:1.0' Binding to 'inet:localhost:12456' Creating new addressbook implementation Loading backend for format 'gdbm' ... done Resolving symbols ... done IOR:010000002100000049444c3a4b41646472657373426f6f6b2f41646472657373426f6f6b3a312e3000000000020000000000000027000000010100000a0000003132372e302e302e3100a8300f0000004f4144020000007f000002eb6b0000000100000024000000010000000100000001000000140000000100000001000100000000000901010000000000 AddressBook name is "test" ------------------------------------------------------------------------------- Now I can start doing some real work. What needs to happen next is we make a decision - do we do all talking to kab using CORBA, or do we do it via a client library (libkab) ? The client library was to perform these functions: 1) Discover which addressbooks are intended for use (via KConfig) 2) Allow searching through _all_ addressbooks 3) Provide a wrapper for the nasty CORBA stuff No. 1 can be done easily by simply letting the client (e.g. libkabui) read the config file itself. No. 2 can also be done by the client - all it has to do is to go through the list of addressbooks and perform the same action for each. No. 3 is no longer relevant, as the CORBA stuff is not nasty any more. We get to use QTL. Can anyone think of any pressing reason for us to continue with my plan for an API library ? Cheers, Rik