diff -r 25a3fbb5e4d3 -r 1cc4c46c2963 securitydialogs/Autolock/indicatorplugin/hbindicatorautolockplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/Autolock/indicatorplugin/hbindicatorautolockplugin.h Mon Oct 04 01:41:57 2010 +0300 @@ -0,0 +1,74 @@ +/* +* ============================================================================ +* Name : hbindicatorautolockplugin.h +* Part of : hb / hbcore +* Description : indicator autolock plugin header +* Version : %version: 1 % +* +* Copyright (c) 2009 Nokia. All rights reserved. +* This material, including documentation and any related computer +* programs, is protected by copyright controlled by Nokia. All +* rights are reserved. Copying, including reproducing, storing, +* adapting or translating, any or all of this material requires the +* prior written consent of Nokia. This material also contains +* confidential information which may not be disclosed to others +* without the prior written consent of Nokia. +* ============================================================================ +*/ + +#ifndef HBINDICATORAUTOLOCKPLUGIN_H +#define HBINDICATORAUTOLOCKPLUGIN_H + +#include +#include +#include + +#include +#include +#include "autolockindicators.h" + +class HbIndicatorAutolockPlugin : public QObject, public HbIndicatorPluginInterface +{ + Q_OBJECT + Q_INTERFACES(HbIndicatorPluginInterface) + +public: + HbIndicatorAutolockPlugin(); + ~HbIndicatorAutolockPlugin(); + + QStringList indicatorTypes() const; + bool accessAllowed(const QString &indicatorType, + const QVariantMap &securityInfo) const; + HbIndicatorInterface* createIndicator(const QString &indicatorType); + int error() const; +private: + int typeIndex(const QString &indicatorType) const; +private: + Q_DISABLE_COPY(HbIndicatorAutolockPlugin) + int mError; + QStringList mIndicatorTypes; +}; + +class HbAutolockIndicator : public HbIndicatorInterface +{ +public: + HbAutolockIndicator(const QString &indicatorType, + int typeIndex, + Interaction interaction); + ~HbAutolockIndicator(); + bool handleInteraction(InteractionType type); + QVariant indicatorData(int role) const; +protected: + bool handleClientRequest(RequestType type, const QVariant ¶meter); +private: + QString mPrimaryText; + QString mSecondaryText; + QString mIcon; + QString mIconMono; + int mTypeIndex; + Interaction mInteraction; + QVariant mParameter; +}; + +#endif // HBINDICATORAUTOLOCKPLUGIN_H +