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 
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 }
 
This file is part of the documentation for kabc Library Version 3.2.0.