This document describes how to create Transmitter Utility and its auxiliary utilities.
This document shows you how to create FM Transmitter Utility and its Scanner Utility and RDS Utility.
Required Background
The FM Transmitter Library Overview provides an overview of the FM Transmitter library.
Introduction
The Transmitter Utility provides abstract APIs to transmit radio broadcast. It is used to enable and disable transmission, scan for frequencies that are in use, set and get RDS metadata.
The following tasks will be covered in this tutorial:
Initialising Transmitter Utility
The high level steps to initialise Transmitter Utility are shown here:
Create an instance of CMMTransmitterUtility using the CMMTransmitterUtility::NewL method.
It returns a pointer to the CMMTransmitterUtility object.
Clients must provide an implementation of MTransmitterUtilityObserver interface to receive notifications.
Specify the index value of transmitter for use between the ranges 0 and CMMTransmitterUtility::TransmittersAvailableL() -1 inclusive.
Use CMMTransmitterUtility::GetCapabilities() method to check if the transmitter created with specified index has the required capabilities.
Determine the number of transmitters available using CMMTransmitterUtility::TransmittersAvailableL method.
Note:
If multiple clients create CMMTransmitterUtility object with the same index, client with high priority gains access to the Transmitter Utility. It is recommended not to create multiple clients with the same index.
Creating Scanner and RDS Utilities
The high level steps to create Scanner and RDS utilities are shown here:
Create an instance of CMMTransmitterScannerUtility class for scanning clear frequencies using the CMMTransmitterUtility::CreateTransmitterScannerUtilityL method.
Create an instance of CMMRdsTransmitterUtility class for setting RDS data using the CMMTransmitterUtility::CreateRdsTransmitterUtilityL method.
Note: For each transmitter utility, you can create only one instance of scanner and RDS utility.
Use MTransmitterScannerUtilityObserver implementation to send callback to the scanner utility.
Delete scanner utility using the MMTransmitterUtility::DeleteTransmitterScannerUtility method.
Delete RDS utility using the CMMTransmitterUtility::DeleteRdsTransmitterUtility method.