homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidgetplugin.cpp
changeset 35 f9ce957a272c
child 36 cdae8c6c3876
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     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 "hsshortcutwidgetplugin.h"
       
    23 #include "hsshortcutwidget.h"
       
    24 
       
    25 #ifdef COVERAGE_MEASUREMENT
       
    26 #pragma CTC SKIP
       
    27 #endif //COVERAGE_MEASUREMENT
       
    28 
       
    29 /**
       
    30     \class HsShortcutWidgetPlugin
       
    31     \ingroup group_hsshortcutwidgetplugin
       
    32     \brief Homescreen shortcut widget plugin collects ready-made homescreen shortcut widget(s).
       
    33 
       
    34     This library includes homescreen shortcut widgets implemented by homescreen scrum team.
       
    35     This plugin provides widgets that are described in the  hsshortcutwidgetplugin.xml plugin
       
    36     xml file.
       
    37 */
       
    38 
       
    39 /*!
       
    40     Creates widget object.
       
    41 */
       
    42 QObject *HsShortcutWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    43                                                 QServiceContext *context,
       
    44                                                 QAbstractSecuritySession *session)
       
    45 {
       
    46     Q_UNUSED(context);
       
    47     Q_UNUSED(session);
       
    48 
       
    49     if (descriptor.interfaceName() == QLatin1String("com.nokia.IHomeScreenWidget")) {
       
    50         return new HsShortcutWidget();
       
    51     } else {
       
    52         return 0;
       
    53     }
       
    54 }
       
    55 
       
    56 Q_EXPORT_PLUGIN2(hsshortcutwidgetplugin, HsShortcutWidgetPlugin)
       
    57 
       
    58 #ifdef COVERAGE_MEASUREMENT
       
    59 #pragma CTC ENDSKIP
       
    60 #endif //COVERAGE_MEASUREMENT