contentstorage/cahandler/tapp/src/catapphandler.cpp
changeset 66 32469d7d46ff
parent 61 8e5041d13c84
child 73 4bc7b118b3df
equal deleted inserted replaced
61:8e5041d13c84 66:32469d7d46ff
    16  */
    16  */
    17 
    17 
    18 #include <qservicemanager.h>
    18 #include <qservicemanager.h>
    19 #include <qservicefilter.h>
    19 #include <qservicefilter.h>
    20 #include <qserviceinterfacedescriptor.h>
    20 #include <qserviceinterfacedescriptor.h>
    21 
    21 #include <XQConversions>
    22 #include <xqappmgr.h>
    22 #include <xqappmgr.h>
    23 
    23 
    24 #include "caentry.h"
    24 #include "caentry.h"
    25 #include "catapphandler.h"
    25 #include "catapphandler.h"
       
    26 #include "cainnerentry.h"
       
    27 #include "caclient_defines.h"
       
    28 
       
    29 _LIT(hsitemLaunchUri, "item:launchuri");
    26 
    30 
    27 QTM_USE_NAMESPACE
    31 QTM_USE_NAMESPACE
    28 
    32 
    29 /*!
    33 /*!
    30     \class CaTappHandler
    34     \class CaTappHandler
    55  Uses XQApplicationManager
    59  Uses XQApplicationManager
    56  \param entry Subject of the \a command.
    60  \param entry Subject of the \a command.
    57  \param command Description of the command.
    61  \param command Description of the command.
    58  \return Error code described in QSERVICEMANAGER.H
    62  \return Error code described in QSERVICEMANAGER.H
    59  */
    63  */
    60 int CaTappHandler::execute(const CaEntry& entry, const QString& command)
    64 int CaTappHandler::execute(CCaInnerEntry& innerEntry, const QString& command)
    61 {
    65 {
    62     int error = 0; // this returns Error enum from QSERVICEMANAGER.H
    66     int error = 0; // this returns Error enum from QSERVICEMANAGER.H
    63     if (command == caCmdOpen) {
    67     if (command == caCmdOpen) {
    64         QUrl url(entry.attribute(hsitemLaunchUri)); // f.e. QUrl url ("application://101F7AE7?");       
    68         TPtrC attribute;
       
    69         innerEntry.FindAttribute(hsitemLaunchUri, attribute);
       
    70 
       
    71         // e.g. QUrl url ("application://101F7AE7?");
       
    72         QUrl url(QString::fromUtf16(attribute.Ptr(), attribute.Length()));
    65         QScopedPointer<XQAiwRequest> request(mAiwMgr->create(url, true));
    73         QScopedPointer<XQAiwRequest> request(mAiwMgr->create(url, true));
    66         if (!request.isNull()) {
    74         if (!request.isNull()) {
    67             bool res = request->send();
    75             bool res = request->send();
    68             if (!res) {
    76             if (!res) {
    69                 error = request->lastError();
    77                 error = request->lastError();