contentstorage/cahandler/url/src/caurlhandlerplugin.cpp
changeset 66 32469d7d46ff
parent 61 8e5041d13c84
child 83 156f692b1687
equal deleted inserted replaced
61:8e5041d13c84 66:32469d7d46ff
    20 #include <qabstractsecuritysession.h>
    20 #include <qabstractsecuritysession.h>
    21 #include <qservicecontext.h>
    21 #include <qservicecontext.h>
    22 #include "cahandlerloader.h"
    22 #include "cahandlerloader.h"
    23 
    23 
    24 #include "caurlhandlerplugin.h"
    24 #include "caurlhandlerplugin.h"
    25 #include "cas60handleradapter.h"
    25 #include "cas60urlhandleradapter.h"
    26 #include "caurlhandler.h"
    26 #include "caurlhandler.h"
    27 
    27 
    28 /*!
    28 /*!
    29     \class CaUrlHandlerPlugin
    29     \class CaUrlHandlerPlugin
    30     \ingroup
    30     \ingroup
    33 
    33 
    34 /*!
    34 /*!
    35     \param descriptor Service descriptor.
    35     \param descriptor Service descriptor.
    36     \param context Ignored.
    36     \param context Ignored.
    37     \param session Ignored.
    37     \param session Ignored.
    38     \return An instance of the CaS60HandlerAdapter<CCaUrlHandler> when descriptor interface name
    38     \return An instance of the CaS60UrlHandlerAdapter<CCaUrlHandler> when descriptor interface name
    39     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
    39     is "com.nokia.homescreen.ICommandHandler", NULL otherwise.
    40 */
    40 */
    41 QObject *CaUrlHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
    41 QObject *CaUrlHandlerPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
    42         QServiceContext *context,
    42         QServiceContext *context,
    43         QAbstractSecuritySession *session)
    43         QAbstractSecuritySession *session)
    45     Q_UNUSED(context);
    45     Q_UNUSED(context);
    46     Q_UNUSED(session);
    46     Q_UNUSED(session);
    47 
    47 
    48     if (descriptor.interfaceName() ==
    48     if (descriptor.interfaceName() ==
    49             "com.nokia.homescreen.ICommandHandler") {
    49             "com.nokia.homescreen.ICommandHandler") {
    50         return new CaS60HandlerAdapter<CCaUrlHandler>;
    50         return new CaS60UrlHandlerAdapter();
    51     } else {
    51     } else {
    52         return 0;
    52         return 0;
    53     }
    53     }
    54 }
    54 }
    55 // TODO: uncomment when it will be a plugin
    55 Q_EXPORT_PLUGIN2(caurlhandlerplugin, CaUrlHandlerPlugin)
    56 //Q_EXPORT_PLUGIN2(caurlhandlerplugin, CaUrlHandlerPlugin)