2 This file is part of KNewStuff.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (c) 2007 Jeremy Whiting <jeremy@scitools.com>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #include <kapplication.h>
25 #include <kcmdlineargs.h>
26 #include <kaboutdata.h>
28 #include <knewstuff2/engine.h>
30 int main(int argc
, char **argv
)
32 KAboutData
about("khotnewstuff", 0, ki18n("KHotNewStuff"), "0.3");
33 about
.setProgramIconName("get-hot-new-stuff");
36 KCmdLineArgs::init(argc
, argv
, &about
);
39 op
.add("+filename", ki18n("Name of .knsrc file to read configuration from"));
40 //op.add("type <type>", ki18n("Display only media of this type"));
41 //op.add("+[providerlist]", ki18n("Provider list to use"));
42 KCmdLineArgs::addCmdLineOptions(op
);
43 args
= KCmdLineArgs::parsedArgs();
47 if (args
->count() > 0) {
49 if (engine
.init(args
->arg(0))) {
50 KNS::Entry::List entries
= engine
.downloadDialogModal();
53 kDebug() << "could not load " << args
->arg(0);
61 //if(args->isSet("type")) d.setCategory(args->getOption("type"));
62 //if(args->count() == 1) d.setProviderList(args->arg(0));
63 // FIXME (KNS2): do we still need/want those?