Bluetooth Framework C++ Edition
CwclBluetoothAudioReceiver Class Reference

A Bluetooth audio Receiver. More...

#include <wclAudio.h>

Public Member Functions

 CwclBluetoothAudioReceiver ()
 Creates new component.
 
virtual ~CwclBluetoothAudioReceiver ()
 Frees the component.
 
int Close ()
 Closes the Bluetooth audio receiver and stops listening for audio connections.
 
int Listen (const tstring &Id)
 Initializes the Bluetooth audio receiver and starts listening for audio connections.
 
int Connect ()
 Initiates a connection to an associated Bluetooth audio device.
 
tstring GetId () const
 Gets the Bluetooth audio device ID associated with the receiver.
 
 __declspec (property(get=GetId)) tstring Id
 
wclBluetoothAudioReceiverState GetState () const
 Gets the Bluetooth audio receiver state.
 
 __declspec (property(get=GetState)) wclBluetoothAudioReceiverState State
 
wclMessageProcessingMethod GetMessageProcessing () const
 Gets a message processing method that should be used by the Audio component.
 
void SetMessageProcessing (const wclMessageProcessingMethod Value)
 Sets a message processing method that should be used by the Audio component.
 
 __declspec (property(get=GetMessageProcessing, put=SetMessageProcessing)) wclMessageProcessingMethod MessageProcessing
 Gets and sets a message processing method that should be used by the Audio component.
 
__event void OnClosed (void *Sender)
 The event called when a Bluetooth audio receiver is closed.
 
__event void OnConnected (void *Sender)
 The event called when a remote Bluetooth audio device is connected to the receiver.
 
__event void OnDisconnected (void *Sender)
 The event called when a remote Bluetooth audio device is disconnected from the receiver.
 
__event void OnListen (void *Sender)
 The event called when the receiver is started listeting for audio connections.
 

Protected Member Functions

virtual void MessageReceived (const CwclMessage *const Message)
 The method called when a new notification message received.
 
virtual void DoClosed ()
 Calls the OnClosed event.
 
virtual void DoConnected ()
 Calls the OnConnected event.
 
virtual void DoDisconnected ()
 Calls the OnDisconnected event.
 
virtual void DoListen ()
 Calls the OnListen event.
 

Detailed Description

A Bluetooth audio Receiver.

This class switches your PC to a Bluetooth speaker that can receiver an audio stream from remote Bluetooth device and play it through PC speaker.

The class is not thread-safe.