contentstorage/cahandler/app/src/caapphandlerplugin.cpp
changeset 96 5d243a69bdda
parent 92 782e3408c2ab
child 98 d2f833ab7940
equal deleted inserted replaced
95:c739008478cc 96:5d243a69bdda
    21 #include <qservicecontext.h>
    21 #include <qservicecontext.h>
    22 
    22 
    23 #include "cahandlerloader.h"
    23 #include "cahandlerloader.h"
    24 #include "caapphandler.h"
    24 #include "caapphandler.h"
    25 #include "caapphandlerplugin.h"
    25 #include "caapphandlerplugin.h"
    26 #include "cas60apphandleradapter.h"
       
    27 
    26 
    28 /*!
    27 /*!
    29     \class CaAppHandlerPlugin
    28     \class CaAppHandlerPlugin
    30     \ingroup
    29     \ingroup
    31     \brief Implementation of Qt SF plugin for application command handler.
    30     \brief Implementation of Qt SF plugin for application command handler.
    33 
    32 
    34 /*!
    33 /*!
    35     \param descriptor Service descriptor.
    34     \param descriptor Service descriptor.
    36     \param context Ignored.
    35     \param context Ignored.
    37     \param session Ignored.
    36     \param session Ignored.
    38     \return An instance of the CaS60HandlerAdapter<CCaAppHandler> when descriptor interface name
    37     \return An instance of the CaS60HandlerAdapter<CaAppHandler> when descriptor interface name
    39     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
    38     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
    40 */
    39 */
    41 QObject *CaAppHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
    40 QObject *CaAppHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
    42         QServiceContext *context,
    41         QServiceContext *context,
    43         QAbstractSecuritySession *session)
    42         QAbstractSecuritySession *session)
    45     Q_UNUSED(context);
    44     Q_UNUSED(context);
    46     Q_UNUSED(session);
    45     Q_UNUSED(session);
    47 
    46 
    48     if (descriptor.interfaceName() ==
    47     if (descriptor.interfaceName() ==
    49             "com.nokia.homescreen.ICommandHandler") {
    48             "com.nokia.homescreen.ICommandHandler") {
    50         return new CaS60AppHandlerAdapter();
    49         return new CaAppHandler();
    51     } else {
    50     } else {
    52         return 0;
    51         return 0;
    53     }
    52     }
    54 }
    53 }
    55 Q_EXPORT_PLUGIN2(caapphandlerplugin, CaAppHandlerPlugin)
    54 Q_EXPORT_PLUGIN2(caapphandlerplugin, CaAppHandlerPlugin)