Phonebook 2 xSP Extension Manager APIChanges in Phonebook 2 xSP Extension Manager API documentation
Changes in Phonebook 2 xSP Extension Manager API
PurposeThe purpose of Phonebook 2 xSP Extension Manager API is to provide third party service providers the means to create UI extensions for Phonebook 2. This document is valid from S60 release 3.2 onwards. API descriptionPhonebook 2 xSP Extension Manager API is a framework API that enables service providers to create their own UI extensions on top of Phonebook 2. UI extensions created using this API are called xSP extensions, and are not pure Phonebook 2 UI extensions. Instead, they are managed by a component called xSP Extension Manager, which itself is a pure Phonebook 2 UI extension. Technically, both xSP extensions and Phonebook 2 UI extensions are ECOM plug-ins. xSP Extension Manager API provides a limited sandbox of operations for xSP extensions, so that Phonebook 2 itself does not have to open its UI extension interfaces for third party service providers. xSP Extension Manager also provides some additional functionality in the form of xSP extension sorting and view and command ID mapping, so service providers do not have to worry about duplicate view or command IDs between xSP extensions. This API provides a method call interface. Use casesThere exists in practise only one main use case for xSP Extension Manager API, and that is creating a new xSP extension. That can be divided into sub-cases, such as creating a tabbed or non-tabbed view, creating options menu extension to Phonebook 2's Names List view, and using Extension Manager provided utility classes during those creation operations. API class structureThe Phonebook 2 xSP Extension Manager API class structure is presented
below. Classes shown as grey are or Phonebook 2 base classes that this API
or its user derives from. Green classes are the API itself, and the yellow
classes are the user of this API, in this case a component called SimpleExample.
The first figure shows the structure of extension factory class. Each xSP
extension must have a factory that is derived from
CxSPBaseView class,
which uses other API interfaces and Phonebook 2 base classes. CxSPBaseView is
a base class for xSP views that contains some functionality common to all
xSP views, and e.g. references to theMxSPContactManager and MxSPViewMapper utilities. MxSPContactManager is an interface through which Extension Manager implemented contact managing/mapping
functionality can be accessed. Likewise, MxSPViewMapper is
an interface through which Extension Manager implemented view mapping functionality
can be accessed. It must be noted that the xSP view classes are not themselves CAknView derived.
Instead, they are using a CPbk2UIExtensionView class instance
for CAknViewrelated operations.The third figure shows the class structure of an optional Names List
extension class. It needs to be implemented only if xSP wants to extend Phonebook
2's Names List view. Names List extension classes are derived from MxSPView,
which is an abstract interface for Phonebook 2 xSP view extensions, i.e. xSPs
can extend Phonebook 2 views by implementing a class derived from it. Currently
only Names List view extending is supported. MxSPBase is
a base interface for other Extension Manager interfaces. Names List extension
also needs a reference to MxSPCommandMapper, which is an
interface through which Extension Manager implemented command mapping functionality
can be accessed.
Related APIs
Using xSP Extension Manager APIxSP Extension Manager API is used for creating an xSP extension. For that,
classes derived from the API's
Example use case: xSP extension creationCreating an xSP extension takes several implementation steps, and some of the most important ones are described below as use cases. xSP extension is basically an ECOM plug-in which additionally implements some interfaces defined in xSP Extension Manager API, described in previous chapters. Creating a tabbed xSP viewBy following the four steps below, a new tab view is created to Phonebook 2: 1. xSP Extension Manager is told about the new views by defining a new xSP_VIEW_INFO resource. For a tabbed view, the following fields are to be defined:
2. The
3. The view class is created (in this example,
4. The
Related APIs
Creating a Phonebook 2 Names List view extensionBy following the five steps below, new menu items are added to the Names List view options menu and the invocation of these menu items is handled. 1.
2. In the created
3. The new menu items are added to the menu pane. Resource file is used to define the added menu items in the usual way (MENU_PANE, MENU_ITEM). 4. Menu commands are handled by implementing
5. Code is added to support command ID mapping. Command ID mapping is a
way to solve the problem of keeping all command IDs unique in the Names List
view options menu. Basically what is to be done, is to first tell xSP Extension
Manager the command IDs of this extension, and then use
Related APIs
Error handlingThe methods leave in case of an error situation. Normal error handling
practises should be used, e.g. using the cleanup stack and the
Related APIs
Related APIs
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: EPL
|


