diff -r e7aa27f58ae1 -r 578830873419 emailuis/nmindicatorplugin/src/nmindicatorplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/nmindicatorplugin/src/nmindicatorplugin.cpp Fri Apr 16 14:51:52 2010 +0300 @@ -0,0 +1,110 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "NmIndicatorPlugin.h" + +#include "nmindicator.h" + +#include +#include +#include +#include + +Q_EXPORT_PLUGIN(NmIndicatorPlugin) + +const int maxIndicatorCount = 10; + +/*! + \class NmIndicatorPlugin + \brief Mail indicator plugin class. +*/ + +/*! + Class constructor. +*/ +NmIndicatorPlugin::NmIndicatorPlugin() +: mError(0), mTranslator(0) +{ +} + +/*! + Class destructor. +*/ +NmIndicatorPlugin::~NmIndicatorPlugin() +{ + delete mTranslator; +} + +/*! + Return notification types this plugin implements + */ +QStringList NmIndicatorPlugin::indicatorTypes() const +{ + QStringList types; + for (int i=0; iload(appName + lang, path); + QCoreApplication::installTranslator(mTranslator); + } + + HbIndicatorInterface *indicator = 0; + indicator = new NmIndicator(indicatorType); + return indicator; +} + +/*! + Returns the last error code. + */ +int NmIndicatorPlugin::error() const +{ + return mError; +} + + + +