messagingapp/msgnotifications/msgindicatorplugin/inc/msgindicatorplugin.h
branchRCL_3
changeset 57 ebe688cedc25
child 47 5b14749788d7
equal deleted inserted replaced
54:fa1df4b99609 57:ebe688cedc25
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: Message Indicator Plugin Class 
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MSGINDICATORPLUGIN_H
       
    19 #define MSGINDICATORPLUGIN_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QStringList>
       
    23 #include <QVariant>
       
    24 
       
    25 #include <hbindicatorplugininterface.h>
       
    26 #include <hbindicatorinterface.h>
       
    27 
       
    28 /**
       
    29  * Message indicator plugin class. 
       
    30  * Main class of message indicator plugin. 
       
    31  */
       
    32 class MsgIndicatorPlugin: public QObject, public HbIndicatorPluginInterface
       
    33 {
       
    34 Q_OBJECT
       
    35 Q_INTERFACES(HbIndicatorPluginInterface)
       
    36 
       
    37 public:
       
    38     /**
       
    39      * Constructor
       
    40      */
       
    41      MsgIndicatorPlugin();
       
    42      
       
    43      /**
       
    44       * Destructor
       
    45       */
       
    46     ~MsgIndicatorPlugin();
       
    47     
       
    48     /**
       
    49      * @see HbIndicatorPluginInterface
       
    50      */
       
    51     QStringList indicatorTypes() const;
       
    52     
       
    53     /**
       
    54      * @see HbIndicatorPluginInterface
       
    55      */
       
    56     bool accessAllowed(const QString &indicatorType,
       
    57         const QVariantMap& securityInfo) const;   
       
    58     /**
       
    59      * @see HbIndicatorPluginInterface
       
    60      */
       
    61     HbIndicatorInterface* createIndicator(const QString &indicatorType);
       
    62 
       
    63     /**
       
    64      * @see HbIndicatorPluginInterface
       
    65      */
       
    66     int error() const;
       
    67 
       
    68     /**
       
    69      * Returns the indices of plugin types.
       
    70      * @param indicatorType QString the type of indicator
       
    71      * @return int the indicator type as an index.
       
    72      */
       
    73     int typeIndex(const QString &indicatorType) const;
       
    74 
       
    75 private:
       
    76     Q_DISABLE_COPY(MsgIndicatorPlugin)
       
    77     
       
    78     /**
       
    79      * Error value
       
    80      */
       
    81     int mError;
       
    82     
       
    83     /**
       
    84      * Indicator types 
       
    85      * supported indicator types. 
       
    86      */
       
    87     QStringList mIndicatorTypes;
       
    88 };
       
    89 
       
    90 #endif // MSGINDICATORPLUGIN_H