/* testaddresses KPilot ** ** Copyright (C) 2006 by Adriaan de Groot #include #include #include #include #include "pilot.h" #include "pilotAddress.h" #include "pilotLocalDatabase.h" static const KCmdLineOptions options[] = { {"verbose", "Verbose output", 0}, {"data-dir ","Set data directory", "."}, KCmdLineLastOption }; int main(int argc, char **argv) { TDEApplication::disableAutoDcopRegistration(); TDEAboutData aboutData("testaddress","Test Addresses","0.1"); TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::addCmdLineOptions( options ); TDEApplication app( false, false ); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); #ifdef DEBUG debug_level= (args->isSet("verbose")) ? 4 : 0; #endif TQString datadir = args->getOption("data-dir"); DEBUGKPILOT << "### testaddresses\n#\n#" << endl; Pilot::setupPilotCodec( CSL1("Latin1") ); PilotLocalDatabase db( datadir, "AddressDB" ); PilotAddressInfo appinfo( &db ); appinfo.dump(); for (unsigned int i=0; i