API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IBTAVRCPMGR

Brew Release
Brew MP 1.0.2
See Also
None
Description

IBTAVRCPMgr defines a factory interface that provides a mechanism for retreival of various AVRCP interface objects such as IRemoteControl_Target and IBTAvrcpCTInfo.
These interfaces enable clients to retrieve AVRCP CT device information and to be controlled by these remote CT devices.
This interface relies on another transport mechanism to be enabled. The internal transport will be responsible for directing commands from the remote device. Bluetooth can be one example for the transport to use.
This interface also provides the mechanism through which clients are notified about the change in transport connection status of CT devices. Clients register the notification with the interface. It is notified when new connection to a AVRCP CT is established or existing connection is disconnected.
Usage

Usage example:




   // IBTAVRCPMgr provides an entry point to the AVRCP TG Remote control
   // functionality. The interface objects provided by this interface
   // enable multiple clients to be controlled by AVRCP CT devices.

   // This interface relies on another transport mechanism to be enabled which is
   // is required to provide transport to commands from the remote device. 
   // IBTAVRCPTarget interface provides BT transport mechanism. 
 
   ===== To create an instance of IBTAVRCPMgr object, please refer the instruction 
   in class factory header file 

   
   ===== To register signal for connection status change notifications:
   // first create the signal, for e.g. use ISignalCBFactory_CreateSignal()
   // then register the signal:
   IBTAVRCPMgr_OnConnChange (piBTAVRCPMgr, piSignal);
 

   ===== To retrieve list of connected devices on signal notification:
   IBTAVRCPMgr_GetConnectedDevices( piBTAVRCPMgr, 
                                    &bdAddrList, 
                                    noOfDevs,
                                    &noOfDevsReq); 

   ===== To create an IBTAVRCPCTInfo object

   // Get IBTAVRCPCTInfo interface object using the BD Address 
      of the connected AVRCP CT device
     
   IBTAVRCPMgr_GetCTObj( piBTAVRCPMgr,
                         bdAddr,
                        (IBTAVRCPCTInfo**) &pIBTAVRCPCTInfo);

   // Get IRemoteControl_Target interface Object. 

   IBTAVRCPMgr_RegisterMediaClient(piBTAVRCPMgr,
                            (IRemoteControl_Target**) pIRemoteCtl);

   ===== When done with AVRCP:
   IBTAVRCPMgr_Release (piBTAVRCPMgr);