iaupdate/IAD/bgcindicatorplugin/src/bgcindicatorplugin.cpp
branchRCL_3
changeset 25 7333d7932ef7
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
       
     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:
       
    15  *
       
    16  */
       
    17 
       
    18 #include "bgcindicatorplugin.h"
       
    19 
       
    20 #include "bgcindicator.h"
       
    21 #include <QtPlugin>
       
    22 #include <QVariant>
       
    23 
       
    24 Q_EXPORT_PLUGIN(BgcIndicatorPlugin)
       
    25 
       
    26 // ----------------------------------------------------------------------------
       
    27 // BgcIndicatorPlugin::BgcIndicatorPlugin
       
    28 // @see bgcindicatorplugin.h
       
    29 // ----------------------------------------------------------------------------
       
    30 BgcIndicatorPlugin::BgcIndicatorPlugin() : mError(0)
       
    31 {
       
    32    
       
    33 }
       
    34 
       
    35 // ----------------------------------------------------------------------------
       
    36 // BgcIndicatorPlugin::~BgcIndicatorPlugin
       
    37 // @see bgcindicatorplugin.h
       
    38 // ----------------------------------------------------------------------------
       
    39 BgcIndicatorPlugin::~BgcIndicatorPlugin()
       
    40 {
       
    41 }
       
    42 
       
    43 // ----------------------------------------------------------------------------
       
    44 // BgcIndicatorPlugin::indicatorTypes
       
    45 // Return notification types this plugin implements
       
    46 // @see bgcindicatorplugin.h
       
    47 // ----------------------------------------------------------------------------
       
    48 QStringList BgcIndicatorPlugin::indicatorTypes() const
       
    49 {
       
    50   QStringList types; 
       
    51   types << "com.nokia.iaupdate.indicatorplugin/1.0";
       
    52   return types;
       
    53 }
       
    54 
       
    55 // ----------------------------------------------------------------------------
       
    56 // BgcIndicatorPlugin::accessAllowed
       
    57 // Check if client is allowed to use notification widget
       
    58 // @see bgcindicatorplugin.h
       
    59 // ----------------------------------------------------------------------------
       
    60 bool BgcIndicatorPlugin::accessAllowed(const QString &indicatorType,
       
    61         const QVariantMap &securityInfo) const
       
    62 {
       
    63     Q_UNUSED(indicatorType)
       
    64     Q_UNUSED(securityInfo)
       
    65 
       
    66     // This plugin doesn't perform operations that may compromise security.
       
    67     // All clients are allowed to use.
       
    68     return true;
       
    69 }
       
    70 
       
    71 // ----------------------------------------------------------------------------
       
    72 // BgcIndicatorPlugin::createIndicator
       
    73 // @see bgcindicatorplugin.h
       
    74 // ----------------------------------------------------------------------------
       
    75 HbIndicatorInterface* BgcIndicatorPlugin::createIndicator(
       
    76         const QString &indicatorType)
       
    77 {
       
    78     HbIndicatorInterface *indicator = new BgcIndicator(indicatorType);
       
    79 
       
    80     return indicator;
       
    81 }
       
    82 
       
    83 // ----------------------------------------------------------------------------
       
    84 // BgcIndicatorPlugin::error
       
    85 // @see bgcindicatorplugin.h
       
    86 // ----------------------------------------------------------------------------
       
    87 int BgcIndicatorPlugin::error() const
       
    88 {
       
    89     return mError;
       
    90 }
       
    91 
       
    92 
       
    93 
       
    94