CSbcEncoderIntfcProxy Class Reference

class CSbcEncoderIntfcProxy : public CSbcEncoderIntfc

Proxy for SBC Encoder configuration interface. This proxy translates the interface API calls to messages and sends them to the message handler.

SbcEncoderIntfcProxy.lib
Since
S60 3.0

Inherits from

Nested Classes and Structures

Public Member Functions
~CSbcEncoderIntfcProxy ()
IMPORT_C TInt ApplyConfig ()
IMPORT_C TInt GetAllocationMethod ( TSbcAllocationMethod &)
IMPORT_C TInt GetBitpoolSize ( TUint &)
IMPORT_C TInt GetChannelMode ( TSbcChannelMode &)
IMPORT_C TInt GetNumOfBlocks ( TUint &)
IMPORT_C TInt GetNumOfSubbands ( TUint &)
IMPORT_C TInt GetSamplingFrequency ( TUint &)
IMPORT_C TInt GetSupportedAllocationMethods ( RArray < TSbcAllocationMethod > &)
IMPORT_C TInt GetSupportedBitpoolRange ( TUint &, TUint &)
IMPORT_C TInt GetSupportedChannelModes ( RArray < TSbcChannelMode > &)
IMPORT_C TInt GetSupportedNumOfBlocks ( RArray < TUint > &)
IMPORT_C TInt GetSupportedNumOfSubbands ( RArray < TUint > &)
IMPORT_C TInt GetSupportedSamplingFrequencies ( RArray < TUint > &)
IMPORT_C CSbcEncoderIntfcProxy * NewL ( TMMFMessageDestinationPckg , MCustomCommand &, CCustomInterfaceUtility *)
IMPORT_C void SetAllocationMethod ( TSbcAllocationMethod )
IMPORT_C void SetBitpoolSize ( TUint )
IMPORT_C void SetChannelMode ( TSbcChannelMode )
IMPORT_C void SetNumOfBlocks ( TUint )
IMPORT_C void SetNumOfSubbands ( TUint )
IMPORT_C void SetSamplingFrequency ( TUint )
Private Member Functions
CSbcEncoderIntfcProxy ( TMMFMessageDestinationPckg , MCustomCommand &, CCustomInterfaceUtility *)
void ConstructL ()
void GetSupportedAllocationMethodsL ( RArray < TSbcAllocationMethod > &)
void GetSupportedBitpoolRangeL ( TUint &, TUint &)
void GetSupportedChannelModesL ( RArray < TSbcChannelMode > &)
void GetSupportedNumOfBlocksL ( RArray < TUint > &)
void GetSupportedNumOfSubbandsL ( RArray < TUint > &)
void GetSupportedSamplingFrequenciesL ( RArray < TUint > &)
void PopulateArrayL ( RArray < TUint > &, TPtr8 , TUint )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CSbcEncoderIntfc::NewL(CMMFDevSound &)
CSbcEncoderIntfc::NewL(CMdaAudioInputStream &)
Inherited Enumerations
CSbcEncoderIntfc:TSbcAllocationMethod
CSbcEncoderIntfc:TSbcChannelMode
Private Attributes
MCustomCommand & iCustomCommand
CCustomInterfaceUtility * iCustomInterfaceUtility
TBool iHasBeenApplied
TMMFMessageDestinationPckg iMessageHandler
TSbcEncConf iSbcEncConf
TSbcEncConf iSbcEncConfCurrent

Constructor & Destructor Documentation

CSbcEncoderIntfcProxy(TMMFMessageDestinationPckg, MCustomCommand &, CCustomInterfaceUtility *)

CSbcEncoderIntfcProxy ( TMMFMessageDestinationPckg aMessageHandler,
MCustomCommand & aCustomCommand,
CCustomInterfaceUtility * aCustomInterfaceUtility
) [private]

C++ default constructor.

CSbcEncoderIntfcProxy::CSbcEncoderIntfcProxy C++ default constructor can NOT contain any code, that might leave.

