homescreen/widgetplugins/hsbookmarkwidgetplugin/src/hsbookmarkwidgetplugin.cpp
changeset 15 73c48011b8c7
equal deleted inserted replaced
13:491a1d15372f 15:73c48011b8c7
       
     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 bookmark widget
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "hsbookmarkwidgetplugin.h"
       
    23 #include "hsbookmarkwidget.h"
       
    24 
       
    25 /*!
       
    26     \ingroup group_hsbookmark_widget
       
    27     \class HsBookmarkWidgetPlugin
       
    28     \brief Implementation for homescreen bookmark widget plugin.
       
    29 */    
       
    30     
       
    31 /*!
       
    32     Initialize plugin for bookmark widget. Contains necessary information about 
       
    33     the bookmark widget that it can be loaded through QT Service Framework.
       
    34 */
       
    35 QObject *HsBookmarkWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    36                                                 QServiceContext *context,
       
    37                                                 QAbstractSecuritySession *session)
       
    38 {
       
    39     Q_UNUSED(context);
       
    40     Q_UNUSED(session);
       
    41 
       
    42     if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
       
    43         return new HsBookmarkWidget();
       
    44     } else {
       
    45         return 0;
       
    46     }
       
    47 }
       
    48 
       
    49 Q_EXPORT_PLUGIN2(hsbookmarkwidgetplugin, HsBookmarkWidgetPlugin)
       
    50