phoneplugins/infowidgetplugin/infowidgetprovider/src/infowidgetprovider.cpp
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 40 bab96b7ed1a4
parent 46 bc5a64e5bc3c
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
     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:  
       
    15  *
       
    16  */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "infowidgetprovider.h"
       
    23 #include "infowidget.h"
       
    24 
       
    25 
       
    26 /*!
       
    27   \class InfoWidgetProvider
       
    28   
       
    29   \brief Homescreen Widget for providing operator information   
       
    30 */
       
    31 QObject *InfoWidgetProvider::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    32                                              QServiceContext *context,
       
    33                                              QAbstractSecuritySession *session)
       
    34 {
       
    35     Q_UNUSED(context);
       
    36     Q_UNUSED(session);
       
    37 
       
    38     if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
       
    39         return new InfoWidget();
       
    40     } else {
       
    41         return 0;
       
    42     }
       
    43 }
       
    44 
       
    45 
       
    46 Q_EXPORT_PLUGIN2(infowidgetprovider, InfoWidgetProvider)