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 /*! \page page1 Terminology |
|
30 |
|
31 \anchor terminology |
|
32 <table border="2"> |
|
33 <tr> |
|
34 <td><b>Term</b></td> |
|
35 <td><b>Definition</b></td> |
|
36 <td><b>Notes</b></td> |
|
37 </tr> |
|
38 <tr> |
|
39 <td><i>activity</i></td> |
|
40 <td> |
|
41 UXD defined term: \n |
|
42 "Activity always refers to the users point of view. An activity is something |
|
43 a user engages in for a purpose. An example of an activity would be: entering |
|
44 an email, listening to music, browsing a web page, etc. Activities are |
|
45 synonymous with experiences, and can be continuous or discontinuous". |
|
46 </td> |
|
47 <td> |
|
48 See more from http://s60wiki.nokia.com/S60Wiki/QtFw_for_S60_coding_conventions/Service_name_registry#Activity. |
|
49 </td> |
|
50 </tr> |
|
51 <tr> |
|
52 <td><i>client, client application</i></td> |
|
53 <td> |
|
54 Application that use the a service application via the QtHighway. |
|
55 </td> |
|
56 <td></td> |
|
57 </tr> |
|
58 <tr> |
|
59 <td><i>embedded</i></td> |
|
60 <td> |
|
61 When a service application is launched as embedded, window groups of client |
|
62 and service application are chained. The service application need to be |
|
63 exited to return UI control back to client application. |
|
64 </td> |
|
65 <td> |
|
66 The embedded launch is considered as private connection between client and |
|
67 service application. |
|
68 </td> |
|
69 </tr> |
|
70 <tr> |
|
71 <td><i>full service name</i></td> |
|
72 <td> |
|
73 Combined service and interface (+ optional embedding part) name as follows. \n |
|
74 1. Service name \n |
|
75 2. Character *.* (dot) \n |
|
76 3. Interface name \n |
|
77 4. Character *.* (dot) (if embedded launch) \n |
|
78 5. Service application process name ((if embedded launch)) |
|
79 </td> |
|
80 <td></td> |
|
81 </tr> |
|
82 <tr> |
|
83 <td><i>interface descriptor</i></td> |
|
84 <td> |
|
85 Utility class to hold meta-data information constructed from the service configuration file. |
|
86 </td> |
|
87 <td></td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><i>interface name</i></td> |
|
91 <td> |
|
92 The name of interface as defined in the service configuration file. |
|
93 </td> |
|
94 <td> |
|
95 See http://s60wiki.nokia.com/S60Wiki/QtFw_for_S60_coding_conventions/Service_name_registry#Service_naming_guidelines. |
|
96 </td> |
|
97 </tr> |
|
98 <tr> |
|
99 <td><i>MIME registry</i></td> |
|
100 <td> |
|
101 The database containing published MIME datatypes applications can view. |
|
102 </td> |
|
103 <td> |
|
104 Symbian OS Application Architecture implements the database. |
|
105 </td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><i>service application, service provider application</i></td> |
|
109 <td> |
|
110 Qt/Orbit based based executable (.exe) that implements and hosts a service provider. |
|
111 </td> |
|
112 <td></td> |
|
113 </tr> |
|
114 <tr> |
|
115 <td><i>operation, message</i></td> |
|
116 <td> |
|
117 Utility's function to be called. Technically Qt slot signature without extra spaces and reference (&). |
|
118 </td> |
|
119 <td></td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><i>service</i></td> |
|
123 <td> |
|
124 Simple utilities offered via interface from an application to another other. |
|
125 The service identified by the full service name. |
|
126 </td> |
|
127 <td></td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><i>service configuration file</i></td> |
|
131 <td> |
|
132 XML formatted file that describes the meta data of the service, e.g. service name, |
|
133 interface name, custom properties, using the agreed XML schema. |
|
134 </td> |
|
135 <td></td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><i>service name</i></td> |
|
139 <td> |
|
140 The name of service as defined in the service configuration file. |
|
141 </td> |
|
142 <td> |
|
143 See http://s60wiki.nokia.com/S60Wiki/QtFw_for_S60_coding_conventions/Service_name_registry#Service_naming_guidelines. |
|
144 </td> |
|
145 </tr> |
|
146 <tr> |
|
147 <td><i>service provider</i></td> |
|
148 <td> |
|
149 Instance of XQServiceProvider that is included into a service application |
|
150 </td> |
|
151 <td> |
|
152 In-process (.dll) providers not supported yet. |
|
153 </td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><i>service registry</i></td> |
|
157 <td> |
|
158 The database containing published service configuration files. |
|
159 </td> |
|
160 <td> |
|
161 Symbian OS Application Architecture implements the database. |
|
162 </td> |
|
163 </tr> |
|
164 </table> |
|
165 */ |
|
166 |
29 /*! |
167 /*! |
30 \class XQApplicationManager |
168 \class XQApplicationManager |
31 \inpublicgroup QtBaseModule |
169 \inpublicgroup QtBaseModule |
32 |
170 |
33 \ingroup ipc |
171 \ingroup ipc |
34 \brief Factory class to list interface descriptors and create interworking objects (XQAiwRequest) |
172 \brief The factory class of the Qt Extension's service framework to support out-of-process application interworking use cases |
|
173 |
|
174 See \ref terminology for terms used in this documentation. |
35 |
175 |
36 XQApplicationManager lists interface descriptors by interface and /or service name. It is also used to |
176 XQApplicationManager lists interface descriptors by interface and /or service name. It is also used to |
37 create interworking objects (XQAiwRequest). |
177 create interworking objects (XQAiwRequest). |
38 |
178 |
39 This class is a part of API to be used by the applications instead of using XQServiceRequest directly. |
179 This class is a part of Application Manager API to be used by the applications instead of using XQServiceRequest directly. |
40 |
180 |
41 The Application Manager API offers centric place for applications UIs to handle application to application interworking use cases, like: |
181 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 |
182 - 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. |
183 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. |
184 - 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). |
185 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. |
186 - 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. |
187 - 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. |
188 - Launch service provider application (.exe) if not already running when client makes service call to it. |
49 - List and discover services dynamically. |
189 - List and discover services dynamically. |
50 - Apply UI related options upon service launch, like "launch as embedded", "launch to foreground" and "launch to backround". |
190 - 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. |
191 - Open files to be viewed by a file viewing interface. Both normal and sharable (data-caged) files are supported. |
52 - Opening URI to be viewed by a URI viewing interface. Includes also launching activity URIs (appto) as fire-and-forget manner. |
192 - 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. |
193 - Miscellanous AIW support, like get service stasus or get DRM attributes. |
54 |
194 |
55 <b>Example usage:</b> \n |
195 <b>Example usage:</b> \n |
56 |
196 |
57 The usage pattern for all the XQApplicationManager variants implemented as service providers , interface, QUrl, QFile, is similar both embedded |
197 The usage pattern for all the XQApplicationManager variants implemented as service providers , interface, QUrl, QFile, is similar both embedded |
58 and non-embedded usage: |
198 and non-embedded usage: |
59 \code |
199 \code |
60 // Recommended way is to add XQApplicationManager as member variable to class |
200 // 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. |
201 // You can use the class also as local variable. |
63 class Client |
202 class Client |
64 { |
203 { |
65 |
204 |
66 public: |
205 public: |
552 return d->getDrmAttributes(file, attributeNames, attributeValues); |
692 return d->getDrmAttributes(file, attributeNames, attributeValues); |
553 } |
693 } |
554 |
694 |
555 /*! |
695 /*! |
556 Checks the status of the given service interface. |
696 Checks the status of the given service interface. |
557 \param implementation Interface which status is being checked. |
697 \param implementation Valid interface descriptor obtained by the list() call. |
558 \return Status of the service. |
698 \return Status of the service. |
559 */ |
699 */ |
560 XQApplicationManager::ServiceStatus XQApplicationManager::status(const XQAiwInterfaceDescriptor& implementation) |
700 XQApplicationManager::ServiceStatus XQApplicationManager::status(const XQAiwInterfaceDescriptor& implementation) |
561 { |
701 { |
562 XQSERVICE_DEBUG_PRINT("XQApplicationManager::status"); |
702 XQSERVICE_DEBUG_PRINT("XQApplicationManager::status"); |
563 return (ServiceStatus)d->status(implementation); |
703 return (ServiceStatus)d->status(implementation); |
564 } |
704 } |
565 |
705 |
566 |
706 /*! |
|
707 Start monitoring for given service. |
|
708 \param implementation Valid interface descriptor obtained by the list() call. |
|
709 \return True if operation succesful, false otherwise. |
|
710 */ |
|
711 bool XQApplicationManager::notifyRunning(XQAiwInterfaceDescriptor& serviceImplDescriptor) |
|
712 { |
|
713 XQSERVICE_DEBUG_PRINT("XQApplicationManager::notifyRunning"); |
|
714 return d->startNotifications(serviceImplDescriptor); |
|
715 } |
|
716 |
|
717 /*! |
|
718 Stop monitoring for given service. |
|
719 \param implementation Valid interface descriptor obtained by the list() call. |
|
720 \return True if operation succesful, false otherwise. |
|
721 */ |
|
722 bool XQApplicationManager::cancelNotifyRunning(XQAiwInterfaceDescriptor& serviceImplDescriptor) |
|
723 { |
|
724 XQSERVICE_DEBUG_PRINT("XQApplicationManager::cancelNotifyRunning"); |
|
725 return d->stopNotifications(serviceImplDescriptor); |
|
726 } |
|
727 |