homescreenapp/hsdomainmodel/tsrc/mockwidgetplugin/src/mockwidgetplugin.cpp
changeset 96 458d8c8d9580
equal deleted inserted replaced
92:6727c5d0afc7 96:458d8c8d9580
       
     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:  Mocked widget plugin.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "mockwidget.h"
       
    23 #include "mockwidgetplugin.h"
       
    24 
       
    25 QObject *MockWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    26                                                 QServiceContext *context,
       
    27                                                 QAbstractSecuritySession *session)
       
    28 {
       
    29     Q_UNUSED(context);
       
    30     Q_UNUSED(session);
       
    31 
       
    32     if (descriptor.interfaceName() == "com.nokia.symbian.IHomeScreenWidget") {
       
    33         return new MockWidget();
       
    34     } else {
       
    35         return 0;
       
    36     }
       
    37 }
       
    38 
       
    39 Q_EXPORT_PLUGIN2(mockwidgetplugin, MockWidgetPlugin)