[Kde-pim] Where is kabc/resourcefile.h ?

Robin Atwood robin at binro.org
Wed Oct 21 16:34:34 BST 2009


On Wednesday 21 October 2009, Tobias Koenig wrote:
> On Wed, Oct 21, 2009 at 08:55:59PM +0700, Robin Atwood wrote:
> Hej Robin,
> 
> > I want to process an arbitrary vcf file as an addressbook, so it seems I
> > want to create an KABC::ResourceFile instance and then access its
> > AddressBook member. But I cannot seem to be able to locate the header
> > file anywhere! Neither Google nor the find command are helping.
> 
> Nope, you want to use something like the following:
> 
>   QFile file( "mycontacts.vcf" );
>   file.open( QIODevice::ReadOnly );
>   const QByteArray data = file.readAll();
> 
>   KABC::VCardConverter converter;
>   const KABC::Addressee::List contacts = converter.parseVCards( data );
> 
>   foreach ( const KABC::Addressee &contact, contacts )
>     qDebug() << "Name=" << contact.fullName();
> 
> StdAddressBook and the rest of the kresource framework shouldn't be
> used anymore!

Ah! Thanks Tobias for the pointer. However, if you searched like I did, all 
the kresource stuff shows up in the current apidox, sending you up the garden 
path: 
http://api.kde.org/4.3-api/kdepimlibs-
apidocs/kabc/html/classKABC_1_1Resource.html

Cheers
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------








_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list