Accessory Services Overview

Accessory Services abstract accessory-related services for platform and SDK clients and provides accessory-related APIs for adaptation (audio and display) and accessory plug-ins.

Purpose

Accessory Services is a group of components that support APIs for platform clients to retrieve accessory connection status information, and device and services type information. It also provides adaptation APIs for the addition of new Accessory Services plug-in components.

Architecture

The architecture of Accessory Services revolves around the Accessory and the Remote Control Framework. Accessory Framework provides platform clients with access to the accessory functionality on the device, while abstracting away accessory, hardware, bearer and protocol-specific details from the software layers. Accessory Framework also provides accessory policy and adaptation APIs for the addition of new Accessory Framework plug-in components (if required). The Remote Control Framework provides APIs required to send and receive remote control commands to/from an accessory connected to a phone.

The core of the Accessory Framework is the Accessory Server. Accessory Server has a central role in accessory-related connection/disconnection handling on the Symbian platform. The Accessory Framework depends on the concepts, such as Generic ID, Accessory Policy, Accessory Handlers and Accessory Mode. These concepts are described in the following section.

Remote Control Framework exposes the Remote Control Server using the Remote Control Core APIs. The remote control commands are understood by the Key Event Converter and passed on to the Target Selector Plug-in (TSP) Controller by the Remote Control Framework. Then TSP decides which application must handle this request and passes that information to the Remote Control Server. Finally, the request is handled by that application. For more information about Remote Control concepts, see the Remote Control Framework section.

The following figure illustrates the architecture of Accessory Services:

Figure 1. Accessory Services Architecture

Description

This section describes the key concepts associated with Accessory Services.

  • Generic ID: Generic ID provides the means to describe, detect, connect, and control an enhancement without a need to use hardware or provider-specific definitions. Thus Generic ID must be a native concept for any accessory-related platform software. For the platform purposes, Generic ID must be defined so that it covers all the enhancement device types, bearers, protocols, and accessory feature profiles that the platform supports and for which information is needed.

  • Accessory Policy: Accessory Policy provides the Generic ID data type for identifying an accessory on the basis of its features, instead of an accessory-specific ID. Accessory Server uses Accessory Policy through the Accessory Policy API to get information about the connected accessories. A connected accessory is identified using an assigned Generic ID, which is a data structure that describes the relevant physical and logical features of the accessory.

  • Accessory Mode: Accessory Mode describes the accessory connection status of the devices connected to a phone and indicates whether the audio is routed into the accessory or not. Accessory Mode typically affects the vibra state, lights state, texts, some UI icons and menu items.

    Note: Accessory Mode is a single-valued state, unlike the accessory connection status. Some supported Accessory Modes include hand portable, wired headset, wireless headset, wired car kit, wireless car kit, headphones, text device, music stand and TV-out.

  • Accessory Handlers: Accessory Handlers (ASYs) form the Accessory Framework adaptation layer. Accessory Server hosts multiple ASYs. For example, wired ASY, bluetooth ASY, plugged display ASY and so on. ASYs can be understood as an accessory adaptation layer between the Accessory Framework and any other Symbian platform or hardware-related software on the phone. Typical task of an ASY is accessory detection (registering for hardware indications) and providing the capabilities of the accessories to the Accessory framework.

  • Controller: Controller is a device that sends a control message or command to a target device and is ready to capture responses.

  • Target: Target is a device that accepts the control message or command from the controller, invokes necessary procedures and sends out responses to controller.

  • Bearer: The bearer is a carrier that acts like a vehicle of transmission for remote control messages. The bearer here is an ECom plug-in to the Remote Control Server.

Components

Accessory Services consists of the following components:

  • Accessory Monitor: Provides APIs to retrieve information about the connected accessories, such as a headset and car kit.

  • Accessory Remote Control: Provides APIs for clients to communicate with remote targets in a terminal and remote targets outside a terminal.

  • Accessory Server: This is a core component that exposes accessory-related client and adaptation APIs through the Accessory Framework. The Accessory Framework provides APIs to query accessory-related information, adjust accessory-related user settings and to request control for accessory-related functions.

  • Headset Status API: Provides APIs for checking the headset status. For example, headset status change notifications.

  • Target Selector Plug-in (TSP) Client Mapper: Provides APIs to create mappings between remote control clients.

  • Plugged Display: Plugged Display component is an ASY that enables High-Definition Multimedia Interface (HDMI) and TV-out support. For more information about HDMI, see Wikipedia.

  • Remote Control Framework: Provides APIs needed to send and receive remote control commands to/from a Bluetooth enabled device.

Using Accessory Services

You can use features provided by Accessory Services to perform the following tasks:

  • Retrieve accessory mode, connection status, accessory device and service type information.

  • Retrieve accessory control and connection-related functionality.

  • Request for a protocol-specific connection handle for accessory audio control.

  • Handle accessory-related key events.

  • Monitor accessories connected to a phone.

  • Identify accessories connected based on its features, using Generic IDs.

  • Configure accessory-related settings.

  • Retrieve headset connection status.

  • Create mappings between remote control clients.

  • Configure TV-out settings.