%{CPP_TEMPLATE}

#include <kuniqueapplication.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <kdebug.h>
#include <tdelocale.h>
#include <dcopclient.h>
#include "%{APPNAMELC}.h"

static const char description[] =
    I18N_NOOP("A TDE KPart Application");

static const char version[] = "0.1";

static TDECmdLineOptions options[] =
{
    TDECmdLineLastOption
};

int main (int argc, char *argv[])
{
	TDELocale::setMainCatalogue("tdelibs");
	TDEAboutData aboutdata("%{APPNAMELC}", I18N_NOOP("TDE"),
				version, description,
				TDEAboutData::License_GPL, "(C) %{YEAR}, %{AUTHOR}");
	aboutdata.addAuthor("%{AUTHOR}",I18N_NOOP("Developer"),"%{EMAIL}");

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

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

	KUniqueApplication app;
	kdDebug() << "starting %{APPNAMELC} " << endl;
	// This app is started automatically, no need for session management
	app.disableSessionManagement();
	%{APPNAME} *service = new %{APPNAME};
	kdDebug() << "starting %{APPNAMELC} " << endl;
	return app.exec();

}
