hswidgetplugin/fmradiohswidgetplugin/src/fmradiohswidgetplugin.cpp
changeset 23 a2b50a479edf
parent 19 afea38384506
child 24 6df133bd92e1
equal deleted inserted replaced
19:afea38384506 23:a2b50a479edf
     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:  FM Radio home screen widget plugin
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "fmradiohswidgetplugin.h"
       
    23 #include "fmradiohswidget.h"
       
    24 
       
    25    
       
    26 /*!
       
    27     Initialize plugin for FM Radio home screen widget. Contains necessary information about 
       
    28     the fm radio widget that it can be loaded through QT Service Framework.
       
    29 */
       
    30 QObject *FmRadioHsWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    31                                              QServiceContext *context,
       
    32                                              QAbstractSecuritySession *session)
       
    33 {
       
    34     Q_UNUSED(context);
       
    35     Q_UNUSED(session);
       
    36 
       
    37     if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
       
    38         return new FmRadioHsWidget();
       
    39     } else {
       
    40         return 0;
       
    41     }
       
    42 }
       
    43 
       
    44 Q_EXPORT_PLUGIN2(fmradiohswidgetplugin, FmRadioHsWidgetPlugin)