testdb.cpp Source File (kabc Library)

| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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 }

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:22 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001