Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Setting configuration parameters using ISettings/PDConfig

This section describes the call flow sequence of using ISetting. ISettings is used to set and get various GPS Engine configuration parameters, such as Engine Lock, CDMA PDE Server Address, CDMA MPC Address, and UMTS SUPL Server Address. The set operations for Engine Lock and Server Address require the pd_AEEPRIVID_Engine_Lock and pd_AEEPRIVID_Server_Address privileges respectively.

GPS Engine Lock Get/Set call flow

This sequence diagram describes the call flow that occurs during a Get/Set operation for Engine Lock using ISettings. The steps are described below.

Get operation

  1. The application creates an instance of the ISettings object using IEnv_CreateInstance().
  2. The application can then retrieve the lock status using ISettings_Get() with "/PD/Config/EngineLock" as the key. Applications can perform a two-step call or a single-step call for ISettings_Get(). If the application passes in a valueLen of 0, valueLenReq is filled with the size of the buffer that the application needs to allocate. In the second call to ISettings_Get(), the application needs to pass in the allocated buffer and its length.
  3. The application receives the engine lock value in the buffer provided.

Set operation

  1. The Set and Get operations begin the same way, by creating an ISettings instance using IEnv_CreateInstance().
  2. To change the lock status, call ISettings_Set() with "/PD/Config/EngineLock" as the key, passing in the desired lock value.
  3. On completion, the ISettings implementation cache is updated with the new lock value. If an application needs to receive change in lock status events, it can register a signal using ISettings_OnChange(). The callback function associated with the signal is invoked when the lock status changes.
  4. Applications that receive a change notification can use ISettings_Get() to retrieve the updated lock value.

Applications can chose receive notification of changes made by other applications.

Server Address Get/Set call flow

This sequence diagram describes the call flow that occurs during a Get/Set operation using ISettings for PDE and MPC Server addresses. The call flow sequence chart uses CDMA PDE server address as example. The steps are described below.

Get operation

  1. The application creates an instance of an ISettings object by calling IEnv_CreateInstance().
  2. The application then retrieves the lock status using ISettings_Get() with "/PD/Config/CDMAPDEAddress" as the key. Applications can perform either a two step-call or a single-step call for ISettings_Get(). If the application passes a valueLen of 0, valueLenReq is filled with size of the buffer that the application needs to allocate. In the second call to ISettings_Get(), the application needs to pass in the allocated buffer and its length. Application will get the PDE Server address in a fully qualified internet name format.
  3. The application receives the server address in the buffer provided.

Set operation

  1. The Set operation begins the same way, by creating an ISettings instance using IEnv_CreateInstance().
  2. To change server address status, call ISettings_Set() with "PD/Config/CDMAPDEAddress" as the key and the desired address value in fully qualified internet name format.An application that needs to receive change in server address events can register a signal using ISettings_OnChange() with the same key. The callback function associated with the signal is triggered when the server address changes.
  3. The address needs to be in a fully qualified internet name format.
  4. On completion, applications receive a notification and can call ISettings_Get() to check the updated server address.

Note: Setting UMTS PDE Server address always sets the address in URL format.