homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstateplugin.cpp
changeset 35 f9ce957a272c
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     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: Menu state plugin
       
    15  *
       
    16  */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "hsmenuworkerstateplugin.h"
       
    23 #include "hsmenuworkerstate.h"
       
    24 
       
    25 #ifdef COVERAGE_MEASUREMENT
       
    26 #pragma CTC SKIP
       
    27 #endif //COVERAGE_MEASUREMENT
       
    28 
       
    29 /*!
       
    30     Creates a HsMenuWorkerState if interface name in \a descriptor
       
    31 	is com.nokia.homescreen.state.HsMenuWorkerState.
       
    32 */
       
    33 QObject *HsMenuWorkerStatePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    34         QServiceContext *context,
       
    35         QAbstractSecuritySession *session)
       
    36 {
       
    37     Q_UNUSED(context);
       
    38     Q_UNUSED(session);
       
    39 
       
    40     if (descriptor.interfaceName() == QLatin1String("com.nokia.homescreen.state.HsMenuWorkerState")) {
       
    41         return new HsMenuWorkerState();
       
    42     } else {
       
    43         return 0;
       
    44     }
       
    45 }
       
    46 
       
    47 Q_EXPORT_PLUGIN2(hsmenuworkerstateplugin, HsMenuWorkerStatePlugin)
       
    48 
       
    49 #ifdef COVERAGE_MEASUREMENT
       
    50 #pragma CTC ENDSKIP
       
    51 #endif //COVERAGE_MEASUREMENT