AIW Generic Parameter API can be categorized as a library API, i.e. it provides standalone implementation units (classes, methods, functions) that are used by the client. The API is used by method calls (interface uses only local objects).
An AIW generic parameter is a pair of semantic id and variant value. Semantic id tells the purpose of the parameter. Variant value contains the data format information and the actual value. This API offers the means for creating a parameter object, setting its variant value and semantic id, etc.
The main use cases of this API are the following:
The class structure of AIW Generic Parameter API classes with some of the most important methods is shown in Figure 1:
Figure 1: Class diagram of AIW Generic Parameter API
The TAiwGenericParam
object contains a single AIW generic
parameter. These objects may then be collected to a CAiwGenericParamList
,
which can be passed to the AIW providers e.g. via CAiwServiceHandler::ExecuteMenuCmdL()
or CAiwServiceHandler::ExecuteServiceCmdL()
.
A single generic parameter object contains a semantic id and a variant
object. A semantic id can for example be an error code or a landmark. See
enumeration TGenericParamId
in AiwGenericParam.hrh for
possible values.
The variant object is of type TAiwVariant
. It consists
of a data format and the actual value. The data format can be e.g. integer,
UID or a descriptor. See AiwVariantType.hrh for a complete list.
A "data agreement" is an important definition here. It is a contract between AIW provider and consumer to define the parameters required to execute a certain AIW service command. A data agreement describes the provider's input and output parameters, and also event parameters if the AIW service is asynchronous. Note also that these data agreements and other necessary information for executing individual AIW service commands are provider specific.
Some data agreements require that an instance of a certain custom class or struct is passed between the consumer and provider. For example, the Map&Navigation provider uses that approach.