Connection Settings APIChanges in Connection Settings API documentation
Contents
ChangesThe following header files have been changed between S60 3rd Edition and S60 5th Edition
Related APIs
PurposeConnection Settings API provides access to Destinations and Connection Methods. Destinations and Connection Methods are the basic components of the Bearer Mobility concept. Bearer Mobility enables automatic selection of the most appropriate access technology (bearer type) in a certain situation or environment, and roaming between access technologies, thus providing the always-on experience from the end-user point-of-view. Bearer Mobility becomes concrete on the UI level via so-called destination network thinking. Instead of explicit Internet Access Point (IAP) association, the application can ask for a connection to a certain destination, e.g. Internet or Intranet. Each destination can contain numerous access technologies that can be used to reach the destination or service domain in question. When a connection to a destination is being established, the device can automatically select the best connection method available, and roam between the connection methods defined inside that particular destination. API descriptionConnection Method Manager API provides:
Connection Method Manager runs in the process of the client application.
All the methods in the API are synchronous. Some UI related methods such as
querying a bearer icon (
As Connection Method Manager runs in the process of the client application
it has the same capabilities as the client application so the client application
needs the
Use casesThe main use cases of the Connection Settings API are:
API class structure
The diagram below contains only the relevant details of the types of Connection Settings API. Full reference can be found in the header files.
Connection Settings API also contains the following DEF header files which
contain constants and enumerations inside the
Some of these file names refer to plug-ins such as cmpluginpacketdatadef.h.
Although some of these file names refer to plug-ins such as cmpluginpacketdatadef.h the plug-in architecture (different bearer types are realized as plug-ins in the Connection Method Manager) is hidden for the user of the API. Usage of the API does not require any knowledge about the plug-in architecture of Connection Method Manager.
The rest of the headers contain the type definitions of the
Related APIs
Related APIs
Using Connection Settings APIcmmanager.lib has to be linked to the application before the Connection Settings API is used. The following line has to be added to the MMP file of the application.
When using types in Connection Settings API for getting information about Destinations and Connection Methods, the first step is to open a Connection Method Manager session.
Below is an example of the initialization process of Connection Settings
API. The
cmmanager.h
header file has to be included for using the
The session has to be closed when it is not used any more:
Create, modify and delete a Destination
After the Connection Method Manager has been initialized, a Destination
can be created in two ways. The recommended way is to call the
An example of how to create a Destination:
Related APIs
Reading the list of existing Destinations
The list of existing Destination IDs can be queried by invoking the
An example of how to get the Destination ID list.
Destination Ids can be used to get the Destination objects. The example goes through all the Destinations and get's the names of them.
Related APIs
Create, copy, move, remove and delete a Connection Method
Connection Method can be created through
or if
Connection Method can be copied by using
Moving a Connection Method from one Destination to another can be done
by using
Removing a Connection Method from a Destination means that the link between that Connection Method and Destination is removed. Normally this means that the removed Connection Method is in the Uncategorized folder after removing.
Deleting a Connection Method can be done through
or without the destination
Related APIs
Reading the list of existing Connection Methods
The list of existing Destination IDs can be queried by invoking the
An example of how to get the Connection Method ID list.
Connection Method IDs can be used to get the Connection Method objects. The example goes through all the Destinations and gets the names of them.
Related APIs
Reading the existing Connection Methods in a Destination
The number of Connection Methods in a Destination can be queried by calling
the
The example lists the names of the Connection Methods in all Destinations.
The
cmconnectionmethoddef.h
header file has to be included for using
Related APIs
Reading and writing the attributes of a Connection Method
Connection Methods has a set of common attributes and a set of bearer specific
attributes. The common attributes can be found in the
cmconnectionmethoddef.h
file,
e.g.
The bearer specific attributes can be found in the
def.h
files of
bearer headers, e.g.
cmpluginpacketdatadef.h
that contains the bearer
specific attributes of packet data bearer type, e.g.
Each attribute has a type, e.g. the type of
Get methods of
RCmConnectionMethod
can be used for writing
the attributes of a Connection Method:
An example of reading and writing a couple of common attributes of the Connection Methods:
Related APIs
Reading the attributes of a bearer type
Some attributes do not belong to a concrete Connection Method but they
are the attributes of a bearer type, e.g.
The next example reads some attributes of the Packet Data bearer type.
Be aware that some attributes including bearer specific and Connection
Method specific attributes require initialized UI context in the client application,
e.g.
Related APIs
Handling of Embedded DestinationSpecial handling is needed for Embedded Destinations. A destination can contain a link to another destination, thus making it possible to utilize the Connection Methods of another destination when creating the connection. This is called an Embedded Destination. Embedded Destination is rarely used. Embedded Destination cannot be created by the phone user.
In Connection Settings API an Embedded Destination is represented as a
Connection Method with Embedded Destination bearer type. So to be prepared
for Embedded Destination first the bearer type of the actual Connection Method
has to be checked. If the bearer type is Embedded Destination then the linked
destination can be queried by calling the
The next example is code fragment from a program which iterates through
the existing Destinations and Connection Methods. The relevant codes about
handling Embedded Destinations are in bold. The
cmpluginembdestinationdef.h
header
has to be included for the UID of the Embedded Destination bearer type (
Related APIs
Error handlingConnection Settings API uses the standard Symbian platform error reporting mechanism. Leaves and system wide error codes as function return values are used if the error is recoverable. A client application can handle these errors similarly as a normal Symbian platform application. Memory overhead
Opening a
Using an example setup with six Destinations each containing three Connection Methods, getting the list of existing Destinations takes about 1 kb.
Getting an
Related APIs
Limitations of the APIIn some cases the client application needs an initialized UI context to successfully invoke the methods of the API. E.g. reading some UI related attributes such as bearer specific icon.
Related APIs
GlossaryAbbreviations
Abbreviations
Definitions
Definitions
|