Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
arts
arts
arts
kde
kiotest.cc
1
#include <stdio.h>
2
#include <kmedia2.h>
3
#include <tdecmdlineargs.h>
4
#include <connect.h>
5
#include <
tdelocale.h
>
6
#include <tdeapplication.h>
7
#include <tdeaboutdata.h>
8
#include "qiomanager.h"
9
#include "artskde.h"
10
11
using namespace
std;
12
using namespace
Arts;
13
14
15
static
TDECmdLineOptions
options[] =
16
{
17
{
"+[URL]"
,
I18N_NOOP
(
"URL to open"
), 0 },
18
TDECmdLineLastOption
19
};
20
21
int
main(
int
argc,
char
**argv)
22
{
23
TDEAboutData
aboutData(
"kiotest"
,
I18N_NOOP
(
"KIOTest"
),
I18N_NOOP
(
"0.1"
),
""
, TDEAboutData::License_GPL,
""
);
24
25
TDECmdLineArgs::init
(argc,argv,&aboutData);
26
TDECmdLineArgs::addCmdLineOptions
(options);
27
TDEApplication
app;
28
QIOManager qiomanager;
29
Dispatcher dispatcher(&qiomanager);
30
TDEIOInputStream stream;
31
StdoutWriter writer;
32
33
TDECmdLineArgs
*args =
TDECmdLineArgs::parsedArgs
();
34
35
if
(args->
count
())
36
{
37
if
(!stream.openURL(args->
arg
(0)))
38
{
39
printf(
"can't open url"
);
40
exit(1);
41
}
42
}
43
else
44
exit(1);
45
46
args->
clear
();
47
48
connect(stream, writer);
49
50
writer.start();
51
stream.start();
52
53
app.exec();
54
}
arts
Skip menu "arts"
Main Page
Alphabetical List
Class List
File List
Class Members
arts
Skip menu "arts"
arts
dcop
dnssd
interfaces
kspeech
interface
library
tdetexteditor
kate
kded
kdoctools
kimgio
kjs
libtdemid
libtdescreensaver
tdeabc
tdecmshell
tdecore
tdefx
tdehtml
tdeinit
tdeio
bookmarks
httpfilter
kpasswdserver
kssl
tdefile
tdeio
tdeioexec
tdeioslave
http
tdemdi
tdemdi
tdenewstuff
tdeparts
tdeprint
tderandr
tderesources
tdespell2
tdesu
tdeui
tdeunittest
tdeutils
tdewallet