Parameters

TMMFMessageDestinationPckg aMessageHandler
MCustomCommand & aCustomCommand
CCustomInterfaceUtility * aCustomInterfaceUtility

~CSbcEncoderIntfcProxy()

IMPORT_C ~CSbcEncoderIntfcProxy ( ) [virtual]

Destructor.

Destructor

Member Functions Documentation

ApplyConfig()

IMPORT_C TInt ApplyConfig ( ) [virtual]
Applies configuration to the encoder.
Since
S60 3.0

ConstructL()

void ConstructL ( ) [private]

Symbian 2nd phase constructor

CSbcEncoderIntfcProxy::ConstructL Symbian 2nd phase constructor can leave.

GetAllocationMethod(TSbcAllocationMethod &)

IMPORT_C TInt GetAllocationMethod ( TSbcAllocationMethod & aAllocationMethod ) [virtual]
Retrieves the current encode allocation method.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetAllocationMethod Returns current allocation method commited by call to ApplyConfig() . (other items were commented in a header).

Parameters

TSbcAllocationMethod & aAllocationMethod returns current encode allocation method.

GetBitpoolSize(TUint &)

IMPORT_C TInt GetBitpoolSize ( TUint & aBitpoolSize ) [virtual]
Retrieves the current encode bitpool size.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetBitpoolSize Returns current bitpool range commited by call to ApplyConfig() . (other items were commented in a header).

Parameters

TUint & aBitpoolSize returns current encode bitpool size.

GetChannelMode(TSbcChannelMode &)

IMPORT_C TInt GetChannelMode ( TSbcChannelMode & aChannelMode ) [virtual]
Retrieves the current encode channel mode.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetChannelMode Returns current channel mode commited by call to ApplyConfig() . (other items were commented in a header).

Parameters

TSbcChannelMode & aChannelMode returns current encode channel mode.

GetNumOfBlocks(TUint &)

IMPORT_C TInt GetNumOfBlocks ( TUint & aNumOfBlocks ) [virtual]
Retrieves the current encode number of blocks.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetNumOfBlocks Returns current number of blocks commited by call to ApplyConfig() . (other items were commented in a header).

Parameters

TUint & aNumOfBlocks returns current encode number of blocks.

GetNumOfSubbands(TUint &)

IMPORT_C TInt GetNumOfSubbands ( TUint & aNumOfSubbands ) [virtual]
Retrieves the current encode number of subbands.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetNumOfSubbands Returns current number of subbands commited by call to ApplyConfig() . (other items were commented in a header).

Parameters

TUint & aNumOfSubbands returns current encode number of subbands.

GetSamplingFrequency(TUint &)

IMPORT_C TInt GetSamplingFrequency ( TUint & aSamplingFrequency ) [virtual]
Retrieves the current encode sampling frequency.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSamplingFrequency Returns current sampling frequency commited by call to ApplyConfig() . (other items were commented in a header).

Parameters

TUint & aSamplingFrequency returns current encode sampling frequency.

GetSupportedAllocationMethods(RArray< TSbcAllocationMethod > &)

IMPORT_C TInt GetSupportedAllocationMethods ( RArray < TSbcAllocationMethod > & aSupportedAllocationMethods ) [virtual]
Retrieves the allocation methods supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedAllocationMethods Returns an array of supported allocation methods. Calls a subfunction which sends the appropriate custom command to its message handler. A subfunction is used to contain multiple leaving functions for a single trap. (other items were commented in a header).

Parameters

RArray < TSbcAllocationMethod > & aSupportedAllocationMethods array returning the supported allocation methods.

GetSupportedAllocationMethodsL(RArray< TSbcAllocationMethod > &)

