Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


World Server functionality

The World Server provides information about a city or a country, including stored data and calculated results. The server is designed primarily applications dealing with dialling information.

[Top]


The world database

The world database is an alphabetically sorted array of city and country entries, which is constructed from a read-only data file, any imported user data files, and any individually added cities/countries.

The read-only file is the main source for the world database, and is usually stored in ROM. The ROM file can be replaced by a read-only file in RAM—C:\System\data\Wld_Data.dbz.

Users can individually add, edit or delete entries to/from the world database arrays, or make multiple changes by importing a data file. Note that the array is alphabetically re-ordered whenever cities/countries are added or removed. There are some limitations on what entries can be deleted—these are discussed in a later section.

[Top]


World IDs

Each city has a unique ID comprised of its city and country name—TWldID. To access world information, the session owner must first get the ID for the desired city/country from the world server—through a connection to RWorldServer.

Both city and country name are required in the ID because the same city name can be used in more than one country (e.g. London). When a country is fetched, the ID refers to the capital of that country.

[Top]


Finding a city or country

The client can use either an exact string match, or prefix matching on the city and country names, to get the ID for a particular city/country. The first match according to the locale — country or whole database — is returned. Since the database is sorted alphabetically by city and country name this match is the first in alphabetic order. The various find functions return a null TWldID if there is no match.

The client can also navigate backwards or forwards through sequential TWldIDs. When finding the next or previous city, the client is able to specify whether the city is from the same country or anywhere in the world.

The server can also be used to return the ID of the closest city to a given map co-ordinate. From this, the ID of the next closest city can be fetched.