AIW Generic Parameter API Specification DocumentChanges in AIW Generic Parameter API documentation
Changes in AIW Generic Parameter API
PurposeThe purpose of AIW Generic Parameter API is to offer the means for handling AIW generic parameters to the AIW consumer applications. The generic parameters are used for transferring data between AIW consumers and providers. API descriptionAIW 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. Use casesThe main use cases of this API are the following:
API class structureThe class structure of AIW Generic Parameter API classes with some of the most important methods is shown in Figure 1: The
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
The variant object is of type
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.
Related APIs
Using AIW Generic Parameter APIThe most important use cases are creating generic parameter lists to be passed to the AIW providers. The first use case is a basic case, and the second is a more advanced one and specific to a certain AIW service provider. Creating a generic parameter list with basic typesThe example code here demonstrates how to create a generic parameter list and fill it with file name (descriptor) and error code (integer) items. This is the way how to pass the most common types of parameters to the AIW providers that do not need provider specific objects.
There may be as many items as required on the list with the same semantic
id. The receiving application uses iterator methods in the
The AIW framework contains convenience methods for creating input and output lists. By using the lists, the consumer application does not have to take care of allocating the list from a heap or deleting it afterwards. The only limitation is that only one input and one output list can be requested simultaneously. If more are required, the consumer application must create and delete them by itself. The methods for creating input and output lists are defined as follows:
Related APIs
Creating a generic parameter list with provider specific objectsIf a provider specific class or struct needs to be transferred between
a consumer and a provider, it needs to be serialized by using e.g. a
Related APIs
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: EPL
|