void GetSupportedAllocationMethodsL ( RArray < TSbcAllocationMethod > & aSupportedAllocationMethods ) [private]
Called by GetSupportedAllocationMethods under trap harness. Retrieves the allocation methods supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedAllocationMethodsL Returns an array of supported allocation methods. Sends the custom command for this function to its message handler. This requires two commands. The first is a request for the number of supported allocation methods. A buffer is allocated locally to hold this number of allocation methods that will be returned. A pointer to this buffer is sent with the next command which is a request for the allocation methods. This buffer will be filled with the allocation method values. These values are then copied into the array provided to this function and the local buffer is deleted. (other items were commented in a header).

Parameters

RArray < TSbcAllocationMethod > & aSupportedAllocationMethods array returning the supported allocation methods.

GetSupportedBitpoolRange(TUint &, TUint &)

IMPORT_C TInt GetSupportedBitpoolRange ( TUint & aMinSupportedBitpoolSize,
TUint & aMaxSupportedBitpoolSize
) [virtual]
Retrieves the supported bitpool range by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedBitpoolRange Returns supported bitpool range. Calls a subfunction which sends the appropriate custom command to its message handler. A subfunction is used to contain multiple leaving functions for a single trap. (other items were commented in a header).

Parameters

TUint & aMinSupportedBitpoolSize returning the min bitpool size.
TUint & aMaxSupportedBitpoolSize returning the max bitpool size.

GetSupportedBitpoolRangeL(TUint &, TUint &)

void GetSupportedBitpoolRangeL ( TUint & aMinSupportedBitpoolSize,
TUint & aMaxSupportedBitpoolSize
) [private]
Called by GetSupportedBitpoolRange under trap harness. Retrieves the supported bitpool range by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedBitpoolRangeL Returns an array of supported bitpool range. Sends the custom command for this function to its message handler with TUint type arguments that will be filled with the bitpool min and max values. (other items were commented in a header).

Parameters

TUint & aMinSupportedBitpoolSize returning the min bitpool size.
TUint & aMaxSupportedBitpoolSize returning the max bitpool size.

GetSupportedChannelModes(RArray< TSbcChannelMode > &)

IMPORT_C TInt GetSupportedChannelModes ( RArray < TSbcChannelMode > & aSupportedChannelModes ) [virtual]
Retrieves the channel configurations supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedChannelModes Returns an array of supported channel modes. Calls a subfunction which sends the appropriate custom command to its message handler. A subfunction is used to contain multiple leaving functions for a single trap. (other items were commented in a header).

Parameters

RArray < TSbcChannelMode > & aSupportedChannelModes array returning the supported frequencies.

GetSupportedChannelModesL(RArray< TSbcChannelMode > &)

void GetSupportedChannelModesL ( RArray < TSbcChannelMode > & aSupportedChannelModes ) [private]
Called by GetSupportedChannelModes under trap harness. Retrieves the channel configurations supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedChannelModesL Returns an array of supported channel modes. Sends the custom command for this function to its message handler. This requires two commands. The first is a request for the number of supported channel modes. A buffer is allocated locally to hold this number of channel modes that will be returned. A pointer to this buffer is sent with the next command, which is a request for the channel modes. This buffer will be filled with the frequency values. These values are then copied into the array provided to this function and the local buffer is deleted. (other items were commented in a header).

Parameters

RArray < TSbcChannelMode > & aSupportedChannelModes array returning the supported frequencies.

GetSupportedNumOfBlocks(RArray< TUint > &)

IMPORT_C TInt GetSupportedNumOfBlocks ( RArray < TUint > & aSupportedNumOfBlocks ) [virtual]
Retrieves array of supported block numbers by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedNumOfBlocks Returns an array of supported blocks. Calls a subfunction, which sends the appropriate custom command to its message handler. A subfunction is used to contain multiple leaving functions for a single trap. (other items were commented in a header).

Parameters

RArray < TUint > & aSupportedNumOfBlocks

GetSupportedNumOfBlocksL(RArray< TUint > &)

