IntentServer QML Type
The System-UI side singleton representing the Intents sub-system. More...
Import Statement: | import QtApplicationManager.SystemUI 2.0 |
Properties
- intentList : list<Intent>
Signals
- disambiguationRequest(requestId, list<Intent> potentialIntents, var parameters)
- intentAdded(intent)
- intentListChanged()
- intentRemoved(intent)
Methods
- acknowledgeDisambiguationRequest(requestId, Intent selectedIntent)
- Intent find(intentId, string applicationId, var parameters = {})
- rejectDisambiguationRequest(requestId)
Detailed Description
This singleton serves two purposes: for one, it gives the System-UI access to the database of all the available intents via intentList, plus it exposes the API to deal with ambigous intent requests. Intent requests can be ambigous if the requesting party only specified the intentId
, but not the targeted applicationId
in its call to IntentClient::sendIntentRequest(). In these cases, it is the responsibility of the System-UI to disambiguate these requests by reacting on the disambiguationRequest() signal.
Property Documentation
Signal Documentation
This signal is emitted when the IntentServer receives an intent request that could potentially be handled by more than one application.
Note: This signal is only emitted, if there is a receiver connected at all. If the signal is not connected, an arbitrary application from the list of potential matches will be chosen to handle this request.
The receiver of this signal gets the requested requestId and its parameters. It can then either call acknowledgeDisambiguationRequest() to choose from one of the supplied potentialIntents or call rejectDisambiguationRequest() to reject the intent request completely. In both cases the unique requestId needs to be sent along to identify the intent request.
Not calling one of these two functions will result in memory leaks.
Note: The corresponding handler is onDisambiguationRequest
.
See also IntentClient::sendIntentRequest.
Emitted when a new intent gets added to the intentList (e.g. on application installation).
Note: The corresponding handler is onIntentAdded
.
Emitted when either a new intent gets added to or an existing intent is remove from the intentList.
Note: The corresponding handler is onIntentListChanged
.
Emitted when an existing intent is removed from the intentList (e.g. on application deinstallation).
Note: The corresponding handler is onIntentRemoved
.
Method Documentation
acknowledgeDisambiguationRequest(requestId, Intent selectedIntent) |
Tells the IntentServer to go ahead with the sender's intent request identified by requestId. The chosen selectedIntent needs to be one of the potentialIntents
supplied to the receiver of the disambiguationRequest signal.
See also IntentClient::sendIntentRequest.
This method exposes the same functionality that is used internally to match incoming Intent requests for the intent identified by intentId and targeted for the application identified by applicationId. Although you could iterate over the intentList yourself in JavaScript, this function has the added benefit of also checking the parameters against any given parameter matches.
If no matching Intent is found, the function will return an invalid Intent.
Tells the IntentServer to ignore the sender's intent request identified by requestId. The original sender will get an error reply back in this case.
See also IntentClient::sendIntentRequest.
© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.