src/profileswidgetplugin.cpp
changeset 0 dc71378f4890
equal deleted inserted replaced
-1:000000000000 0:dc71378f4890
       
     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: Profiles widget plugin
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <qserviceinterfacedescriptor.h>
       
    20 #include <qabstractsecuritysession.h>
       
    21 #include <qservicecontext.h>
       
    22 
       
    23 // User includes
       
    24 #include "profileswidgetplugin.h"
       
    25 #include "profileswidget.h"
       
    26 
       
    27 /*!
       
    28     \class ProfilesWidgetPlugin
       
    29     \implementation of profiles widget plugin
       
    30 */    
       
    31     
       
    32 /*!
       
    33     Initialize plugin of profiles widget
       
    34 */
       
    35 QObject *ProfilesWidgetPlugin::createInstance(const 
       
    36 		QServiceInterfaceDescriptor &descriptor,
       
    37 		QServiceContext *context,
       
    38         QAbstractSecuritySession *session)
       
    39 {
       
    40     Q_UNUSED(context);
       
    41     Q_UNUSED(session);
       
    42 
       
    43     if (descriptor.interfaceName() == 
       
    44     		QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
       
    45         return new ProfilesWidget();
       
    46     } else {
       
    47         return 0;
       
    48     }
       
    49 }
       
    50 
       
    51 Q_EXPORT_PLUGIN2(profileswidgetplugin, ProfilesWidgetPlugin)