• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • arts
 

arts

kiotest.cc
00001 #include <stdio.h>
00002 #include <kmedia2.h>
00003 #include <kcmdlineargs.h>
00004 #include <connect.h>
00005 #include <klocale.h>
00006 #include <kapplication.h>
00007 #include <kaboutdata.h>
00008 #include "qiomanager.h"
00009 #include "artskde.h"
00010 
00011 using namespace std;
00012 using namespace Arts;
00013 
00014 
00015 static KCmdLineOptions options[] =
00016 {
00017     { "+[URL]", I18N_NOOP("URL to open"), 0 },
00018     KCmdLineLastOption
00019 };
00020 
00021 int main(int argc, char **argv)
00022 {
00023     KAboutData aboutData( "kiotest", I18N_NOOP("KIOTest"), I18N_NOOP("0.1"), "", KAboutData::License_GPL, "");
00024                               
00025     KCmdLineArgs::init(argc,argv,&aboutData);
00026     KCmdLineArgs::addCmdLineOptions(options);   
00027     KApplication app;
00028     QIOManager qiomanager;
00029     Dispatcher dispatcher(&qiomanager);
00030     KIOInputStream stream;
00031     StdoutWriter writer;
00032 
00033     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00034 
00035     if(args->count())
00036     {
00037         if(!stream.openURL(args->arg(0)))
00038         {
00039         printf("can't open url");
00040         exit(1);
00041         }
00042     }
00043     else
00044         exit(1);
00045         
00046     args->clear();
00047     
00048     connect(stream, writer);
00049 
00050     writer.start();
00051     stream.start();
00052     
00053     app.exec();
00054 }

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for arts by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |