appinstaller/AppinstUi/sisxsilentinstallindicatorplugin/src/sisxsilentinstallindicatorplugin.cpp
branchRCL_3
changeset 66 8b7f4e561641
parent 65 7333d7932ef7
child 70 e8965914fac7
equal deleted inserted replaced
65:7333d7932ef7 66:8b7f4e561641
     1 /*
       
     2  * Copyright (c) 2010 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 <QtPlugin>
       
    19 #include <QVariant>
       
    20 #include "sisxsilentinstallindicatorplugin.h"
       
    21 #include "sisxsilentinstallindicator.h"
       
    22 
       
    23 Q_EXPORT_PLUGIN(SisxSilentInstallIndicatorPlugin)
       
    24 
       
    25 // ----------------------------------------------------------------------------
       
    26 // SisxSilentInstallIndicatorPlugin::SisxSilentInstallIndicatorPlugin
       
    27 // @see sisxsilentinstallindicatorplugin.h
       
    28 // ----------------------------------------------------------------------------
       
    29 SisxSilentInstallIndicatorPlugin::SisxSilentInstallIndicatorPlugin() : mError(0)
       
    30 {
       
    31    
       
    32 }
       
    33 
       
    34 // ----------------------------------------------------------------------------
       
    35 // SisxSilentInstallIndicatorPlugin::~SisxSilentInstallIndicatorPlugin
       
    36 // @see sisxsilentinstallindicatorplugin.h
       
    37 // ----------------------------------------------------------------------------
       
    38 SisxSilentInstallIndicatorPlugin::~SisxSilentInstallIndicatorPlugin()
       
    39 {
       
    40 }
       
    41 
       
    42 // ----------------------------------------------------------------------------
       
    43 // SisxSilentInstallIndicatorPlugin::indicatorTypes
       
    44 // Return notification types this plugin implements
       
    45 // @see sisxsilentinstallindicatorplugin.h
       
    46 // ----------------------------------------------------------------------------
       
    47 QStringList SisxSilentInstallIndicatorPlugin::indicatorTypes() const
       
    48 {
       
    49   QStringList types; 
       
    50   types << "com.nokia.sisxsilentinstall.indicatorplugin/1.0";
       
    51   return types;
       
    52 }
       
    53 
       
    54 // ----------------------------------------------------------------------------
       
    55 // SisxSilentInstallIndicatorPlugin::accessAllowed
       
    56 // Check if client is allowed to use notification widget
       
    57 // @see sisxsilentinstallindicatorplugin.h
       
    58 // ----------------------------------------------------------------------------
       
    59 bool SisxSilentInstallIndicatorPlugin::accessAllowed(
       
    60 		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 // SisxSilentInstallIndicatorPlugin::createIndicator
       
    73 // @see sisxsilentinstallindicatorplugin.h
       
    74 // ----------------------------------------------------------------------------
       
    75 HbIndicatorInterface* SisxSilentInstallIndicatorPlugin::createIndicator(
       
    76         const QString &indicatorType)
       
    77 {
       
    78     HbIndicatorInterface *indicator = 
       
    79             new SisxSilentInstallIndicator(indicatorType);
       
    80     return indicator;
       
    81 }
       
    82 
       
    83 // ----------------------------------------------------------------------------
       
    84 // SisxSilentInstallIndicatorPlugin::error
       
    85 // @see sisxsilentinstallindicatorplugin.h
       
    86 // ----------------------------------------------------------------------------
       
    87 int SisxSilentInstallIndicatorPlugin::error() const
       
    88 {
       
    89     return mError;
       
    90 }
       
    91 
       
    92 //EOF