BLID Application Satellite Info API: Technical Specification

Type of the Interface

The type of this interface is method-call (interface uses only local objects).

The BLID Application Satellite Info API loads the implementation at run-time but the implementation consists only of local objects.

Interface Class Structure

This section describes the BLID Application Satellite Info API class structure. UML diagrams are used to present the classes.

Figure 1:  BLID Application Satellite Info API class diagram

BLID Application Satellite Info API consists of one class: CSatelliteInfoUI. The interface of this class is based on the interface of standard AVKON dialog classes.

Usage

Protocol

To use BLID Application Satellite Info API, an instance of CSatelliteInfoUI needs to be created using the NewL() function. This instance should be used to invoke the ExecuteLD() method providing it with a string, which signifies the requestor data used by Location Framework.

If invoking application receives an foreground event and if the Satellite Information dialog is active, the CSatelliteInfoUI’s HandleForegroundEventL() method must be invoked providing it with the event Boolean.

Error Handling

The BLID Application Satellite Info API uses the standard Symbian error reporting mechanism. Errors are reported through return codes or leaves.

Memory Overhead

SatInfo.DLL required for the operation of BLID Application Satellite Info API requires 4256 bytes of memory for its operation.

Extensions to the API

There are no extensions defined to the BLID Application Satellite Info API.

Example

The following example depicts the use of the CSatelliteInfoUI class.

// Create the server name
HBufC* srvName = StringLoader::LoadLC(R_SATREF_SERVICE_RULE_NAME, 
	                           CEikonEnv::Static() );
// Creating instance of CSatelliteInfoUI
CsatelliteInfo* iSatelliteInfo = CSatelliteInfoUI::NewL();
	    	
// ExecuteLD displays the satellite dialog.
// The dialog display satellite ID's along with 
// their signal strengths depicted using bar's.
iSatelliteInfo->ExecuteLD(*srvName);
CleanupStack::PopAndDestroy(srvName); //srvName
iSatelliteInfo = NULL;

Foreground event can be handled in the following fashion.

void HandleForegroundEventL(TBool aForeground)
	{
	if(iSatelliteInfo)
		{
		// SatelliteInfo To Handle Foreground Event
		iSatelliteInfo->HandleForegroundEventL(aForeground);		}
	}

Detailed Description

The BLID Application Satellite Info API consists of only one class: CSatelliteInfoUI. This usage of this class is described in the Usage section. The API displays a dialog indicating the satellite data availability and quality. The dialog displays the satellite IDs along with their signal strengths in the form of bars. Only five satellites with the top signal strengths are considered for displaying. A satellite that is represented by a filled bar has a fix and a satellite represented by an unfilled bar does not have a fix.

Construction

static CSatelliteInfoUI* NewL()

Usage:

Two-phased constructor.

Leaves if memory is insufficient.

Returns:

A new instance of this class.

Execution

TInt ExecuteLD( const TDesC& aNameOfRule )

Usage:

Once this method is called, a progress dialog and is displayed, after which the Satellite Information dialog is displayed.

The function leaves if memory is insufficient or a connection to Mobile Location Framework cannot be established.

Parameters:

aNameOfRuleTakes a string that provides the requestor data used by Location Framework.

Returns:

Returns “0” if the user canceled the dialog and “1” otherwise.

Handling Foreground Event

void HandleForegroundEventL(TBool aForeground)

Usage:

This method is to be called when the Satellite Information dialog is being displayed and the using application receives a foreground event.

Parameters:

aForegroundTakes the foreground event received by the application UI class from the framework.

Code Architecture

Figure 2:  Files needed by BLID Application Satellite Info API client

The BLID Application Satellite Info API header files are as shown in the figure above. The lbs.LIB is the library exposed by Location Framework used. SatInfo.DLL is the library that needs to be linked to use BLID Application Satellite Info API.


Copyright © Nokia Corporation 2001-2007
Back to top