contentstorage/cahandler/url/src/caurlhandlerplugin.cpp
changeset 96 5d243a69bdda
parent 92 782e3408c2ab
child 98 d2f833ab7940
equal deleted inserted replaced
95:c739008478cc 96:5d243a69bdda
    13  *
    13  *
    14  * Description:
    14  * Description:
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #include <cadefs.h>
       
    19 #include <qserviceinterfacedescriptor.h>
    18 #include <qserviceinterfacedescriptor.h>
    20 #include <qabstractsecuritysession.h>
    19 #include <qabstractsecuritysession.h>
    21 #include <qservicecontext.h>
    20 #include <qservicecontext.h>
       
    21 
    22 #include "cahandlerloader.h"
    22 #include "cahandlerloader.h"
    23 
       
    24 #include "caurlhandlerplugin.h"
    23 #include "caurlhandlerplugin.h"
    25 #include "cas60urlhandleradapter.h"
       
    26 #include "caurlhandler.h"
    24 #include "caurlhandler.h"
    27 
    25 
    28 /*!
    26 /*!
    29     \class CaUrlHandlerPlugin
    27     \class CaUrlHandlerPlugin
    30     \ingroup
    28     \ingroup
    33 
    31 
    34 /*!
    32 /*!
    35     \param descriptor Service descriptor.
    33     \param descriptor Service descriptor.
    36     \param context Ignored.
    34     \param context Ignored.
    37     \param session Ignored.
    35     \param session Ignored.
    38     \return An instance of the CaS60UrlHandlerAdapter<CCaUrlHandler> when descriptor interface name
    36     \return An instance of the CaS60UrlHandlerAdapter<CaUrlHandler> when descriptor interface name
    39     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
    37     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
    40 */
    38 */
    41 QObject *CaUrlHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
    39 QObject *CaUrlHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
    42         QServiceContext *context,
    40         QServiceContext *context,
    43         QAbstractSecuritySession *session)
    41         QAbstractSecuritySession *session)
    44 {
    42 {
    45     Q_UNUSED(context);
    43     Q_UNUSED(context);
    46     Q_UNUSED(session);
    44     Q_UNUSED(session);
    47 
    45 
    48     if (descriptor.interfaceName() ==
    46     if (descriptor.interfaceName() ==
    49             "com.nokia.homescreen.ICommandHandler") {
    47         QLatin1String("com.nokia.homescreen.ICommandHandler")) {
    50         return new CaS60UrlHandlerAdapter();
    48         return new CaUrlHandler();
    51     } else {
    49     } else {
    52         return 0;
    50         return 0;
    53     }
    51     }
    54 }
    52 }
       
    53 
    55 Q_EXPORT_PLUGIN2(caurlhandlerplugin, CaUrlHandlerPlugin)
    54 Q_EXPORT_PLUGIN2(caurlhandlerplugin, CaUrlHandlerPlugin)