void GetSupportedNumOfBlocksL ( RArray < TUint > & aSupportedNumOfBlocks ) [private]
Called by GetSupportedNumOfBlocks under trap harness. Retrieves array of supported block numbers by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedNumOfBlocks Returns an array of supported blocks. Sends the custom command for this function to its message handler. This requires two commands. The first is a request for the number of supported blocks. A buffer is allocated locally to hold this number of blocks that will be returned. A pointer to this buffer is then sent with the next command, which is a request for the blocks. This buffer will be filled with the block values. These values are then copied into the array provided to this function and the local buffer is deleted. (other items were commented in a header).

Parameters

RArray < TUint > & aSupportedNumOfBlocks

GetSupportedNumOfSubbands(RArray< TUint > &)

IMPORT_C TInt GetSupportedNumOfSubbands ( RArray < TUint > & aSupportedNumOfSubbands ) [virtual]
Retrieves the number of subbands supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedNumOfSubbands Returns an array of supported subbands. Calls a subfunction which sends the appropriate custom command to its message handler. A subfunction is used to contain multiple leaving functions for a single trap. (other items were commented in a header).

Parameters

RArray < TUint > & aSupportedNumOfSubbands array returning the supported number of subbands.

GetSupportedNumOfSubbandsL(RArray< TUint > &)

void GetSupportedNumOfSubbandsL ( RArray < TUint > & aSupportedNumOfSubbands ) [private]
Called by GetSupportedNumOfSubbands under trap harness. Retrieves the allocation methods supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedNumOfSubbandsL Returns an array of supported subbands. Sends the custom command for this function to its message handler. This requires two commands. The first is a request for the number of supported subbands. A buffer is allocated locally to hold this number of subbands that will be returned. A pointer to this buffer is sent with the next command, which is a request for the subbands. This buffer will be filled with the subband values. These values are then copied into the array provided to this function and the local buffer is deleted. (other items were commented in a header).

Parameters

RArray < TUint > & aSupportedNumOfSubbands

GetSupportedSamplingFrequencies(RArray< TUint > &)

IMPORT_C TInt GetSupportedSamplingFrequencies ( RArray < TUint > & aSupportedSamplingFrequencies ) [virtual]
Retrieves the sampling frequencies supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedSamplingFrequencies Returns an array of supported sampling frequencies. Calls a subfunction, which sends the appropriate custom command to its message handler. A subfunction is used to contain multiple leaving functions in a single trap. (other items were commented in a header).

Parameters

RArray < TUint > & aSupportedSamplingFrequencies array returning the supported frequencies.

GetSupportedSamplingFrequenciesL(RArray< TUint > &)

void GetSupportedSamplingFrequenciesL ( RArray < TUint > & aSupportedSamplingFrequencies ) [private]
Called by GetSupportedSamplingFrequencies under trap harness. Retrieves the sampling frequencies supported by the encoder.
Since
S60 3.0
CSbcEncoderIntfcProxy::GetSupportedSamplingFrequenciesL Returns an array of supported sampling frequencies. Sends the custom command for this function to its message handler. This requires two commands. The first is a request for the number of supported sampling frequencies. A buffer is allocated locally to hold this number of frequencies that will be returned. A pointer to this buffer is sent with the next command, which is a request for the frequencies. This buffer will be filled with the frequency values. These values are then copied into the array provided to this function and the local buffer is deleted. (other items were commented in a header).

Parameters

RArray < TUint > & aSupportedSamplingFrequencies array returning the supported frequencies.

NewL(TMMFMessageDestinationPckg, MCustomCommand &, CCustomInterfaceUtility *)

IMPORT_C CSbcEncoderIntfcProxy * NewL ( TMMFMessageDestinationPckg aMessageHandler,
MCustomCommand & aCustomCommand,
CCustomInterfaceUtility * aCustomInterfaceUtility
) [static]

Two-phased constructor.

CSbcEncoderIntfcProxy::NewL Two-phased constructor.

Parameters

TMMFMessageDestinationPckg aMessageHandler
MCustomCommand & aCustomCommand
CCustomInterfaceUtility * aCustomInterfaceUtility

