emailuis/nmhswidget/src/nmhswidgetplugin.cpp
changeset 20 ecc8def7944a
child 30 759dc5235cdb
equal deleted inserted replaced
18:578830873419 20:ecc8def7944a
       
     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:  Homescreen nmail widget plugin
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "nmhswidgetplugin.h"
       
    23 #include "nmhswidget.h"
       
    24 
       
    25 #ifdef COVERAGE_MEASUREMENT
       
    26 #pragma CTC SKIP
       
    27 #endif //COVERAGE_MEASUREMENT
       
    28 
       
    29 /*!
       
    30   \class NmHsWidgetPlugin
       
    31   \ingroup group_hsclockwidgetplugin
       
    32   \brief Homescreen clock widget provider collects ready-made homescreen clock widget(s).
       
    33  
       
    34   This library includes homescreen clock widgets implemented by homescreen scrum team.
       
    35   This plugin provides widgets that are described in the  hsclockwidgetplugin.xml plugin
       
    36   xml file.
       
    37  
       
    38 */
       
    39 QObject *NmHsWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    40                                              QServiceContext *context,
       
    41                                              QAbstractSecuritySession *session)
       
    42 {
       
    43     qDebug() << "NmHsWidgetPlugin::createInstance";
       
    44     Q_UNUSED(context);
       
    45     Q_UNUSED(session);
       
    46 
       
    47     if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
       
    48         return new NmHsWidget();
       
    49     } else {
       
    50         return 0;
       
    51     }
       
    52 }
       
    53 
       
    54 Q_EXPORT_PLUGIN2(nmhswidgetplugin, NmHsWidgetPlugin)
       
    55 
       
    56 #ifdef COVERAGE_MEASUREMENT
       
    57 #pragma CTC ENDSKIP
       
    58 #endif //COVERAGE_MEASUREMENT