CCentralRepositoryHandler Class Reference

class CCentralRepositoryHandler : public CBase

it is a wrapper of Central Repository, responsible for the operations that need to access the central respositorhy.

FmPresetUtility.lib
Since
Series 60 3.0_version

Inherits from

Public Member Functions
~CCentralRepositoryHandler ()
void DeletePresetL ( TInt )
void GetFirstPresetL ( TInt &)
void GetNextPresetL ( TInt , TInt &)
void GetNumberOfPresetsL ( TInt &)
CCentralRepositoryHandler * NewL ( TRadioSettings &)
TBool RetrievePresetFavouriteL ( TInt )
TInt RetrievePresetFrequencyL ( TInt )
TFmPresetName RetrievePresetNameL ( TInt )
TUint RetrievePresetPIL ( TInt )
TUint RetrievePresetPTYL ( TInt )
TFmPresetUrl RetrievePresetUrlL ( TInt )
TBool RetrievePresetUserRenameL ( TInt )
void SaveFmPresetSettings ()
void SavePresetFavouriteInfoL ( TInt , TBool )
void SavePresetFrequencyL ( TInt , TInt )
void SavePresetNameL ( TInt , const TFmPresetName &)
void SavePresetPIL ( TInt , TUint )
void SavePresetPTYL ( TInt , TUint )
void SavePresetUrlL ( TInt , const TFmPresetUrl &)
void SavePresetUserRenameInfoL ( TInt , TBool )
Private Member Functions
CCentralRepositoryHandler ( TRadioSettings &)
void ConstructL ()
TBool ConvertStringToChannelFavouriteL (const TDesC8 &)
TUint ConvertStringToChannelPIL (const TDesC8 &)
TUint ConvertStringToChannelPTYL (const TDesC8 &)
TBool ConvertStringToChannelUserRenameL (const TDesC8 &)
void ExternalizeToStreamL (const TPresetChannel &, TDes8 &)
TInt GetPresetL ( TInt , TPresetChannel &)
void InternalizeFromStreamL ( TPresetChannel &, TDes8 &)
void RetrieveInitialSettings ()
void UpdateChannelObjectWithFavouriteInfoL ( TInt , TPresetChannel &, TBool )
void UpdateChannelObjectWithPIL ( TInt , TPresetChannel &, TUint )
void UpdateChannelObjectWithPTYL ( TInt , TPresetChannel &, TUint )
void UpdateChannelObjectWithUserRenameInfoL ( TInt , TPresetChannel &, TBool )
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()
Private Attributes
CRepository * iCentralRepository
TInt iFirstPreset
TRadioSettings * iRadioSettings

Constructor & Destructor Documentation

CCentralRepositoryHandler(TRadioSettings &)

CCentralRepositoryHandler ( TRadioSettings & aRadioSettings ) [private]

Default class constructor.

Parameters

TRadioSettings & aRadioSettings - pointer to the CRadioSettings class

~CCentralRepositoryHandler()

~CCentralRepositoryHandler ( ) [virtual]

Destructor of CCentralRepositoryHandler class.

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

Second phase class constructor.

ConvertStringToChannelFavouriteL(const TDesC8 &)

TBool ConvertStringToChannelFavouriteL ( const TDesC8 & aString ) const [private]

Get the channel favourite info from the externalized stream.

Parameters

const TDesC8 & aString - the raw data received from Central Repository

ConvertStringToChannelPIL(const TDesC8 &)

TUint ConvertStringToChannelPIL ( const TDesC8 & aString ) const [private]

Get the channel PI code from the externalized stream.

Parameters

const TDesC8 & aString - the raw data received from Central Repository

ConvertStringToChannelPTYL(const TDesC8 &)

TUint ConvertStringToChannelPTYL ( const TDesC8 & aString ) const [private]

Get the channel PTY from the externalized stream.

Parameters

const TDesC8 & aString - the raw data received from Central Repository

ConvertStringToChannelUserRenameL(const TDesC8 &)

TBool ConvertStringToChannelUserRenameL ( const TDesC8 & aString ) const [private]

Get the channel user rename info from the externalized stream.

Parameters

const TDesC8 & aString - the raw data received from Central Repository

DeletePresetL(TInt)

void DeletePresetL ( TInt aIndex )

Delete the specified preset. Specifying aIndex == 0, will delete all presets. Has no effect if specified index contains no preset.

Parameters

TInt aIndex

ExternalizeToStreamL(const TPresetChannel &, TDes8 &)

void ExternalizeToStreamL ( const TPresetChannel & aPresetChannel,
TDes8 & aBuffer
) [private]

Externalize the string in the aBuffer.

Parameters

const TPresetChannel & aPresetChannel - reference to the RadioSettings class
TDes8 & aBuffer - the buffer to be externalized

GetFirstPresetL(TInt &)

void GetFirstPresetL ( TInt & aIndex )

Get the index of first preset.

Parameters

TInt & aIndex - the first preset index.

GetNextPresetL(TInt, TInt &)

void GetNextPresetL ( TInt aIndex,
TInt & aNextIndex
)

Get the index of the next preset.

Parameters

TInt aIndex - the first preset index.
TInt & aNextIndex - the next preset index.

GetNumberOfPresetsL(TInt &)

void GetNumberOfPresetsL ( TInt & aNum )

Get the current number of presets.

Parameters

TInt & aNum - the number of presets.

GetPresetL(TInt, TPresetChannel &)

TInt GetPresetL ( TInt aIndex,
TPresetChannel & aPreset
) [private]

Gets stored information of given index and internalizes the stream to aPreset

Parameters

TInt aIndex the index of the stored preset to be read
TPresetChannel & aPreset a reference to TPresetChannel where to internalize from

InternalizeFromStreamL(TPresetChannel &, TDes8 &)

void InternalizeFromStreamL ( TPresetChannel & aPresetChannel,
TDes8 & aBuffer
) [private]

Parameters

TPresetChannel & aPresetChannel - reference to the RadioSettings class
TDes8 & aBuffer - the buffer where to internalize from

NewL(TRadioSettings &)

CCentralRepositoryHandler * NewL ( TRadioSettings & aRadioSettings ) [static]

Two-phased class constructor.

Parameters

TRadioSettings & aRadioSettings pointer to the CRadioSettings class

RetrieveInitialSettings()

void RetrieveInitialSettings ( ) [private]

Retrieves persistent settings from Central Repository.

RetrievePresetFavouriteL(TInt)

TBool RetrievePresetFavouriteL ( TInt aIndex ) const
Retrieve the preset favourite information from Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to retrieve

RetrievePresetFrequencyL(TInt)

TInt RetrievePresetFrequencyL ( TInt aIndex ) const
Retrieve the preset frequency from Central Repository
Since
Series 60 3.0

Parameters

TInt aIndex the index of which preset to retrieve

RetrievePresetNameL(TInt)

TFmPresetName RetrievePresetNameL ( TInt aIndex ) const
Retrieve the preset name from Central Repository
Since
Series 60 3.0

Parameters

TInt aIndex the index of which preset to retrieve

RetrievePresetPIL(TInt)

TUint RetrievePresetPIL ( TInt aIndex ) const
Retrieve the preset PI code (programme identification) from Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to retrieve

RetrievePresetPTYL(TInt)

TUint RetrievePresetPTYL ( TInt aIndex ) const
Retrieve the preset PTY (programme type) from Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to retrieve

RetrievePresetUrlL(TInt)

TFmPresetUrl RetrievePresetUrlL ( TInt aIndex ) const
Retrieve the preset URL from Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to retrieve

RetrievePresetUserRenameL(TInt)

TBool RetrievePresetUserRenameL ( TInt aIndex ) const
Retrieve the preset user rename information from Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to retrieve

SaveFmPresetSettings()

void SaveFmPresetSettings ( )
Save all FmPreset related persistent info back to Central Repository
Since
Series 60 3.0

SavePresetFavouriteInfoL(TInt, TBool)

