[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] Kaddresbook dcop request...
From:       Mark Westcott <mark () houseoffish ! org>
Date:       2001-11-27 7:44:12
[Download RAW message or body]

On Tuesday 27 November 2001 2:29 am, Eduardo Dominguez wrote:

>
> I am coding a small Caller ID app in python. What I want to do is
> send the number to all the workstation in the office (4) using  xmlrpc
> and then lookup the name of the person thats calling in each persons
> kaddressbook so that I can display it. I really need this feature in
> KAB.

I dont know a thing about python or the KDE Bindings in other languages - but 
ideally you do not want to use a DCOP call to kaddressbook but a call to kabc 
(the new addressbook api, in head at the moment).  There is little point 
modifying kab, as it is obselete once KDE3 is released.  

I see no reason why this function shouldnt be added to kabc, - we have 
findByName, findByEmail etc, why not findByPhoneNumber?

Be aware that (in general), more than one contact could have the same phone 
number, so the function you add needs to return a list of addressees, not 
just one.

The files you need to modify to add this feature are 
kdelibs/kabc/addressbook.h and addressbook.cpp.  Add the function in 
addressbook.h, with the same decleration as, say, the findByEmail function.  
Then in kaddressbook.cpp, add the function.  Start by copying the findByEmail 
function, but instead of the (*it).preferredEmail() use (*it).phoneNumber().

Hope this helps,

If you get stuck I'll do it for you, 
(dont take that as an invitation to not try :P)

Mark



> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> _______________________________________________
> kde-pim mailing list
> kde-pim@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-pim


_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic