contentstorage/cahandler/tapp/src/catapphandlerplugin.cpp
changeset 61 8e5041d13c84
child 66 32469d7d46ff
equal deleted inserted replaced
60:f62f87b200ec 61:8e5041d13c84
       
     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:  Default runtime plugin.
       
    15  *
       
    16  */
       
    17 
       
    18 /*#include <qserviceinterfacedescriptor.h>
       
    19  #include <qabstractsecuritysession.h>
       
    20  #include <qservicecontext.h>
       
    21  */
       
    22 
       
    23 #include "catapphandlerplugin.h"
       
    24 #include "catapphandler.h"
       
    25 
       
    26 #include <cadefs.h>
       
    27 
       
    28 #ifdef COVERAGE_MEASUREMENT
       
    29 #pragma CTC SKIP
       
    30 #endif //COVERAGE_MEASUREMENT
       
    31 /*!
       
    32     \class CaTappHandlerPlugin
       
    33     \ingroup
       
    34     \brief Implementation of Qt SF plugin for templated application command handler.
       
    35 */
       
    36 
       
    37 /*!
       
    38     \param descriptor service descriptor
       
    39     \param context ignored
       
    40     \param session ignored
       
    41     \return An instance of the CaTapphandler object when descriptor interface name
       
    42     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
       
    43 */
       
    44 QObject *CaTappHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
       
    45     QServiceContext *context, QAbstractSecuritySession *session)
       
    46 {
       
    47     Q_UNUSED(context);
       
    48     Q_UNUSED(session);
       
    49 
       
    50     if (descriptor.interfaceName() == QLatin1String("com.nokia.homescreen.ICommandHandler")) {
       
    51         return new CaTappHandler();
       
    52     }
       
    53     else {
       
    54         return 0;
       
    55     }
       
    56 }
       
    57 
       
    58 Q_EXPORT_PLUGIN2(catapphandlerplugin, CaTappHandlerPlugin)
       
    59 
       
    60 #ifdef COVERAGE_MEASUREMENT
       
    61 #pragma CTC ENDSKIP
       
    62 #endif //COVERAGE_MEASUREMENT