void SavePresetFavouriteInfoL ( TInt aIndex,
TBool aFav
)
Save channel favourite info back to Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to save
TBool aFav the preset favourite info to be saved

SavePresetFrequencyL(TInt, TInt)

void SavePresetFrequencyL ( TInt aIndex,
TInt aFrequency
)
Save channel preset info back to Central Repository
Since
Series 60 3.0

Parameters

TInt aIndex the index of which preset to save
TInt aFrequency the frequency to be saved

SavePresetNameL(TInt, const TFmPresetName &)

void SavePresetNameL ( TInt aIndex,
const TFmPresetName & aStationName
)
Save channel preset name back to Central Repository
Since
Series 60 3.0

Parameters

TInt aIndex the index of which preset to save
const TFmPresetName & aStationName the preset name to be saved

SavePresetPIL(TInt, TUint)

void SavePresetPIL ( TInt aIndex,
TUint aPI
)
Save channel PI code back to Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to save
TUint aPI the preset programme identification to be saved

SavePresetPTYL(TInt, TUint)

void SavePresetPTYL ( TInt aIndex,
TUint aPTY
)
Save channel PTY (genre) back to Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to save
TUint aPTY the preset programme type to be saved

SavePresetUrlL(TInt, const TFmPresetUrl &)

void SavePresetUrlL ( TInt aIndex,
const TFmPresetUrl & aStationUrl
)
Save channel URL name back to Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to save
const TFmPresetUrl & aStationUrl the preset URL to be saved

SavePresetUserRenameInfoL(TInt, TBool)

void SavePresetUserRenameInfoL ( TInt aIndex,
TBool aUR
)
Save channel user rename info back to Central Repository
Since
Series 60 5.2

Parameters

TInt aIndex the index of which preset to save
TBool aUR the preset user rename info to be saved

UpdateChannelObjectWithFavouriteInfoL(TInt, TPresetChannel &, TBool)

void UpdateChannelObjectWithFavouriteInfoL ( TInt aIndex,
TPresetChannel & aPresetChannel,
TBool aFav
) [private]

Update the current preset channel's favourite information.

Parameters

TInt aIndex - the index of which preset's channel name to be updated
TPresetChannel & aPresetChannel - reference to the CRadioSettings class
TBool aFav - the new channel favourite info to be updated to the preset channel

UpdateChannelObjectWithPIL(TInt, TPresetChannel &, TUint)

void UpdateChannelObjectWithPIL ( TInt aIndex,
TPresetChannel & aPresetChannel,
TUint aPI
) [private]

Update the current preset channel's PI code (programme identification).

Parameters

TInt aIndex - the index of which preset's channel name to be updated
TPresetChannel & aPresetChannel - reference to the CRadioSettings class
TUint aPI - the new channel PI code to be updated to the preset channel

UpdateChannelObjectWithPTYL(TInt, TPresetChannel &, TUint)

void UpdateChannelObjectWithPTYL ( TInt aIndex,
TPresetChannel & aPresetChannel,
TUint aPTY
) [private]

Update the current preset channel's PTY (programme type).

Parameters

TInt aIndex - the index of which preset's channel name to be updated
TPresetChannel & aPresetChannel - reference to the CRadioSettings class
TUint aPTY - the new channel PTY (genre) to be updated to the preset channel

UpdateChannelObjectWithUserRenameInfoL(TInt, TPresetChannel &, TBool)

void UpdateChannelObjectWithUserRenameInfoL ( TInt aIndex,
TPresetChannel & aPresetChannel,
TBool aUR
) [private]

Update the current preset channel's user rename information.

Parameters

TInt aIndex - the index of which preset's channel name to be updated
TPresetChannel & aPresetChannel - reference to the CRadioSettings class
TBool aUR - the new channel user rename info to be updated to the preset channel

Member Data Documentation

CRepository * iCentralRepository

CRepository * iCentralRepository [private]

TInt iFirstPreset

TInt iFirstPreset [private]

TRadioSettings * iRadioSettings

TRadioSettings * iRadioSettings [private]