kabc Library API Documentation

testdb.cpp

00001 #include <kaboutdata.h>
00002 #include <kapplication.h>
00003 #include <kdebug.h>
00004 #include <klocale.h>
00005 #include <kcmdlineargs.h>
00006 
00007 #include "addressbook.h"
00008 #include "vcardformat.h"
00009 #include "resourcesql.h"
00010 
00011 using namespace KABC;
00012 
00013 int main(int argc,char **argv)
00014 {
00015   KAboutData aboutData("testdb","TestKabcDB","0.1");
00016   KCmdLineArgs::init(argc,argv,&aboutData);
00017 
00018 //  KApplication app( false, false );
00019   KApplication app;
00020 
00021   AddressBook ab;
00022   
00023   ResourceSql r( &ab, "root", "kde4ever", "localhost" );
00024   if ( ! r.open() ) {
00025     kdDebug() << "Failed to open resource." << endl;
00026   }
00027   
00028   r.load( &ab );
00029   
00030   r.close();
00031   
00032   ab.dump();
00033 }
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:08 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001