qthighway/xqservice/src/xqappmgr.cpp
changeset 24 9d760f716ca8
parent 14 6fbed849b4f4
child 26 3d09643def13
equal deleted inserted replaced
19:46686fb6258c 24:9d760f716ca8
    24 #include <xqaiwrequest.h>
    24 #include <xqaiwrequest.h>
    25 #include <xqaiwinterfacedescriptor.h>
    25 #include <xqaiwinterfacedescriptor.h>
    26 #include <QList>
    26 #include <QList>
    27 #include "xqappmgr_p.h"
    27 #include "xqappmgr_p.h"
    28 
    28 
       
    29 /*!
       
    30     \class XQApplicationManager
       
    31     \inpublicgroup QtBaseModule
       
    32 
       
    33     \ingroup ipc
       
    34     \brief Factory class to list interface descriptors and create interworking objects (XQAiwRequest)
       
    35     
       
    36     XQApplicationManager lists interface descriptors by interface and /or service name. It is also used to
       
    37     create interworking objects (XQAiwRequest).
       
    38     
       
    39     This class is a part of API to be used by the applications instead of using XQServiceRequest directly.
       
    40     
       
    41     The Application Manager API offers centric place for applications UIs to handle application to application interworking use cases, like:
       
    42     - Synchronous out-of-process service call from client to service provider, where service provider needs to complete the request before
       
    43       control comes back to requesting client.
       
    44     - Asynchronous out-of-process service call from client to service provider, where Service provider completes the request whenever suitable.
       
    45       The control returns back requesting as soon the service provider has received the asynchronous call (can be applied to notifications as well).
       
    46     - Embedded out-of-process service call. In this case window groups are chained and "Back" returns to client window.
       
    47     - Any named Qt type in the Qt meta-object system can be used as a service call parameter or return value. Also own, custom meta-types are supported.
       
    48     - Launched service provider application (.exe) if not already running when client makes service call to it.
       
    49     - List and discover services dynamically.
       
    50     - Apply UI related options upon service launch, like "launch as embedded", "launch to foreground" and "launch to backround".
       
    51     - Opening files to be viewed by a file viewing interface.
       
    52     - Opening URI to be viewed by a URI viewing interface. Includes also launching activity URIs (appto) as fire-and-forget manner.
       
    53     - Miscellanous AIW support, like get service stasus or get DRM attributes.
       
    54     
       
    55     <b>Example usage:</b> \n
       
    56     
       
    57     The usage pattern for all the XQApplicationManager variants implemented as service providers , interface, QUrl, QFile, is similar both embedded
       
    58     and non-embedded usage:
       
    59     \code
       
    60         // Recommended way is to add XQApplicationManager as member variable to class
       
    61         // Later on when caching of services
       
    62         // You can use the class also as local variable.
       
    63         class Client
       
    64         {
       
    65 
       
    66         public:
       
    67              // Service access
       
    68             bool accessService(void);
       
    69 
       
    70         private slots:
       
    71                 void handleOk(const QVariant &result);
       
    72                 void handleError(int errorCode, const QString& errorMessage);
       
    73         private:
       
    74               XQApplicationManager mAiwMgr;
       
    75         };
       
    76 
       
    77 
       
    78         //  In client.cpp
       
    79         bool Client::accessService(void)
       
    80         {
       
    81             QString parameter1("+3581234567890");
       
    82             int parameter2 = 3;
       
    83 
       
    84             bool embedded=true;  // or false
       
    85 
       
    86             XQAiwRequest *request;
       
    87             // Create request by interface name, the very first service implementation
       
    88             // applied.
       
    89             request = mAiwMgr.create("Interface", "functionName2(QString, int)", embedded);
       
    90 
       
    91             // If dedicated service is wanted, apply this 
       
    92             // request = mAiwMgr.create("Service", "Interface", 
       
    93             //                          "functionName2(QString, int)", embedded);
       
    94 
       
    95             if (request == NULL)
       
    96             {
       
    97                 // Service not found 
       
    98                 return false;
       
    99             }
       
   100             // ... Perform further processing
       
   101         }
       
   102     \endcode
       
   103     
       
   104     Access service by descriptor:
       
   105     \code
       
   106         QList<XQAiwInterfaceDescriptor> implementations = appmgr.list("Interface");
       
   107 
       
   108        // Display service in UI and make selection possible.
       
   109         foreach (XQAiwInterfaceDescriptor d, implementations)
       
   110         {
       
   111             qDebug() << "Service=" << d.serviceName();
       
   112             qDebug() << "Interface=" << d.interfaceName();
       
   113             qDebug("Implementation Id=%x",d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
       
   114         }
       
   115 
       
   116 
       
   117         // Select correct implementation
       
   118         XQAiwInterfaceDescriptor selectedImpl = doSelectService();
       
   119 
       
   120         // The difference to the previous example is is how request is created
       
   121         // via application mgr.
       
   122 
       
   123         // ...See previous example
       
   124         request = mAiwMgr.create(selectedImpl, embedded);
       
   125         // ....See previous example
       
   126     \endcode
       
   127     
       
   128     The XQApplicationManager supports opening activity (see Terminology) URIs (appto scheme) as fire-and-forget mannner:
       
   129     \code
       
   130         QUrl url("appto://10207C62?activityname=MusicMainView"); 
       
   131 
       
   132         // The difference to the previous example is is how request is created
       
   133         // via application mgr.
       
   134         request = mAiwMgr.create(url);
       
   135         if (request == NULL)
       
   136         {
       
   137             // No handlers for the URI
       
   138             return;
       
   139         }
       
   140 
       
   141         // Set function parameters
       
   142         QList<QVariant> args;
       
   143         args << uri.toSring();
       
   144         request->setArguments(args);
       
   145 
       
   146         // Send the request
       
   147         bool res = request.send();
       
   148         if  (!res) 
       
   149         {
       
   150             // Request failed. 
       
   151             int error = request->lastError();
       
   152             // Handle error
       
   153         }
       
   154      
       
   155        // All done.
       
   156        delete request;
       
   157     \endcode
       
   158     
       
   159     \sa XQAiwRequest
       
   160 */
       
   161 
    29 XQApplicationManager::XQApplicationManager()
   162 XQApplicationManager::XQApplicationManager()
    30 {
   163 {
    31     XQSERVICE_DEBUG_PRINT("XQApplicationManager::XQApplicationManager");
   164     XQSERVICE_DEBUG_PRINT("XQApplicationManager::XQApplicationManager");
    32     d = new XQApplicationManagerPrivate();
   165     d = new XQApplicationManagerPrivate();
    33     
   166     
    47     \param interface Interface name as mentioned in the service registry file.
   180     \param interface Interface name as mentioned in the service registry file.
    48                      Apply the xqaiwdecl.h file for common constants.
   181                      Apply the xqaiwdecl.h file for common constants.
    49     \param operation The function signature to be called via the interface.
   182     \param operation The function signature to be called via the interface.
    50                      Can be set later via XQAiwRequest::setOperation.
   183                      Can be set later via XQAiwRequest::setOperation.
    51                      Apply the xqaiwdecl.h file for common constants.
   184                      Apply the xqaiwdecl.h file for common constants.
    52     \param embedded True if embedded (window groups chained) call, false otherwise
   185     \param embedded True if embedded (window groups chained) call, false otherwise.
    53                     Can be set later via XQAiwRequest::setEmbedded.
   186                     Can be set later via XQAiwRequest::setEmbedded.
    54     \return The application interworking request instance, NULL if no service is available
   187     \return The application interworking request instance, NULL if no service is available
    55     \sa list(const QString &interface, const QString &operation)
   188     \sa list(const QString &interface, const QString &operation)
    56     \sa create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded);
   189     \sa create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded);
    57     \sa xqaiwdecl.h for constants values
   190     \sa xqaiwdecl.h for constants values
    92     The descriptor is got from the list() call.
   225     The descriptor is got from the list() call.
    93     As combination [service,interface,version] shall be unique,
   226     As combination [service,interface,version] shall be unique,
    94     the descriptor points to one implementation and thus selects correct
   227     the descriptor points to one implementation and thus selects correct
    95     implementation.
   228     implementation.
    96     
   229     
    97     \param implementation Valid interface descriptor obtained by the "list" call.
   230     \param implementation Valid interface descriptor obtained by the list() call.
    98     \param operation The function signature to be called via the interface.
   231     \param operation The function signature to be called via the interface.
    99                      Can be set later via XQAiwRequest::setOperation.
   232                      Can be set later via XQAiwRequest::setOperation.
   100                      Apply the xqaiwdecl.h file for common constants.
   233                      Apply the xqaiwdecl.h file for common constants.
   101     \param embedded True if embedded call, false otherwise
   234     \param embedded True if embedded call, false otherwise.
   102                      Can be set later via XQAiwRequest::setEmbedded.
   235                      Can be set later via XQAiwRequest::setEmbedded.
   103     \return The application interworking request instance, NULL if no service is available
   236     \return The application interworking request instance, NULL if no service is available
   104     \sa list()
   237     \sa list()
   105     \sa create( const QString &interface, const QString &operation, bool embedded)
   238     \sa create( const QString &interface, const QString &operation, bool embedded)
   106     \sa create( const QString &service, const QString &interface, const QString &operation, bool embedded)
   239     \sa create( const QString &service, const QString &interface, const QString &operation, bool embedded)
   138     
   271     
   139     \param service Service name as mentioned in the service registry file
   272     \param service Service name as mentioned in the service registry file
   140     \param interface Interface name as mentioned in the service registry file
   273     \param interface Interface name as mentioned in the service registry file
   141     \param operation The function signature to be called via the interface.
   274     \param operation The function signature to be called via the interface.
   142                      Can be set later via XQAiwRequest::setOperation.
   275                      Can be set later via XQAiwRequest::setOperation.
   143     \param embedded True if embedded (window groups chained) call, false otherwise
   276     \param embedded True if embedded (window groups chained) call, false otherwise.
   144                      Can be set later via XQAiwRequest::setEmbedded.
   277                      Can be set later via XQAiwRequest::setEmbedded.
   145     \return The application interworking request instance, NULL if no service is available
   278     \return The application interworking request instance, NULL if no service is available
   146     \sa XQApplicationManager::create( const QString &interface, const QString &operation, bool embedded)
   279     \sa XQApplicationManager::create( const QString &interface, const QString &operation, bool embedded)
   147     \sa create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded);
   280     \sa create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded);
   148     \sa xqaiwdecl.h for constants values
   281     \sa xqaiwdecl.h for constants values
   198     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list");
   331     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list");
   199     return d->list(interface, operation);
   332     return d->list(interface, operation);
   200 }
   333 }
   201 
   334 
   202 /*!
   335 /*!
   203     List implementation(s) descriptors by service and interface name.
   336     List available implementations for the given \a service and \a interface names from the service registry.
       
   337     The \a operation is reserved for future use.
       
   338     \param service Service name as mentioned in the service registry file
       
   339     \param interface Interface name as mentioned in the service registry file
       
   340     \param operation The operation signature to be called.  Reserved for future use.
       
   341     \return List of found interface descriptors that matched to both the \a service and \a interface names, otherwise empty list.
   204     \sa list(const QString &interface, const QString &operation)
   342     \sa list(const QString &interface, const QString &operation)
   205 */
   343 */
   206 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(
   344 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(
   207     const QString &service, const QString &interface, const QString &operation)
   345     const QString &service, const QString &interface, const QString &operation)
   208 {
   346 {
   209     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list");
   347     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list");
   210     return d->list(service, interface, operation);
   348     return d->list(service, interface, operation);
   211 }
   349 }
   212 
   350 
   213 /*!
   351 /*!
   214     Creates AIW request to view the  given URI (having a attached scheme)
   352     Creates AIW request to view the  given URI (having a attached scheme).
   215     The interface name applied implicitly isthe XQI_URI_VIEW (from xqaiwdecl.h),
   353     The interface name applied implicitly is the XQI_URI_VIEW (from xqaiwdecl.h),
   216     unless there is custom handling attached to URI scheme.
   354     unless there is custom handling attached to URI scheme.
   217     The first found service implementation is applied.
   355     The first found service implementation is applied.
   218     A service declares support for scheme(s) (CSV list) by adding the custom property key
   356     A service declares support for scheme(s) (CSV list) by adding the custom property key
   219     (see the constant XQCUSTOM_PROP_SCHEMES value) to the service XML.
   357     (see the constant XQCUSTOM_PROP_SCHEMES value) to the service XML.
   220     By default, the operation name declared by constant XQOP_URI_VIEW is used.
   358     By default, the operation name declared by constant XQOP_URI_VIEW is used.
   234     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(url)");
   372     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(url)");
   235     return d->create(uri, NULL, embedded);
   373     return d->create(uri, NULL, embedded);
   236 }
   374 }
   237 
   375 
   238 /*!
   376 /*!
   239     Creates AIW request to view the given URI by service implementation
   377     Creates AIW request to view the given URI by service implementation.
   240     The interface name applied implicitly is XQI_URI_VIEW (from xqaiwdecl.h),
   378     The interface name applied implicitly is the XQI_URI_VIEW (from xqaiwdecl.h),
   241     unless there is custom handling attached to URI scheme.
   379     unless there is custom handling attached to URI scheme.
   242     A service declares support for scheme(s) (CSV list) by adding the custom property key
   380     A service declares support for scheme(s) (CSV list) by adding the custom property key
   243     (see the constant XQCUSTOM_PROP_SCHEMES value) to the service XML.
   381     (see the constant XQCUSTOM_PROP_SCHEMES value) to the service XML.
   244     Custom handling for certainsoverride the default service handling:
   382     Custom handling for certainsoverride the default service handling:
   245      - "http:" and "https: schemes are handled by QDesktopServices::openUrl()
   383      - "http:" and "https: schemes are handled by QDesktopServices::openUrl()
   273 {
   411 {
   274     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(file)");
   412     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(file)");
   275     return d->create(file, NULL, embedded);
   413     return d->create(file, NULL, embedded);
   276 }
   414 }
   277 
   415 
       
   416 /*!
       
   417     Same as basic create(const QFile &file, bool embedded), but applies the interface descriptor to select the dedicated implementation.
       
   418     \param file The file to be viewed
       
   419     \param implementation Valid interface descriptor obtained by the list(const QFile &file) call.
       
   420     \param embedded True if embedded (window groups chained) call, false otherwise
       
   421     \return The application interworking request instance, or NULL if no viewer found.
       
   422     \sa xqaiwdecl.h for constants values
       
   423 */
   278 XQAiwRequest* XQApplicationManager::create(
   424 XQAiwRequest* XQApplicationManager::create(
   279     const QFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded)
   425     const QFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded)
   280 {
   426 {
   281     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(file+impl)");
   427     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(file+impl)");
   282     return d->create(file, &implementation, embedded);
   428     return d->create(file, &implementation, embedded);
   283 }
   429 }
   284 
   430 
   285 
   431 
   286 /*!
   432 /*!
   287     List implementations that support handling the URI scheme of the given uri
   433     List implementations that support handling the URI scheme of the given uri.
   288     The interface name applied implicitly is declared by the constant XQI_URI_VIEW
   434     The interface name applied implicitly is declared by the constant XQI_URI_VIEW.
       
   435     \param uri The URI scheme that should be matched to the interface
       
   436     \return List of found interface descriptors that matched to the URI scheme, otherwise empty list.
       
   437     \sa list(const QString &interface, const QString &operation)
   289 */
   438 */
   290 
   439 
   291 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QUrl &uri)
   440 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QUrl &uri)
   292 {
   441 {
   293     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(uri)");
   442     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(uri)");
   294     return d->list(uri);
   443     return d->list(uri);
   295 }
   444 }
   296 
   445 
   297 /*!
   446 /*!
   298     List implementations that support handling the MIME type of of the given file
   447     List implementations that support handling the MIME type of the given file.
   299     The interface name applied implicitly is declared by the constant XQI_FILE_VIEW
   448     The interface name applied implicitly is declared by the constant XQI_FILE_VIEW.
       
   449     \param file File which MIME type should be supported by the interface.
       
   450     \return List of found interface descriptors for applications that can handle the file, otherwise empty list.
       
   451     \sa list(const QString &interface, const QString &operation)
   300 */
   452 */
   301 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QFile &file)
   453 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QFile &file)
   302 {
   454 {
   303     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(file)");
   455     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(file)");
   304     return d->list(file);
   456     return d->list(file);
   305 }
   457 }
   306 
   458 
   307 /*!
   459 /*!
   308     List implementations that support handling the MIME type of of the given sharable file
   460     List implementations that support handling the MIME type of of the given sharable file.
   309     The interface name applied implicitly is declared by the constant XQI_FILE_VIEW
   461     The interface name applied implicitly is declared by the constant XQI_FILE_VIEW.
       
   462     \param file Sharable file which MIME type should be supported by the interface.
       
   463     \return List of found interface descriptors for applications that can handle the file, otherwise empty list.
       
   464     \sa list(const QString &interface, const QString &operation)
   310 */
   465 */
   311 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const XQSharableFile &file)
   466 QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const XQSharableFile &file)
   312 {
   467 {
   313     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(XQSharableFile)");
   468     XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(XQSharableFile)");
   314     return d->list(file);
   469     return d->list(file);
   316 
   471 
   317 /*!
   472 /*!
   318     Create AIW request for the given file and the MIME type attached to the sharable file
   473     Create AIW request for the given file and the MIME type attached to the sharable file
   319     The interface name applied implicitly is declared by the constant XQI_FILE_VIEW
   474     The interface name applied implicitly is declared by the constant XQI_FILE_VIEW
   320     By default, the operation name declared by constant XQOP_FILE_VIEW_SHARABLE is used.
   475     By default, the operation name declared by constant XQOP_FILE_VIEW_SHARABLE is used.
       
   476     \param file The sharable file to be viewed
       
   477     \param embedded True if embedded (window groups chained) call, false otherwise
       
   478     \return The application interworking request instance, or NULL if no viewer found.
   321 */
   479 */
   322 XQAiwRequest* XQApplicationManager::create(const XQSharableFile &file, bool embedded)
   480 XQAiwRequest* XQApplicationManager::create(const XQSharableFile &file, bool embedded)
   323 {
   481 {
   324     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(XQSharableFile)");
   482     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(XQSharableFile)");
   325     return d->create(file, NULL, embedded);
   483     return d->create(file, NULL, embedded);
   326 }
   484 }
   327 
   485 
       
   486 /*!
       
   487     Same as basic create(const XQSharableFile &file, bool embedded), but applies the interface descriptor to select the dedicated implementation.
       
   488     \param file The sharable file to be viewed
       
   489     \param implementation Valid interface descriptor obtained by the list(const XQSharableFile &file) call.
       
   490     \param embedded True if embedded (window groups chained) call, false otherwise
       
   491     \return The application interworking request instance, or NULL if no viewer found.
       
   492     \sa xqaiwdecl.h for constants values
       
   493 */
   328 XQAiwRequest* XQApplicationManager::create(
   494 XQAiwRequest* XQApplicationManager::create(
   329     const XQSharableFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded)
   495     const XQSharableFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded)
   330 {
   496 {
   331     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(XQSharableFile+impl)");
   497     XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(XQSharableFile+impl)");
   332     return d->create(file, &implementation, embedded);
   498     return d->create(file, &implementation, embedded);
   333 }
   499 }
   334 
   500 
       
   501 /*!
       
   502     Returns error code of the last performed operation.
       
   503     \return Error code of the last operation, 0 if no error occured.
       
   504 */
   335 int XQApplicationManager::lastError() const
   505 int XQApplicationManager::lastError() const
   336 {
   506 {
   337     XQSERVICE_DEBUG_PRINT("XQApplicationManager::lastError");
   507     XQSERVICE_DEBUG_PRINT("XQApplicationManager::lastError");
   338     return d->lastError();
   508     return d->lastError();
   339 }
   509 }
   340 
   510 
   341 
   511 /*!
       
   512     Tests whether given implementation is running. That is, the service provider has published
       
   513     the full service name attached to the given interface descriptor.
       
   514     \param implementation Interface that is tested for being run.
       
   515     \return True if the implementation is running, false otherwise.
       
   516 */
   342 bool XQApplicationManager::isRunning(const XQAiwInterfaceDescriptor& implementation) const
   517 bool XQApplicationManager::isRunning(const XQAiwInterfaceDescriptor& implementation) const
   343 {
   518 {
   344     XQSERVICE_DEBUG_PRINT("XQApplicationManager::isRunning");
   519     XQSERVICE_DEBUG_PRINT("XQApplicationManager::isRunning");
   345     return d->isRunning(implementation);
   520     return d->isRunning(implementation);
   346 }
   521 }
   347 
   522 
   348 
   523 /*!
       
   524     Gets the values of the DRM related \a attributeNames, like "IsProtected",
       
   525     "IsForwardable", "MimeType" for a given \a file.
       
   526     \param file File for which DRM attributes are retrieved
       
   527     \param attributeNames List of attributes that should be retrieved (check #DrmAttribute)
       
   528     \param attributeValues On success fills this list whith values, where each value is QVariant of the integer or string type.
       
   529                            If attribute value does not exists or other error occurs when reading the attribute, the invalid QVariant
       
   530                            value is returned.
       
   531     \return True on success, upon error returns false (e.g file does not exists or other general error).
       
   532 */
   349 bool XQApplicationManager::getDrmAttributes(const QFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
   533 bool XQApplicationManager::getDrmAttributes(const QFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
   350 {
   534 {
   351     XQSERVICE_DEBUG_PRINT("XQApplicationManager::drmAttributes (file)");
   535     XQSERVICE_DEBUG_PRINT("XQApplicationManager::drmAttributes (file)");
   352     return d->getDrmAttributes(file, attributeNames, attributeValues);
   536     return d->getDrmAttributes(file, attributeNames, attributeValues);
   353 }
   537 }
   354 
   538 
       
   539 /*!
       
   540     Gets the values of the DRM related \a attributeNames, like "IsProtected",
       
   541     "IsForwardable", "MimeType" for a given sharable file.
       
   542     \param file Sharable file for which DRM attributes are retrieved
       
   543     \param attributeNames List of attributes that should be retrieved (check #DrmAttribute)
       
   544     \param attributeValues On success fills this list whith values, where each value is QVariant of the integer or string type.
       
   545                            If attribute value does not exists or other error occurs when reading the attribute, the invalid QVariant
       
   546                            value is returned.
       
   547     \return True on success, upon error returns false (e.g file does not exists or other general error).
       
   548 */
   355 bool XQApplicationManager::getDrmAttributes(const XQSharableFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
   549 bool XQApplicationManager::getDrmAttributes(const XQSharableFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
   356 {
   550 {
   357     XQSERVICE_DEBUG_PRINT("XQApplicationManager::drmAttributes (XQSharableFile)");
   551     XQSERVICE_DEBUG_PRINT("XQApplicationManager::drmAttributes (XQSharableFile)");
   358     return d->getDrmAttributes(file, attributeNames, attributeValues);
   552     return d->getDrmAttributes(file, attributeNames, attributeValues);
   359 }
   553 }
   360 
   554 
       
   555 /*!
       
   556     Checks the status of the given service interface.
       
   557     \param implementation Interface which status is being checked.
       
   558     \return Status of the service.
       
   559 */
   361 XQApplicationManager::ServiceStatus XQApplicationManager::status(const XQAiwInterfaceDescriptor& implementation)
   560 XQApplicationManager::ServiceStatus XQApplicationManager::status(const XQAiwInterfaceDescriptor& implementation)
   362 {
   561 {
   363     XQSERVICE_DEBUG_PRINT("XQApplicationManager::status");
   562     XQSERVICE_DEBUG_PRINT("XQApplicationManager::status");
   364     return (ServiceStatus)d->status(implementation);
   563     return (ServiceStatus)d->status(implementation);
   365 }
   564 }