PopulateArrayL(RArray< TUint > &, TPtr8, TUint)

void PopulateArrayL ( RArray < TUint > & aArray,
TPtr8 aPtr,
TUint aCount
) [private]

CSbcEncoderIntfcProxy::PopulateArrayL Utility method that reads stream from 8-bit descriptor, converts it to TUint data items and then copies them to the aArray. (other items were commented in a header).

Parameters

RArray < TUint > & aArray
TPtr8 aPtr
TUint aCount

SetAllocationMethod(TSbcAllocationMethod)

IMPORT_C void SetAllocationMethod ( TSbcAllocationMethod aAllocationMethod ) [virtual]
Sets the allocation method for encoding.
Since
S60 3.0
CSbcEncoderIntfcProxy::SetAllocationMethod Saves locally requested allocation method. Change does not apply to the encoder until ApplyConfig() is called. (other items were commented in a header).

Parameters

TSbcAllocationMethod aAllocationMethod requested encoding allocation method.

SetBitpoolSize(TUint)

IMPORT_C void SetBitpoolSize ( TUint aBitpoolSize ) [virtual]
Sets the bitpool size for encoding.
Since
S60 3.0
CSbcEncoderIntfcProxy::SetBitpoolSize Saves locally requested bitpool range. Change does not apply to the encoder until ApplyConfig() is called. (other items were commented in a header).

Parameters

TUint aBitpoolSize requested encoding number of blocks.

SetChannelMode(TSbcChannelMode)

IMPORT_C void SetChannelMode ( TSbcChannelMode aChannelMode ) [virtual]
Sets the channel mode for encoding.
Since
S60 3.0
CSbcEncoderIntfcProxy::SetChannelMode Saves locally requested channel mode. Change does not apply to the encoder until ApplyConfig() is called. (other items were commented in a header).

Parameters

TSbcChannelMode aChannelMode requested encoding channel mode.

SetNumOfBlocks(TUint)

IMPORT_C void SetNumOfBlocks ( TUint aNumOfBlocks ) [virtual]
Sets the number of blocks for encoding.
Since
S60 3.0
CSbcEncoderIntfcProxy::SetNumOfBlocks Saves locally requested number of blocks. Change does not apply to the encoder until ApplyConfig() is called. (other items were commented in a header).

Parameters

TUint aNumOfBlocks requested encoding number of blocks.

SetNumOfSubbands(TUint)

IMPORT_C void SetNumOfSubbands ( TUint aNumOfSubbands ) [virtual]
Sets the number of subbands for encoding.
Since
S60 3.0
CSbcEncoderIntfcProxy::SetNumOfSubbands Saves locally requested number of subbands. Change does not apply to the encoder until ApplyConfig() is called. (other items were commented in a header).

Parameters

TUint aNumOfSubbands

SetSamplingFrequency(TUint)

IMPORT_C void SetSamplingFrequency ( TUint aSamplingFrequency ) [virtual]
Sets the sampling frequency for encoding.
Since
S60 3.0
CSbcEncoderIntfcProxy::SetSamplingFrequency Saves locally requested sampling frequency. Change does not apply to the encoder until ApplyConfig() is called. (other items were commented in a header).

Parameters

TUint aSamplingFrequency requested encoding sampling frequency.

Member Data Documentation

MCustomCommand & iCustomCommand

MCustomCommand & iCustomCommand [private]

CCustomInterfaceUtility * iCustomInterfaceUtility

CCustomInterfaceUtility * iCustomInterfaceUtility [private]

TBool iHasBeenApplied

TBool iHasBeenApplied [private]

TMMFMessageDestinationPckg iMessageHandler

TMMFMessageDestinationPckg iMessageHandler [private]

TSbcEncConf iSbcEncConf

TSbcEncConf iSbcEncConf [private]

TSbcEncConf iSbcEncConfCurrent

TSbcEncConf iSbcEncConfCurrent [private]