summaryrefslogtreecommitdiffstats
path: root/kweather/main.cpp
blob: 864b551f3c5629a54864500da3f74d5097a65779 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <kuniqueapplication.h>
#include <tdecmdlineargs.h>
#include <kdebug.h>
#include <tdeaboutdata.h>
#include <klocale.h>
#include <dcopclient.h>
#include "weatherservice.h"

int main (int argc, char *argv[])
{
	TDELocale::setMainCatalogue("tdelibs");
	TDEAboutData aboutdata("KWeatherService", I18N_NOOP("TDE"),
				"0.8", I18N_NOOP("KWeather DCOP Service"),
				TDEAboutData::License_GPL, "(C) 2002, Ian Reinhart Geiser");
	aboutdata.addAuthor("Ian Reinhart Geiser",I18N_NOOP("Developer"),"geiseri@kde.org");
	aboutdata.addAuthor("Nadeem Hasan",I18N_NOOP("Developer"),"nhasan@kde.org");

	TDECmdLineArgs::init( argc, argv, &aboutdata );
	// TDECmdLineArgs::addCmdLineOptions( options );
	KUniqueApplication::addCmdLineOptions();

	if (!KUniqueApplication::start())
	{
		kdDebug() << "dcopservice is already running!" << endl;
		return (0);
	}

	KUniqueApplication app;
	// This app is started automatically, no need for session management
	app.disableSessionManagement();
	kdDebug() << "starting dcopservice " << endl;
	new WeatherService(TQT_TQOBJECT(&app), "WeatherService");
	return app.exec();

}