homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsclockwidgetplugin.cpp
branchRCL_3
changeset 82 5f0182e07bfb
equal deleted inserted replaced
79:f00a6757af32 82:5f0182e07bfb
       
     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:  Homescreen widget plugin
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "hsclockwidgetplugin.h"
       
    23 #include "hsclockwidget.h"
       
    24 
       
    25 #ifdef COVERAGE_MEASUREMENT
       
    26 #pragma CTC SKIP
       
    27 #endif //COVERAGE_MEASUREMENT
       
    28 
       
    29 /*!
       
    30   \class HsClockWidgetPlugin
       
    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 *HsClockWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    40                                              QServiceContext *context,
       
    41                                              QAbstractSecuritySession *session)
       
    42 {
       
    43     Q_UNUSED(context);
       
    44     Q_UNUSED(session);
       
    45 
       
    46     if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
       
    47         return new HsClockWidget();
       
    48     } else {
       
    49         return 0;
       
    50     }
       
    51 }
       
    52 
       
    53 Q_EXPORT_PLUGIN2(hsclockwidgetplugin, HsClockWidgetPlugin)
       
    54 
       
    55 #ifdef COVERAGE_MEASUREMENT
       
    56 #pragma CTC ENDSKIP
       
    57 #endif //COVERAGE_MEASUREMENT