# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273841009 -10800 # Node ID ee64f059b8e19f93b6df6cbe43b3d8d75aa0e13b # Parent 2e1adbfc62af97f42bd7fa9d91e6c8775ae24eb7 Revision: 201017 Kit: 201019 diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/bmarm/irdataprovideru.def --- a/internetradio2.0/bmarm/irdataprovideru.def Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/bmarm/irdataprovideru.def Fri May 14 15:43:29 2010 +0300 @@ -11,14 +11,13 @@ _ZN21CIRLogoDownloadEngine13GetCacheLogoLERK7TDesC16Ri @ 10 NONAME _ZN21CIRLogoDownloadEngine13SendCacheLogoEv @ 11 NONAME _ZN21CIRLogoDownloadEngine13isLogoCachedLEP13CIRIsdsPresetii @ 12 NONAME - _ZN21CIRLogoDownloadEngine16SetFavDbInstanceEP14CIRFavoritesDb @ 13 NONAME - _ZN21CIRLogoDownloadEngine17CancelTransactionEv @ 14 NONAME - _ZN21CIRLogoDownloadEngine19SendPresetWithLogoLEv @ 15 NONAME - _ZN21CIRLogoDownloadEngine4NewLEv @ 16 NONAME - _ZN21CIRLogoDownloadEngineD0Ev @ 17 NONAME - _ZN21CIRLogoDownloadEngineD1Ev @ 18 NONAME - _ZN21CIRLogoDownloadEngineD2Ev @ 19 NONAME - _ZNK21CIRLogoDownloadEngine9IsRunningEv @ 20 NONAME - _ZTI21CIRLogoDownloadEngine @ 21 NONAME - _ZTV21CIRLogoDownloadEngine @ 22 NONAME + _ZN21CIRLogoDownloadEngine17CancelTransactionEv @ 13 NONAME + _ZN21CIRLogoDownloadEngine19SendPresetWithLogoLEv @ 14 NONAME + _ZN21CIRLogoDownloadEngine4NewLEv @ 15 NONAME + _ZN21CIRLogoDownloadEngineD0Ev @ 16 NONAME + _ZN21CIRLogoDownloadEngineD1Ev @ 17 NONAME + _ZN21CIRLogoDownloadEngineD2Ev @ 18 NONAME + _ZNK21CIRLogoDownloadEngine9IsRunningEv @ 19 NONAME + _ZTI21CIRLogoDownloadEngine @ 20 NONAME + _ZTV21CIRLogoDownloadEngine @ 21 NONAME diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/bmarm/irsettingsu.def --- a/internetradio2.0/bmarm/irsettingsu.def Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/bmarm/irsettingsu.def Fri May 14 15:43:29 2010 +0300 @@ -1,73 +1,40 @@ EXPORTS _ZN11CIRSettings11SetTimeOutLEi @ 1 NONAME - _ZN11CIRSettings12SetBearerIdLEm @ 2 NONAME - _ZN11CIRSettings13GetStereoModeEv @ 3 NONAME - _ZN11CIRSettings13SetNetworkIdLEm @ 4 NONAME - _ZN11CIRSettings14MaxPresetCountEv @ 5 NONAME - _ZN11CIRSettings14SetStereoModeLEi @ 6 NONAME - _ZN11CIRSettings15IsFlagIfAnyFavLEv @ 7 NONAME - _ZN11CIRSettings15SetISDSBaseUrlLERK7TDesC16 @ 8 NONAME - _ZN11CIRSettings16SetFlagIfAnyFavLEv @ 9 NONAME - _ZN11CIRSettings16SetIrappVersionLERK7TDesC16 @ 10 NONAME - _ZN11CIRSettings16SetLogRunningNoLEv @ 11 NONAME - _ZN11CIRSettings16SetSubscriberIdLERK4TBufILi15EE @ 12 NONAME - _ZN11CIRSettings17SetDestinationIdLEm @ 13 NONAME - _ZN11CIRSettings17SetSilencePeriodLEj @ 14 NONAME - _ZN11CIRSettings17SetVolumeSettingLEi @ 15 NONAME - _ZN11CIRSettings18GetStickyViewFlagLEv @ 16 NONAME - _ZN11CIRSettings18IsFlagCostWarningLEv @ 17 NONAME - _ZN11CIRSettings18IsUpdateAvailableLEv @ 18 NONAME - _ZN11CIRSettings18SetMaxPresetCountLEi @ 19 NONAME - _ZN11CIRSettings18SetStartingViewIdLEm @ 20 NONAME - _ZN11CIRSettings18SetStickyViewFlagLEi @ 21 NONAME - _ZN11CIRSettings18SetTimeCorrectionLEi @ 22 NONAME - _ZN11CIRSettings19SetFlagCostWarningLEv @ 23 NONAME - _ZN11CIRSettings19SetSongHisotryShowLEi @ 24 NONAME - _ZN11CIRSettings19SetUpdateAvailableLEv @ 25 NONAME - _ZN11CIRSettings20Set3GBitrateQualityLEi @ 26 NONAME - _ZN11CIRSettings20SetPreferredQualityLEi @ 27 NONAME - _ZN11CIRSettings21ReSetFlagCostWarningLEv @ 28 NONAME - _ZN11CIRSettings21ReSetUpdateAvailableLEv @ 29 NONAME - _ZN11CIRSettings21SetManuallyAddedChIdLEv @ 30 NONAME - _ZN11CIRSettings22SetDisplayAccessPointLEv @ 31 NONAME - _ZN11CIRSettings22SetGPRSBitrateQualityLEi @ 32 NONAME - _ZN11CIRSettings22SetSilencePeriodStartLERK7TDesC16 @ 33 NONAME - _ZN11CIRSettings22SetWiFiBitrateQualityLEi @ 34 NONAME - _ZN11CIRSettings23SetUserSavedApSettingsLEmmm @ 35 NONAME - _ZN11CIRSettings24ReSetDisplayAccessPointLEv @ 36 NONAME - _ZN11CIRSettings24SetUserDefinedSelectionLEm @ 37 NONAME - _ZN11CIRSettings25IsFlagTermsAndConditionsLEv @ 38 NONAME - _ZN11CIRSettings25SetStartingViewParameterLEm @ 39 NONAME - _ZN11CIRSettings26SetFlagTermsAndConditionsLEv @ 40 NONAME - _ZN11CIRSettings28ReSetFlagTermsAndConditionsLEv @ 41 NONAME - _ZN11CIRSettings5OpenLEv @ 42 NONAME - _ZN11CIRSettings8SetApIdLEm @ 43 NONAME - _ZN11CIRSettings8SetIRIDLERK7TDesC16 @ 44 NONAME - _ZNK11CIRSettings10GetTimeOutEv @ 45 NONAME - _ZNK11CIRSettings11PrivatePathEv @ 46 NONAME - _ZNK11CIRSettings12GetBearerIdLEv @ 47 NONAME - _ZNK11CIRSettings13GetNetworkIdLEv @ 48 NONAME - _ZNK11CIRSettings13SubscriberIdLEv @ 49 NONAME - _ZNK11CIRSettings14TimeCorrectionEv @ 50 NONAME - _ZNK11CIRSettings15GetISDSBaseUrlLEv @ 51 NONAME - _ZNK11CIRSettings15GetLogRunningNoEv @ 52 NONAME - _ZNK11CIRSettings16GetIrappVersionLEv @ 53 NONAME - _ZNK11CIRSettings16GetVolumeSettingEv @ 54 NONAME - _ZNK11CIRSettings17GetDestinationIdLEv @ 55 NONAME - _ZNK11CIRSettings17GetSilencePeriodLEv @ 56 NONAME - _ZNK11CIRSettings18GetSongHistoryShowEv @ 57 NONAME - _ZNK11CIRSettings18GetStartingViewIdLEv @ 58 NONAME - _ZNK11CIRSettings19DisplayAccessPointLEv @ 59 NONAME - _ZNK11CIRSettings19Get3GBitrateQualityEv @ 60 NONAME - _ZNK11CIRSettings19GetPreferredQualityEv @ 61 NONAME - _ZNK11CIRSettings20GetManuallyAddedChIdEv @ 62 NONAME - _ZNK11CIRSettings21GetGPRSBitrateQualityEv @ 63 NONAME - _ZNK11CIRSettings21GetWiFiBitrateQualityEv @ 64 NONAME - _ZNK11CIRSettings22GetSilencePeriodStartLEv @ 65 NONAME - _ZNK11CIRSettings23GetUserSavedApSettingsLERmS0_S0_ @ 66 NONAME - _ZNK11CIRSettings24GetUserDefinedSelectionLEv @ 67 NONAME - _ZNK11CIRSettings25GetStartingViewParameterLEv @ 68 NONAME - _ZNK11CIRSettings8GetApIdLEv @ 69 NONAME - _ZNK11CIRSettings8GetIRIDLEv @ 70 NONAME - _ZN11CIRSettings17GetGlobalAdvFlagLEv @ 71 NONAME + _ZN11CIRSettings14MaxPresetCountEv @ 2 NONAME + _ZN11CIRSettings15SetISDSBaseUrlLERK7TDesC16 @ 3 NONAME + _ZN11CIRSettings16SetLogRunningNoLEv @ 4 NONAME + _ZN11CIRSettings17GetGlobalAdvFlagLEv @ 5 NONAME + _ZN11CIRSettings17SetSilencePeriodLEj @ 6 NONAME + _ZN11CIRSettings17SetVolumeSettingLEi @ 7 NONAME + _ZN11CIRSettings18IsUpdateAvailableLEv @ 8 NONAME + _ZN11CIRSettings18SetMaxPresetCountLEi @ 9 NONAME + _ZN11CIRSettings18SetStartingViewIdLEm @ 10 NONAME + _ZN11CIRSettings18SetTimeCorrectionLEi @ 11 NONAME + _ZN11CIRSettings19SetSongHisotryShowLEi @ 12 NONAME + _ZN11CIRSettings19SetUpdateAvailableLEv @ 13 NONAME + _ZN11CIRSettings20SetPreferredQualityLEi @ 14 NONAME + _ZN11CIRSettings21ReSetUpdateAvailableLEv @ 15 NONAME + _ZN11CIRSettings22SetSilencePeriodStartLERK7TDesC16 @ 16 NONAME + _ZN11CIRSettings25IsFlagTermsAndConditionsLEv @ 17 NONAME + _ZN11CIRSettings26SetFlagTermsAndConditionsLEv @ 18 NONAME + _ZN11CIRSettings28ReSetFlagTermsAndConditionsLEv @ 19 NONAME + _ZN11CIRSettings5OpenLEv @ 20 NONAME + _ZN11CIRSettings8SetIRIDLERK7TDesC16 @ 21 NONAME + _ZNK11CIRSettings10GetTimeOutEv @ 22 NONAME + _ZNK11CIRSettings11PrivatePathEv @ 23 NONAME + _ZNK11CIRSettings14TimeCorrectionEv @ 24 NONAME + _ZNK11CIRSettings15GetISDSBaseUrlLEv @ 25 NONAME + _ZNK11CIRSettings15GetLogRunningNoEv @ 26 NONAME + _ZNK11CIRSettings16GetIrappVersionLEv @ 27 NONAME + _ZNK11CIRSettings16GetVolumeSettingEv @ 28 NONAME + _ZNK11CIRSettings17GetSilencePeriodLEv @ 29 NONAME + _ZNK11CIRSettings18GetSongHistoryShowEv @ 30 NONAME + _ZNK11CIRSettings18GetStartingViewIdLEv @ 31 NONAME + _ZNK11CIRSettings19GetPreferredQualityEv @ 32 NONAME + _ZNK11CIRSettings22GetSilencePeriodStartLEv @ 33 NONAME + _ZNK11CIRSettings8GetIRIDLEv @ 34 NONAME + _ZN11CIRSettings30SetManuallyInputtedStationUrlLERK7TDesC16 @ 35 NONAME + _ZN11CIRSettings31SetManuallyInputtedStationNameLERK7TDesC16 @ 36 NONAME + _ZNK11CIRSettings30GetManuallyInputtedStationUrlLEv @ 37 NONAME + _ZNK11CIRSettings31GetManuallyInputtedStationNameLEv @ 38 NONAME diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/bwinscw/irdataprovideru.def --- a/internetradio2.0/bwinscw/irdataprovideru.def Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/bwinscw/irdataprovideru.def Fri May 14 15:43:29 2010 +0300 @@ -15,7 +15,5 @@ ?SendPresetWithLogoL@CIRLogoDownloadEngine@@QAEXXZ @ 14 NONAME ; void CIRLogoDownloadEngine::SendPresetWithLogoL(void) ?SendRequestL@CIRLogoDownloadEngine@@QAEXPAVCIRIsdsPreset@@HH@Z @ 15 NONAME ; void CIRLogoDownloadEngine::SendRequestL(class CIRIsdsPreset *, int, int) ?SendRequestL@CIRLogoDownloadEngine@@QAEXPAVCIRIsdsPreset@@PAVMLogoDownloadObserver@@HHH@Z @ 16 NONAME ; void CIRLogoDownloadEngine::SendRequestL(class CIRIsdsPreset *, class MLogoDownloadObserver *, int, int, int) - ?SetFavDbInstance@CIRLogoDownloadEngine@@QAEXPAVCIRFavoritesDb@@@Z @ 17 NONAME ; void CIRLogoDownloadEngine::SetFavDbInstance(class CIRFavoritesDb *) - ?isLogoCachedL@CIRLogoDownloadEngine@@QAEHPAVCIRIsdsPreset@@HH@Z @ 18 NONAME ; int CIRLogoDownloadEngine::isLogoCachedL(class CIRIsdsPreset *, int, int) - _E32Dll=__E32Dll ; Entry point for emulation + ?isLogoCachedL@CIRLogoDownloadEngine@@QAEHPAVCIRIsdsPreset@@HH@Z @ 17 NONAME ; int CIRLogoDownloadEngine::isLogoCachedL(class CIRIsdsPreset *, int, int) diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/bwinscw/irsettingsu.def --- a/internetradio2.0/bwinscw/irsettingsu.def Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/bwinscw/irsettingsu.def Fri May 14 15:43:29 2010 +0300 @@ -1,73 +1,40 @@ EXPORTS - ?DisplayAccessPointL@CIRSettings@@QBEHXZ @ 1 NONAME ; int CIRSettings::DisplayAccessPointL(void) const - ?Get3GBitrateQuality@CIRSettings@@QBEHXZ @ 2 NONAME ; int CIRSettings::Get3GBitrateQuality(void) const - ?GetApIdL@CIRSettings@@QBEKXZ @ 3 NONAME ; unsigned long CIRSettings::GetApIdL(void) const - ?GetBearerIdL@CIRSettings@@QBEKXZ @ 4 NONAME ; unsigned long CIRSettings::GetBearerIdL(void) const - ?GetDestinationIdL@CIRSettings@@QBEKXZ @ 5 NONAME ; unsigned long CIRSettings::GetDestinationIdL(void) const - ?GetGPRSBitrateQuality@CIRSettings@@QBEHXZ @ 6 NONAME ; int CIRSettings::GetGPRSBitrateQuality(void) const - ?GetIRIDL@CIRSettings@@QBEABVTDesC16@@XZ @ 7 NONAME ; class TDesC16 const & CIRSettings::GetIRIDL(void) const - ?GetISDSBaseUrlL@CIRSettings@@QBEABVTDesC16@@XZ @ 8 NONAME ; class TDesC16 const & CIRSettings::GetISDSBaseUrlL(void) const + ?GetStartingViewIdL@CIRSettings@@QBEKXZ @ 1 NONAME ; unsigned long CIRSettings::GetStartingViewIdL(void) const + ?SetTimeOutL@CIRSettings@@QAEXH@Z @ 2 NONAME ; void CIRSettings::SetTimeOutL(int) + ?SetPreferredQualityL@CIRSettings@@QAEXH@Z @ 3 NONAME ; void CIRSettings::SetPreferredQualityL(int) + ?GetSilencePeriodStartL@CIRSettings@@QBEABVTDesC16@@XZ @ 4 NONAME ; class TDesC16 const & CIRSettings::GetSilencePeriodStartL(void) const + ?SetStartingViewIdL@CIRSettings@@QAEXK@Z @ 5 NONAME ; void CIRSettings::SetStartingViewIdL(unsigned long) + ?MaxPresetCount@CIRSettings@@QAEHXZ @ 6 NONAME ; int CIRSettings::MaxPresetCount(void) + ?GetISDSBaseUrlL@CIRSettings@@QBEABVTDesC16@@XZ @ 7 NONAME ; class TDesC16 const & CIRSettings::GetISDSBaseUrlL(void) const + ?IsUpdateAvailableL@CIRSettings@@QAEHXZ @ 8 NONAME ; int CIRSettings::IsUpdateAvailableL(void) ?GetIrappVersionL@CIRSettings@@QBEABVTDesC16@@XZ @ 9 NONAME ; class TDesC16 const & CIRSettings::GetIrappVersionL(void) const - ?GetLogRunningNo@CIRSettings@@QBEHXZ @ 10 NONAME ; int CIRSettings::GetLogRunningNo(void) const - ?GetManuallyAddedChId@CIRSettings@@QBEHXZ @ 11 NONAME ; int CIRSettings::GetManuallyAddedChId(void) const - ?GetNetworkIdL@CIRSettings@@QBEKXZ @ 12 NONAME ; unsigned long CIRSettings::GetNetworkIdL(void) const - ?GetPreferredQuality@CIRSettings@@QBEHXZ @ 13 NONAME ; int CIRSettings::GetPreferredQuality(void) const - ?GetSilencePeriodL@CIRSettings@@QBEIXZ @ 14 NONAME ; unsigned int CIRSettings::GetSilencePeriodL(void) const - ?GetSilencePeriodStartL@CIRSettings@@QBEABVTDesC16@@XZ @ 15 NONAME ; class TDesC16 const & CIRSettings::GetSilencePeriodStartL(void) const - ?GetStartingViewIdL@CIRSettings@@QBEKXZ @ 16 NONAME ; unsigned long CIRSettings::GetStartingViewIdL(void) const - ?GetStartingViewParameterL@CIRSettings@@QBEKXZ @ 17 NONAME ; unsigned long CIRSettings::GetStartingViewParameterL(void) const - ?GetStereoMode@CIRSettings@@QAEHXZ @ 18 NONAME ; int CIRSettings::GetStereoMode(void) - ?GetStickyViewFlagL@CIRSettings@@QAEHXZ @ 19 NONAME ; int CIRSettings::GetStickyViewFlagL(void) - ?GetTimeOut@CIRSettings@@QBEHXZ @ 20 NONAME ; int CIRSettings::GetTimeOut(void) const - ?GetUserDefinedSelectionL@CIRSettings@@QBEKXZ @ 21 NONAME ; unsigned long CIRSettings::GetUserDefinedSelectionL(void) const - ?GetUserSavedApSettingsL@CIRSettings@@QBEXAAK00@Z @ 22 NONAME ; void CIRSettings::GetUserSavedApSettingsL(unsigned long &, unsigned long &, unsigned long &) const - ?GetVolumeSetting@CIRSettings@@QBEHXZ @ 23 NONAME ; int CIRSettings::GetVolumeSetting(void) const - ?GetWiFiBitrateQuality@CIRSettings@@QBEHXZ @ 24 NONAME ; int CIRSettings::GetWiFiBitrateQuality(void) const - ?IsFlagCostWarningL@CIRSettings@@QAEHXZ @ 25 NONAME ; int CIRSettings::IsFlagCostWarningL(void) - ?IsFlagIfAnyFavL@CIRSettings@@QAEHXZ @ 26 NONAME ; int CIRSettings::IsFlagIfAnyFavL(void) - ?IsFlagTermsAndConditionsL@CIRSettings@@QAEHXZ @ 27 NONAME ; int CIRSettings::IsFlagTermsAndConditionsL(void) - ?IsUpdateAvailableL@CIRSettings@@QAEHXZ @ 28 NONAME ; int CIRSettings::IsUpdateAvailableL(void) - ?MaxPresetCount@CIRSettings@@QAEHXZ @ 29 NONAME ; int CIRSettings::MaxPresetCount(void) - ?OpenL@CIRSettings@@SAPAV1@XZ @ 30 NONAME ; class CIRSettings * CIRSettings::OpenL(void) - ?PrivatePath@CIRSettings@@QBEABVTDesC16@@XZ @ 31 NONAME ; class TDesC16 const & CIRSettings::PrivatePath(void) const - ?ReSetDisplayAccessPointL@CIRSettings@@QAEXXZ @ 32 NONAME ; void CIRSettings::ReSetDisplayAccessPointL(void) - ?ReSetFlagCostWarningL@CIRSettings@@QAEXXZ @ 33 NONAME ; void CIRSettings::ReSetFlagCostWarningL(void) - ?ReSetFlagTermsAndConditionsL@CIRSettings@@QAEXXZ @ 34 NONAME ; void CIRSettings::ReSetFlagTermsAndConditionsL(void) - ?ReSetUpdateAvailableL@CIRSettings@@QAEXXZ @ 35 NONAME ; void CIRSettings::ReSetUpdateAvailableL(void) - ?Set3GBitrateQualityL@CIRSettings@@QAEXH@Z @ 36 NONAME ; void CIRSettings::Set3GBitrateQualityL(int) - ?SetApIdL@CIRSettings@@QAEXK@Z @ 37 NONAME ; void CIRSettings::SetApIdL(unsigned long) - ?SetBearerIdL@CIRSettings@@QAEXK@Z @ 38 NONAME ; void CIRSettings::SetBearerIdL(unsigned long) - ?SetDestinationIdL@CIRSettings@@QAEXK@Z @ 39 NONAME ; void CIRSettings::SetDestinationIdL(unsigned long) - ?SetDisplayAccessPointL@CIRSettings@@QAEXXZ @ 40 NONAME ; void CIRSettings::SetDisplayAccessPointL(void) - ?SetFlagCostWarningL@CIRSettings@@QAEXXZ @ 41 NONAME ; void CIRSettings::SetFlagCostWarningL(void) - ?SetFlagIfAnyFavL@CIRSettings@@QAEXXZ @ 42 NONAME ; void CIRSettings::SetFlagIfAnyFavL(void) - ?SetFlagTermsAndConditionsL@CIRSettings@@QAEXXZ @ 43 NONAME ; void CIRSettings::SetFlagTermsAndConditionsL(void) - ?SetGPRSBitrateQualityL@CIRSettings@@QAEXH@Z @ 44 NONAME ; void CIRSettings::SetGPRSBitrateQualityL(int) - ?SetIRIDL@CIRSettings@@QAEXABVTDesC16@@@Z @ 45 NONAME ; void CIRSettings::SetIRIDL(class TDesC16 const &) - ?SetISDSBaseUrlL@CIRSettings@@QAEXABVTDesC16@@@Z @ 46 NONAME ; void CIRSettings::SetISDSBaseUrlL(class TDesC16 const &) - ?SetIrappVersionL@CIRSettings@@QAEXABVTDesC16@@@Z @ 47 NONAME ; void CIRSettings::SetIrappVersionL(class TDesC16 const &) - ?SetLogRunningNoL@CIRSettings@@QAEXXZ @ 48 NONAME ; void CIRSettings::SetLogRunningNoL(void) - ?SetManuallyAddedChIdL@CIRSettings@@QAEXXZ @ 49 NONAME ; void CIRSettings::SetManuallyAddedChIdL(void) - ?SetMaxPresetCountL@CIRSettings@@QAEXH@Z @ 50 NONAME ; void CIRSettings::SetMaxPresetCountL(int) - ?SetNetworkIdL@CIRSettings@@QAEXK@Z @ 51 NONAME ; void CIRSettings::SetNetworkIdL(unsigned long) - ?SetPreferredQualityL@CIRSettings@@QAEXH@Z @ 52 NONAME ; void CIRSettings::SetPreferredQualityL(int) - ?SetSilencePeriodL@CIRSettings@@QAEXI@Z @ 53 NONAME ; void CIRSettings::SetSilencePeriodL(unsigned int) - ?SetSilencePeriodStartL@CIRSettings@@QAEXABVTDesC16@@@Z @ 54 NONAME ; void CIRSettings::SetSilencePeriodStartL(class TDesC16 const &) - ?SetStartingViewIdL@CIRSettings@@QAEXK@Z @ 55 NONAME ; void CIRSettings::SetStartingViewIdL(unsigned long) - ?SetStartingViewParameterL@CIRSettings@@QAEXK@Z @ 56 NONAME ; void CIRSettings::SetStartingViewParameterL(unsigned long) - ?SetStereoModeL@CIRSettings@@QAEXH@Z @ 57 NONAME ; void CIRSettings::SetStereoModeL(int) - ?SetStickyViewFlagL@CIRSettings@@QAEXH@Z @ 58 NONAME ; void CIRSettings::SetStickyViewFlagL(int) - ?SetSubscriberIdL@CIRSettings@@QAEXABV?$TBuf@$0P@@@@Z @ 59 NONAME ; void CIRSettings::SetSubscriberIdL(class TBuf<15> const &) - ?SetTimeCorrectionL@CIRSettings@@QAEXH@Z @ 60 NONAME ; void CIRSettings::SetTimeCorrectionL(int) - ?SetTimeOutL@CIRSettings@@QAEXH@Z @ 61 NONAME ; void CIRSettings::SetTimeOutL(int) - ?SetUpdateAvailableL@CIRSettings@@QAEXXZ @ 62 NONAME ; void CIRSettings::SetUpdateAvailableL(void) - ?SetUserDefinedSelectionL@CIRSettings@@QAEXK@Z @ 63 NONAME ; void CIRSettings::SetUserDefinedSelectionL(unsigned long) - ?SetUserSavedApSettingsL@CIRSettings@@QAEXKKK@Z @ 64 NONAME ; void CIRSettings::SetUserSavedApSettingsL(unsigned long, unsigned long, unsigned long) - ?SetVolumeSettingL@CIRSettings@@QAEXH@Z @ 65 NONAME ; void CIRSettings::SetVolumeSettingL(int) - ?SetWiFiBitrateQualityL@CIRSettings@@QAEXH@Z @ 66 NONAME ; void CIRSettings::SetWiFiBitrateQualityL(int) - ?SubscriberIdL@CIRSettings@@QBEABV?$TBuf@$0P@@@XZ @ 67 NONAME ; class TBuf<15> const & CIRSettings::SubscriberIdL(void) const - ?TimeCorrection@CIRSettings@@QBEHXZ @ 68 NONAME ; int CIRSettings::TimeCorrection(void) const - ?GetSongHistoryShow@CIRSettings@@QBEHXZ @ 69 NONAME ; int CIRSettings::GetSongHistoryShow(void) const - ?SetSongHisotryShowL@CIRSettings@@QAEXH@Z @ 70 NONAME ; void CIRSettings::SetSongHisotryShowL(int) - ?GetGlobalAdvFlagL@CIRSettings@@QAEHXZ @ 71 NONAME ; int CIRSettings::GetGlobalAdvFlagL(void) + ?OpenL@CIRSettings@@SAPAV1@XZ @ 10 NONAME ; class CIRSettings * CIRSettings::OpenL(void) + ?IsFlagTermsAndConditionsL@CIRSettings@@QAEHXZ @ 11 NONAME ; int CIRSettings::IsFlagTermsAndConditionsL(void) + ?SetSongHisotryShowL@CIRSettings@@QAEXH@Z @ 12 NONAME ; void CIRSettings::SetSongHisotryShowL(int) + ?SetSilencePeriodL@CIRSettings@@QAEXI@Z @ 13 NONAME ; void CIRSettings::SetSilencePeriodL(unsigned int) + ?ReSetFlagTermsAndConditionsL@CIRSettings@@QAEXXZ @ 14 NONAME ; void CIRSettings::ReSetFlagTermsAndConditionsL(void) + ?GetLogRunningNo@CIRSettings@@QBEHXZ @ 15 NONAME ; int CIRSettings::GetLogRunningNo(void) const + ?SetMaxPresetCountL@CIRSettings@@QAEXH@Z @ 16 NONAME ; void CIRSettings::SetMaxPresetCountL(int) + ?SetISDSBaseUrlL@CIRSettings@@QAEXABVTDesC16@@@Z @ 17 NONAME ; void CIRSettings::SetISDSBaseUrlL(class TDesC16 const &) + ?SetTimeCorrectionL@CIRSettings@@QAEXH@Z @ 18 NONAME ; void CIRSettings::SetTimeCorrectionL(int) + ?TimeCorrection@CIRSettings@@QBEHXZ @ 19 NONAME ; int CIRSettings::TimeCorrection(void) const + ?SetFlagTermsAndConditionsL@CIRSettings@@QAEXXZ @ 20 NONAME ; void CIRSettings::SetFlagTermsAndConditionsL(void) + ?GetSilencePeriodL@CIRSettings@@QBEIXZ @ 21 NONAME ; unsigned int CIRSettings::GetSilencePeriodL(void) const + ?GetSongHistoryShow@CIRSettings@@QBEHXZ @ 22 NONAME ; int CIRSettings::GetSongHistoryShow(void) const + ?PrivatePath@CIRSettings@@QBEABVTDesC16@@XZ @ 23 NONAME ; class TDesC16 const & CIRSettings::PrivatePath(void) const + ?GetPreferredQuality@CIRSettings@@QBEHXZ @ 24 NONAME ; int CIRSettings::GetPreferredQuality(void) const + ?GetGlobalAdvFlagL@CIRSettings@@QAEHXZ @ 25 NONAME ; int CIRSettings::GetGlobalAdvFlagL(void) + ?GetVolumeSetting@CIRSettings@@QBEHXZ @ 26 NONAME ; int CIRSettings::GetVolumeSetting(void) const + ?SetUpdateAvailableL@CIRSettings@@QAEXXZ @ 27 NONAME ; void CIRSettings::SetUpdateAvailableL(void) + ?SetLogRunningNoL@CIRSettings@@QAEXXZ @ 28 NONAME ; void CIRSettings::SetLogRunningNoL(void) + ?GetIRIDL@CIRSettings@@QBEABVTDesC16@@XZ @ 29 NONAME ; class TDesC16 const & CIRSettings::GetIRIDL(void) const + ?SetSilencePeriodStartL@CIRSettings@@QAEXABVTDesC16@@@Z @ 30 NONAME ; void CIRSettings::SetSilencePeriodStartL(class TDesC16 const &) + ?GetTimeOut@CIRSettings@@QBEHXZ @ 31 NONAME ; int CIRSettings::GetTimeOut(void) const + ?SetVolumeSettingL@CIRSettings@@QAEXH@Z @ 32 NONAME ; void CIRSettings::SetVolumeSettingL(int) + ?SetIRIDL@CIRSettings@@QAEXABVTDesC16@@@Z @ 33 NONAME ; void CIRSettings::SetIRIDL(class TDesC16 const &) + ?ReSetUpdateAvailableL@CIRSettings@@QAEXXZ @ 34 NONAME ; void CIRSettings::ReSetUpdateAvailableL(void) + ?GetManuallyInputtedStationNameL@CIRSettings@@QBEABVTDesC16@@XZ @ 35 NONAME ; class TDesC16 const & CIRSettings::GetManuallyInputtedStationNameL(void) const + ?GetManuallyInputtedStationUrlL@CIRSettings@@QBEABVTDesC16@@XZ @ 36 NONAME ; class TDesC16 const & CIRSettings::GetManuallyInputtedStationUrlL(void) const + ?SetManuallyInputtedStationUrlL@CIRSettings@@QAEXABVTDesC16@@@Z @ 37 NONAME ; void CIRSettings::SetManuallyInputtedStationUrlL(class TDesC16 const &) + ?SetManuallyInputtedStationNameL@CIRSettings@@QAEXABVTDesC16@@@Z @ 38 NONAME ; void CIRSettings::SetManuallyInputtedStationNameL(class TDesC16 const &) diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/cenrep/2000b499.txt Binary file internetradio2.0/cenrep/2000b499.txt has changed diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/dataproviderinc/irlogodownloadengine.h --- a/internetradio2.0/dataproviderinc/irlogodownloadengine.h Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/dataproviderinc/irlogodownloadengine.h Fri May 14 15:43:29 2010 +0300 @@ -30,8 +30,6 @@ #include #include -#include -#include "irfavoritesdb.h" #include "irisdspreset.h" #include "mlogodownloadobserver.h" #include "ircacheobserver.h" @@ -46,7 +44,6 @@ class RHTTPSession; class RHTTPTransaction; class CIRIsdsPreset; -class CIRFavoritesDb; class CIRNetworkController; class MLogoDownloadObserver; class CIRCacheMgmt; //for logo cache mgmt @@ -60,7 +57,6 @@ */ class CIRLogoDownloadEngine : public CBase, public MHTTPTransactionCallback, public MHTTPDataSupplier,public MIRCacheObserver, - public MPSPresetObserver, public MIRActiveNetworkObserver { public: @@ -80,12 +76,6 @@ */ IMPORT_C static CIRLogoDownloadEngine* NewL(); - /** - * void SetFavDbInstance(CIRFavoritesDb* aFavDb) - * To set the favorites db instance - */ - IMPORT_C void SetFavDbInstance(CIRFavoritesDb* aFavDb); - /** * SendRequestL(CIRIsdsPreset* aPreset) * API is called from the SearchResultsView for to download logo @@ -202,14 +192,6 @@ */ void ReleaseResources(); - /** - * HandlePresetChangedL - * whenever their is any change in preset - * the function will get invoked. - * callback API from MPSPresetObserver - */ - void HandlePresetChangedL( TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aReason ); - //from MIRActiveNetworkObserver /** * Notified by network controller when network is active @@ -341,12 +323,7 @@ * pointer to the logo observer object */ MLogoDownloadObserver* iCacheTempLogoHandle; - - /** - * pointer to the favorites db object - */ - CIRFavoritesDb* iFavDb; - + /** * pointer to the preset object * temporary preset in the logo downloading usecase diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp --- a/internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp Fri May 14 15:43:29 2010 +0300 @@ -19,7 +19,7 @@ #include #include #include //to get the supported MIME types -#ifdef _DEBUG +#ifdef ENABLE_USAGE_REPORT_TEST #include #include "irreportsettings.h" #endif @@ -42,6 +42,7 @@ const TInt KMaxSize = 2048; const TInt KBufSize = 10; const TUid KUidHelixController = { 0x101F8514 }; // Helix Video controller UID +const TInt KLogbufferLenth = KLogBufferSize/2 - 1; // --------------------------------------------------------------------------- // CIRHttpDataProvider::CIRHttpDataProvider(MIRHttpDataProviderObserver& @@ -219,7 +220,7 @@ // receive transaction events in MHFRunL and MHFRunError. iHttpTransaction = iHttpSession.OpenTransactionL( uri, *this, method ); -#ifdef _DEBUG +#ifdef ENABLE_USAGE_REPORT_TEST RFs iFs; User::LeaveIfError(iFs.Connect()); @@ -289,7 +290,7 @@ // events via MHFRunL and MHFRunError. iHttpTransaction.SubmitL(); -#ifdef _DEBUG +#ifdef ENABLE_USAGE_REPORT_TEST if ( aRequestInfo.iMethod == EIRHttpPOST ) { _LIT( KSentPrefix, "X__"); @@ -627,8 +628,24 @@ SetHeaderL( header, HTTP::EUserAgent, iIRNetworkControllerHandle->GetUAProfString()->Des() ); logstr.Copy(iIRNetworkControllerHandle->GetUAProfString()->Des()); - IRLOG_DEBUG2( "CIRHttpDataProvider::BuildHeadersL - HTTP::EUserAgent = %S", &logstr ); - + IRLOG_DEBUG( "CIRHttpDataProvider::BuildHeadersL - HTTP::EUserAgent ="); + TInt logstrLenth = logstr.Length(); + TBuf tempStr; + TInt index = 0; + while( logstrLenth > 0 ) + { + if( logstrLenth > KLogbufferLenth ) + { + tempStr.Copy( &logstr[index], KLogbufferLenth ); + } + else + { + tempStr.Copy( &logstr[index], logstrLenth ); + } + IRLOG_DEBUG2( "%S", &tempStr ); + index += KLogbufferLenth; + logstrLenth -= KLogbufferLenth; + } // Set the Accept Character set header SetHeaderL( header, HTTP::EAcceptCharset, KAcceptCharset ); logstr.Copy(KAcceptCharset); @@ -668,7 +685,24 @@ RStringF xWapProfileValueString = iHttpSession.StringPool().OpenFStringL( iIRNetworkControllerHandle->GetWapProfString()->Des() ); logstr.Copy(iIRNetworkControllerHandle->GetWapProfString()->Des()); - IRLOG_DEBUG2( "CIRHttpDataProvider::BuildHeadersL - x-wap-profile = %S", &logstr ); + IRLOG_DEBUG( "CIRHttpDataProvider::BuildHeadersL - x-wap-profile ="); + logstrLenth = logstr.Length(); + index = 0; + while( logstrLenth > 0 ) + { + if( logstrLenth > KLogbufferLenth ) + { + tempStr.Copy( &logstr[index], KLogbufferLenth ); + } + else + { + tempStr.Copy( &logstr[index], logstrLenth ); + } + IRLOG_DEBUG2( "%S", &tempStr ); + index += KLogbufferLenth; + logstrLenth -= KLogbufferLenth; + } + THTTPHdrVal xWapProfileHeader(xWapProfileValueString ); header.SetFieldL(xWapProfileString, xWapProfileHeader); xWapProfileString.Close(); @@ -778,7 +812,23 @@ RStringF xNokiaIrAppAcceptValueString = iHttpSession.StringPool().OpenFStringL( audioMIMEs ); logstr.Copy(audioMIMEs); - IRLOG_DEBUG2( "CIRHttpDataProvider::BuildHeadersL - X-Nokia-iRAPP-Accept = %S", &logstr ); + IRLOG_DEBUG( "CIRHttpDataProvider::BuildHeadersL - X-Nokia-iRAPP-Accept =" ); + logstrLenth = logstr.Length(); + index = 0; + while( logstrLenth > 0 ) + { + if( logstrLenth > KLogbufferLenth ) + { + tempStr.Copy( &logstr[index], KLogbufferLenth ); + } + else + { + tempStr.Copy( &logstr[index], logstrLenth ); + } + IRLOG_DEBUG2( "%S", &tempStr ); + index += KLogbufferLenth; + logstrLenth -= KLogbufferLenth; + } THTTPHdrVal xNokiaIrAppAcceptHeader(xNokiaIrAppAcceptValueString ); header.SetFieldL(xNokiaIrAppAcceptString, xNokiaIrAppAcceptHeader); xNokiaIrAppAcceptString.Close(); diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp --- a/internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp Fri May 14 15:43:29 2010 +0300 @@ -228,20 +228,6 @@ IRLOG_DEBUG( "CIRLogoDownloadEngine::SetHeaderL - Exiting" ); } -// --------------------------------------------------------------------------- -// CIRLogoDownloadEngine::SetFavDbInstance(CIRFavoritesDb* aFavDb) -// To set the favorites db instance -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRLogoDownloadEngine::SetFavDbInstance(CIRFavoritesDb* aFavDb) - { - IRLOG_DEBUG( "CIRLogoDownloadEngine::SetFavDbInstance - Entering" ); - iFavDb = aFavDb; - iFavDb->AddObserver( *this ); - IRLOG_DEBUG( "CIRLogoDownloadEngine::SetFavDbInstance - Exiting" ); - } - - // ---------------------------------------------------------------------------------- // CIRLogoDownloadEngine::SendRequestL(CIRIsdsPreset* aPreset,TInt aXValue,TInt aYValue) // API is called from the SearchResultsView for to download logo while doing Add to Favorites @@ -865,7 +851,6 @@ iTempPreset->SetLogoData(*iRespBody); if(iTempReqFrom == 0)//which means the request came from SearchView while doing Add to Favorite { - iFavDb->ReplacePresetL(*iTempPreset); iPresetModifiedStatus = ETrue; } else if(iTempReqFrom == 1)//which menas the request came from a view other than NowPlayingView @@ -878,7 +863,6 @@ //(2)send the logo to the NPV through PresetLogoDownloadedL //(3)check whether the preset exists in favdb; if so replace that with new logo iTempLogoHandle->PresetLogoDownloadedL(iTempPreset); - //iFavDb->ReplacePresetL(*iTempPreset) } @@ -1509,7 +1493,6 @@ } if(iCacheReqFrom == 0) { - iFavDb->ReplacePresetL(*iCacheTempPreset); iPresetModifiedStatus = ETrue; } else @@ -1528,7 +1511,6 @@ } if(iTempReqFrom == 0) { - iFavDb->ReplacePresetL(*iTempPreset); iPresetModifiedStatus = ETrue; } else @@ -1567,85 +1549,6 @@ IRLOG_DEBUG( "CIRLogoDownloadEngine::ReleaseResources - Exiting" ); } - -// --------------------------------------------------------------------------- -// CIRLogoDownloadEngine::HandlePresetChangedL( TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aType ) -// This is called by CIRFavoritesDb when values of presets stations has been changed -// --------------------------------------------------------------------------- -// -void CIRLogoDownloadEngine::HandlePresetChangedL( TInt aId, TUid aDataHandler, - MPSPresetObserver::TPSReason aReason ) - { - IRLOG_DEBUG( "CIRLogoDownloadEngine::HandlePresetChangedL - Entering" ); - if ( aDataHandler == KIRPreset ) - { - switch ( aReason ) - { - case 0: //MPSPresetObserver::EPSCreated - { -/*d CIRPreset* preset = NULL; - preset = iFavDb->PresetById( aId ); - delete iCopyPreset; - iCopyPreset = NULL; - iCopyPreset = CIRIsdsPreset::NewL(); - preset->CopyPresetData(*iCopyPreset); - if(iCopyPreset->GetChannelType()==1) - { - if(iCopyPreset->GetImgUrl().Length() != 0) - { - if(iCopyPreset->GetLogoData().Length() == 0) - { - SendRequestL(iCopyPreset); - } - } - else - { - //do nothing; - } - } -d*/ } - break; - case 1: //MPSPresetObserver::EPSDeleted: - break; - case 2: //MPSPresetObserver::EPSModified: - { - if(!iFavDb->GetMoveStatus()) - { - if(iPresetModifiedStatus) - { - iPresetModifiedStatus = EFalse; - } - else - { - CIRPreset* preset = NULL; - preset = iFavDb->PresetById( aId ); - delete iCopyPreset; - iCopyPreset = NULL; - iCopyPreset = CIRIsdsPreset::NewL(); - preset->CopyPresetData(*iCopyPreset); - if(iCopyPreset->GetChannelType()==1) - { - if(iCopyPreset->GetImgUrl().Length() != 0) - { - SendRequestL(iCopyPreset,KLogoSize,KLogoSize); - } - else - { - //do nothing; - } - } - } - } - } - break; - default: - break; - } - } - IRLOG_DEBUG( "CIRLogoDownloadEngine::HandlePresetChangedL - Exiting" ); - } - - // ----------------------------------------------------------------------------- // Notified by network controller when network is active, to reissue the request // NotifyActiveNetworkObserversL() diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/datastructuressrc/irchannelserverurl.cpp --- a/internetradio2.0/datastructuressrc/irchannelserverurl.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/datastructuressrc/irchannelserverurl.cpp Fri May 14 15:43:29 2010 +0300 @@ -110,7 +110,12 @@ // EXPORT_C const TDesC& CIRChannelServerUrl::GetServerName() const { - IRLOG_DEBUG( "CIRChannelServerUrl::GetServerName" ); + IRLOG_DEBUG( "CIRChannelServerUrl::GetServerName" ); + if( NULL == iServerName ) + { + CIRChannelServerUrl *tempUrl = const_cast(this); + tempUrl->iServerName = HBufC::NewL(0); + } return *iServerName; } @@ -122,7 +127,12 @@ // EXPORT_C const TDesC& CIRChannelServerUrl::GetServerUrl() const { - IRLOG_DEBUG( "CIRChannelServerUrl::GetServerUrl" ); + IRLOG_DEBUG( "CIRChannelServerUrl::GetServerUrl" ); + if( NULL == iURL ) + { + CIRChannelServerUrl *tempUrl = const_cast(this); + tempUrl->iURL = HBufC::NewL(0); + } return *iURL; } diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/favoritesdbinc/irfavoritesdb.h --- a/internetradio2.0/favoritesdbinc/irfavoritesdb.h Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/favoritesdbinc/irfavoritesdb.h Fri May 14 15:43:29 2010 +0300 @@ -24,7 +24,6 @@ class CIRIsdsPreset; class CIRPreset; -class CIRSettings; class CPSPresetNotifier; @@ -285,8 +284,7 @@ /** The maximum number of supported presets. */ TInt iMaxPresetCount; - /**cenrep handle*/ - CIRSettings *iSettings; + /**type of presets(source)*/ enum TChannelType { diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp --- a/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp Fri May 14 15:43:29 2010 +0300 @@ -27,7 +27,6 @@ const TInt KNullId = 0; const TInt KNineteen = 19; -const TInt KFifty = 50; namespace PresetHandler { @@ -106,11 +105,6 @@ iFavPresetList.Close(); iServ.Close(); - if (iSettings) - { - iSettings->Close(); - } - IRLOG_DEBUG( "CIRFavoritesDb::~CIRFavoritesDb - Exiting." ); } @@ -146,18 +140,17 @@ else { searchResult = SearchPreset( aPreset.GetId(), KNullId ); - } - - if( KErrNotFound != searchResult) - { - //Eventhough the preset exists in the favorites db, replace the - //same with the new preset i.e. aPreset. Because the db should - //contain the updated values of the preset. - ReplacePresetL(aPreset); - - aRetVal = KErrAlreadyExists; + if( KErrNotFound != searchResult) + { + //Eventhough the preset exists in the favorites db, replace the + //same with the new preset i.e. aPreset. Because the db should + //contain the updated values of the preset. + ReplacePresetL(aPreset); + + aRetVal = KErrAlreadyExists; - return; + return; + } } if ( EmptyPresetCount()<=0 ) @@ -237,6 +230,18 @@ IRLOG_DEBUG( "CIRFavoritesDb::DeletePresetL" ); iMoveStatus=EFalse; iServ.DeletePresetL( aId); + + TInt count = iFavPresetList.Count(); + //when we delete one preset in the server's db, we also + //need to delete it in the favorite list. + for( TInt i=0; iId()) + { + iFavPresetList.Remove(i); + break; + } + } IRLOG_DEBUG( "CIRFavoritesDb::DeletePresetL - Exiting." ); } @@ -585,15 +590,16 @@ { IRLOG_DEBUG( "CIRFavoritesDb::ConstructL" ); //cenrep handle - iSettings = CIRSettings::OpenL(); - iSettings->SetMaxPresetCountL(KFifty); + CIRSettings *settings = CIRSettings::OpenL(); + iMaxPresetCount=settings->MaxPresetCount(); + settings->Close(); + User::LeaveIfError( iServ.Connect() ); //a session to the client of the preset server iServ.GetPresetsL( iFavPresetList, KIRPreset ); //notifier iNotifier = CPSPresetNotifier::NewL( iServ, *this ); - //cenrep. - iMaxPresetCount=iSettings->MaxPresetCount(); + //initialization of the list for UI use //iFavPresetList=new(ELeave)CArrayPtrFlat(KGranularity) iMoveStatus=EFalse; diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/filerecognizerinc/irrecognizer.h --- a/internetradio2.0/filerecognizerinc/irrecognizer.h Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/filerecognizerinc/irrecognizer.h Fri May 14 15:43:29 2010 +0300 @@ -76,6 +76,11 @@ * @param aBuffer is buffer containing data to be recognized */ void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + + /* + * try to recognize a m3u file and decide whether it should be launched by InternetRadio application + */ + void RecognizeM3uFileL(const TDesC8& aBuffer); }; #endif //IRRECOGNIZER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/filerecognizersrc/irrecognizer.cpp --- a/internetradio2.0/filerecognizersrc/irrecognizer.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/filerecognizersrc/irrecognizer.cpp Fri May 14 15:43:29 2010 +0300 @@ -27,7 +27,7 @@ // Uid of the recogniser //const TUid KUidIRRecognizer={0x2000B499} // maximum amount of buffer space we will ever use -const TInt KMaxBufferLength=4; +const TInt KMaxBufferLength=4*1024; // If the file name length > 4, the file extension might be valid const TInt KPlsFileExtensionsMightBeValid = 4; const TInt KM3uFileExtensionsMightBeValid = 4; @@ -140,19 +140,24 @@ else if (aName.Right(KM3uFileExtensionsMightBeValid).CompareF( KM3uExtension)==0) { - _LIT8(KHttp, "http://"); - if (KErrNotFound != aBuffer.Find(KHttp)) - { - iConfidence = ECertain; - iDataType = TDataType(KM3uMimeType); - IRLOG_DEBUG("CApaRecognizerEx::DoRecognizeL - Exiting (2)."); - } + RecognizeM3uFileL(aBuffer); + IRLOG_DEBUG( "CApaRecognizerEx::DoRecognizeL - Exiting (2)." ); return; } IRLOG_DEBUG( "CApaRecognizerEx::DoRecognizeL - Exiting (3)." ); } } +void CApaRecognizerEx::RecognizeM3uFileL(const TDesC8& /*aBuffer*/) +{ + // _LIT8(KHttpProtocol, "http"); + // _LIT8(KMmsProtocol, "mms"); + // _LIT8(KRtspProtocol, "rtsp"); + + //try to use descriptor method to parse the buffer + iConfidence = ECertain; + iDataType = TDataType(KM3uMimeType); +} // ----------------------------------------------------------------------------- // ImplementationTable diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/group/common.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/internetradio2.0/group/common.mmp Fri May 14 15:43:29 2010 +0300 @@ -0,0 +1,18 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +//MACRO ENABLE_USAGE_REPORT_TEST \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/group/irdataprovider.mmp --- a/internetradio2.0/group/irdataprovider.mmp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/group/irdataprovider.mmp Fri May 14 15:43:29 2010 +0300 @@ -16,6 +16,7 @@ */ #include +#include "common.mmp" TARGET irdataprovider.dll TARGETTYPE dll diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/group/irnetworkcontroller.mmp --- a/internetradio2.0/group/irnetworkcontroller.mmp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/group/irnetworkcontroller.mmp Fri May 14 15:43:29 2010 +0300 @@ -41,7 +41,6 @@ SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(http) SYSTEMINCLUDE MW_LAYER_PUBLIC_EXPORT_PATH(http) -LIBRARY apengine.lib LIBRARY bafl.lib LIBRARY centralrepository.lib LIBRARY commdb.lib @@ -54,32 +53,9 @@ LIBRARY http.lib LIBRARY inetprotutil.lib LIBRARY cmmanager.lib - - -//test linker error -LIBRARY cenrepnotifhandler.lib -LIBRARY commonengine.lib -LIBRARY etel.lib -LIBRARY etel3rdparty.lib -LIBRARY etelmm.lib -LIBRARY estor.lib -LIBRARY efsrv.lib -LIBRARY xmlframework.lib - -LIBRARY impapprotocolcontroller.lib -LIBRARY imut.lib -LIBRARY netmsg.lib -LIBRARY netmeta.lib -LIBRARY nifman.lib -LIBRARY pops.lib -LIBRARY responsemsg.lib -LIBRARY smts.lib - - -//test end - - -LIBRARY flogger.lib +LIBRARY extendedconnpref.lib +LIBRARY netmeta.lib +LIBRARY flogger.lib //CAPABILITY NetworkServices ProtServ ReadDeviceData ReadUserData SwEvent UserEnvironment WriteDeviceData WriteUserData TrustedUI CAPABILITY CAP_GENERAL_DLL diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/include/irdebug.h --- a/internetradio2.0/include/irdebug.h Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/include/irdebug.h Fri May 14 15:43:29 2010 +0300 @@ -21,7 +21,7 @@ #include - +#include /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // Debug usage @@ -64,10 +64,9 @@ #endif #ifdef IRDEBUG_TRACE_TO_FILE - #include _LIT( KIRDebugLogDirectory, "internetradio" ); _LIT( KIRDebugLogFile, "internetradiolog.txt" ); - const TFileLoggingMode KIRDebugLoggingMode = EFileLoggingModeAppend; + const TFileLoggingMode KIRDebugLoggingMode = EFileLoggingModeAppend; // EFileLoggingModeOverwrite #endif #if IR_DEBUG_LEVEL > IR_DEBUG_LEVEL_NONE diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/include/irinternalcrkeys.h --- a/internetradio2.0/include/irinternalcrkeys.h Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/include/irinternalcrkeys.h Fri May 14 15:43:29 2010 +0300 @@ -24,18 +24,8 @@ /** The UID of the category we use. Must be the same as Visual Radio's UID3 (SID). */ const TUid KCRUidInternetRadio = { 0x2000B499}; - -const TUint32 KIRGprsBitRate = { 0x00000001}; -const TUint32 KIR3GBitRate = { 0x00000002}; -const TUint32 KIRWifiBitRate = { 0x00000003}; -const TUint32 KIRDefaultAccessPoint = { 0x00000004 }; -const TUint32 KIRUserDefinedAccessPoint = { 0x00000005 }; -const TUint32 KIRUserDefinedBearerID = { 0x00000006 }; -const TUint32 KIRUserDefinedNetworkID = { 0x00000007 }; const TUint32 KIRDefaultMaxPresetCount = { 0x00000008 }; -const TUint32 KIRStereoMode = { 0x00000009 }; const TUint32 KIRDefaultPlayVolume = { 0x00000010 }; -const TUint32 KIRCostWarningFlag = { 0x00000011 }; const TUint32 KIRTermsAndConditionsFlag = { 0x00000012 }; const TUint32 KIRUpdateAvailablity = { 0x00000013 }; const TUint32 KIRTimeOutDuration = { 0x00000014 }; @@ -45,19 +35,11 @@ const TUint32 KIRDefaultIrId = { 0x00000018 }; const TUint32 KIRIrappVer = { 0x00000019 }; const TUint32 KIRDefaultTimeCorrection = { 0x00000020 }; -const TUint32 KIRUserDefinedSubscriberId = { 0x00000021 }; const TUint32 KIRUserDefinedLogRunningNumber = { 0x00000022 }; -const TUint32 KIRUserDefinedRunningChannelId = { 0x00000023 }; -//added for ALR/SNAP -const TUint32 KIRUserDefinedSelection = { 0x00000024 }; -const TUint32 KIRUserDefinedDestinationId = {0x00000025 }; - -const TUint32 KIRIfAnyFavFlag = {0x00000026 }; //added for starting view const TUint32 KIRStartingViewId = {0x00000027}; -const TUint32 KIRStartingViewParameter = {0x00000028}; -const TUint32 KIRStickyViewFlag = {0x00000029}; + const TUint32 KIRPreferredQuality = {0x00000030}; //added for songhistory show enable @@ -65,4 +47,8 @@ //added for global advertisement const TUint32 KIRGlobalAdvFlag = {0x00000032}; + +//added for Go to station view +const TUint32 KIRStationUrl = { 0x00000033 }; +const TUint32 KIRStationName = { 0x00000034 }; #endif diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp --- a/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp Fri May 14 15:43:29 2010 +0300 @@ -27,6 +27,7 @@ #include #include #include +#include #include "irdebug.h" #include "irfilteredapreader.h" @@ -337,7 +338,13 @@ { if (iDefaultConnection) { - iIRNetworkConnection->Start(iStatus); + TConnPrefList prefList; + TExtendedConnPref extPrefs; + + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet); + extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnDisableNotes); + prefList.AppendL(&extPrefs); + iIRNetworkConnection->Start(prefList, iStatus); } else { diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/presetpluginsrc/irchannelserverurlimpl.cpp --- a/internetradio2.0/presetpluginsrc/irchannelserverurlimpl.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/presetpluginsrc/irchannelserverurlimpl.cpp Fri May 14 15:43:29 2010 +0300 @@ -96,6 +96,11 @@ // TDesC& CIRChannelServerUrlImpl::GetServerName() { + if( NULL == iServerName ) + { + iServerName = HBufC::NewL(0); + } + return *iServerName; } @@ -106,6 +111,10 @@ // TDesC& CIRChannelServerUrlImpl::GetServerUrl() { + if( NULL == iURL ) + { + iURL = HBufC::NewL(0); + } return *iURL; } diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/settingsinc/irsettings.h --- a/internetradio2.0/settingsinc/irsettings.h Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/settingsinc/irsettings.h Fri May 14 15:43:29 2010 +0300 @@ -17,13 +17,12 @@ #ifndef C_CIRSETTINGS_H #define C_CIRSETTINGS_H -#include #include -#include + +class CRepository; // CLEANUP REQUIRED -const TInt KMaxLengthIAPID = 256; const TInt KMaxLengthIRAppVersion = 50; const TInt KMaxLengthIrId = 32; const TInt KMaxLengthSilencePeriod = 32; @@ -40,25 +39,16 @@ IMPORT_C static CIRSettings* OpenL(); ~CIRSettings(); -// CLEANUP REQUIRED - - IMPORT_C TBool IsFlagCostWarningL(); - IMPORT_C void SetFlagCostWarningL(); - IMPORT_C void ReSetFlagCostWarningL(); IMPORT_C TBool IsFlagTermsAndConditionsL(); IMPORT_C void SetFlagTermsAndConditionsL(); IMPORT_C void ReSetFlagTermsAndConditionsL(); - IMPORT_C void SetIrappVersionL(const TDesC& aIRAppVersion); IMPORT_C const TDesC& GetIrappVersionL() const; - IMPORT_C void SetIRIDL(const TDesC& aIrid); IMPORT_C const TDesC& GetIRIDL() const; IMPORT_C const TDesC& GetISDSBaseUrlL() const; IMPORT_C void SetISDSBaseUrlL(const TDesC& aIsdsUrl); IMPORT_C TInt GetVolumeSetting() const; IMPORT_C void SetVolumeSettingL(TInt aPlayVolume); - IMPORT_C TInt GetManuallyAddedChId() const; - IMPORT_C void SetManuallyAddedChIdL(); IMPORT_C TBool IsUpdateAvailableL(); IMPORT_C void SetUpdateAvailableL(); IMPORT_C void ReSetUpdateAvailableL(); @@ -70,24 +60,6 @@ IMPORT_C TUint GetSilencePeriodL() const; IMPORT_C void SetSilencePeriodStartL(const TDesC& aSilencePeriodStart); IMPORT_C const TDesC& GetSilencePeriodStartL() const; - IMPORT_C TBool DisplayAccessPointL() const; - IMPORT_C void SetDisplayAccessPointL(); - IMPORT_C void ReSetDisplayAccessPointL(); - IMPORT_C void SetBearerIdL(TUint32 aBearerId); - IMPORT_C TUint32 GetBearerIdL() const; - IMPORT_C void SetNetworkIdL(TUint32 aBearerId); - IMPORT_C TUint32 GetNetworkIdL() const; - IMPORT_C void SetApIdL(TUint32 aBearerId); - IMPORT_C TUint32 GetApIdL() const; - IMPORT_C void SetUserSavedApSettingsL( TUint32 aBearerId,TUint32 aNetworkId,TUint32 aApId); - IMPORT_C void GetUserSavedApSettingsL( TUint32& aBearerId, - TUint32& aNetworkId,TUint32& aApId) const; - IMPORT_C void SetGPRSBitrateQualityL(TInt aBitrate); - IMPORT_C TInt GetGPRSBitrateQuality() const; - IMPORT_C void SetWiFiBitrateQualityL(TInt aBitrate); - IMPORT_C TInt GetWiFiBitrateQuality() const; - IMPORT_C void Set3GBitrateQualityL(TInt aBitrate); - IMPORT_C TInt Get3GBitrateQuality() const; IMPORT_C void SetPreferredQualityL(TInt aQualityValue); IMPORT_C TInt GetPreferredQuality() const; IMPORT_C void SetSongHisotryShowL(TInt aShowFlag); @@ -97,56 +69,7 @@ IMPORT_C void SetTimeCorrectionL(TInt aCorrection); IMPORT_C TInt TimeCorrection() const; IMPORT_C const TDesC& PrivatePath() const; - IMPORT_C void SetStereoModeL(TInt val); - IMPORT_C TInt GetStereoMode(); - - //Methods to determine if any channel was added to favorites - IMPORT_C TBool IsFlagIfAnyFavL(); - IMPORT_C void SetFlagIfAnyFavL(); - - //Added for ALR/SNAP - /** - * SetUserDefinedSelectionL() - * Sets the UserDefinedSelection in cenrep - */ - IMPORT_C void SetUserDefinedSelectionL(TUint32 aUserDefinedSelection); - - /** - * GetUserDefinedSelectionL() - * Gets the UserDefinedSelection from cenrep - */ - IMPORT_C TUint32 GetUserDefinedSelectionL() const; - - /** - * SetDestinationIdL() - * Sets the DestinationId in cenrep - */ - IMPORT_C void SetDestinationIdL(TUint32 aDestinationId); - - /** - * GetDestinationIdL() - * Gets the DestinationId from cenrep - */ - IMPORT_C TUint32 GetDestinationIdL() const; - - -// END CLEANUP - - /** - * Returns the current saved subscriber identifier (IMSI code). - * - * @return The saved subscriber identifier. - */ - IMPORT_C const RMobilePhone::TMobilePhoneSubscriberId& SubscriberIdL() const; - - /** - * Sets the subscriber identifier (IMSI code). - * - * @param Subscriber identifier to set. - */ - IMPORT_C void SetSubscriberIdL( const RMobilePhone::TMobilePhoneSubscriberId& aSubscriberId ); - // Methods for starting view /** * SetStartingViewIdL() @@ -160,36 +83,33 @@ */ IMPORT_C TUint32 GetStartingViewIdL() const; - /** - * SetStartingViewParameterL() - * Sets the starting view parameter in cenrep - */ - IMPORT_C void SetStartingViewParameterL(TUint32 aParameter); - - /** - * GetStartingViewParameterL() - * Gets the starting view parameter from cenrep - */ - IMPORT_C TUint32 GetStartingViewParameterL() const; - - /** - * SetStickyViewFlagL() - * Sets the sticky view flag in cenrep - */ - IMPORT_C void SetStickyViewFlagL(TBool aFlag); - - /** - * GetStickyViewFlagL() - * Gets the sticky view flag from cenrep - */ - IMPORT_C TBool GetStickyViewFlagL(); - /** * GetGlobalAdvFlagL() * Gets the global advertisement flag from cenrep */ IMPORT_C TBool GetGlobalAdvFlagL(); + /** + * GetManuallyInputtedStationUrlL() + * Gets the url inputted in Go to station view from cenrep + */ + IMPORT_C const TDesC& GetManuallyInputtedStationUrlL() const; + /** + * SetManuallyInputtedStationUrlL() + * Sets the url in Go to station view from cenrep + */ + IMPORT_C void SetManuallyInputtedStationUrlL(const TDesC& aUrl); + + /** + * GetManuallyInputtedStationNameL() + * Gets the name inputted in Go to station view from cenrep + */ + IMPORT_C const TDesC& GetManuallyInputtedStationNameL() const; + /** + * SetManuallyInputtedStationNameL() + * Sets the name in Go to station view from cenrep + */ + IMPORT_C void SetManuallyInputtedStationNameL(const TDesC& aName); private: CIRSettings(); @@ -200,34 +120,19 @@ CRepository *iRepository; RFs iFs; -// CLEANUP REQUIRED - - //key KAccessPoints - TInt iAccessPoints;//!number of accesspoints available - //key KRunningChId - TInt iRunningChId; //! Channelid for isds channels - // zero once it reaches the value. - // to arrange the preset data, //key KIrappVersion - TBuf iIrappVersion;//! irapp version number, + TBuf iIrappVersion;//! irapp version number, //key KIRID - TBuf iIRID;//! ir-id supplied by isds. cannot change + TBuf iIRID;//! ir-id supplied by isds. cannot change // key KSilencePeriodStartTime - TBuf iSilencePeriodStartTime; //!Universal timestamp for the time of decline of an Update + TBuf iSilencePeriodStartTime; //!Universal timestamp for the time of decline of an Update //key KISDSBaseUrl - TBuf iISDSBaseUrl;//!the base url of isds + TBuf iISDSBaseUrl;//!the base url of isds TBuf iPrivatePath; - -// END CLEANUP - - /** The current subscriber identifier (IMSI code). */ - RMobilePhone::TMobilePhoneSubscriberId iSubscriberId; + TBuf iStationUrl; + TBuf iStationName; TInt iResourceFileOffset; - - TFileName iSettingsFileName; - TFileName iBackedUpSettingsFileName; - }; #endif // C_CIRSETTINGS_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/settingssrc/irsettings.cpp --- a/internetradio2.0/settingssrc/irsettings.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/settingssrc/irsettings.cpp Fri May 14 15:43:29 2010 +0300 @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "irdebug.h" #include "irsettings.h" @@ -32,7 +32,6 @@ const TInt KSix = 6; const TInt KFifty = 50; const TInt KTimeSize = 60000000 ; -const TInt KOne = 1; // --------------------------------------------------------------------------- // description_if_needed @@ -136,48 +135,13 @@ // description_if_needed // --------------------------------------------------------------------------- // -EXPORT_C TBool CIRSettings::IsFlagCostWarningL() - { - IRLOG_DEBUG( "CIRSettings::IsFlagCostWarningL() - Entering" ); - TBool value = ETrue; - User::LeaveIfError( iRepository->Get(KIRCostWarningFlag, value) ); - IRLOG_DEBUG( "CIRSettings::IsFlagCostWarningL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetFlagCostWarningL() - { - IRLOG_DEBUG( "CIRSettings::SetFlagCostWarningL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRCostWarningFlag, 1)); - IRLOG_DEBUG( "CIRSettings::SetFlagCostWarningL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::ReSetFlagCostWarningL() - { - IRLOG_DEBUG( "CIRSettings::ReSetFlagCostWarningL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRCostWarningFlag, 0)); - IRLOG_DEBUG( "CIRSettings::ReSetFlagCostWarningL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// EXPORT_C TBool CIRSettings::IsFlagTermsAndConditionsL() { IRLOG_DEBUG( "CIRSettings::IsFlagTermsAndConditionsL() - Entering" ); - TBool value = ETrue; + TInt value = 0; User::LeaveIfError( iRepository->Get(KIRTermsAndConditionsFlag, value) ); IRLOG_DEBUG( "CIRSettings::IsFlagTermsAndConditionsL() - Exiting" ); - return value; + return value == 1 ? ETrue : EFalse; } // --------------------------------------------------------------------------- @@ -206,17 +170,6 @@ // description_if_needed // --------------------------------------------------------------------------- // -EXPORT_C void CIRSettings::SetIrappVersionL(const TDesC& aIRAppVersion) - { - IRLOG_DEBUG( "CIRSettings::SetIrappVersionL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRIrappVer, aIRAppVersion) ); - IRLOG_DEBUG( "CIRSettings::SetIrappVersionL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// EXPORT_C const TDesC& CIRSettings::GetIrappVersionL() const { IRLOG_DEBUG( "CIRSettings::GetIrappVersionL() - Entering" ); @@ -299,41 +252,6 @@ User::LeaveIfError ( iRepository->Set(KIRDefaultPlayVolume, aPlayVolume)); IRLOG_DEBUG( "CIRSettings::SetVolumeSettingL() - Exiting" ); } - - - - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CIRSettings::GetManuallyAddedChId() const - { - IRLOG_DEBUG( "CIRSettings::GetManuallyAddedChId() - Entering" ); - TInt value = KOne; - TInt err = iRepository->Get(KIRUserDefinedRunningChannelId, value); - if(err) - { - IRLOG_DEBUG( "CIRSettings::GetManuallyAddedChId() - Error" ); - } - IRLOG_DEBUG( "CIRSettings::GetManuallyAddedChId() - Exiting" ); - return value; - - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetManuallyAddedChIdL() - { - IRLOG_DEBUG( "CIRSettings::SetManuallyAddedChIdL() - Entering" ); - iRunningChId++; - User::LeaveIfError ( iRepository->Set(KIRUserDefinedRunningChannelId, iRunningChId)); - IRLOG_DEBUG( "CIRSettings::SetManuallyAddedChIdL() - Exiting" ); - } - - // --------------------------------------------------------------------------- // description_if_needed @@ -478,257 +396,6 @@ IRLOG_DEBUG( "CIRSettings::GetSilencePeriodStartL() - Exiting" ); return iSilencePeriodStartTime; } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CIRSettings::DisplayAccessPointL() const - { - IRLOG_DEBUG( "CIRSettings::DisplayAccessPointL() - Entering" ); - TBool value = ETrue; - User::LeaveIfError( iRepository->Get(KIRDefaultAccessPoint, value) ); - IRLOG_DEBUG( "CIRSettings::DisplayAccessPointL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetDisplayAccessPointL() - { - IRLOG_DEBUG( "CIRSettings::SetDisplayAccessPointL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRDefaultAccessPoint, 1) ); - IRLOG_DEBUG( "CIRSettings::SetDisplayAccessPointL() - Exiting" ); - } - -EXPORT_C void CIRSettings::SetStereoModeL(TInt val) -{ - IRLOG_DEBUG( "CIRSettings::SetStereoModeL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRStereoMode, val)); - IRLOG_DEBUG( "CIRSettings::SetStereoModeL() - Exiting" ); - -} - -EXPORT_C TInt CIRSettings::GetStereoMode() -{ - IRLOG_DEBUG( "CIRSettings::GetStereoMode() - Entering" ); - TInt value = 0; - TInt err = iRepository->Get(KIRStereoMode, value); - if(err) - { - IRLOG_DEBUG( "CIRSettings::GetStereoMode() - Error" ); - } - IRLOG_DEBUG( "CIRSettings::GetStereoMode() - Exiting" ); - return value; -} - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::ReSetDisplayAccessPointL() - { - IRLOG_DEBUG( "CIRSettings::ReSetDisplayAccessPointL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRDefaultAccessPoint, 0) ); - IRLOG_DEBUG( "CIRSettings::ReSetDisplayAccessPointL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetBearerIdL(TUint32 aBearerId) - { - IRLOG_DEBUG( "CIRSettings::SetBearerIdL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRUserDefinedBearerID, (TInt)aBearerId)); - IRLOG_DEBUG( "CIRSettings::SetBearerIdL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TUint32 CIRSettings::GetBearerIdL() const - { - IRLOG_DEBUG( "CIRSettings::GetBearerIdL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedBearerID, value) ); - IRLOG_DEBUG( "CIRSettings::GetBearerIdL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetNetworkIdL(TUint32 aBearerId) - { - IRLOG_DEBUG( "CIRSettings::SetNetworkIdL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRUserDefinedNetworkID, (TInt)aBearerId) ); - IRLOG_DEBUG( "CIRSettings::SetNetworkIdL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TUint32 CIRSettings::GetNetworkIdL() const - { - IRLOG_DEBUG( "CIRSettings::GetNetworkIdL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedNetworkID, value) ); - IRLOG_DEBUG( "CIRSettings::GetNetworkIdL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetApIdL(TUint32 aBearerId) - { - IRLOG_DEBUG( "CIRSettings::SetApIdL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRUserDefinedAccessPoint , (TInt)aBearerId) ); - IRLOG_DEBUG( "CIRSettings::SetApIdL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TUint32 CIRSettings::GetApIdL() const - { - IRLOG_DEBUG( "CIRSettings::GetApIdL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedAccessPoint, value) ); - IRLOG_DEBUG( "CIRSettings::GetApIdL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetUserSavedApSettingsL( TUint32 aBearerId,TUint32 aNetworkId, - TUint32 aApId) - { - IRLOG_DEBUG( "CIRSettings::SetUserSavedApSettingsL() - Entering" ); - SetBearerIdL( aBearerId ); - SetNetworkIdL( aNetworkId ); - SetApIdL( aApId ); - IRLOG_DEBUG( "CIRSettings::SetUserSavedApSettingsL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::GetUserSavedApSettingsL( TUint32& aBearerId,TUint32& aNetworkId, - TUint32& aApId) const - { - IRLOG_DEBUG( "CIRSettings::GetUserSavedApSettingsL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedAccessPoint, value) ); - aApId = value; - - value =0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedNetworkID, value) ); - aNetworkId = value; - - value =0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedBearerID, value) ); - aBearerId = value; - IRLOG_DEBUG( "CIRSettings::GetUserSavedApSettingsL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetGPRSBitrateQualityL(TInt aBitrate) - { - IRLOG_DEBUG( "CIRSettings::SetGPRSBitrateQualityL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRGprsBitRate, aBitrate) ); - IRLOG_DEBUG( "CIRSettings::SetGPRSBitrateQualityL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CIRSettings::GetGPRSBitrateQuality() const - { - IRLOG_DEBUG( "CIRSettings::GetGPRSBitrateQuality() - Entering" ); - TInt value =0; - TInt err = iRepository->Get(KIRGprsBitRate, value); - if(err) - { - IRLOG_DEBUG( "CIRSettings::GetGPRSBitrateQuality() - Error" ); - } - IRLOG_DEBUG( "CIRSettings::GetGPRSBitrateQuality() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetWiFiBitrateQualityL(TInt aBitrate) - { - IRLOG_DEBUG( "CIRSettings::SetWiFiBitrateQualityL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRWifiBitRate, aBitrate) ); - IRLOG_DEBUG( "CIRSettings::SetWiFiBitrateQualityL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CIRSettings::GetWiFiBitrateQuality() const - { - IRLOG_DEBUG( "CIRSettings::GetWiFiBitrateQuality() - Entering" ); - TInt value =2; - TInt err = iRepository->Get(KIRWifiBitRate, value); - if(err) - { - IRLOG_DEBUG( "CIRSettings::GetWiFiBitrateQuality() - Error" ); - } - - IRLOG_DEBUG( "CIRSettings::GetWiFiBitrateQuality() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::Set3GBitrateQualityL(TInt aBitrate) - { - IRLOG_DEBUG( "CIRSettings::Set3GBitrateQualityL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIR3GBitRate, aBitrate) ); - IRLOG_DEBUG( "CIRSettings::Set3GBitrateQualityL() - Exiting" ); - } - - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CIRSettings::Get3GBitrateQuality() const - { - IRLOG_DEBUG( "CIRSettings::Get3GBitrateQuality() - Entering" ); - TInt value = 1; - TInt err = iRepository->Get(KIR3GBitRate, value); - if(err) - { - IRLOG_DEBUG( "CIRSettings::Get3GBitrateQuality() - Error" ); - } - - IRLOG_DEBUG( "CIRSettings::Get3GBitrateQuality() - Exiting" ); - return value; - } // --------------------------------------------------------------------------- // description_if_needed @@ -849,112 +516,6 @@ IRLOG_DEBUG( "CIRSettings::PrivatePath" ); return iPrivatePath; } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C const RMobilePhone::TMobilePhoneSubscriberId& CIRSettings::SubscriberIdL() const - { - IRLOG_DEBUG( "CIRSettings::SubscriberIdL() - Entering" ); - User::LeaveIfError( iRepository->Get(KIRUserDefinedSubscriberId, (TDes&)iSubscriberId) ); - IRLOG_DEBUG( "CIRSettings::SubscriberIdL() - Exiting" ); - return iSubscriberId; - } - -// --------------------------------------------------------------------------- -// description_if_needed -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetSubscriberIdL( const RMobilePhone::TMobilePhoneSubscriberId& - aSubscriberId ) - { - IRLOG_DEBUG( "CIRSettings::SetSubscriberIdL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRUserDefinedSubscriberId, (TDes&)aSubscriberId) ); - IRLOG_DEBUG( "CIRSettings::SetSubscriberIdL() - Exiting" ); - } - - -//Added for ALR/SNAP - - -// --------------------------------------------------------------------------- -// SetUserDefinedSelectionL() -// Sets the UserDefinedSelection in cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetUserDefinedSelectionL(TUint32 aUserDefinedSelection) - { - IRLOG_DEBUG( "CIRSettings::SetUserDefinedSelectionL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRUserDefinedSelection, (TInt)aUserDefinedSelection) ); - IRLOG_DEBUG( "CIRSettings::SetUserDefinedSelectionL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// GetUserDefinedSelectionL() -// Gets the UserDefinedSelection from cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C TUint32 CIRSettings::GetUserDefinedSelectionL() const - { - IRLOG_DEBUG( "CIRSettings::GetUserDefinedSelectionL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedSelection, value) ); - IRLOG_DEBUG( "CIRSettings::GetUserDefinedSelectionL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// SetDestinationIdL() -// Sets the DestinationId in cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetDestinationIdL(TUint32 aDestinationId) - { - IRLOG_DEBUG( "CIRSettings::SetDestinationIdL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRUserDefinedDestinationId, (TInt)aDestinationId) ); - IRLOG_DEBUG( "CIRSettings::SetDestinationIdL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// GetDestinationIdL() -// Gets the DestinationId from cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C TUint32 CIRSettings::GetDestinationIdL() const - { - IRLOG_DEBUG( "CIRSettings::GetDestinationIdL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRUserDefinedDestinationId, value) ); - IRLOG_DEBUG( "CIRSettings::GetDestinationIdL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// IsFlagIfAnyFavL() -// Method to determine if any channel was added to favorites -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CIRSettings::IsFlagIfAnyFavL() - { - IRLOG_DEBUG( "CIRSettings::IsFlagIfAnyFavL() - Entering" ); - TBool value = EFalse; - User::LeaveIfError( iRepository->Get(KIRIfAnyFavFlag, value) ); - IRLOG_DEBUG( "CIRSettings::IsFlagIfAnyFavL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// SetFlagIfAnyFavL() -// Method to set boolean value when any channel was added to favorites -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetFlagIfAnyFavL() - { - IRLOG_DEBUG( "CIRSettings::SetFlagIfAnyFavL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRIfAnyFavFlag, 1)); - IRLOG_DEBUG( "CIRSettings::SetFlagIfAnyFavL() - Exiting" ); - } // --------------------------------------------------------------------------- // SetStartingViewIdL() @@ -983,58 +544,6 @@ } // --------------------------------------------------------------------------- -// SetStartingViewParameterL() -// Sets the starting view parameter in cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetStartingViewParameterL(TUint32 aParameter) - { - IRLOG_DEBUG( "CIRSettings::SetStartingViewParameterL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRStartingViewParameter, (TInt)aParameter) ); - IRLOG_DEBUG( "CIRSettings::SetStartingViewParameterL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// GetStartingViewParameterL() -// Gets the starting view parameter from cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C TUint32 CIRSettings::GetStartingViewParameterL() const - { - IRLOG_DEBUG( "CIRSettings::GetStartingViewParameterL() - Entering" ); - TInt value = 0; - User::LeaveIfError( iRepository->Get(KIRStartingViewParameter, value) ); - IRLOG_DEBUG( "CIRSettings::GetStartingViewParameterL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- -// SetStickyViewFlagL() -// Sets the sticky view flag in cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C void CIRSettings::SetStickyViewFlagL(TBool aFlag) - { - IRLOG_DEBUG( "CIRSettings::SetStickyViewFlagL() - Entering" ); - User::LeaveIfError ( iRepository->Set(KIRStickyViewFlag, aFlag)); - IRLOG_DEBUG( "CIRSettings::SetStickyViewFlagL() - Exiting" ); - } - -// --------------------------------------------------------------------------- -// GetStickyViewFlagL() -// Gets the sticky view flag from cenrep -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CIRSettings::GetStickyViewFlagL() - { - IRLOG_DEBUG( "CIRSettings::GetStickyViewFlagL() - Entering" ); - TBool value = EFalse; - User::LeaveIfError( iRepository->Get(KIRStickyViewFlag, value) ); - IRLOG_DEBUG( "CIRSettings::GetStickyViewFlagL() - Exiting" ); - return value; - } - -// --------------------------------------------------------------------------- // GetGlobalAdvFlagL() // Gets the global advertisement flag from cenrep // --------------------------------------------------------------------------- @@ -1047,3 +556,49 @@ IRLOG_DEBUG( "CIRSettings::GetGlobalAdvFlagL() - Exiting" ); return value; } + +// --------------------------------------------------------------------------- +// description_if_needed +// --------------------------------------------------------------------------- +// +EXPORT_C const TDesC& CIRSettings::GetManuallyInputtedStationUrlL() const + { + IRLOG_DEBUG( "CIRSettings::GetManuallyInputtedStationUrlL() - Entering" ); + User::LeaveIfError( iRepository->Get(KIRStationUrl, (TDes&)iStationUrl) ); + IRLOG_DEBUG( "CIRSettings::GetManuallyInputtedStationUrlL() - Exiting" ); + return iStationUrl; + } + +// --------------------------------------------------------------------------- +// description_if_needed +// --------------------------------------------------------------------------- +// +EXPORT_C void CIRSettings::SetManuallyInputtedStationUrlL(const TDesC& aUrl) + { + IRLOG_DEBUG( "CIRSettings::SetManuallyInputtedStationUrlL() - Entering" ); + User::LeaveIfError ( iRepository->Set(KIRStationUrl, aUrl) ); + IRLOG_DEBUG( "CIRSettings::SetManuallyInputtedStationUrlL() - Exiting" ); + } + +// --------------------------------------------------------------------------- +// description_if_needed +// --------------------------------------------------------------------------- +// +EXPORT_C const TDesC& CIRSettings::GetManuallyInputtedStationNameL() const + { + IRLOG_DEBUG( "CIRSettings::GetManuallyInputtedStationNameL() - Entering" ); + User::LeaveIfError( iRepository->Get(KIRStationName, (TDes&)iStationName) ); + IRLOG_DEBUG( "CIRSettings::GetManuallyInputtedStationNameL() - Exiting" ); + return iStationName; + } + +// --------------------------------------------------------------------------- +// description_if_needed +// --------------------------------------------------------------------------- +// +EXPORT_C void CIRSettings::SetManuallyInputtedStationNameL(const TDesC& aName) + { + IRLOG_DEBUG( "CIRSettings::SetManuallyInputtedStationNameL() - Entering" ); + User::LeaveIfError ( iRepository->Set(KIRStationName, aName) ); + IRLOG_DEBUG( "CIRSettings::SetManuallyInputtedStationNameL() - Exiting" ); + } diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/songhistoryinc/uinotifyhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/internetradio2.0/songhistoryinc/uinotifyhandler.h Fri May 14 15:43:29 2010 +0300 @@ -0,0 +1,65 @@ +/* +* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface class to notify database changes to SongHistoryView +* +*/ + + +#ifndef IR_SONGHISTORYUINOTIFYHANDLER +#define IR_SONGHISTORYUINOTIFYHANDLER + +#include + +/** +* Observer interface for CIRSongHistoryView. +* Notifies the view when new data is received. +*/ +class MSongHistoryUINotifyHandler + { + public: + + /** + * Invoked from CIRSongHistoryDbEng when new entry is added to the database. + * @param aSongName + * @param aArtistName + * @param aChannelName + * Parameters yet to be decided. + */ + virtual void NextSongReceivedL( const TDesC& aSongName, const TDesC& aArtistName, + const TDesC& aChannelName, const TDesC& aChannelUrl ) = 0; + + virtual void ChannelChangedL( const TDesC& aSongName, const TDesC& aArtistName, + const TDesC& aChannelName, const TDesC& aChannelUrl ) = 0; + + /** + * Invoked from CIRSongHistoryDbEng when new entry is added to the database which *would exceed 30 entries. + * @param aSongName + * @param aArtistName + * @param aChannelName + */ + virtual TInt RemoveSongEntry( const TDesC& aSongName, const TDesC& aArtistName, + const TDesC& aChannelName, const TDesC& aChannelUrl ) = 0; + + virtual TInt RemoveChannelEntry( const TDesC& aSongName, const TDesC& aArtistName, + const TDesC& aChannelName, const TDesC& aChannelUrl ) = 0; + + /** + * Invoked when an error occurred while notifying to UI. + * @param aError The error code. + */ + virtual void NotifyDataChangeToUIError( TInt aError ) = 0; + + }; + +#endif //IR_SONGHISTORYUINOTIFYHANDLER diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/songhistorysrc/irsonghistorydb.cpp --- a/internetradio2.0/songhistorysrc/irsonghistorydb.cpp Mon May 03 12:25:23 2010 +0300 +++ b/internetradio2.0/songhistorysrc/irsonghistorydb.cpp Fri May 14 15:43:29 2010 +0300 @@ -361,9 +361,7 @@ // void CIRSongHistoryDb::GetAllSongHistoryListL(RPointerArray& aHistoryDataArr) { - IRLOG_DEBUG( "CIRSongHistoryDb::GetAllSongHistoryListL" ); - - TInt error = KErrNone; + IRLOG_DEBUG( "CIRSongHistoryDb::GetAllSongHistoryListL" ); if(iSongHistoryTable.CountL() < 1) { @@ -383,123 +381,68 @@ TInt musicStatusColumn = columns->ColNo( KSongHistoryDBMusicStatusColumn ); delete columns; - columns = NULL; - - // Comparer function to find channel in channelHistoryArr - TIdentityRelation comparer( CIRSongHistoryDb::CompareChannelInfos ); - - // Find out channels in order - RPointerArray channelHistoryArr; - for ( iSongHistoryTable.LastL(); iSongHistoryTable.AtRow(); iSongHistoryTable.PreviousL() ) + columns = NULL; + + TInt song = 0; + + + for ( iSongHistoryTable.LastL(); iSongHistoryTable.AtRow(); iSongHistoryTable.PreviousL() ) { iSongHistoryTable.GetL(); - - CIRChannelInfo *pChannelInfo = new ( ELeave ) CIRChannelInfo; - CleanupStack::PushL( pChannelInfo ); - pChannelInfo->iChannelName.Create(iSongHistoryTable.ColDes( channelColumn )); - pChannelInfo->iChannelUrl.Create(iSongHistoryTable.ColDes( channelUrlColumn )); - pChannelInfo->iChannelType = iSongHistoryTable.ColUint16( channelTypeColumn ); - - // Verify the channel is not in our list already - if( channelHistoryArr.Find(pChannelInfo, comparer) == KErrNotFound ) - { - error = channelHistoryArr.Append( pChannelInfo ); - if( error!=KErrNone ) - { - CleanupStack::PopAndDestroy( pChannelInfo ); - channelHistoryArr.ResetAndDestroy(); - User::LeaveIfError(error); - } - - CleanupStack::Pop( pChannelInfo ); - - - } - else - { - CleanupStack::PopAndDestroy( pChannelInfo ); - } - } - - // Find out songs for each channel in order + + RBuf songName; + RBuf artistName; + RBuf channelName; + RBuf channelUrl; + TInt channelType; + TInt channelId; + TInt bitrate; + RBuf channelDesc; + RBuf imageUrl; + RBuf channelMusicStatus; + + songName.CreateL(iSongHistoryTable.ColDes( songColumn )); + songName.CleanupClosePushL(); + + artistName.CreateL(iSongHistoryTable.ColDes( artistColumn )); + artistName.CleanupClosePushL(); + + channelName.CreateL(iSongHistoryTable.ColDes( channelColumn )); + channelName.CleanupClosePushL(); + + channelUrl.CreateL(iSongHistoryTable.ColDes( channelUrlColumn )); + channelUrl.CleanupClosePushL(); + + channelType=iSongHistoryTable.ColUint8( channelTypeColumn ); + + channelId=iSongHistoryTable.ColUint16( channelIdColumn ); + + bitrate=iSongHistoryTable.ColUint16( bitrateColumn ); + + channelDesc.CreateL(iSongHistoryTable.ColDes( channelDescColumn )); + channelDesc.CleanupClosePushL(); - TInt song = 0; - for( TInt channelIndex = 0; channelIndex < channelHistoryArr.Count(); ++channelIndex ) - { - for ( iSongHistoryTable.LastL(); iSongHistoryTable.AtRow(); iSongHistoryTable.PreviousL() ) - { - iSongHistoryTable.GetL(); - // Extracting the values from the database. - if(song < aHistoryDataArr.Count()) - { - RBuf songName; - RBuf artistName; - RBuf channelName; - RBuf channelUrl; - TInt channelType; - TInt channelId; - TInt bitrate; - RBuf channelDesc; - RBuf imageUrl; - RBuf channelMusicStatus; - - songName.Create(iSongHistoryTable.ColDes( songColumn )); - songName.CleanupClosePushL(); - - artistName.Create(iSongHistoryTable.ColDes( artistColumn )); - artistName.CleanupClosePushL(); - - channelName.Create(iSongHistoryTable.ColDes( channelColumn )); - channelName.CleanupClosePushL(); - - channelUrl.Create(iSongHistoryTable.ColDes( channelUrlColumn )); - channelUrl.CleanupClosePushL(); - - channelType=iSongHistoryTable.ColUint8( channelTypeColumn ); - - channelId=iSongHistoryTable.ColUint16( channelIdColumn ); - - bitrate=iSongHistoryTable.ColUint16( bitrateColumn ); - - channelDesc.Create(iSongHistoryTable.ColDes( channelDescColumn )); - channelDesc.CleanupClosePushL(); + imageUrl.CreateL(iSongHistoryTable.ColDes( imageUrlColumn )); + imageUrl.CleanupClosePushL(); - imageUrl.Create(iSongHistoryTable.ColDes( imageUrlColumn )); - imageUrl.CleanupClosePushL(); - - channelMusicStatus.Create(iSongHistoryTable.ColDes( musicStatusColumn )); - channelMusicStatus.CleanupClosePushL(); - - if( channelHistoryArr[channelIndex]->iChannelName == channelName && - channelHistoryArr[channelIndex]->iChannelUrl == channelUrl && - channelHistoryArr[channelIndex]->iChannelType == channelType - ) - { - aHistoryDataArr[song]->SetHistoryInfo(songName, artistName, channelUrl, - channelName,channelType,channelId,bitrate,channelDesc , - imageUrl, channelMusicStatus); - ++song; - } - - CleanupStack::PopAndDestroy(&channelMusicStatus); - CleanupStack::PopAndDestroy(&imageUrl); - CleanupStack::PopAndDestroy(&channelDesc); - CleanupStack::PopAndDestroy(&channelUrl); - CleanupStack::PopAndDestroy(&channelName); - CleanupStack::PopAndDestroy(&artistName); - CleanupStack::PopAndDestroy(&songName); - - } - else - { - //Should not enter this scenario as aHistoryDataArr is suppose to give - //required memory allocated. But should it enter here should appendL into - //the list and increment "iSong" - } - } - } - - channelHistoryArr.ResetAndDestroy(); + channelMusicStatus.CreateL(iSongHistoryTable.ColDes( musicStatusColumn )); + channelMusicStatus.CleanupClosePushL(); + + aHistoryDataArr[song]->SetHistoryInfo(songName, artistName, channelUrl, + channelName,channelType,channelId,bitrate,channelDesc , + imageUrl, channelMusicStatus); + ++song; + + + CleanupStack::PopAndDestroy(&channelMusicStatus); + CleanupStack::PopAndDestroy(&imageUrl); + CleanupStack::PopAndDestroy(&channelDesc); + CleanupStack::PopAndDestroy(&channelUrl); + CleanupStack::PopAndDestroy(&channelName); + CleanupStack::PopAndDestroy(&artistName); + CleanupStack::PopAndDestroy(&songName); + } + IRLOG_DEBUG( "CIRSongHistoryDb::GetAllSongHistoryListL - Exiting." ); } @@ -623,12 +566,12 @@ { return KErrArgument; } - - iSongHistoryTable.FirstL(); + + iSongHistoryTable.LastL(); TInt tempIndex = 0; while (tempIndex < aIndex) { - TRAPD(error,iSongHistoryTable.NextL();); + TRAPD(error,iSongHistoryTable.PreviousL()); if (KErrNone != error) { Compact(); diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/iraccessoryobserver.h --- a/internetradio2.0/uiinc/iraccessoryobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Observer of accessory states. -* -*/ - - -#ifndef CIRACCESSORYOBSERVER_H -#define CIRACCESSORYOBSERVER_H - -#include -#include -#include - -class MIRHeadsetEventObserver; - -/** - * Observer of accessory states. - * - * Instance of this class observes notifications of headset state changes. - * In its turn it sends notifications to its observer of those changes. - * - */ -NONSHARABLE_CLASS( CIRAccessoryObserver ): public CActive - { -public: - - /** - * C++ default constructor. - */ - CIRAccessoryObserver(); - - /** - * Static constructor. - * - * @param aAccessoryServer Existing session for The Accessory Server. - */ - static CIRAccessoryObserver* NewL(); - - /** - * Destructor. - */ - virtual ~CIRAccessoryObserver(); - - /** - * Sets observer. The observer will be notified when headset has been - * pressed or headset is connected/disconnected. - * - * @param aObserver Observer - */ - void SetObserver(MIRHeadsetEventObserver* aObserver); - - /** - * Returns accessory connection state. - * - * @return ETrue if accessory is connected, - * EFalse otherwise - */ - TBool IsHeadsetConnected() const; - - // from base class CActive - /** - * From CActive - * - * @see CActive::RunL() - */ - void RunL(); - - /** - * From CActive - * - * @see CActive::DoCancel() - */ - void DoCancel(); - -protected: - -private: - - /** - * By default Symbian 2nd phase constructor is private. - * - * @param aAccessoryServer Existing session for The Accessory Server. - */ - void ConstructL(); - -public: - -protected: - - /** - * Instance that gets notifications of the headset state changes - */ - MIRHeadsetEventObserver* iObserver; - -private: // Data - - /** - * Session for The Accessory Server. - */ - RAccessoryServer iAccessoryServer; - - /** - * Accessory Mode sub-session - */ - RAccessoryMode iAccessoryModeSession; - - - /** - * Accessory Mode structure, with active audio information. - */ - TAccPolAccessoryMode iAccPolAccessoryMode; - }; - -#endif // CIRACCESSORYOBSERVER_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/iraddmanuallystationcontainer.h --- a/internetradio2.0/uiinc/iraddmanuallystationcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRAddManuallyContainer -* -*/ - - -#ifndef IRADDMANUALLYSTATIONCONTAINER_H -#define IRADDMANUALLYSTATIONCONTAINER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -class CIRBaseView; -class CIRDialogLauncher; -//class CEikEdwin; -#include -#include -#include -#include -class CEikEdwin; -class CGulIcon; - -class CIRAddManuallyStationView; - -class CIRDialogLauncher; -class CAknNavigationControlContainer; -class CAknNavigationDecorator; - -class Stateind_uid : public TUid -{ - public: - Stateind_uid(int stateind) - { - iUid = stateind; - } -}; - - - -/** - * Container class for Add Manually View. - */ -class CIRAddManuallyStationContainer : public CAknForm,public MCoeControlObserver - { - -public: // Methods - - /** - * CIRAddManuallyStationContainer::NewL(const TRect& aRect) - * Two phased constructor - * Creates a CIRAddManuallyStationViewContainer object which - * will draw itself to aRect - * @param aRect. The rectangle to which this view will be drawn to - * @return. A pointer to the created instance of - * CIRAddManuallyStationViewContainer. - */ - static CIRAddManuallyStationContainer* NewL(CIRAddManuallyStationView* aView); //(CAknToolbar* aToolbar) - - /** - * Destructor. - */ - ~CIRAddManuallyStationContainer(); - - /** - * C++ default constructor. - * - * @param aView View of this container. - */ - CIRAddManuallyStationContainer( CIRAddManuallyStationView* aView ); - - - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - IMPORT_C void GetHelpContext( TCoeHelpContext& aContext ) const; - - - - public: // New functions - /** - * To Handle the key events - */ - void DefaultVauleL(); - - /** - * copies to clipboard - */ - void CopyDataL(); - - /** - * paste from clipboard - */ - void PasteDataL(); - - /** - * Saves the URL name nd description of the station to be saved - */ - void SaveDataL(); - - /** - * Edits the URL name and description of the station - */ - void EditStationL(); - - /** - * Checks whether Name Field is empty or not. If it contains empty then - * replace with the default name ("Unnamed") - * - * @return NA - */ - void ReplaceEmptyName( TDes& aUrlName ); - - - /** - * Replaces the ugly char symbols with space - */ - void ReplaceUglyChar(TDes& aUrlName); - - - /** - * Checks if there is an URI that contains scheme (="http://") - * and at some characters after that. - * - * @return ETrue if Name text field contains a scheme and at least one character - * Otherwise EFalse. - */ - TBool ValidateUrlL(); - - /** - * Checks if there are any invalid characters in URL - * @return ETrue if URL contains invalid characters - */ - TBool HasInvalidCharsInUrl(TDes& aUrl); - - public: // Functions from base classes - - /** - * To Handle the key events - */ - void HandlePointerEventL (const TPointerEvent & aPointerEvent) ; - void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType); - void HandleResourceChange (TInt aType); - - /** - * From CAknForm, called just before options menu is displayed. - * @param aResourceId Resource ID identifying the menu pane to initialize - * @param aMenuPane The in-memory representation of the menu pane - */ - void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); - - /** - * From CAknForm, takes care of command handling. - * @param aCommand Command to be handled - */ - void ProcessCommandL( TInt aCommand ); - void SizeChanged(); - - protected: - - /** - * From CAknForm, called by the framework if user presses a button - * @param aButtonId The ID of the pressed button. - * @return Should the dialog exit (EFalse or ETrue) - */ - TBool OkToExitL( TInt aButtonId ); - - /** - * From CAknForm, called by the framework just before form is shown - */ - void PostLayoutDynInitL(); - - private: - - /** - * To save station information to favourites - */ - void AddToFavouritesL(); - - - void PreLayoutDynInitL(); - - - private: // Data - // True if it is edit station. - TBool iIsEditStation; - TBool iIsSpaceEntered; - TBool iIsTextEntered; - TBuf<10> iTextBoxValidateUrl; - TBool iUnNamedFlag; - - CAknNavigationControlContainer* iNaviPane; - CAknNavigationDecorator* iNaviDecorator; - public: - CIRDialogLauncher* iDialogLauncher; - CIRIsdsPreset* iPreset; - - TBuf<256> iSelText; - TBuf<256> iStationURL; - TBuf<256> iStationName; - TBuf<256> iStationDescription; - TBool iIsEnable; - - -public: - - - TUid iAddManPrevID; - CIRAddManuallyStationView* iView; - - - //Previous ViewId - TUid iAddManPrevId; - - - }; - -#endif // IRADDMANUALLYSTATIONCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/iraddmanuallystationview.h --- a/internetradio2.0/uiinc/iraddmanuallystationview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,210 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRAddManuallyStationView -* -*/ - - -#ifndef _CIRADDMANUALLYSTATIONVIEW_H -#define _CIRADDMANUALLYSTATIONVIEW_H - -#include -#include -#include -#include "irbaseview.h" - - -class CIRAddManuallyStationContainer; -class CIRAddStationsTimer; - -/** - * Add Manually View, adds radio channels to favorites. - */ -class CIRAddManuallyStationView : public CIRBaseView, public MAknToolbarObserver - { - -public: - - /** - * static constructor - */ - static CIRAddManuallyStationView* NewL(const TRect& aRect); - - /** - * Static constructor. - */ - static CIRAddManuallyStationView* NewLC(const TRect& aRect); - - /** - * Destructor. - */ - ~CIRAddManuallyStationView(); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - - /** - * For Touch Toolbar - */ - void DynInitToolbarL(TInt aResourceId, CAknToolbar* aToolbar ); - void OfferToolbarEventL( TInt aCommand ); - void ConstructToolbarL(); - void SetToolbarItems(); - void SetAddStationsTitleL(); - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - - void RefreshView(); - -protected: - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - -private: - - /** - * 2nd phase constructor - */ - void ConstructL(const TRect& aRect); - - /** - * C++ default constructor. - */ - CIRAddManuallyStationView(); - - -private: // Data - - /** - * Container for this view. - */ - - /** - * Moving item index. If KErrNotFound, no item is moving at the moment. - */ - TInt iMovingFrom; - - /** - * View Id of the previous view. - */ - TVwsViewId iPrevViewId; - - /** - * Is the start up of application ongoing. - */ - TBool iStartUp; - - CIRAddStationsTimer* iAddStationsTimer; - - -public: - - - CIRAddManuallyStationContainer* iContainer; - - /** - * Checks whether any char is entered in URL and - * Name fields - */ - TBool iIsTextEntered; - - /** - * Checks whether any space is entered in URL and - * Name fields - */ - TBool iIsSpaceEntered; - - TBool iIsCopied; - - }; - - -class CIRAddStationsTimer : public CActive - { -public: - //Member Functions - public: - static CIRAddStationsTimer* NewL(CIRAddManuallyStationContainer& aContainer); - - void ConstructL(); - - ~CIRAddStationsTimer(); // Destruction - - void IssueRequest(); // issue request - - void DoCancel(); // Cancel request - - // Defined as pure virtual by CActive - // implementation provided by this class. - void RunL(); - - // Defined as pure virtual by CActive - // implementation provided by this class. - void ExecuteL(); - - void StopTimer(); - - private: - - RTimer iTimer; // Asynchronous service provider. - - TInt iCounter; - - CIRAddStationsTimer(CIRAddManuallyStationContainer& aContainer); // Construction - - public: - - - CIRAddManuallyStationContainer& iContainer; - }; - - -#endif // _CIRADDMANUALLYSTATIONVIEW_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/iralarmobserver.h --- a/internetradio2.0/uiinc/iralarmobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef IRALARMOBSERVER_H -#define IRALARMOBSERVER_H - -#include -//d #include - -class CIRUi; - - -/** - * This is the alarm observer class is used for alarm observing - * When alarm is comes or made it calls HandleAlarmStart which does the call handling - * When call is disconnected it calls HandleAlarmEnd to handle the scenerio - * - * @code - * - * CIRAlarmObserver* obj - * obj = CIRAlarmObserver::NewL(instance of CIRUi* aUi); //creating call observer - * obj->Start();//starting the observer - * - * @endcode - * - */ - -NONSHARABLE_CLASS(CIRAlarmObserver) : public CActive - { - //member functions -public: - - /** - * Function : NewL - * Function returns an instance of CIRAlarmObserver - * Two phase constructor - * @param CIRUi instance - * @return instance of CIRAlarmObserver - */ - static CIRAlarmObserver* NewL(CIRUi* aUi); - - /** - * Function : NewLC - * Function returns an instance of CIRAlarmObserver - * Two phase constructor - * @param CIRUi instance - * @return instance of CIRAlarmObserver - */ - static CIRAlarmObserver* NewLC(CIRUi* aUi); - - /** - * Function : ~CIRAlarmObserver - * Default destructor calls Cancel function which cancel the active request - */ - ~CIRAlarmObserver(); - - /** - * Function : Start - * Function starts the call observer - */ - void Start(); - - /** - * Function : RunL - * This is the RunL function if a call is recieved or disconnected when the player - * is active, is handled here - */ - void RunL(); - - /** - * Function : DoCancel - * Function stops the call observer if it is active - */ - void DoCancel(); - - /** - * Function : RunError - * Function which handles RunL error - * @param Error value - */ - TInt RunError(TInt aError); - -private: - /** - * Function : ConstructL - * Function does all the initializations - * Two phase constructor - * @param CIRNowPlayingView instance - */ - void ConstructL(CIRUi* aUi); - - /** - * Function : CIRAlarmObserver - * Function is the default constructor, sets the CActive priority, Line status - */ - CIRAlarmObserver(); - - //data member declaration -private: - - //The client-side interface to the Symbian OS alarm server - RASCliSession iAlarmSession; - - //Alarm id - TAlarmId iAlarmId; - - //instance of Now Playing View - CIRUi* iUi; - - //Checks whether alarm is on or off - TBool iAlarmOn; - }; - -#endif //IRALARMOBSERVER_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irapplication.h --- a/internetradio2.0/uiinc/irapplication.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRAPPLICATION_H -#define IRAPPLICATION_H - -#include - -//========================================class declaration CIRApplication============================================ - -/** - * This class Creates the document - * - * @code - * - * Creates the document class. - * new (ELeave) CIRDocument(*this); - * AppDllUid() - returns the UID for the IR application - * - * @endcode - * - */ - -class CIRApplication : public CAknApplication - { -private: - - /** - * Function : CreateDocumentL() - * Inherited from class CApaApplication - */ - CApaDocument* CreateDocumentL(); - - /** - * Function : AppDllUid(). - * @return TUid,the UID for the IR application. - */ - TUid AppDllUid() const; - /** - * Function : PreDocConstructL(). - */ - void PreDocConstructL(); - -public: - - /** - * Function : GetInstanceFlag(). - * @return the bool value for iSecondInstance - */ - TBool GetInstanceFlag(); - -private: - /** - * iSecondInstance - */ - TBool iSecondInstance; - }; - -#endif // IRAPPLICATION_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/iraudioroutingobserver.h --- a/internetradio2.0/uiinc/iraudioroutingobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for MIRAudioRoutingObserver. Interface for observing -* audio routing events -* -*/ - - -#ifndef MIRAUDIOROUTINGOBSERVER_H -#define MIRAUDIOROUTINGOBSERVER_H - -#include "vraudioutils.hrh" - -/** - * Interface for observing audio routing events. - * - * Implementer will be notified when audio routing changes - * between IHF and headset. - * - */ -class MIRAudioRoutingObserver - { - -public: // Methods - - /** - * Notifies of a requested audio routing change. Changes requested - * by other applications do not generate a notification. - * - * @param aOutputSource Current audio output source - */ - virtual void AudioRoutingChangedL( - TVROutputDestination aOutputDestination) = 0; - - }; - -#endif // MIRAUDIOROUTINGOBSERVER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irautomatedbitrateselection.h --- a/internetradio2.0/uiinc/irautomatedbitrateselection.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRAUTOMATEDBITRATESELECTION_H -#define IRAUTOMATEDBITRATESELECTION_H - -#include - -//high quality selection default for WLAN network -const TInt KHighQuality = 2; - -//high quality selection default for 3G network -const TInt KMediumQuality = 1; - -//high quality selection default for GPRS network -const TInt KLowQuality = 0; - -//limit for high bit rate greater than or equals 128kbps -const TInt KHighBitRateLimit = 128; - -//limit for medium bit rate between 128kbps and 48kps -const TInt KMediumBitRateLimit = 48; - -#endif //IRAUTOMATEDBITRATESELECTION_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irbacksteppingservicewrapper.h --- a/internetradio2.0/uiinc/irbacksteppingservicewrapper.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Wrapper for Back Stepping Service -* -*/ - - -#ifndef CIRBACKSTEPPINGSERVICEWRAPPER_H -#define CIRBACKSTEPPINGSERVICEWRAPPER_H - -#include -#include - -class MLiwInterface; -class CLiwGenericParamList; -class CLiwServiceHandler; - -/** - * Back Stepping (BS) Service wrapper for Internet Radio. - */ -class CIRBackSteppingServiceWrapper : public CBase - { - -public: - - /** - * Static constructor. - * - * @param aUid Application UID. - */ - static CIRBackSteppingServiceWrapper* NewL( TUid aUid ); - - /** - * Destructor. - */ - ~CIRBackSteppingServiceWrapper(); - - /** - * Forwards view activation event to BS Service. - * - * @param aViewId View id of the view where back is called. - * @param aEnter Indicates if it is entry or exit activation. - */ - void HandleViewActivationEventL( const TVwsViewId aViewId, TBool aEnter ); - - /** - * Forwards back command to BS Service. - * - * @param aViewId View id of the view where back is called. - * @return Returns Etrue if BS Service consumed the command, otherwise returns EFalse. - */ - TBool HandleBackCommandL( const TVwsViewId aViewId ); - -private: - - /** - * C++ default constructor. - */ - CIRBackSteppingServiceWrapper(); - - /** - * 2nd phase constructor - * - * @param aUid Application UID. - */ - void ConstructL( TUid aUid ); - - /** - * Initializes BS Service. - * - * @param aUid Application UID. - */ - void InitializeL( TUid aUid ); - - /** - * Handles the result of a LIW command - * - * @return Returns ETrue if LIW command executed, otherwise returns EFalse. - */ - TBool HandleResultL(); - -private: // data - - /** - * AIW Service Handler. - * Own. - */ - CLiwServiceHandler* iServiceHandler; - - /** - * BS Service interface returned by LIW. - * Own. - */ - MLiwInterface* iBsInterface; - - /** - * In param list. - * Not own. - */ - CLiwGenericParamList* iInParamList; - - /** - * Out param list. - * Not own. - */ - CLiwGenericParamList* iOutParamList; - }; - -#endif // CIRBACKSTEPPINGSERVICEWRAPPER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irbaseview.h --- a/internetradio2.0/uiinc/irbaseview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for CIRBaseView -* -*/ - - -#ifndef C_CIRBASEVIEW_H -#define C_CIRBASEVIEW_H - -#include - -#include "irsystemeventobserver.h" - - -const TInt KIRIconSubCellIndex = 3; -const TInt KAlphanumericStart = 48; //Scan code of '0' key on keypad. -const TInt KAlphanumericEnd = 59; //Scan code of 'w' key on keypad. -const TInt KAphaUpperCaseStart = 65; -const TInt KAphaUpperCaseEnd = 91; -const TInt KAphaLowerCaseStart = 97; -const TInt KAphaLowerCaseEnd = 122; -const TInt KAknExListFindBoxTextLength = 10; - -const TInt KFont = 200; -const TSize KBitmapSize = TSize(59, 59); - -class CIRIsdsWrapper; -class CIRNowPlayingWrapper; -class CIRUi; -class CIRAddManuallyStationForm; -class CIRDialogLauncher; -/** - * Base View - * - * Base View, which is used to hold common functionality across different views. - * At the moment contains only some event handling and some view activation related functionality. - */ -class CIRBaseView :public CAknView, - public MIRSystemEventObserver - { -public: - - /** - * Available observers to be used in derived classes. - */ - enum TIRObservers - { - EIRNone = 0x00000000, - EIRSystemEventObserver = 0x00000002 - }; - - /** - * Destructor. - */ - ~CIRBaseView(); - - /** - * Set the title of the current view. This is a utility method for more easy - * title setting. SetTitleL has two overloaded methods: one for resource - * based strings and one for descriptor based strings. - * - * @param aResourceid A resource id pointing to a text - */ - void SetTitleL( TInt aResourceId ); - /** - * @param aTitleText Descriptor which holds the title text - */ - void SetTitleL( const TDesC& aTitleText ); - - /** - * Takes care of pushing and poping views for view backtracking - */ - void HandleViewStackL(TUid aCustomMessageId); - - // from base class CAknView - void HandleCommandL( TInt aCommand ); - void HandleForegroundEventL( TBool aForeground ); - // from base class MEikMenuObserver - - - /** - * GetCurrentFocus - * Returns Data for the current focus in the Listbox - */ - TInt GetCurrentFocus(); - - /** - * GetCurrentTopItemInstance - * Returns Data for the top item index in the Listbox - */ - - TInt GetCurrentTopItem(); - - /** - * SetCurrentFocus - * Sets Data for the current focus in the Listbox - */ - void SetCurrentFocus(TInt aCurrentFocus); - - /** - * SetCurrentTopItemInstance - * Sets Data for the top item index in the Listbox - */ - void SetCurrentTopItem(TInt aTopItemIndex); - - //From the base class MIRSystemEventObserver - void HandleSystemEventL(TIRSystemEventType aEventType); - - -protected: - - /** - * By default Symbian 2nd phase constructor is private. - * - * @param aResourceId A resource id for BaseContructL - */ - void ConstructL( TInt aResourceId ); - - /** - * C++ default constructor. - */ - CIRBaseView(); - - /** - * Enable event observing. - * - * @param aObservers List of observers to be enabled - */ - void EnableObserverL( TInt aObservers ); - - /** - * Disable event observing. - * - * @param aObservers List of observers to be disabled - */ - void DisableObserver( TInt aObservers ); - - - // from base class CAknView - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - void DoDeactivate(); - -private: - - /** - * Saves information about which observers are currently enabled/disabled. - */ - TInt iObserverEnabled; - -public: //data - - CIRUi* iUi; - - /** - * iIsdsWrapper - * instance of the IsdsWrapper class - * To be used by all the views - */ - CIRIsdsWrapper *iIsdsWrapper; - /** - * iNowPlayingWrapper - * instance of the CIRNowPlayingWrapper class - * To be used by all the views - */ - CIRNowPlayingWrapper *iNowPlayingWrapper; - - /** - * iCurrentFocus - * Data for the current focus in the Listbox - */ - TInt iCurrentFocus; - - /** - * iTopItemIndex - * Data for the top item index in the Listbox - */ - TInt iTopItemIndex; - }; - -#endif /* C_CIRBASEVIEW_H */ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irbat.h --- a/internetradio2.0/uiinc/irbat.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRBAT_H -#define IRBAT_H - -#include - -/** - * Callback for battery Status indicator - * To display the battery level - */ -class MBatteryObserver - { -public: - /** - * DisplayBatteryValueL() - * Loads the image icon based on battery level - */ - virtual void DisplayBatteryValueL(TInt)=0; - }; - -#endif //IRBAT_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irbsserviceconstants.h --- a/internetradio2.0/uiinc/irbsserviceconstants.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Constants for Back Stepping Service Provider - * -*/ - - -#ifndef IR_BS_SERVICE_CONSTANTS_H -#define IR_BS_SERVICE_CONSTANTS_H - -// BS Service implementation UID -const TInt KBSServiceImplUid( 0x2000F840); - -// from LIW -_LIT8( KIRGenericParamServiceCmdIDStr, "cmd" ); - -// BSS Service and Interface ID -_LIT8( KIRBSServiceID, "Service.BackStepping" ); -_LIT8( KIRBSInterface, "IBackStepping" ); - -// BSS commands -_LIT8( KIRBSCmdInitialize, "Initialize" ); -_LIT8( KIRBSCmdForwardActivationEvent, "ForwardActivationEvent" ); -_LIT8( KIRBSCmdHandleBackCommand, "HandleBackCommand" ); - -// BSS in param names -_LIT8( KIRBSInParamAppUid, "AppUid" ); -_LIT8( KIRBSInParamState, "State" ); -_LIT8( KIRBSInParamEnter, "Enter" ); -_LIT8( KIRBSInParamCheckOnly, "CheckOnly" ); - -// BSS out param names -_LIT8( KIRBSOutParamStatusInfo, "StatusInfo" ); - -#endif // IR_BS_SERVICE_CONSTANTS_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/ircategoryview.h --- a/internetradio2.0/uiinc/ircategoryview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,283 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRCategoryView -* -*/ - - -#ifndef CIRCATEGORYVIEW_H -#define CIRCATEGORYVIEW_H - -#include "irbaseview.h" -#include "MViewsResponseAndErrorObserver.h" - -#include "MLogoDownloadObserver.h" -#include "IRActiveNetworkObserver.h" - - -class CIRCategoryViewContainer; - - -/** - * SearchResults View - */ -class CIRCategoryView : public CIRBaseView,public MViewsResponseAndErrorObserver, - public MLogoDownloadObserver,public MIRActiveNetworkObserver - { - -public: //Methods - - //ENums to indicate the currently selected item in the listbox. - enum TCurrentSelectedItem - { - EGenreData=0, - ELanguageData, - ECountryData, - ETopStationData - }; - /** - * NewL() - * Static constructor. - */ - static CIRCategoryView* NewL(); - - /** - * NewLC() - * Static constructor. - */ - static CIRCategoryView* NewLC(); - - /** - *~CIRCategoryView() - * Destructor. - */ - ~CIRCategoryView(); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - /** - * void SetStatusPaneTextL() - * Sets the title pane of the search results view - */ - void SetStatusPaneTextL(); - - /** - * DoChannelRequestL - * Issues a Request to Isds for getting the Channels - */ - void DoChannelRequestL(); - - /** - * void CIRCategoryView::ResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - - /** - * ErrorL() - * Handles the errors from Isds - */ - void ErrorL(); - - /** - * PresetResponseL - * Issues a listen request - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * DynInitMenuPaneL - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - - /** - * From CAknView - */ - void HandleStatusPaneSizeChange(); - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - /** - * PresetLogoDownloadedL() - * CallBack Function Returning the Preset With Logo - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * PresetLogoDownloadError() - * CallBack Function Returning the Preset With no Logo/error while downloading logo - */ - void PresetLogoDownloadError(CIRIsdsPreset* aPreset); - - /** - * LogoRequestL() - * Called by the container of this view - */ - void AdRequestL(); - /* - * SetActualFilteredItemIndex() - * sets the original index of the filtered item - */ - void SetActualFilteredItemIndex(TInt aIndex); - - /** - * GetFilteredIndex() - * Returns the filtered Index - */ - TInt GetFilteredIndex(); - - /* - * GetFirstLaunchFlag() - * returns the whether the view is launching for the first time/ - * coming back from that has been activated from this view - */ - TBool GetFirstLaunchFlag() ; - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); - - -public: - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - -protected: //Methods - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/, const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - -private: //Methods - - /** - * ConstructL() - * 2nd phase constructor - */ - void ConstructL(); - - /** - * CIRCategoryView() - * C++ default constructor. - */ - CIRCategoryView(); - - -private: // Data - - /** - * iContainer - * Container for this view. - */ - CIRCategoryViewContainer* iContainer; - - - /** - * iLoadingCancelled - * Data whether loading has been cancelled - */ - TBool iLoadingCancelled; - /* - * iIndex - * - */ - TInt iIndex; - TInt iFilteredIndex; - - TBool iFirstTimeLaunchFlag; - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; - - - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - /* - * iRequestIssued - * Checks whether the request has been issued - */ - TBool iRequestIssued; - - - -public: - /** - * iCategoryReqMade - * boolean value to know whether the category request - * has made to isds or not - */ - TBool iCategoryReqMade; - - - - }; - -#endif // CIRCATEGORYVIEW_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/ircategoryviewcontainer.h --- a/internetradio2.0/uiinc/ircategoryviewcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,307 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRCategoryViewContainer -* -*/ - - -#ifndef CIRCATEGORYVIEWCONTAINER_H -#define CIRCATEGORYVIEWCONTAINER_H - -#include -#include -#include -#include -#include "irimageconverterobserver.h" - - -class CIRCategoryView; -class CIRCategoryViewContainer; -/** - * This classes are used for Advertisements - */ -class CIRCategoryCustomListBox; -class CIRImageConverter; -class CIRFilteredModel; -class MIRListBoxArray; -class CIRCategoryAdvertisingListBox; -/** - * Container for Search Results View. - */ -class CIRCategoryViewContainer : public CCoeControl/*public CAknDoubleStyleListBox*/ , public MEikListBoxObserver, - public MIRImageConverterObserver - - { - -public: // Methods - - /** - * NewL. - * Two-phased constructor. - * Create a CIRCategoryViewContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aCtaegoryView The Category view's instance. - * @return a pointer to the created instance of CIRCategoryViewContainer. - */ - static CIRCategoryViewContainer* NewL( CIRCategoryView& aCtaegoryView, const TRect& aRect ); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRCategoryViewContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aCtaegoryView The Category view's instance. - * @return a pointer to the created instance of CIRCategoryViewContainer. - */ - static CIRCategoryViewContainer* NewLC( CIRCategoryView& aCtaegoryView, const TRect& aRect ); - - /** - * ConstructL - * 2nd phase constructor. - */ - void ConstructL( const TRect& aRect); - - /** - * CIRCategoryViewContainer() - * C++ default constructor. - * @param aView View of this container. - */ - CIRCategoryViewContainer(CIRCategoryView& aCtaegoryView); - - /** - * ~CIRCategoryViewContainer() - * Destructor. - */ - ~CIRCategoryViewContainer(); - - /** - * UpdateSearchResultsViewL() - * updates the search results data to the search results list - */ - void UpdateCategoryViewL(CDesCArray* aCategory); - - - // from base class CCoeControl - - /** - * From CCoeControl - * - * @see CCoeControl::OfferKeyEventL() - */ - - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * GetCurrentItemIndex() - * returns the index of the currently selected item - */ - TInt GetCurrentItemIndex() const; - - /** - * From MEikListBoxObserver HandleListBoxEventL - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - - /** - * GetListBoxTopIndex() - * returns the index of the top item - */ - TInt GetListBoxTopIndex() const; - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(/*const TRect& aRect*/); - - /** - * HandleResourceChange() - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); - /* - * CreateFindBoxL() - * Creates the find box for dynamic filtering - */ - CAknSearchField* CreateFindBoxL(CEikListBox* aListBox, - CTextListBoxModel* aModel, CAknSearchField::TSearchFieldStyle aStyle); - /* - * DisableFindBox() - * disable the listbox when foxus is not present - */ - void DisableFindBox(); - /** - * Function : StartTimer - * Function called to get the actual index of the station - */ - void Comparestrings(); - - /** - * HandleImageConversionEventL() - * from base class MIRImageConverterObserver - */ - void HandleImageConversionEventL( MIRImageConverterObserver::TIRImageConversionEvent aEvent, - TInt aId, TInt aError ); - /** - * PresetLogoDownloadL() - * Used to download the logos depending the preset values. - */ - void PresetLogoDownloadL(CIRIsdsPreset* aPreset); - /** - * CreateCustomListBoxL() - * Creates the custom listbox and updates the list according to that - */ - void CreateCustomListBoxL(); - /** - * CreateListBoxL() - * Creates ListBox depending upon the presence of Advertisement - */ - void CreateListBoxL(); - /** - * OpenUrlL() - * Used to connect to advertisement url - */ - void OpenUrlL( const TDesC& aHttpLink ); - - /** - * GetLogoNotSupported() - * returns whether the advertisement is supported by the sdk r not - */ - TBool GetLogoNotSupported(); - /** - * HandleLogoErrorL() - * called from the iCategoryView when the logo is not downloaded - */ - void HandleLogoErrorL(); -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect ) const; - -private: // Data - /** - * iCategoryView - * reference of the category view - */ - CIRCategoryView &iCategoryView; - CFbsBitmap* iAdBitmap; - /* - * iCurrentItemConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iCurrentItemConverter; - /* - * iLandScapeCount - * used to call the aknfind s HandlePopupFindSizeChanged function only once - */ - TInt iLandScapeCount; - TBool iFilteredFlag; - TInt iError; -public: - - /** - * iItemArray - * array for the listbox model - */ - CDesCArray* iItemArray; - /** - * iCategoryListBox - * Instance of the Category ListBox - */ - CIRCategoryAdvertisingListBox* iCategoryListBox; - /* - * iFindString - * Used to Get the Entered Search string - */ - - TBuf iFindString; - /* - * iSearchTextBox - * Instance for CAknSearchField; - */ - CAknSearchField* iSearchTextBox; - /* - * iFilteredModel - * Instance for CAknFilteredTextListBoxModel; - */ - CIRFilteredModel* iFilteredModel; - - /* - * iConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iConverter; - /** - * Temporary preset to store the raw data of Advertisements - */ - CIRIsdsPreset* iAdvPreset; - /* - * iAdPresent - * returns whether the advetisment is present or not - */ - TBool iAdPresent; - /* - * iBgContext - * Instance of CAknsBasicBackgroundControlContext - */ - CAknsBasicBackgroundControlContext* iBgContext; - /* - * iAdvString - * sets the advertisement string - */ - HBufC* iAdvString; - /* - * iListBoxArray - * Instance of MIRListBoxArray - */ - MIRListBoxArray* iListBoxArray; - - /* - * iRequestForAdvertisement - * sets when the request for advertisment conversation is made - */ - TBool iRequestForAdvertisement; - /* - * iLogoDownloadError - * sets when the advertisment future is not supported - */ - TBool iLogoDownloadError; - }; - -#endif // CIRCATEGORYVIEWCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irchangeobserver.h --- a/internetradio2.0/uiinc/irchangeobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRCHANGEOBSERVER_H -#define IRCHANGEOBSERVER_H - -#include -#include - -/** - * MIRChangeObserver - * Abstract interface for handling property change events. - */ -class MIRChangeObserver - { - public: - /** - * This is a callback function which is called when a property value of type int is changed. - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with Publish And Subscribe - * @param aValue the new value - */ - virtual void HandleChangeL(const TUid& aCategory, const TUint aKey, - const TInt aValue) = 0; - }; - - -// CLASS DECLARATION - -/** - * CIRObserver Observer class that observes changes of Property values and propogates them further. - * The class defines a handle to a property, a single data value representing - * an item of state information. - * - * @Code - * - * Updates an int value reference in correspondence - * with the current Property value - * CIRObserver::GetValue(TInt& aValue) - * - * @endcode - */ -class CIRObserver:public CActive - { -public: - /** - * Two-phased constructor. - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with Publish And Subscribe - * @param aPropertyType property type to observe - */ - static CIRObserver* NewL(MIRChangeObserver& aObserver,const TUid& aCategory, - const TUint aKey,const RProperty::TType aPropertyType); - - /** - * Destructor. - */ - ~CIRObserver(); - - /** - * Updates an int value reference in correspondence with the current Property value - * @param aValue handle to a value which will be updated - */ - void GetValue(TInt& aValue) const; - -protected: // Functions from base classes - - /** - * From CActive - * Handles an active object’s request completion event - */ - void RunL(); - - /** - * From CActive, - * Cancels and outstanding request - */ - void DoCancel(); - -private: - /** - * C++ default constructor. - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with Publish And Subscribe - * @param aPropertyType property type to observe - **/ - CIRObserver(MIRChangeObserver& aObserver, const TUid& aCategory, - const TUint aKey, const RProperty::TType aPropertyType); - - /** - * default Symbian 2nd phase constructor. - */ - void ConstructL(); - - -private: - - //Value of a subscribed category property of type int. - TInt iValueInt; - - // handle to Publish And Subscribe component - RProperty iProperty; - - MIRChangeObserver& iObserver; - // UID of Publish And Subscribe category - TUid iCategory; - // subkey to be used with Publish And Subscribe - TUint iKey; - //Type of the observed property. - RProperty::TType iPropertyType; - - }; - -#endif // IRCHANGEOBSERVER_H \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/ircommon.h --- a/internetradio2.0/uiinc/ircommon.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRCOMMON_H -#define IRCOMMON_H - -#include -namespace - { - - // --------------------------------------------------------------------------- - // Performs ResetAndDestroy() and Close() on the supplied object. - // --------------------------------------------------------------------------- - // - template - inline void DoCleanupResetAndDestroyClose( TAny* aSelf ) - { - T* self = static_cast( aSelf ); - if ( self ) - { - self->ResetAndDestroy(); - self->Close(); - } - } - - // --------------------------------------------------------------------------- - // Pushes an object onto the cleanup stack. - // - // Use this only for objects that you want to have ResetAndDestroy() and - // Close() called upon their destruction. - // --------------------------------------------------------------------------- - // - template - inline void CleanupResetAndDestroyClosePushL( T& aObject ) - { - CleanupStack::PushL( TCleanupItem( DoCleanupResetAndDestroyClose, &aObject ) ); - } - - } - -#define KUIDIRAPP 0x2000B499 - -//violates PC Lint Warning 569: Loss of information -//(initialization) (32 bits to 31 bits) - -/* -* Application Uid -*/ -static const TUid KUidInternetRadioApp = {KUIDIRAPP}; - -/** Maximum UID for the views. If some view starts to use this id, this */ -/** value must be changed. */ -const TUid KIRMaximumViewId = { 0x00000010 }; - -/* -* View IDs -*/ -static const TUid KIRTandCViewID = {1}; -static const TUid KIRMainChoiceViewID = {2}; -static const TUid KIRDiscoverStationsViewID = {3}; -static const TUid KIRBrowseByCategoryViewID = {4}; -static const TUid KIRStationsViewID = {5}; -static const TUid KIRNowPlayingViewID = {6}; -static const TUid KIRStationInformationViewID = {7}; -static const TUid KIRSavedStationsViewID = {8}; -static const TUid KIRSearchViewID = {9}; -static const TUid KIRSearchResultsViewID = {10}; -static const TUid KIRAddManuallyStationViewID = {11}; -static const TUid KIRProgressBarViewID = {12}; -static const TUid KIRUpdateWarningViewID = {15}; -static const TUid KIRPlsViewID = {17}; -static const TUid KIRSettingsViewId = {18}; -static const TUid KIRSettingsPopupViewID = {19}; -static const TUid KIRAccessPointView = {20}; -static const TUid KIRGPRSBitRateView = {21}; -static const TUid KIR3GBitRateView = {22}; -static const TUid KIRWIFIBitRateView = {23}; -static const TUid KIRStationDirectoryViewId = {30}; -static const TUid KIRCostWarningViewId={26}; -static const TUid KIRCategoryViewId={27}; -static const TUid KIRStationsViewId={28}; -static const TUid KIRTopStationsViewId={29}; -/** UID of the Channel List View */ -const TUid KVRChannelListViewId = { 0x00000004 }; -const TUid KIRHistoryListViewId = { 24 }; -const TUid KIRFirstTimeViewId = { 0x00000005 }; -static const TUid KIRStationInfoViewId = {31}; - -static const TUid KIRNowPlayingViewCustomMessageId = {106}; -static const TUid KHistoryLaunch = {100}; -static const TUid KMainViewLaunch = {104}; -static const TUid KNowPlayingLaunch = {107}; -static const TUid KNowPlayingFrmMainView = {108}; - - - -_LIT8(KIRNowPlayingViewCustomMessagePlayAfterActivation, "PlayAfterActivation"); - -/* -* Mif Files -*/ -_LIT(KMIFFILE,"InternetRadio.mif"); -_LIT(KEDWINSKINFILE,"InternetRadioEdwinSkin.mif"); - -/* -* File path -*/ -_LIT(KTAB,"\t"); - -/* -* Application name -*/ -_LIT(KAPPNAME,"Internet Radio"); - -/* -* SVG name -*/ -_LIT(KSVGLOADING,"qgn_ir_loading.svg"); -_LIT(KBUFFERING,"qgn_ir_buffering_anim.svg"); - -//Different Bitrate ranges -enum TIRBitRateQuality - { - EIRStandardQuality, - EIRHighQuality, - EIRBestQuality - }; - -#endif // IRCOMMON_H \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/ircontroleventobserver.h --- a/internetradio2.0/uiinc/ircontroleventobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for CIRControlEventObserver -* -*/ - - -#ifndef CIRCONTROLEVENTOBSERVER_H -#define CIRCONTROLEVENTOBSERVER_H - -#include -#include -#include "irui.h" - -#define KMAXLENGTH 256 - - -NONSHARABLE_CLASS( CIRControlEventObserver ) : public CActive - { - - public: - - /** - * Property type. Cannot use RProperty::TType because EByteArray == EText. - */ - enum TVRPropertyType - { - EVRPropertyInt, // Integral property type. - EVRPropertyByteArray, // Byte-array (8 bit), max size 512 bytes - EVRPropertyText // Text (16 bit), max size 512 bytes - }; - - /** - * Two-phased constructor. - * - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aPropertyType property type to observe - */ - IMPORT_C static CIRControlEventObserver* NewL( - CIRUi& aObserver, - const TUid& aCategory, - const TUint aKey, - const RProperty::TType aPropertyType); - - /** - * Destructor. - */ - ~CIRControlEventObserver(); - - /** - * Subscribes the object to listen to the specified key. Does nothing if already active. - * Must be called after construction, or after calling Cancel(). - */ - IMPORT_C void SecondConstructL(); - - -private: - - /** - * C++ default constructor overload. - * Two-phased constructor. - * - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aPropertyType property type to observe - */ - CIRControlEventObserver( - CIRUi& aObserver, - const TUid& aCategory, - const TUint aKey, - const RProperty::TType aPropertyType); - - /** - * By default Symbian 2nd phase constructor is private. - **/ - void ConstructL(); - -protected: - - // from base class Cactive - /** - * From CActive - * - * @see CActive::RunL() - */ - void RunL(); - - /** - * From CActive, - * - * @see CActive::DoCancel() - */ - void DoCancel(); - -private: // data - - - /** - * Observer to be notified when particular Property value has changed - */ - CIRUi& iObserver; - - /** - * UID of Publish And Subscribe category - */ - TUid iCategory; - - /** - * Subkey to be used with Publish And Subscribe - */ - TUint iKey; - - RProperty iProperty; - - RProperty::TType iPropertyType; - - /** The cached value of the key. */ - mutable TBuf8 iText; - TInt iValue; - }; - -#endif // CIRCONTROLEVENTOBSERVER_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/ircostwarningcontainer.h --- a/internetradio2.0/uiinc/ircostwarningcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRCostWarningContainer -* -*/ - - - -#ifndef CIRCOSTWARNINGCONTAINER_H -#define CIRCOSTWARNINGCONTAINER_H - -#include -#include - -class CIRCostWarningView; - -/** - * Container for cost warning View. - */ -class CIRCostWarningContainer :public CCoeControl - - { - -public: // Methods - - enum TIRTermsTextType - { - EIRTermsTextInvalid, - EIRTermsTextHeading, - EIRTermsTextNormal - }; - /** - * NewL. - * Two-phased constructor. - * Create a CIRPlsContainer object, which will draw itself to aRect. - * @param aRect The rectangle this view will be drawn to. - * @param aView which is a plsview's reference - * @return a pointer to the created instance of CIRPlsContainer. - */ - static CIRCostWarningContainer* NewL(const TRect& aRect ,CIRCostWarningView &aView ); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRPlsContainer object, which will draw itself - * to aRect. - * @param aRect Rectangle this view will be drawn to. - * @param aView which is a plsview's reference - * @return A pointer to the created instance of CIRPlsContainer. - */ - static CIRCostWarningContainer* NewLC(const TRect& aRect,CIRCostWarningView &aView); - - /** - * 2nd phase constructor. - * - */ - void ConstructL( const TRect& aRect ); - /** - * C++ default constructor. - * - * @param aView View of this container. - */ - CIRCostWarningContainer(CIRCostWarningView &View); - - /** - * Destructor. - */ - ~CIRCostWarningContainer(); - - - // from base class CCoeControl - - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - /** - * TandCAcceptL(). - * For setting the terms and conditions flag - */ - void TandCAcceptL() const; - - /** - * CostWarningContinueL(). - * For displaying the soft keys - */ - void CostWarningContinueL(); - - /** - * UpdateTermsL(). - * To update the required data whenever called - */ - void UpdateTermsL(); - - /** - * CreateEditorL(). - * @no param . - * Creates the CEikRichTextEditor object - */ - CEikRichTextEditor* CreateEditorL() const; - - - /** - * SetReadOnly(). - * @aReaOnly param as ETrue or EFalse . - * Making the editor as ReadOnly - */ - void SetReadOnly( TBool aReadOnly ); - - /** - * SetDataContentL(). - * @aText param is RichText object . - * Setting the RichText into the Editor - */ - void SetDataContentL( CRichText& aText ); - - /** - * CreateRichTextDataL(). - * @no param . - * Creating the CRichText object - */ - void CreateRichTextDataL(); - - /** - * GetEditor(). - * @no param . - * Getting the contents of RichText to the Editor - */ - CRichText* GetEditor() const; - - /** - * HandlePointerEventL(). - * Handles pointer events. - */ - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - - - -private: //Methods - - /** - * ReadTermsFromFileL. - * @no param . - * Reads the text from a HTML file - */ - void ReadTermsFromFileL(); - - /** - * LayoutTermsL - * @no param - * Inserts the text into the RichText object (Heading of Terms & Conditions). - */ - void LayoutTermsL(); - - /** - * GetNextTermsL - * @param aCounter,aTermsText,aTermsType - */ - TBool GetNextTermsL(TInt& aCounter, TPtrC& aTermsText, TIRTermsTextType& aTermsType); - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect ) const; - - /** - * CountComponentControls() - * @no param . - */ - TInt CountComponentControls() const; - - /** - * SizeChanged(). - * @no param . - */ - void SizeChanged(); - - /** - * ComponentControl(). - * @aIndex as param . - */ - CCoeControl* ComponentControl(TInt aIndex) const; - - /** - * HandleResourceChange(). - * Handles Changes in the Resources - */ - void HandleResourceChange(TInt aType); - - - - -private: // Data - - /** - * iTermsData. - * Data extracted from the HTML file. - */ - HBufC* iTermsData; - - /** - * iBackGroundControlContext. - * - */ - CAknsBasicBackgroundControlContext* iBackGroundControlContext; - - // Array of fonts of terms data. - CArrayFix* iTermsFonts; - - // Array of lines of terms data. - CArrayFix* iTermsLines; - - /** - * iTotalTextHeight. - * - */ - TInt iTotalTextHeight; - - /** - * iMsgView. - * A reference to CIRCostWarningView view . - */ - CIRCostWarningView &iMsgView; - - /** - * iEditor. - * CEikRichTextEditor object . - */ - CEikRichTextEditor* iEditor; - /** - * iRichText. - * RichText object - */ - CRichText* iRichText; - - - }; - -#endif // CIRCOSTWARNINGCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/ircostwarningview.h --- a/internetradio2.0/uiinc/ircostwarningview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRCostWarningView -* -*/ - - -#ifndef CIRCOSTWARNINGVIEW_H -#define CIRCOSTWARNINGVIEW_H - - -#include "irbaseview.h" -#include -class CIRCostWarningContainer; - - -class CIRCostWarningView : public CAknView - { - -public: - - /** - * Static constructor. - */ - static CIRCostWarningView* NewLC(const TRect& aRect); - - /** - * Destructor. - */ - ~CIRCostWarningView(); - - /** - * Two-phased constructor. - * Returns a pointer to the Cost Warning view - */ - static CIRCostWarningView* NewL(const TRect& aRect); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - -protected: - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage */); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - /** - * From CAknView - * - * @see CAknView::HandleStatusPaneSizeChange() - */ - void HandleStatusPaneSizeChange(); - -private: - - /** - * 2nd phase constructor - */ - void ConstructL(const TRect& /*aRect*/); - - /** - * C++ default constructor. - */ - CIRCostWarningView(); - -private: // Data - - /** - * Container for this view. - */ - CIRCostWarningContainer* iContainer; - - - }; - -#endif // CIRCostWarningView_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irdelayedactionobserver.h --- a/internetradio2.0/uiinc/irdelayedactionobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Observer interface for delayed actions -* -*/ - - -#ifndef M_MIRDELAYEDACTIONOBSERVER_H -#define M_MIRDELAYEDACTIONOBSERVER_H - -/** - * Observer interface for delayed actions. - * - * Delayed actions are used to process user actions that were done prior to - * network connection being up as soon as the connection is established. - */ -class MIRDelayedActionObserver - { - -public: - - /** - * Called when the network connection is up and ready to be used. - */ - virtual void ExecuteDelayedActionL() = 0; - - }; - -#endif // M_MIRDELAYEDACTIONOBSERVER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irdialoglauncher.h --- a/internetradio2.0/uiinc/irdialoglauncher.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for a class showing dialogs and notes. -* -*/ - - -#ifndef CIRDIALOGLAUNCHER_H -#define CIRDIALOGLAUNCHER_H - -#include -#include - -class CAknGlobalNote; -class CAknInformationNote; - -/** - * Defines dialog launcher. - * - * Helper class to show dialogs, notes etc. - */ -class CIRDialogLauncher : public CBase - { - -public: - - /** - * Static constructor. - */ - static CIRDialogLauncher* NewL(); - - /** - * Destructor - */ - ~CIRDialogLauncher(); - - /** - * Displays a confirmation note - * - * @param aText Text to show. - * @param aWaiting If true the function blocks until the note is dismissed. - */ - void ShowConfirmationNoteL( const TDesC& aText, TBool aWaiting ) const; - - /** - * Displays a confirmation note - * - * @param aTextResourceId Resource ID for the text string. - * @param aWaiting If true the function blocks until the note is dismissed. - */ - void ShowConfirmationNoteL( TInt aTextResourceId, TBool aWaiting ) const; - - /** - * Displays an information note - * - * @param aTextResourceId Resource ID for the text string. - * @param aWaiting If true the function blocks until the note is dismissed. - * @param aDialogId The dialog ID for publishing its usage (given only if publishing is wanted). - */ - void ShowInformationNoteL( TInt aTextResourceId, TBool aWaiting, - TInt aDialogId = KErrNotFound ) const; - - /** - * Displays an information note - * - * @param aErrorCode The error code whose related text is being resolved. - */ - void ShowInformationNoteL( TInt aErrorCode ) const; - - /** - * Displays an error note - * - * @param aTextResourceId Resource ID for the text string. - * @param aWaiting If true the function blocks until the note is dismissed. - */ - void ShowErrorNoteL( TInt aTextResourceId, TBool aWaiting ) const; - - /** - * Displays a global note - * - * @param aType Note type. - * @param aTextResourceId Resource ID for the text string. - */ - void ShowGlobalNoteL( TAknGlobalNoteType aType, TInt aTextResourceId ) const; - - - - /** - * Launches a query dialog. - * @param aResourceId The resource ID of the dialog to load. - * @param aDialogId The dialog ID for publishing its usage (given only if publishing is wanted). - * @return ID of the button that closed the dialog, or zero if it was the cancel button. - */ - void ShowQueryDialogL( TInt aResourceId, TInt& aValue,TInt aDialogId = KErrNotFound) const; - - /** - * Launches a query dialog. - * @param aResourceId The resource ID of the dialog to load. - * @param aPrompt Text for prompt. - * @param aDialogId The dialog ID for publishing its usage (given only if publishing is wanted). - * @return ID of the button that closed the dialog, or zero if it was the cancel button. - */ - void ShowQueryDialogL(TInt aResourceId,const TDesC& aPrompt, TInt& aValue, - TInt aDialogId = KErrNotFound) const; - - void ShowQueryDialogDeletionL(const TDesC& aMessage,TInt& aValue); - - - -protected: - -private: - - /** - * Constructor. - */ - CIRDialogLauncher(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - - /** - * Resolves the platform provided error text related to system errorcodes. - * - * @param aErrorCode The error code whose related text is being resolved. - * @return The error text provided by platform. - */ - HBufC* ResolveDefaultErrorTextLC( TInt aErrorCode ) const; - -private: // Data - - - }; - -#endif \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irdiskspacesession.h --- a/internetradio2.0/uiinc/irdiskspacesession.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRDiskSpaceSession -* -*/ - -#ifndef C_IRDISKSPACESESSION_H -#define C_IRDISKSPACESESSION_H - -#include -#include - -class MIRDiskSpaceWatcherObserver; - -/** - * Defines disk space observer. - * - * Observers defined disk and notifies observer if disk space drops below - * certain level. - */ -NONSHARABLE_CLASS( CIRDiskSpaceSession ) : public CActive - { - -public: - - /** - * Static constructor - * - * @param aDiskSpaceSessionObserver Observer who is interested if disk - * space drops below certain level. - * @param aDriveNumber drive to observe - * @param aCriticalLevel critical disk space level in bytes. If disk - * space falls below this observer is notified. - */ - static CIRDiskSpaceSession* NewL(MIRDiskSpaceWatcherObserver& - aDiskSpaceSessionObserver, - const TDriveNumber& aDriveNumber, - const TInt64& aCriticalLevel, - RFs& aFs ); - - /** - * Destructor - */ - ~CIRDiskSpaceSession(); - - /** - * Tells observed drive. - * - * @return Drive number which is been observed by this session. - */ - TDriveNumber DriveNumber(); - - /** - * Sets observer count - * - * @param aObserverCount observer count - */ - void SetObserverCount( TInt aObserverCount ); - - /** - * Returns observer count - * - * @return observer count - */ - TInt ObserverCount(); - - /** - * IsBelowCriticalLevel Returns whether or disk defined by parameter - * contains less than the critical level free disk space. - * - * @param aDriveNumber drive which space is checked - * @return ETrue if there is less free disk space than the critical - * level, otherwise EFalse. - */ - TBool IsBelowCriticalLevel( const TDriveNumber& aDriveNumber ) const; - -protected: - - // from base class CActive - /** - * From CActive - * - * @see CActive::DoCancel() - */ - void DoCancel(); - - /** - * From CActive - * - * Invoked when the observed disk's free disk space has run - * below the supplied critical level. - * Notifies the observer and regenerates the request to RFs' - * NotifyDiskSpace. - * @see CActive::RunL() - */ - void RunL(); - -private: - - /** - * C++ default constructor. Sets references. - * - * @param aDiskSpaceSessionObserver Observer who is interested if disk - * space drops below certain level. - * @param aDriveNumber drive to observe - * @param aCriticalLevel critical disk space level in bytes. If disk - * space falls below this observer is notified. - */ - CIRDiskSpaceSession(MIRDiskSpaceWatcherObserver& - aDiskSpaceSessionObserver, - const TDriveNumber& aDriveNumber, - const TInt64& aCriticalLevel, - RFs& aFs ); - - /** - * Second phase constructor - */ - void ConstructL(); - -private: - - /** - * The observer to be notified when critical disk space limit is reached. - */ - MIRDiskSpaceWatcherObserver& iObserver; - - /** - * Drive to be observed. - */ - const TDriveNumber iDriveNumber; - - /** - * Critical disk space level. - */ - const TInt64 iCriticalLevel; - - /** - * Handle to the file system. - */ - RFs& iFs; - - /** - * Number of observers of this drive. When observer count drops to - * zero drive observation can be stopped. - */ - TInt iObserverCount; - - }; - - -#endif // C_IRDISKSPACESESSION_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irdiskspacewatcher.h --- a/internetradio2.0/uiinc/irdiskspacewatcher.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRDiskSpaceWatcher -* -*/ - -#ifndef CIRDISKSPACEWATCHER_H -#define CIRDISKSPACEWATCHER_H - -#include -#include - -#include "irdiskspacewatcherobserver.h" - -class CIRDiskSpaceSession; - -// Default drive. Used to save for example settings and cache files. -const TDriveNumber KVRDefaultDrive = EDriveC; - -/** - * CIRDiskSpaceWatcher. Watcher of disk space on defined disks. - * - * Observes a disk and notifies the observer if the supplied critical disk - * space limit is reached. - */ -NONSHARABLE_CLASS( CIRDiskSpaceWatcher ): public CBase, public MIRDiskSpaceWatcherObserver - { - -public: // Methods - - /** - * Static constructor. - * - * @param aCriticalLevel, critical disk space level - * @param aDiskSpaceWatcherObserver observer of disk space status - */ - static CIRDiskSpaceWatcher* NewL( const TInt64& aCriticalLevel, - MIRDiskSpaceWatcherObserver& aDiskSpaceWatcherObserver ); - - /** - * Destructor. - */ - virtual ~CIRDiskSpaceWatcher(); - - /** - * IsBelowCriticalLevel Returns whether or disk defined by parameter - * contains less than the critical level free disk space. - * Please note that StartObservingDriveL must have been called - * before calling this. Otherwise method will return EFalse whetever - * disk space is below critical level or not. - * - * @param aDriveNumber drive which space is checked - * @return ETrue if there is less free disk space than the critical - * level, otherwise EFalse. - */ - TBool IsBelowCriticalLevel( const TDriveNumber& aDriveNumber ) const; - - /** - * Starts observing space of drive which is given as parameter - * - * @param aDriveNumber drive which will be observed - */ - void StartObservingDriveL( const TDriveNumber& aDriveNumber ); - - /** - * Stops observing space of drive which is given as parameter. - * Please note that if drive is observed by some other object - * it will be observed until all objects have asked - * VRDiskSpaceWatcher to stop observing that drive. - * - * @param aDriveNumber drive which observing will be stopped. - */ - void StopObservingDrive( const TDriveNumber& aDriveNumber ); - - // From base class MIRDiskSpaceWatcherObserver - /** - * From MIRDiskSpaceWatcherObserver - * - * @see MIRDiskSpaceWatcherObserver::NotifyLowDiskSpaceL() - */ - - void NotifyLowDiskSpaceL(); - -protected: - -private: - - /** - * C++ default constructor. - * - * @param aCriticalLevel, critical disk space level - * @param aDiskSpaceWatcherObserver observer of disk space status - */ - CIRDiskSpaceWatcher( const TInt64& aCriticalLevel, - MIRDiskSpaceWatcherObserver& aDiskSpaceWatcherObserver ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // Data - - /** - * Handle to the file system. - */ - RFs iFs; - - /** - * Critical disk space level. - */ - const TInt64 iCriticalLevel; - - /** - * The observer to be notified when critical disk space limit is reached. - */ - MIRDiskSpaceWatcherObserver& iObserver; - - /** - * Contains active objects which do the actual disk space checking - */ - RPointerArray iDiskSpaceSessions; - }; - -#endif // IRDISKSPACEWATCHER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irdiskspacewatcherobserver.h --- a/internetradio2.0/uiinc/irdiskspacewatcherobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Disk space observer, information about low disk space. -* -*/ - - -#ifndef M_IRDISKSPACEWATCHEROBSERVER_H -#define M_IRDISKSPACEWATCHEROBSERVER_H - -/** - * Observer of low disk space - * - * Observer which is interested low disk space situations. - */ -class MIRDiskSpaceWatcherObserver - { - -public: - - /** - * NotifyLowDiskSpaceL Called when the observed disk's free disk space is - * less than the critical level. Because this method does not tell which - * drive is running out of space observer must check if it by asking from - * CVRDiskSpaceWatcher - */ - virtual void NotifyLowDiskSpaceL() = 0; - -protected: - - }; - -#endif // M_IRDISKSPACEWATCHEROBSERVER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irdocument.h --- a/internetradio2.0/uiinc/irdocument.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - -#ifndef IRDOCUMENT_H -#define IRDOCUMENT_H - - -#include - -class CEikApplication; -class CPeriodic; - -//========================================class declaration CIRDocument============================================ - -/** - * This class creates the document class - * This class creates the IRUi class. - * @code - * CIRDocument* self = new (ELeave) CIRDocument(aApp) creates the document class. - * appui->ParsePlsDataL(aFileStore,aFile) //parses the pls data. - * @endcode - * - */ - -class CIRDocument : public CAknDocument - { -public: - - /** - * Function : NewL - * function to return an instance of CIRDocument - * Two phase constructor - */ - static CIRDocument* NewL(CEikApplication& aApp); - - /** - * Function : ConstructL() - * Two phase constructor - */ - void ConstructL(); - - /** - * Destructor. - */ - ~CIRDocument(); - - /** - * Function : OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs). - * @param aDoOpen,to check whether DB is already open or not. - * @param aFilename,filename. - * @param aFs,Handle to Filesession. - */ - CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs); - - /** - * Function : OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs). - * @param aFilename,filename. - * @param aFile,RFile instance. - */ - void OpenFileL(CFileStore*& aFileStore, RFile& aFile); - -protected: - - // from CEikDocument - void UpdateTaskNameL(CApaWindowGroupName* aWgName); - -private: - - /** - * CIRDocument. - * C++ default constructor. - * @param instance of CEikApplication. - **/ - CIRDocument(CEikApplication& aApp); - - /** - * CreateAppUiL. - * creates UI's instance.. - * @return CEikAppUi,instance of CEikApplication. - **/ - CEikAppUi* CreateAppUiL(); - - /** - * Callback for memory check timer. - * - * @param aSelf pointer to CIRDocument instance. - * @return Always KErrNone - */ - static TInt MemCheckTimerCallback(TAny* aSelf); - -private: - - // Memory check timer. - CPeriodic* iMemCheckTimer; - }; - - -#endif // IR_DOCUMENT_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irfilteredmodel.h --- a/internetradio2.0/uiinc/irfilteredmodel.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __IRFILTEREDMODEL_H__ -#define __IRFILTEREDMODEL_H__ - -#include -#include -#include "mirlistboxarray.h" - - - -class CIRFilteredModel : public CAknFilteredTextListBoxModel - { - public: - /** - * Implementation of @c CTextListBoxModel::NumberOfItems() - * @return The number of items the list box has. - */ - TInt NumberOfItems() const; - /** - * Returns the text of the specified item. - * @param aItemIndex Index to the item. - * @return The text of item in given index. - */ - TPtrC ItemText(TInt aItemIndex) const; - /** - * SetItemAtZero() - * sets the lastplayed flag and string - */ - void SetItemAtZero(TBool aAdFlag,HBufC& aAdvString,TBool aMainView= EFalse); - /** - * SetAdvFlag() - * sets the advertisment flag and string - */ - void SetAdvFlag(TBool aAdFlag,HBufC& aAdvString); - /* - * SetListArray() - * sets the listarray - */ - void SetListArray( MIRListBoxArray* aListArray); - /* - * iLastPlayedString - * sets the lastplayed string into this - */ - HBufC* iLastPlayedString; - /* - * iAdFlag - * saves the lastplayed/advertisement status into this - */ - TBool iAdFlag; - /** - * iListBoxArray - * Instance of MIRListBoxArray - */ - MIRListBoxArray* iListBoxArray; - /** - * MatchableTextArray () - * Implementation of CTextListBoxModel::MatchableTextArray() - * return Pointer to the text array. - */ - const MDesCArray* MatchableTextArray () const ; - }; -#endif // __IRFILTEREDMODEL_H__ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irfirsttimecontainer.h --- a/internetradio2.0/uiinc/irfirsttimecontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRFindStationsContainer -* -*/ - - -#ifndef C_CIRFIRSTTIMECONTAINER_H_ -#define C_CIRFIRSTTIMECONTAINER_H_ - -#include -#include -#include - - -class CIRFirstTimeView; -class CAknDoubleStyleListBox; - - -/** - * Container for First Time View. - */ -class CIRFirstTimeContainer : public CCoeControl, public MEikListBoxObserver - { - -public: // Methods - - /** - * Second-phase constructor. - * - * @param aRect Rect for Find Station Container - */ - void ConstructL( const TRect& aRect ); - - /** - * C++ default constructor. - * - * @param aSetupStationsLaterItem Is Setup Station Later item in the list. - */ - CIRFirstTimeContainer(CIRFirstTimeView& aFirstTimeView); - - /** - * Destructor. - */ - ~CIRFirstTimeContainer( ); - - /** - * From CCoeControl - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * From CCoeControl - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * From MEikListBoxObserver HandleListBoxEventL - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * GetCurrentItemIndex - * Returns the Current Selected index of the ListBox - */ - TInt GetCurrentItemIndex() const; - - /** - * HandleResourceChange() - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect) const; - - - -public: //Methods - /** - * PopulateFirstTimeListL - * Sets items to the listbox. - */ - void PopulateFindStationListL(); - void CreateFindStationDataL(TInt aTitle,TInt aDescription); - -private: // Data - /** - * List box used to display the list of items. - * Owned. - */ - CDesCArray* iItemArray; - - /** - * iFirstTimeView - * Instance of FirstTimeView - */ - CIRFirstTimeView& iFirstTimeView; - /** - * iListbox - * Data for the StationDirectory Listbox - */ - CAknDoubleStyleListBox* iListbox; - -}; - -#endif /*C_CIRFirstTimeContainer_H_*/ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irfirsttimeview.h --- a/internetradio2.0/uiinc/irfirsttimeview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CVRFindStationsView -* -*/ - - -#ifndef C_CIRFIRSTTIMEVIEW_H_ -#define C_CIRFIRSTTIMEVIEW_H_ - -#include "irbaseview.h" -#include "MViewsResponseAndErrorObserver.h" -#include "IRActiveNetworkObserver.h" - -//#include -#include -class CIRFirstTimeContainer; -class CIRAddManuallyStationForm; -class CIRDialogLauncher; -class MIRActiveNetworkObserver; - -class CIRFirstTimeView : public CIRBaseView, - public MViewsResponseAndErrorObserver, - public MIRActiveNetworkObserver //, public MAknToolbarObserver -{ - -public: - - /** - * NewL() - * Static constructor. - */ - static CIRFirstTimeView* NewL(); - - /** - * NewLC() - * Static constructor. - */ - static CIRFirstTimeView* NewLC(); - - /** - * Destructor. - */ - ~CIRFirstTimeView(); - -// from base class CVRBaseView - - TUid Id() const; - void HandleCommandL( TInt aCommand ); - - /** - * void CIRFirstTimeView::DynInitMenuPaneL() - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * void CIRSearchView::ResponseL() - * Activates the SearchResults view after getting the IsdsResponse - */ - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - void PresetResponseL(CIRIsdsPreset* aPreset); - void ErrorL(); - - void ShowQueryDialogL(const TDesC& aTitle, TDes& aBuffer); - - /* void CIRFirstTimeView::IssueSearchRequestL() - * Issues a search request to the Isds Client - */ - void IssueSearchRequestL(); - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); - /* - * RefreshView() - * Refreshes the view when layout changes. - */ - void RefreshView(); -protected: - -// from base class CVRBaseView - - void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - void DoDeactivate( ); - - /** - * From CAknView - */ - void HandleStatusPaneSizeChange(); - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - -private: - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * C++ default constructor. - */ - CIRFirstTimeView(); - -public: - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - - -private: - - /** - * Container for this view. - */ - CIRFirstTimeContainer* iContainer; - - /** - * Are we first time in this view for this session - */ - TBool iFirstTime; - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - /* - * iSearchValue - * Used to determine if search is issued - */ - TInt iSearchValue; - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; - -}; - -#endif /*C_CIRFirstTimeView_H_*/ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irheadseteventobserver.h --- a/internetradio2.0/uiinc/irheadseteventobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Accessory detection component for Internet Radio application -* -*/ -/* -* ============================================================================ -* Name : IRHeadsetEventObserver.h -* Part of : -* Origin : Internet Radio, Nokia -* Created : -* Description: -* Accessory detection component for Internet Radio application -* Version : -* -* --------------------------------------------------------------------------- -* -/** @file IRHeadsetEventObserver.h */ - -#ifndef MIRHEADSETEVENTOBSERVER_H -#define MIRHEADSETEVENTOBSERVER_H - - -// CLASS DECLARATION -/** -* -* Observer for the Headset button state. Implementer will be notified each time the headset button -* state has changed (button pressed). -*/ -class MIRHeadsetEventObserver - { - - public: // New functions - - /** - * This callback will notify of the Headset to be connected - */ - virtual void HeadsetConnectedCallbackL() = 0; - - /** - * This callback will notify of the Headset to be disconnected - */ - virtual void HeadsetDisconnectedCallbackL() = 0; - }; - -#endif // MIRHEADSETEVENTOBSERVER_H - -// End of File diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irhistory.h --- a/internetradio2.0/uiinc/irhistory.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRHISTORY_H -#define IRHISTORY_H - -#include - -class CIRIsdsPreset; -class CIRUi; - -//========================================class declaration CIRLastPlayedStationInfo============================================ - -/** - * This class Creates CIRLastPlayedStationInfo. - * //Please put brife about this class - * - * @code - * - * - * //Please put brife about this function - * - * - * - * @endcode - * - */ - -class CIRLastPlayedStationInfo:public CBase - { -public: - /** - * NewL. - * Two-phased constructor. - * Create a CIRLastPlayedStationInfo object - * - * @param - * @return - */ - static CIRLastPlayedStationInfo*NewL(); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRLastPlayedStationInfo object - * - * @param - * @return - */ - static CIRLastPlayedStationInfo* NewLC(); - - /** - * ~CIRLastPlayedStationInfo - * Destructor. - */ - ~CIRLastPlayedStationInfo(); - - /** - * CommitLastPlayedChannelL - * - */ - void CommitLastPlayedChannelL(); - - /** - * RetriveLastPlayedChannelL - * - */ - void RetriveLastPlayedChannelL(); - - /** - * FileExists - * - */ - TBool FileExists(); - - /** - * RemoveLastPlayedFile - * - */ - TInt RemoveLastPlayedFile(); - -protected: - /** - * ConstructL - * 2nd phase constructor. - * Perform the second phase construction of a - * CIRLastPlayedStationInfo object. - * @param - */ - void ConstructL(); - -public: - CIRIsdsPreset *iLastPlayedStation; - CIRUi* ui; - }; - -#endif //IR_HISTORY_H \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irhistorylistcontainer.h --- a/internetradio2.0/uiinc/irhistorylistcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,334 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRHistoryListContainer -* -*/ - - -/* --------------------------------------------------------------------------- -* Version history: -* Template version: -* -* -* Ref: -* Implemented SongHistory changes for channelwise songs -* -* -* ============================================================================ -*/ - -#ifndef IRHISTORYLISTCONTAINER_H -#define IRHISTORYLISTCONTAINER_H - -#include -#include - -class CIRHistoryListView; -class CIRSongHistoryInfo; -class CAknSingleStyleTreeList; - -/** - * Container for History List View. - */ -class CIRHistoryListContainer :public CCoeControl,public MAknTreeListObserver, - public MViewsResponseAndErrorObserver - - { - -public: // Methods - - /** - * NewL. - * Two-phased constructor. - * Create a CIRHistoryListContainer object, which will draw itself to aRect. - * @return a pointer to the created instance of CIRHistoryListContainer. - */ - static CIRHistoryListContainer* NewL(const TRect& aRect ,CIRHistoryListView &aView , - RPointerArray& aHistoryDataArr); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRHistoryListContainer object, which will draw itself - * to aRect. - * @return A pointer to the created instance of CIRHistoryListContainer. - */ - static CIRHistoryListContainer* NewLC(const TRect& aRect,CIRHistoryListView &aView, - RPointerArray& aHistoryDataArr); - /** - * 2nd phase constructor. - */ - - void ConstructL( const TRect& aRect, RPointerArray& aHistoryDataArr ); - - - /** - * C++ default constructor. - * - * @param aView View of this container. - */ - CIRHistoryListContainer( CIRHistoryListView& aHistoryListView ); - - /** - * Destructor. - */ - ~CIRHistoryListContainer(); - - /** - * SizeChanged() - * - */ - void SizeChanged(); - - - /** - * UpdateAllL() - * Updates all items of the list by reading data from preset data base. - */ - - void UpdateAllL(RPointerArray & aHistoryDataArr); - - /** - * InsertSongEntryL() - * Adds the specified list item - * - */ - - void InsertSongEntry(const TDesC & aSongName, const TDesC & aArtistName, - const TDesC & aChannelName, const TDesC & aChannelUrl); - - /** - * RemoveListItemL() - * Removes the specified list item - * - */ - - void RemoveListItem(const TDesC &aSongName , const TDesC & aArtistName, - const TDesC & aChannelName); - - - - // from base class CCoeControl - - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * ClearHistoryList() - * Clears the history list - */ - void ClearHistoryListL(); - - /** - * ListenUrlL() - * Connects to channel url and opens Now Playing view - */ - void ListenUrlL( TInt index ); - - /** - * From MAknTreeListObserver. - * Handles tree list events. - */ - TBool HandleTreeListEvent( CAknTreeList& aList, TAknTreeItemID aItem, - TEvent aEvent ); - - /** - * HandleResourceChange() - * Handles Changes in the resources - */ - void HandleResourceChange( TInt aType ); - - /** - * GetCurrentFocussedNode() - * To get the focus of Node of the treeList - */ - TInt GetCurrentFocussedNode(); - - /** - * GetCurrentFocussedLeaf() - * To get the focus of Leaf of the treeList - */ - TInt GetCurrentFocussedLeaf(); - - /** - * AddStationToFavorites() - * For Adding the Station name to the favorites DB. - */ - void AddStationToFavoritesL(TInt aCommand); - - /** - * DisplayErroronDBL() - * To show error note whenever the Fovorites DB is full - */ - void DisplayErroronDBL(); - - /** - * ShowFocus() - * To return whether a leaf or node is focused - */ - TInt ShowFocus(); - - /** - * void ResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - - /** - * void PresetResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * ErrorL() - * Handles error Conditions - */ - void ErrorL(); - - /** - * IsdsOrNot() - * Returns Whether ISDS channel or not. - */ - TBool IsdsOrNot(); - - /** - * GetButtonDimmed() - * Returns Whether Find in Shop Button is dimmed or not. - */ - TBool GetButtonDimmed() ; - - /** - * RemovedIsdsChannel() - * Plays or AddtoFav the removed isds channel converting it to Userdefined. - */ - void RemovedIsdsChannelL() ; - - -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect ) const; - - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * Retrieves an object of the same type as that encapsulated in aId. - * - * @param aId An encapsulated object type ID. - */ - - TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); - - - - - -private: // Data - - CIRHistoryListView & iHistoryListView; - - /** - * CAknSingleStyleTreeList object for hierarchical list - */ - CAknSingleStyleTreeList* iTreeListBox; - /** - * CAknsBasicBackgroundControlContext object - */ - CAknsBasicBackgroundControlContext* iBgContext; - /** - * Array for storing the Node's TAknTreeItemID - */ - RArray iNodeArray; - /** - * Array for storing the Leaf's TAknTreeItemID - */ - RArray iLeafArray; - /** - * Array for storing the URL Name for Listen scenario - */ - CDesC16ArrayFlat * iUrlArray; - /** - * Array for storing the Channel Name - */ - CDesC16ArrayFlat * iChannelArray; - /** - * Array for storing the Channel Type - */ - RArray iChannelTypeArray; - - /** - * Array for storing the Channel Description - */ - CDesC16ArrayFlat * iChannelDescriptionArray; - - - TBool iLoadingCancelled; - - /** - * Array for storing the Channel Id - */ - RArray iChannelIdArray; - /** - * Array for storing the MusicStoreStatus of the channel - */ - CDesC16ArrayFlat * iMusicStoreStatus; - - TBool iDimmed; - - /** - * Used to store the value of the Id when removed from the isds. - */ - TInt iChannelSyncId ; - /** - * Boolean to store whether Listen request from history view. - */ - TBool iListenFrmHistory; - /** - * Boolean to store whether AddToFav request from history view. - */ - TBool iAddFrmHistory; - /** - * Used to store the value of the current index of the view removed from the isds. - */ - TInt iChangedIndex ; - }; - -#endif // IRHISTORYLISTCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irhistorylistview.h --- a/internetradio2.0/uiinc/irhistorylistview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,336 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRHistoryListView -* -*/ - - -/* --------------------------------------------------------------------------- -* Version history: -* Template version: -* -* -* Ref: -* Implemented SongHistory changes for channelwise songs -* -* -* ============================================================================ -*/ - -#ifndef IRHISTORYLISTVIEW_H -#define IRHISTORYLISTVIEW_H - - - -#include - -//For Touch Toolbar for find in shop -#include -#include -#ifdef MUSICSHOP_AVAILABLE -#include //For Find in Shop -#include //For Find in Shop -#endif -#include "irbaseview.h" -#include "IRHistoryListContainer.h" -#include "UINotifyHandler.h" -#include "irdialoglauncher.h" -#include "IRActiveNetworkObserver.h" - -class CIRHistoryListContainer; -class MSongHistoryUINotifyHandler; -class CIRSongHistoryEngine; -class CIRDialogLauncher; -class MIRActiveNetworkObserver; - -class CMPXFindInMShop; //For Find in Shop - -class CIRHistoryListView : public CIRBaseView, - public MSongHistoryUINotifyHandler, - public MAknToolbarObserver, - public MIRActiveNetworkObserver - { - -public: - - /** - * Static constructor NewLC(). - */ - static CIRHistoryListView* NewLC(); - /** - * Static constructor NewL(). - */ - static CIRHistoryListView* NewL(); - - /** - * Destructor. - */ - ~CIRHistoryListView(); - - //MSongHistoryUINotifyHandler functions - /** - * NextSongReceivedL() - * Adds the currently playing song to the history's array. - */ - - void NextSongReceivedL( const TDesC& aSongName, const TDesC& sArtistName, - const TDesC& aChannelName, const TDesC& aChannelUrl ); - - /** - * ChannelChangedL( ). - * Moves the currently playing channel to the top. - */ - void ChannelChangedL( const TDesC& aSongName, const TDesC& sArtistName, - const TDesC& aChannelName, const TDesC& aChannelUrl ); - - /** - * RemoveSongEntry(). - * Removes the oldest song from History array. - */ - TInt RemoveSongEntry( const TDesC& /*aSongName*/, const TDesC& /*aArtistName*/, - const TDesC& /*aChannelName*/, const TDesC& /*aChannelUrl*/ ); - - /** - * RemoveChannelEntry(). - * Not in use now! - */ - TInt RemoveChannelEntry( const TDesC& aSongName, const TDesC& aArtistName, - const TDesC& aChannelName, const TDesC& aChannelUrl ); - - /** - * NotifyDataChangeToUIError(). - * Notification to UI of any error Conditions. - */ - void NotifyDataChangeToUIError(TInt /*aError*/); - - /** - * ClearSongHistoryItemL(). - * Clears the Song History List Array - */ - void ClearSongHistoryItemL(); - - /** - * GetAllListL(). - * Getting the stored List from the History Db. - */ - void GetAllListL(); - - /** - * Id(). - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - /** - * DynInitMenuPaneL() - * For Dynamic Handling of the Menu Pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * HandleMetaDataReceived() - * Handling the Metadata Receving - */ - void HandleMetaDataReceived( const CIRMetaData& aMetaData ); - - /** - * For Touch Toolbar - * Handles the Dynamic changes on the toolBar - */ - void DynInitToolbarL(TInt aResourceId, CAknToolbar* aToolbar ); - /** - * OfferToolbarEventL() - * Handles any event on the Touch ToolBar - */ - void OfferToolbarEventL( TInt aCommand ); - /** - * For ConstructToolbarL(); - * Constructs the Touch ToolBar - */ - void ConstructToolbarL(); - - /** - * To Launch Find in Shop Option - * LaunchMusicShopL(); - */ - void LaunchMusicShopL(); - - /** - * To Launch Find in Shop Option - * DoFindInMusicShopL() - */ - void DoFindInMusicShopL( const TDesC& aSongName, - const TDesC& aArtistName, - const TDesC& aAlbumName ); - - /** - * To Launch Find in Shop Option when selected from the toolbar - * FindInShopOption() - */ - void FindInShopOptionL(); - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - - /** - * Get the FindInShop Instance is null or not. - * GetFindInShopInstance() - */ - TBool GetFindInShopInstance(); - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); - - /** - * Refreshes the view on synchronisation. - * RefreshHistoryL() - */ - void RefreshHistoryL(); - - /** - * Gets the History's engine instance. - * HistoryEngineInstance() - */ - CIRSongHistoryEngine* HistoryEngineInstance() ; - -protected: - - - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - /** - * From CAknView - * - * @see CAknView::HandleStatusPaneSizeChange() - */ - void HandleStatusPaneSizeChange(); - - -private: - - /** - * 2nd phase constructor - */ - void ConstructL(); - - /** - * C++ default constructor. - */ - CIRHistoryListView(); - - -public: - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - -private: // Data - - /** - * Container for this view. - */ - CIRHistoryListContainer* iContainer; - - /** - * View Id of the previous view. - */ - TVwsViewId iPrevViewId; - - /** - * RPointerArray of CIRSongHistoryInfo - */ - RPointerArray iHistoryDataArr; - - /** - * Pointer to CIRSongHistoryEngine - */ - CIRSongHistoryEngine* iHistoryEngine; - - - /** - * For Find in Music Shop - * - */ - CMPXFindInMShop* iMPXFindInShop; //For Find in Shop - - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - /* - * iAddToFav - * Checks whether request is for adding to favorites - */ - TBool iAddToFav; - - /* iListenRequest - * Checks whether request is for listen - */ - TBool iListenRequest; - - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; - - - }; - -#endif // IRHISTORYLISTVIEW_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irisdswrapper.h --- a/internetradio2.0/uiinc/irisdswrapper.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,434 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Wrapper class for Isds functions -* -*/ - - - - - -#ifndef IRISDSWRAPPER_H -#define IRISDSWRAPPER_H - -#include -#include -#include "misdsresponseobserver.h" -#include "isdsclientdll.h" -#include - -const TInt KPresetsArrayMaxLength = 50; - - -class CIRIsdsClient; -class CIRBrowseCatagoryItems; -class CIRBrowseChannelItems; -class CIRSettings; -class CIRFavoritesDb; -class CIRIsdsPreset; -class CIRDialogLauncher; -class CAknWaitDialog; - -class MViewsResponseAndErrorObserver; -class MSyncPresetObserver; - -class CIRIsdsWrapper:public CBase,public MIsdsResponseObserver,public MProgressDialogCallback -{ - -public: - /* Function : NewL - * function to return an instance of CIRIsdsWrapper - * Two phase constructor - */ - static CIRIsdsWrapper* NewL(CIRSettings& aIRSettings,CIRFavoritesDb& aFavPresets); - /** - * NewLC. - * Two-phased constructor. - * Create a CIRIsdsWrapper object, which will draw itself - * to aRect. - */ - static CIRIsdsWrapper* NewLC(CIRSettings& aIRSettings,CIRFavoritesDb& aFavPresets); - /** - * ~CIRIsdsWrapper - * Destructor. - */ - ~CIRIsdsWrapper(); - - /** - * ConstructL - * 2nd phase constructor. - * Perform the second phase construction of a - * CIRSearchView object. - */ - void ConstructL(); - - /** - * CIRSearchView. - * C++ default constructor. - */ - CIRIsdsWrapper(CIRSettings& aIRSettings,CIRFavoritesDb& aFavPresets); - /** - * IsdsSearchRequestL - * Issues a search request to the Isds Client - */ - void IsdsSearchRequestL(MViewsResponseAndErrorObserver* aViewObserver, - const TDesC& aIsdsSearchString); - - /** - * IsdsCategoryRequestL - * Issues a category request to the Isds Client - */ - void IsdsCategoryRequestL(MViewsResponseAndErrorObserver* aViewObserver, - CIRIsdsClient::TIRIsdsclientInterfaceIDs aIDType); - - /** - * IsdsChannelRequestL - * Issues a channel request to the Isds Client - */ - void IsdsChannelRequestL(MViewsResponseAndErrorObserver* aViewObserver,TInt aIndex); - - /** - * IsdsListenRequestL - * Issues a Listen request to the Isds Client - */ - void IsdsListenRequestL(MViewsResponseAndErrorObserver* aViewObserver, - TInt aCurrentIndex,TBool aHistoryBool=EFalse); - - /** - * MIsdsResponseObserver::IsdsErrorL() - * Used to Indiacte error in retrieving data from Isds - * @param aErrCode- contains error code - */ - void IsdsErrorL(TInt aErrCode); - - /** - * MIsdsResponseObserver::IsdsCatogoryDataReceivedL() - * Called when catogory information is recieved from ISDS - * @param aParsedStructure - contains catogory info - */ - void IsdsCatogoryDataReceivedL( - CArrayPtrFlat & aParsedStructure) ; - - /** - * MIsdsResponseObserver::IsdsChannelDataReceivedL() - * Called when channel information is recieved from ISDS - * @param aParsedStructure - contains Channel info - */ - void IsdsChannelDataReceivedL( - CArrayPtrFlat & aParsedStructure); - - /** - * MIsdsResponseObserver::IsdsPresetDataReceivedL() - * Called when preset information is recieved from ISDS - * @param aParsedStructure - contains Preset info - */ - void IsdsPresetDataReceivedL( - CArrayPtrFlat & aParsedStructure); - - /** - * MIsdsResponseObserver::IsdsIRIDRecieved() - * Called to provide IRID - * @param aIRID - contains IRID recived from Isds - */ - void IsdsIRIDRecieved(const TDesC& /*aIRID*/); - - /** - * MIsdsResponseObserver::IsdsOtaInfoRecieved() - * called back when OTA info is recieved and Ui needs to be intimated - * @param CIROTAUpdate&,the ota information - */ - void IsdsOtaInfoRecieved( CIROTAUpdate &/*aOtaData*/); - - /** - * MIsdsResponseObserver::IsdsPresetRemovedL() - * called back when the preset that is synced was removed from isds - * @param TInt,the preset id - */ - void IsdsPresetRemovedL(TInt /*aId*/); - - /** - * MIsdsResponseObserver::IsdsPresetChangedL() - * called back when the preset that is synced has been changed in the isds - * @param CIRIsdsPreset&,the new preset data - */ - void IsdsPresetChangedL(CIRIsdsPreset& /*aPreset*/); - - /** - * MIsdsResponseObserver::IsdsPresetNoChangeL() - * called back when the preset that is synced has not been changed - */ - void IsdsPresetNoChangeL(); - /** - * IsdsPresetRequestL() - * called by all the views to get preset data - */ - void IsdsPresetRequestL(MViewsResponseAndErrorObserver* aViewObserver,TInt aIndex, - TInt aCommand,TInt aReqForLogo = ETrue,TInt aHistoryBool=EFalse); - - - /** - * CIRIsdsWrapper::GetISDSInstance() - * Returns the ISDS Instance - */ - CIRIsdsClient* GetISDSInstance(); - - /** - * CIRIsdsWrapper::IsdsCancelRequest() - * Cancels the Isds request made by UI - */ - void IsdsCancelRequest(); - - /** - * CIRIsdsWrapper::GetDialogLauncherInstance() - * Returns the Dialog Launcher Instance - */ - CIRDialogLauncher* GetDialogLauncherInstance(); - - /** - * GetStationsData() - * returns the instance of iStationsData - */ - CDesCArrayFlat* GetStationsData(); - void CreateWaitDialogL(); - /** - * Called when the refresh dialog is dismissed. - * @param aButtonId The button that was used to dismiss the dialog. - */ - void DialogDismissedL( TInt aButtonId ); - - - /** - * CIRIsdsWrapper::GetBannerUrl() - * Returns the BannerUrl - */ - HBufC* GetBannerUrl(); - - /** - * DestroyWaitDialogL() - * Destroys the Wait Dialog - */ - void DestroyWaitDialogL(); - - /** - * CIRIsdsWrapper::SetCurrentPlayingIndex() - * Sets the Current Playing Index - */ - void SetCurrentPlayingIndex(TBool aCurrentPlayingIndex); - - /** - * CIRIsdsWrapper::GetCurrentPlayingIndex() - * Returns The current Playing Index - */ - TBool GetCurrentPlayingIndex(); - - /** - * CIRIsdsWrapper::SetListenRequest() - * Sets The ListenRequest if Listen is Done - */ - void SetListenRequest(TBool aListenRequest); - - /** - * CIRIsdsWrapper::GetListenRequest() - * Returns the Listen Request Value - */ - TBool GetListenRequest(); - /** - * CIRIsdsWrapper::ActiveWaitDialog(); - * Returns checks Whether tHe IsdS waitDialog is Active or Not - */ - - TBool ActiveWaitDialog(); - - /** - * CIRIsdsWrapper::SetSyncPresetObserver() - * Notifies the sync preset call back to the observer - * @param MSyncPresetObserver, observer for the synchronization - */ - void SetSyncPresetObserver(MSyncPresetObserver* aSyncPresetObserver); - - void SetSyncPresetObserver(MSyncPresetObserver* aSyncPresetObserver, - MViewsResponseAndErrorObserver* aViewObserver); - - - TInt GetErrorCode(); - - /** - * CIRIsdsWrapper::SetSyncReqFromMainView() - * called before the syncrequest is made form MAINVIEW - * once the reponse receives saying "preset removed", - * error note "item no longer available" should not be displayed - * @param aValue, to know whether the syncrequest is made form mainview or not - */ - void SetSyncReqFromMainView(TBool aValue); - -public: //data - - /** - * iStationsData - * Data for stationa data - */ - CDesCArrayFlat* iStationsData; - /** - * iCategoryData - * Data for category data - */ - CDesCArrayFlat* iCategoryData; - - /** - * iCategoryData - * Array which contains the data for imgUrl of each channel - */ - CDesCArrayFlat* iChannelImgUrl; - - - /** - * iChannelID - * stores the channel id of currently playing channel - */ - TInt iChannelID; - - /** - * iChannelIdArray - * for station id comparision - */ - RArray iChannelIdArray; - - - /** - * iIRSettings - * Instance of CurrentOperationSettings - */ - CIRSettings& iIRSettings; - - /** - * iISDSClient - * ISDS INTERFACE - */ - CIRIsdsClient* iISDSClient; - - /** - * iViewObserver - * data of MViewsResponseAndErrorObserver class - */ - MViewsResponseAndErrorObserver *iViewObserver; - - /** - * iFavPresets - * Instance of favoritesDb class - */ - CIRFavoritesDb& iFavPresets; - - /** - * iReqAddToFav - * Boolean value to determine whether add to favorites is requested - */ - TBool iReqAddToFav; - - /** - * iReqForLogo - * Boolean value to determine whether logo is requested - */ - TBool iReqForLogo; - - /** - * iSSearchRequest; - * Checks if the Isds request is for search - */ - TBool iSSearchRequest; - - /** - * iError - * Checks if there is any Isds error. - */ - TBool iError; - TBool iConnTimeOut; - TBool iDialogDismissed; - - /** - * iDiaologLauncher - * instance of CIRDiaologLauncher - */ - CIRDialogLauncher* iDiaologLauncher; - - -private: - /** - * iBannerUrl - * Banner Url of the Advertisement for Channels - */ - HBufC* iBannerUrl; - - /** - * iWaitDialogWhileSearch - * Set When request For Search - */ - TBool iWaitDialogWhileSearch; - - /** - *iCurrentPlayingIndex - * index of currently playing item - */ - TInt iCurrentPlayingIndex; - - /** - * iListenRequest - * Set When request For Listen - */ - TBool iListenRequest; - - TBool iHistoryBool ; - /** - * iSyncPresetObserver - * observer for the prest synchronization - */ - MSyncPresetObserver* iSyncPresetObserver; - TBool iKNotFound; - -public: - - /** - * iCliokThroughUrl - * ClickThroughUrl of the Advertisement for Channels - */ - HBufC* iClickThroughUrl; - /** - * iBannerUrl - * Banner Url of the Advertisement for Channels - */ - HBufC* iCatBannerUrl; - - /** - * iCliokThroughUrl - * ClickThroughUrl of the Advertisement for Channels - */ - HBufC* iCatClickThroughUrl; - /** - * iWaitDialog - * calls the waitdialog owned by - * CAknWaitDialog - */ - CAknWaitDialog* iIsdsWaitDialog; - TBool iCatBannerTag; - TBool iChannelBannerTag; - - /** - * iSyncReqFromMainView - * used to know whether the sync request is made from mainview or not - */ - TBool iSyncReqFromMainView; - - -}; - -#endif //IRISDSWRAPPER_H \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irmaincontainer.h --- a/internetradio2.0/uiinc/irmaincontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,574 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRMainContainer -* -*/ - - -#ifndef CIRMAINCONTAINER_H -#define CIRMAINCONTAINER_H - -#include -#include -#include -#include -#include - -#include "irimageconverterobserver.h" - -class CIRMainView; -class CIRMainContainer; -class CAknIconArray; -class CIRImageConverter; -/** - * This classes are used for Advertisements - */ -class CIRFilteredModel; -class MIRListBoxArray; -class CIRAdvertisingListBox; - /** - * Container for Search Results View. - */ -class CIRMainContainer : public CCoeControl, - public MEikListBoxObserver, - public MIRImageConverterObserver, - MProgressDialogCallback - { - -public: // Methods - - - /** - * NewL. - * Two-phased constructor. - * Create a CIRMainContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aView The MainView's instance. - * @return a pointer to the created instance of CIRMainContainer. - */ - static CIRMainContainer* NewL( CIRMainView& aView, const TRect& aRect ); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRMainContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aView The MainView's instance. - * @return a pointer to the created instance of CIRMainContainer. - */ - static CIRMainContainer* NewLC( CIRMainView& aView, const TRect& aRect ); - /** - * ConstructL - * 2nd phase constructor. - */ - void ConstructL( const TRect& aRect); - - /** - * CIRMainContainer() - * C++ default constructor. - * @param aView View of this container. - */ - CIRMainContainer(CIRMainView& aView); - - /** - * ~CIRMainContainer() - * Destructor. - */ - ~CIRMainContainer(); - - - // from base class CCoeControl - - /** - * From CCoeControl - * @see CCoeControl::OfferKeyEventL() - */ - - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * From MEikListBoxObserver HandleListBoxEventL - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * HandleResourceChange() - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); - /* - * CreateFindBoxL() - * Creates the find box for dynamic filtering - */ - CAknSearchField* CreateFindBoxL(CEikListBox* aListBox, - CTextListBoxModel* aModel, CAknSearchField::TSearchFieldStyle aStyle); - /* - * GetListPointer() - * returns List box pointer - */ - CIRAdvertisingListBox* GetListPointer(); - /* - * GetFilterdModelPointer() - * returns filtered model pointer - */ - CIRFilteredModel* GetFilterdModelPointer(); - /* - * GetSearchBoxPointer() - * returns Find box pointer - */ - CAknSearchField* GetSearchBoxPointer(); - /** - * Formats list item string with given arguments - * - * @param aFirstRow text for first row - * @param aSecondRow text for second row - * @param aIconId Icon ID used on item - */ - HBufC* FormatItemStringLC( const TDesC& aFirstRow, const TDesC& aSecondRow, TInt aIconId ); - /** - * UpdateAllL() - * updates the search results data to the search results list - */ - void UpdateAllL(); - /* - * DisableFindBox() - * disable the listbox when foxus is not present - */ - void DisableFindBox(); - - /** - * Function : Comparestrings - * Function called to get the actual index of the station - */ - void Comparestrings(); - - /** - * HandleImageConversionEventL() - * from base class MIRImageConverterObserver - */ - void HandleImageConversionEventL( MIRImageConverterObserver::TIRImageConversionEvent aEvent, - TInt aId, TInt aError ); - /** - * CreateCustomListBoxL() - * Creates the custom listbox and updates the list according to that - */ - void CreateCustomListBoxL(); - /** - * StartConvertL() - * used to convert the images depending the index passed - */ - void LastPlayedDisplayL(); - /** - * CIRSearchResultsViewContainer::cmdMarkL() - * implement the mark/unmark feature - */ - void cmdMarkL(TInt item,TBool mark); - /** - * DeleteMultiStationsL() - * Deletes multiple elements from preset - */ - void DeleteMultiStationsL(); - /** - * DeleteChannelL() - * used to convert the images depending the index passed - */ - void DeleteChannelL( TInt aIndex ) ; - // from base class MIRPresetChangesObserver - /** - * From MPSPresetObserver - * - * @see HandlePresetChangedL( TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aReason ) - */ - void HandlePresetChangedL( TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aReason ); - /** - * StartConvertL() - * used to convert the images depending the index passed - */ - void CheckConnectionL(TInt aUrlIndex); - - /** - * DisplayFilterListBoxL() - * Displayin gof filter box depending on favourites - */ - void DisplayFilterListBoxL(); - /** - * DialogDismissedL - * Called when/if the dialog has been dismissed. - * @param aButtonId - */ - void DialogDismissedL( TInt aButtonId ); - /** - * Function : FilteredIndexL - * Function called when mark all is called after dynamic filtering - */ - void FilteredIndexL(); - /* - * CreateProgressBarL() - * creates a progress bar. - */ - void CreateProgressBarL(); - /* - * SetIconsL() - * Set Icons to the List - */ - void SetIconsL(); - /* - * RemoveFromLogoArray() - * Removes the station from the logoarray - */ - void RemoveFromLogoArray(TInt aIndex); - /* - * SetContextSenstiveFlag() - * Set context senstive flag when the element is marked and - * single clicked and resets when all the elements are unmarked - */ - void SetContextSenstiveFlag(TBool aContextSensitiveFlag); - /* - * EnableEmptyListBox() - * creates the empty listbox - */ - void EnableEmptyListBox(); - /** - * GetListBoxCount() - * returns the number of elements in the listbox - */ - TInt GetListBoxCount(); - /** - * GetCurrentItemIndex() - * returns the index of the currently selected item - */ - TInt GetCurrentItemIndex() const; - - /** - * GetListBoxTopIndex() - * returns the index of the top item - */ - TInt GetListBoxTopIndex() const; - /** - * GetUrlIndex() - * returns the number of elements in the listbox - */ - TInt GetUrlIndex(); - /** - * GetLastPlayedChannel() - * returns whether the last played station exists/not. - */ - TBool GetLastPlayedChannel(); - /* - * GetContextSenstiveFlag() - * returns the context sensitive flag - */ - TBool GetContextSenstiveFlag(); - /* - * GetFilteredFlag() - * returns the filtered flag - */ - TBool GetFilteredFlag(); - /** - * Creates default (empty) icon - * - * @return Default icon - */ - CGulIcon* CreateDefaultIconL(); - void SendRequestForLastPlayedLogoL(); - /* - * CIRIsdsPreset* GetTempPreset() - * returns the temporary preset - */ - CIRIsdsPreset* GetTempPreset(); - /** - * HandleLogoErrorL() - * called from the iSearchResultsView when the logo is not downloaded - */ - void HandleLogoErrorL(); - /** - * PresetLogoDownloadL() - * Used to download the logos depending the preset values. - */ - void PresetLogoDownloadL(CIRIsdsPreset* aPreset); - /** - * RefreshViewL() - * Resets all the values and draws the view with new values. - */ - void RefreshViewL(); - /** - * SetFilteredIndexArrayL() - * stores the indexs of all the filtered elements - */ - void SetFilteredIndexArrayL(); - /** - * CheckFiltered() - * checks whether the deleted index exists in the filteredindex array or not - */ - TBool CheckFiltered(); - -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect ) const; - /** - * StartConvertL() - * used to convert the images depending the index passed - * - */ - void StartConvertL( CIRImageConverter& aConverter, TInt aIndex, TInt aId ); - - void ProcessPointerEventL( TInt /* aIndex */); - -private: // Data - /** - * iItemArray - * array for the listbox model - */ - CDesCArray* iListArray; - - /** - * iMainView - * Data for CIRStationsView view - */ - CIRMainView& iMainView; - /* - * iConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iConverter; - - /* - * iCurrentItemConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iCurrentItemConverter; - /* - * iBgContext - * Instance of CAknsBasicBackgroundControlContext - */ - CAknsBasicBackgroundControlContext* iBgContext; - /** - * iFavouritesListBox - * Instance of the Stations ListBox - */ - CIRAdvertisingListBox* iFavouritesListBox; - /* - * iSearchTextBox - * Instance for CAknSearchField; - */ - CAknSearchField* iFavouritesSearchBox; - /** - * iLabel - * instance for CAknDoubleNumberStyleListBox - */ - CAknDoubleLargeStyleListBox* iEmptyListbox; - /** - * iProgressDialog - * Not owned by CAknExNoteContainer object. - */ - CAknProgressDialog* iProgressDialog; - - /** - * iProgressInfo - * Not owned by CAknExNoteContainer object. - */ - CEikProgressInfo* iProgressInfo; - /* - * iFilteredModel - * Instance for CAknFilteredTextListBoxModel - */ - CIRFilteredModel* iFilteredModel; - /* - * iListBoxArray - * Instance of MIRListBoxArray - */ - MIRListBoxArray* iListBoxArray; - /** - * Temporary preset to store url and the logo data - */ - CIRIsdsPreset *iTempPreset; - /* - * iItem - * sets the itemfor filtered zeroth index - */ - HBufC *iItem; - /* - * iLastplayed - * sets the Lastplayed string - */ - HBufC *iLastplayed ; - /* - * iAdvString - * sets the advertisement string - */ - HBufC* iAdvString; - /* - * iInvalidIconIndices - * instance of RArray - */ - RArray iInvalidIconIndices; - /* - * iLogosArray - * instance of RArray - */ - RArray iLogosArray; - /* - * iNoLogosArray - * instance of RArray - */ - RArray iNoLogosArray; - /* - * iInvalidIconIndices - * instance of RArray - */ - RArray iFilterIndexExist; - /* - * iFindString - * Used to Get the Entered Search string - */ - TBuf iFindString; - /** - * iMultiDeleteString - * contains the data that how many elements are deleted after mark - */ - RBuf iMultiDeleteString; - /** - * iFinalCount - * contains the final count to present after the deletion of marked items - */ - TInt iFinalCount; - /* - * iUrlIndex - * contains the indx of the url - */ - TInt iUrlIndex; - /** - * iProgressCount - * contains the number of counts the progress has incremented - */ - TInt iProgressCount; - /* - * iDeletingCount - * contains the number of elements to be deleted - */ - TInt iDeletingCount; - /* - * iImageCount - * have the position of image that has to be placed in iconarray - */ - TInt iImageCount; - /* - * iLandScapeCount - * used to call the aknfind s HandlePopupFindSizeChanged function only once - */ - TInt iLandScapeCount; - /** - * iAftertime - * contains the time after the deletion of station - */ - TTime iAftertime; - /** - * iBeforetime - * contains the time before the deletion of stations started - */ - TTime iBeforetime; - /** - * iIntervalsec - * contians the difference of time taken to delete the elements - * i.e., (iAftertime-iBeforetime) - */ - TTimeIntervalMicroSeconds iIntervalsec; - /** - * markedCount - * conatians the cunt of marked elements - */ - TReal32 iMarkedElementsCount; - /** - * iProgress - * contains the amount of progress should be done inorder to update the progress dialog - */ - TReal32 iProgress; - /* - * iFilteredFlag - * This flag is set when dynamic filtering is done and - * will be reseted when the characters in the filter box is deleted - */ - TBool iFilteredFlag; - /* - * iContextSensitiveFlag - * sets when any station is marked and the element is single clicked - */ - TBool iContextSensitiveFlag; - /* - * iImageLast - * sets when lastplayed has logo data - * and resets when the logo is dowmloaded - */ - TBool iImageLast; - /* - * iLastPlayedChannel - * variable to set the lastplayed station - */ - TBool iLastPlayedChannel; - /* - * - * Flag for progress dialog status - */ - TBool iProgressFlag; - /* - * iProgressStart - * this will be set when the progressdialog is created - */ - TBool iProgressStart; - /* - * iMoveFocusLast - * this will be set when the Move is enabled and the focus is on the lastplayed - */ - TBool iMoveFocusLast; - /* - * iLogoDownloadError - * sets when the advertisment future is not supported - */ - TBool iLogoDownloadError; - TInt iError; - }; - -#endif // CIRMAINCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irmainview.h --- a/internetradio2.0/uiinc/irmainview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,497 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRMainView -* -*/ - - -#ifndef CIRMAINVIEW_H -#define CIRMAINVIEW_H - - -#include "irbaseview.h" -#include -#include -#include - -#include "irpreset.h" -#include "MViewsResponseAndErrorObserver.h" -#include "IRActiveNetworkObserver.h" -#include "msyncpresetobserver.h" // MSyncPresetObserver -#include "MLogoDownloadObserver.h" - -class CIRMainContainer; -class CAknWaitDialog; -class MLogoDownloadObserver; - - -/** - * SearchResults View - */ -class CIRMainView : public CIRBaseView, - public MAknToolbarObserver, - public MPSPresetObserver, - public MIRActiveNetworkObserver, - public MSyncPresetObserver, - public MLogoDownloadObserver, - public MViewsResponseAndErrorObserver - - { - -public: //Methods - /** - * NewL() - * Static constructor. - */ - static CIRMainView* NewL(); - - /** - * NewLC() - * Static constructor. - */ - static CIRMainView* NewLC(); - - /** - *~CIRMainView() - * Destructor. - */ - ~CIRMainView(); - /** - * ConstructL() - * 2nd phase constructor - */ - void ConstructL(); - - /** - * CIRMainView() - * C++ default constructor. - */ - CIRMainView(); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - - /** - * DynInitMenuPaneL - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * ConstructToolbarL() - * Constructs a touch toolbar - */ - virtual void ConstructToolbarL(); - - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - - /** - * From CAknView - */ - void HandleStatusPaneSizeChange(); - - /* - * OfferToolbarEventL - * - */ - void OfferToolbarEventL(TInt aCommand ); - /* - * SetToolbarItems - * Sets the touch tool bar items - */ - void SetToolbarItems(); - - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - /** - * HandlePresetChangedL - * whenever their is any change in preset - * the function will get invoked. - */ - void HandlePresetChangedL( TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aReason ); - /** - * ConnectToLastPlayedStationL() - * Connects to the last played station. - */ - void ConnectToLastPlayedStationL(); - /* - * GetMainContainer() - * returns pointer to main container - */ - CIRMainContainer* GetMainContainer(); - /** - * SetUrlFromPresetL. - */ - void SetUrlFromPresetL(TInt aUrlIndex); - /** - * DoConnectToChannelL - * Connects to the station . - */ - void DoConnectToChannelL( TInt aUrlIndex ); - /** - * SyncPresetL. - */ - void SyncPresetL(TInt aChid,const TDesC &aModifiedTime); - /** - * SetListBoxMarkedCount() - * sets the marked item count in the listbox - */ - void SetListBoxMarkedCount(TInt aMarkedItemCount); - /** - * SetMarkedFlag() - * sets the marked flag - */ - void SetMarkedFlag(TInt aMarkedFlag); - /** - * SetMarkedAllFlag() - * sets the marked All flag value. - */ - void SetMarkedAllFlag(TInt aMarkedAllFlag); - /* - * SetRequestPendingStatus() - * Sets the request pending state - */ - void SetRequestPendingStatus(TBool aRequestPending); - /* - * SetFavListen() - * Sets the listen is from favourites or not - */ - void SetFavListen(TBool aFavListen); - /* - * SetActualFilteredItemIndex() - * sets the original index of the filtered item - */ - void SetActualFilteredItemIndex(TInt aFilteredIndex); - /** - * SetMovingFlag() - * Sets the view is in move mode . - */ - void SetMovingFlag(TBool aValue); - /** - * GetMarkedIndexArray() - * returns the array of elements marked in the listbox - */ - RArray GetMarkedIndexArray(); - /** - * GetListBoxMarkedCount() - * returns the number of elements marked in the listbox - */ - TInt GetListBoxMarkedCount(); - /** - * GetMarkedFlag() - * returns the iMarkedflag value - */ - TInt GetMarkedFlag(); - /** - * GetMarkedAllFlag() - * returns the iMarkedAllflag value - */ - TInt GetMarkedAllFlag(); - /** - * GetCurrentIndex() - * returns the index of the station. - */ - TInt GetCurrentIndex(); - /** - * GetLastPlayedStatus() - * returns the iLastplayed value - */ - TBool GetLastPlayedStatus(); - /** - * GetAddToFavouratesFlag() - * returns whether any station is added to favourates or not. - */ - TBool GetAddToFavouratesFlag(); - /* - * GetRequestPendingStatus() - * returns whether an active request is pending - */ - TBool GetRequestPendingStatus(); - /* - * GetFavListen() - * returns /Checks whether request is listen to favorites. - */ - TBool GetFavListen(); - /** - * GetAddDimmingStatus() - * returns the dimming status value for Enable/Disabling Add to favourites option - */ - TBool GetAddDimmingStatus(); - - /** - * GetEditDimmingStatus() - * returns the dimming status value for Enable/Disabling Edit option - */ - TBool GetEditDimmingStatus(); - /** - * GetMovingFlag() - * Gets the view is in move mode or not. - */ - TBool GetMovingFlag(); - - /** - * from MSyncPresetObserver - * SyncPresetRemovedL() - * called back when the preset that is synced was removed from isds - * @param TInt,the preset id - */ - void SyncPresetRemovedL(TInt aId); - - /** - * from MSyncPresetObserver - * SyncPresetChangedL() - * called back when the preset that is synced has been changed in the isds - * @param CIRIsdsPreset&,the new preset data - */ - void SyncPresetChangedL(CIRIsdsPreset& aPreset); - - /** - * from MSyncPresetObserver - * SyncPresetNoChangeL() - * called back when the preset that is synced has not been changed - */ - void SyncPresetNoChangeL(); - - /** - * ConnectToSelectedStationL() - * Used to synchronize the LastPlayed preset before listen - */ - void ConnectToSelectedStationL(); - - /** - * AddStationtoFavoritesL() - * Called when user selects AddtoStations cmd from the MainView options - */ - void AddStationtoFavoritesL(); - - /** - * PresetLogoDownloadedL() - * CallBack Function Returning the Preset With Logo - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * PresetLogoDownloadError() - * CallBack Function Returning the Preset With no Logo/Error while downloading - */ - void PresetLogoDownloadError(CIRIsdsPreset* /*aPreset*/); - - /** - * LogoRequestL() - * Called by the container of this view - */ - void LogoRequestL(); - - /** - * ResponseL() - * From the class MViewsResponseAndErrorObserver - */ - void ResponseL(CIRIsdsPreset* aPreset = NULL ); - - /** - * PresetResponseL() - * From the class MViewsResponseAndErrorObserver - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * ErrorL() - * From the class MViewsResponseAndErrorObserver - */ - void ErrorL(); - - - - - -protected: //Methods - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - -private: - /** - * iContainer - * Container for this view. - */ - CIRMainContainer* iContainer; - /** - * iMarkedFlag - * returns bool value depending on mark/unmark state. - */ - TBool iMarkedFlag; - /** - * iMarkedAllFlag - * returns bool value depending on whether all the elements are marked/unmarked state. - */ - TBool iMarkedAllFlag; - /* - * iAddToFavouratesFlag - * returns whether any station is added to favourates or not. - */ - TBool iAddToFavouratesFlag; - - /* - * iIndexExisting - */ - TBool iIndexExisting; - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - /* - * iFavListen - * Checks whether request is listen to favorites - */ - TBool iFavListen; - /* - * iStationDetailsCmd - * - */ - TBool iStationDetailsCmd; - - /** - * iMoveMarkedFlag - * boolean flag to set the moving state - */ - TBool iMoveMarkedFlag; - /** - * iMarkedItemCount - * Data to count the no.of items marked - * Used to Handle multiselection - */ - TInt iMarkedItemCount; - /* - * iFilteredIndex - * the index that is obtained after the dynamic filtering of a station - */ - TInt iFilteredIndex; - /** - * iMovedItemIndex - * flag to get the marked item - */ - TInt iMovedItemIndex; - /** - * iIndexTo - * Index of moved place - */ - TInt iIndexTo; - /** - * iIndexFrom - * Index of moving place - */ - TInt iIndexFrom; - /** - * iChannelIdTo - * Id of the moved channel - */ - TInt iChannelIdTo; - /** - * iChannelIdFrom - * Id of the moving channel - */ - TInt iChannelIdFrom; - - /* iListenRequest - * Checks whether request is for listen - */ - TBool iListenRequest; - - /* iAddtoStationsCmd - * Checks whether request is for AddtoStations - */ - TBool iAddtoStationsCmd; - - -public: - /* - * iInvalidIconIndices - * instance of RArray - */ - RArray iMarkedIndexArray; - /* - * iInvalidIconIndices - * instance of RArray - */ - RArray iUnMarkedArray; - /* - * iEditStation - * instance for getting the Edit station index - */ - TBool iEditStation; - - /* - * iSyncReq - * to know the status whether the sync request is completed or not - */ - TBool iSyncReq; - - - - }; - -#endif // CIRMAINVIEW_H - - - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irmediaclient.h --- a/internetradio2.0/uiinc/irmediaclient.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - - -#ifndef IRMEDIACLIENT_H -#define IRMEDIACLIENT_H - -#include - -#include "ircontrolparams.h" -#include "irmediaenginedef.h" -#include - -class CIRCtrlCmdObserver; -class CIRMediaEngineInterface; - -//========================================class declaration CIRMediaEngineInterface============================================ - -/** - * This is client class for irmediaengine which a ecom dll - * Any request to media engine is routed through media client - * This client creates proper player for mp3 or acc/accp according - * to the mime type To start a player StartNewPlayerL function is to be - * used, which in turn trigger play and this should be called before - * calling play or stop functions - * The buffers are created and filled with data. - * media engines instance is created and associates the filled buffer - * to media engine, finally the media engine's and buffer associated is deleted - * for each format we delete and recreate the player and buffer - * This also interacts with ircommandchannel.dll for filling data,triggering - * audiofadeout etc. - * - * @code - * - * CIRCtrlCmdObserver* channel; //instance of CIRCtrlCmdObserver defined - * //in ircommandchannel.dll - * client = CIRMediaClient* NewL(); //instance of media client - * TConfig config; - * TBuf<20> format; - * _LIT(KFormat,"audio/mpeg"); - * client->StartNewPlayer(config,KFormat,channel); //Initiates the player - * //Creates buffer fills the buffer, Creates instance of player - * //and associates filled buffer with it triggers playing. - * //Once this done irmediaengine takes care of buffering issues - * //Deletes the old instance of player as well as buffer associated - * //before creating a new one - * client->Stop(); //stop the player - * client->Play(); //plays the player - * client->SetVolume(); //sets the volume - * client->MaxVolume(); //gives the maximum volume - * client->Volume(); //returns the current volume - * client->BufferFilled(); //is a call back when buffer is filled this has to be called - * client->StopMediaBuffering(); //stop buffering when buffering is handled in irmediaengine - * client->StopInitialBuffering(); //stop buffering when buffering is handled in - * //irmediaclient - * @endcode - * - */ - -NONSHARABLE_CLASS(CIRMediaClient) : public CBase - { // Function declaration - - //Constructor functions -public: - - /** - * Function : NewL - * Two Phase Constructor - NewL - * @return an instance of the player component - */ - static CIRMediaClient* NewL(CIRCtrlCmdObserver* aChannel); - - /** - * Function : NewLC - * Two Phase Constructor - NewLC - * @return an instance of the player component - */ - static CIRMediaClient* NewLC(CIRCtrlCmdObserver* aChannel); - - /** - * destructor function - * destructor of the player component - */ - ~CIRMediaClient(); - -private: - //Constructor function - - /** - * This is default Constructor - * for the class CIRMediaClient - */ - CIRMediaClient(); - - /** - * Two phase ConstructL - * network component is taken as input - * @param instance of network - */ - void ConstructL(CIRCtrlCmdObserver* aChannel); - - -public: - - // Function to control the play - - /** - * Function : Play - * Starts to play the stream - * @return KErrNone if player is existing if not it returns KErrNotFound - */ - TInt Play(); - - /** - * Function : Stop - * Stops to play the stream - */ - void Stop(); - - //Function to control the volume - - /** - * Function : SetVolume - * function to set the volume, - * @param integer level of volume is the input - */ - void SetVolume(TInt aVolume); - - /** - * Function : MaxVolume - * @returns the maximum volume , integer value is the Output - */ - TInt MaxVolume() const; - - /** - * Function : Volume - * function to returns the volume - * @return integer level of voume is the Output - */ - TInt Volume() const; - - /** - * Function: BufferFilled - * Set the whether a Fill Buffer is currently active - */ - void BufferFilled(); - - /** - * Function: StartNewPlayerL - * Set the whether a Fill Buffer is currently active - * @param configuration settings - * @param format type - * @param command channel's instance - */ - void StartNewPlayerL(TConfig& aConfig,const TDesC8& aFormat); - - /** - * Function: StopMediaBuffering - * stops buffering of media engine - */ - void StopMediaBuffering(); - - /** - * Function: StopMediaBuffering - * stops buffering from media client, media engine is not stopped - */ - void StopInitialBuffering(); - - /** - * Function: StartMediaBuffering - * starts buffering of media engine - */ - void StartMediaBuffering(); - /** - * GetMediaClientInstance() - * Returns the Audio Player Instance - */ - CMdaAudioOutputStream* GetPlayerInstance(); - -private: - - /** - * Creates instance of the media engine ECom plugin. - * - * @return ETrue, if the creation succeeded, EFalse otherwise - */ - TBool CreatePlayer(); - - /** - * initializes the player with codec settings, initialised buffer - * and Control command instance. - * - * @param configuration settings - * @param command channel's instance - */ - void InitializePlayer( TConfig& aConfig,CIRCtrlCmdObserver* aChannel); - - -private: - //data members - - - //Instance of Interface definision - CIRMediaEngineInterface* iPlayer; - - //Instance of channel through with data is sent UI - CIRCtrlCmdObserver* iChannel; - - //The instance of buffer which is currently playing - TUint8* iCurrentBuffer; - - //The pointer to buffer which being created for a new player - TUint8* iTempBuffer; - - //pointer to buffer being filled - TUint8* iInputBufferPtr; - - //holds the format type - TBuf8<20> iFormat; - - //buffer which is being filled - TPtr8 iInputBuffer; - - //hold the configuration information - TConfig iConfig; - - //Holds the percentage of data in the buffer - TInt iBufferPercentage; - - //Set of commands that can be sent to command channel - TIRControlCommmand iCommand; - - //checks whether the player is a newly created player - TBool iNewPlayer; - - //checks whether the execution of code is required for only first time or not - TBool iFirstTime; - - //checks whether to stop buffering - TBool iStopBuffering; - }; - -#endif //IRMEDIACLIENT_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irmessageobserver.h --- a/internetradio2.0/uiinc/irmessageobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef IRMESSAGEOBSERVER_H -#define IRMESSAGEOBSERVER_H - -#include // CBase -#include // MMsvSessionObserver - - -class CIRUi; - - -/** - * This is the message observer class is used for sms observing - * When new message comes, the MMsvSessionObserver calls HandleSessionEventL which does the message handling - * - * @code - * - * CIRMessageObserver* obj - * obj = CIRMessageObserver::NewL(instance of CIRUi* aUi); //creating message observer - * - * @endcode - * - */ - - -class CIRMessageObserver : public CBase, public MMsvSessionObserver - { - public: - /** - * 2nd phase constructor. - * @param aUi the instance of CIRUi - * @return A pointer to the created instance of CIRMessageObserver - */ - static CIRMessageObserver* NewL(CIRUi* aUi); - - /** - * 2nd phase constructor. - * @param aUi the instance of CIRUi - * @return A pointer to the created instance of CIRMessageObserver - */ - static CIRMessageObserver* NewLC(CIRUi* aUi); - - /** - * Destructor. - */ - ~CIRMessageObserver(); - - public: - /** - * From MMsvSessionObserver. - * Called when a session event occurs. - */ - void HandleSessionEventL(TMsvSessionEvent aEvent, - TAny* aArg1, - TAny* aArg2, - TAny* aArg3); - - private: - /** - * Symbian OS default constructor. - * @param aObserver the observer which gets notified when message - * events occur - */ - CIRMessageObserver(CIRUi* aUi); - - /** - * 2nd phase constructor. - * Initializes objects. - */ - void ConstructL(); - - private: - // Session with the messaging server - CMsvSession* iMsvSession; - - // instance of CIRUi - CIRUi* iUi; - }; - -#endif /*IRMESSAGEOBSERVER_H*/ \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irnowplayingview.h --- a/internetradio2.0/uiinc/irnowplayingview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,847 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for CIRNowPlayingView -* -*/ - - -#ifndef C_CIRNOWPLAYINGVIEW_H -#define C_CIRNOWPLAYINGVIEW_H - -#include "internetradioconfigurationflags.hrh" -#include -#ifdef MUSICSHOP_AVAILABLE -#include //For Find in Shop -#include //For Find in Shop -#endif -#include //For future use -#include - -#include -#include "irbaseview.h" -#include "irui.h" -#include "ir.hrh" -#include "pspresetobserver.h" -#include "MLogoDownloadObserver.h" -#include "irstationinformationdata.h" -#include -#include -#include "IRFavoritesDb.h" -#include "MViewsResponseAndErrorObserver.h" -#include - -#include -#include -#include "irstationlogocontrolobserver.h" - -#include "IRActiveNetworkObserver.h" -#include "msyncpresetobserver.h" // MSyncPresetObserver -//Forward Declarations -class CAlfEnv; -class CIRNowPlayingViewContainer; -class CIRIsdsPreset; -class CIRLogoDownloadEngine; -class MLogoDownloadObserver; -class CIRIsdsPreset; -class CEikMenuPane; - -#ifdef __IRA_FEATURE_EQUALIZER -class CMPXViewPlugin; -class CMPXFindInMShop; //For Find in Shop -#endif - -class CMdaAudioPlayerUtility; -class CStereoWidening; -class CIRSettings; -class CMPXFindInMShop; //For Find in Shop -class CAknVolumePopup; -class CAknWaitDialog; -class CIRLogoTimer; -/** - * NowPlayingView View - * - * NowPlayingView View, the view displayed in Internet Radio application,when - * Listen is Done - */ -class CIRNowPlayingView :public CIRBaseView,public MPSPresetObserver, - public MLogoDownloadObserver,public MAknToolbarObserver, - public MViewsResponseAndErrorObserver,public MCoeControlObserver, - public MAlfActionObserver,private MRemConCoreApiTargetObserver, - public MIRLogoControlObserver, - public MSyncPresetObserver - - - { -public: // Methods - - /** - * Function : NewL - * Function returns an instance of CIRNowPlayingView - * Two phase constructor - * @param aAlfEnv Alfred environment to use - * @return instance of CIRNowPlayingView - */ - static CIRNowPlayingView* NewLC( CAlfEnv& aAlfEnv ); - - /** - * Two-phased constructor. - * - * Adds the control to the control group - * - * @param aEnv Alfred environment to use. - * @return The created object. Ownership is not transferred. - */ - static CIRNowPlayingView* NewL( CAlfEnv& aEnv); - /** - * Destructor. - */ - ~CIRNowPlayingView(); - - /** - * OfferToolbarEventL() - */ - void OfferToolbarEventL(TInt aCommand ); - - /** - * Id() - * returns the id of the View - */ - // from base class CAknView - TUid Id() const; - - /** - * HandleCommandL() - */ - void HandleCommandL( TInt aCommand ); - - /** - * DynInitMenuPaneL() - */ - // from base class MEikMenuObserver - void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); - - - /** - * HandleForegroundEventL() - */ - void HandleForegroundEventL( TBool aForeground ); - - /** - * Function : PresetLogoDownloadedL - * CallBack Function Returning the Preset With Logo - * @param aPreset to be filled with Logo - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * PresetLogoDownloadError() - * CallBack Function Returning the Preset Without Logo - * Called when an error/connection-fail occurs while downloading - * @param aPreset sent without Logo - */ - void PresetLogoDownloadError(CIRIsdsPreset* aPreset); - - - /** - * Function :PlayAndStopControlL() - * Function Used to Play or Stop The Song - * User Play,Stop Functionality - */ - void PlayAndStopControlL(); - - /** - * Function :ConnectToPreset() - * User For Connecting To Next or Prev Preset - * For Context Navigation - */ - void ConnectToPresetL(); - - // from base class MCoeControlObserver - /** - * From MCoeControlObserver - * - * @see MCoeControlObserver::HandleControlEventL( - * CCoeControl* aControl, - * TCoeEvent aEventType ) - */ - void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); - -// from base class MAlfActionObserver - void HandleActionL(const TAlfActionCommand& aActionCommand); - - /** - * Function :UpdateStationNameL() - * User For Updating Station Name - * @param aFadeStyle Used for setting Directionality - */ - void UpdateStationNameL(TIRFadeStyle /*aFadeStyle*/) ; - - /** - * Function :DisplayBitrate() - * Used for Displaying Bitrate - * @param aBitrate Value To show on the View - */ - void DisplayBitrate(const TDesC& aBitrate) const; - - /** - * Function :OnViewActivationL() - * Used for Setting the values On View Activation - */ - void OnViewActivationL(); - - /** - * Function :DisplaySongArtistNameL() - * Displays the Song Name and Artist Name - * @param aSongName To show on the View - * @param aArtistName To show on the View - */ - void DisplaySongArtistNameL(const TDesC& aSongName,const TDesC& aArtistName); - - /** - * Function :DisplayByteCounterL() - * Used for Displaying ByteCounter - * @param total_bytes Value To show on the View - */ - void DisplayByteCounterL(TReal32 total_bytes); - - /** - * Function :SetRequestPendingWhenNoNetWork() - * Sets the Value of Request Pendind While Checking For Network - * @param aRequestPending Value To Set - */ - void SetRequestPendingWhenNoNetWork(TBool aRequestPending); - - /** - * Function :GetRequestPending() - * Return the Request Pending Value - * @return Returns the Request Pending Value - */ - TBool GetRequestPending(); - - /** - * Function :SetRequestPendingWhenNoNetWorkForNextOrPrev() - * Sets the Value of Request Pendind While Checking For Network - * @param aRequestPending Value To Set - */ - void SetRequestPendingWhenNoNetWorkForNextOrPrev(TBool aRequestPending); - - /** - * Function :GetRequestPendingForNextOrPreV() - * Return the Request Pending Value - * @return Returns the Request Pending Value - */ - TBool GetRequestPendingForNextOrPreV(); - - /** - * Function :ConstructToolbarL() - * Used for Constructing ToolBar - */ - void ConstructToolbarL(); - - /** - * Function :DisplaylogoL() - * Function User For Displaying the Logo - */ - void DisplaylogoL() ; - - /** - * Function :DrawViewL() - * Function User For Layouting Controls On the View - * @param aLogoStatus Value Used for Displaying - * Media idle Animation - */ - void DrawViewL(TBool aLogoStatus) ; - - /** - * Function :StartTimerL() - * Function User Updating Station Name When Next Is Pressed - */ - void StartTimerL() ; - /** - * Function :ReFreshView() - * Function Used For Refreshing the View - */ - - void ReFreshViewL(); - /** - * Function :AddStationsL() - * Function Used Used to Add the Currently Playing Channel To Fav - */ - void AddStationsL(); - /** - * ResponseL() - */ - //from thr mixing class MViewsResponseAndErrorObserver - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - - /** - * PresetResponseL() - * CallBack From IsDs when Preset data is received - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * ErrorL() - */ - void ErrorL(); - - /** - * Function :GetStereoModeL() - * Used for getting Mode of Stereo whether it is On or Off - */ - - void GetStereoModeL(); - - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); - - /** - * Function :SetVolumePopUpValue() - * Used for setting the VolumePop up Value - */ - void SetVolumePopUpValue(TInt aValue); - - /** - * Function :GetVolumePopUpValue() - * Getting the volume Pop up Value - */ - TInt GetVolumePopUpValue(); - - /** - * Function :UpdateLastplayedL() - * Updates the LastPlayed Station - */ - void UpdateLastplayedL(); - - - /** - * LaunchFMTransmitterL() - * Launch FM Transmitter application - */ - void LaunchFMTransmitterL(); - /** - * SetBitrate() - * Sets The Bitrates Value - */ - void SetBitrate(TInt aError) ; - - // from base class MRemConCoreApiTargetObserver - - /** - * From MRemConCoreApiTargetObserver. - */ - void MrccatoCommand(TRemConCoreApiOperationId aOperationId, - TRemConCoreApiButtonAction aButtonAct); - - /** - * From MRemConCoreApiTargetObserver. - */ - void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, - TRemConCoreApiButtonAction aButtonAct); -// from base class MIRLogoControlObserver - void LogoReadyForDisplayL(); - void LogoConversionFailedL(); - - /** - * from MSyncPresetObserver - * SyncPresetRemovedL() - * called back when the preset that is synced was removed from isds - * @param TInt,the preset id - */ - void SyncPresetRemovedL(TInt aId); - - /** - * from MSyncPresetObserver - * SyncPresetChangedL() - * called back when the preset that is synced has been changed in the isds - * @param CIRIsdsPreset&,the new preset data - */ - void SyncPresetChangedL(CIRIsdsPreset& aPreset); - - /** - * from MSyncPresetObserver - * SyncPresetNoChangeL() - * called back when the preset that is synced has not been changed - */ - void SyncPresetNoChangeL(); - -protected: - - // from base class CAknView - /** - * DoActivateL() - */ - void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * DoDeactivate() - */ - void DoDeactivate(); - -private: //Methods - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * C++ default constructor. - */ - CIRNowPlayingView( CAlfEnv& aAlfEnv ); - - /** - * Updates the station logos with preset data - */ - void UpdateStationLogosL(); - - /** - * HandlePresetChangedL() - * returns the instance of iStationsData - */ - // from base class MPSPresetObserver - void HandlePresetChangedL( TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aReason ); - - /** - * GetLogo() - * returns the instance of iStationsData - */ - void GetLogoL(); - - /** - * To Launch Find in Shop Option - * - */ - void LaunchMusicShopL(); - - /** - * To Launch Find in Shop Option - * - */ - void DoFindInMusicShopL( const TDesC& aSongName, - const TDesC& aArtistName, - const TDesC& aAlbumName, - TBool aMusicFlag ); - - /** - * Retrievs the string from Central Repository for the specified key and cen rep uid - * Transfers the ownership of the returned HBufC object - * The caller must takecare of deleting the returned object* - * @param aRepositoryUid specifies the Uid of the repository to be used - * @param aKey specifies the key to be used - * @return HufC* pointer to the retrieved string - */ - HBufC* CentralRepositoryStringValueL(const TUid& aRepositoryUid, - TUint32 aKey ) const; - /** - * ListenFromPls() - * To support Context Navigation - */ - void ListenFromPlsL(); - - /** - * HelpContext() - * Returns the Help Context For NowPlaying View - */ - TCoeHelpContext HelpContext() const; - - /** - * IsMetaData() - * returns true if there is meta data - */ - TBool IsMetaData(); - - /** - * MusciStoreEnabledStatus() - * returns true if music store enabled status is "yes" - */ - TBool MusciStoreEnabledStatus(); - - - -public: - /** - * SetsameUrlFlag() - * function sets the iSameUrl flag - */ - void SetsameUrlFlag(TBool aSameUrl); - /** - * GetsameUrlFlag() - * function returns the iSameUrl Flag - */ - TInt GetsameUrlFlag(); - - /** - * SetStationNameFlag() - * function Sets the Flag to Update the Station Nmae - */ - void SetStationNameFlag(TInt aValue); - - /** - * SetLastPlayedValue() - * function Sets the Lastplayed Flag Value - */ - void SetLastPlayedValue(TInt aLastPlayed); - - /** - * SetPlayingValue() - * function Sets the iPlaying Flag Value - */ - void SetPlayingValue(TInt aPlaying); - - /** - * HandleMediaKeysL() - * function handles the hardware media keys - */ - void HandleMediaKeysL(TRemConCoreApiOperationId aOperationId, - TRemConCoreApiButtonAction aButtonAct); - - /** - * DeleteSteroEffect() - * Destroys the Stereo Effect Corresponing the Player - */ - void DeleteSteroEffect(TBool aStereo); - /** - * DisablePlayer() - * Stop Player When Call is Active - */ - void DisablePlayer(); - - /** - * Function :SetRockerIndex() - * Sets the Current Playing Index - * @param aRockerIndex Value used for Context Navigation - */ - void SetRockerIndex(TInt aRockerIndex); - - /** - * Function :GetRockerIndex() - * Returns The current Playing Index - * @return RockerIndex Value used for Context Navigation - */ - TInt GetRockerIndex(); - - /** - * Function :SavePreviousIndex() - * Sets the Previous Index - * @param aPresetCount Value used for Context Navigation - */ - void SavePreviousIndex(TInt aPresetCount); - - /** - * Function :GetRequestPending() - * Return the Previous index Value - * @return Returns Previous index Value - */ - TInt GetPreviousIndex(); - /** - * Indicates, has this view been activated in the life time of - * the application. - * @return ETrue if this view has been activated, EFalse otherwise - */ - TBool HasBeenActivated() const; - - /** - * Function :GetCommandId() - * Returns the Last selected Command id - * @return the Command id Required While network Switch - */ - TInt GetCommandId() ; - - /** - * Function :IsVolumeMuted() - * Returns whether volume is Muted - * @return the Volume Mute State - */ - TBool IsVolumeMuted() ; - - /** - * SyncPresetL() - * Used to syncronize presets - * @param TInt the preset id - * @param TDesC the last modified tag for the preset - */ - void SyncPresetL(TInt aChid,const TDesC &aModifiedTime); - - /** - * Callback method that performs the actual deletion of connections. - * - * @param aSelfPtr Pointer argument given when the callback/timer is created. - * @return KErrNone Specified in the function pointer declaration. - */ - static TInt StaticConnectionCleanupCallback( TAny* aSelfPtr ); - - -private: - - /** - * The Alfred environment - */ - CAlfEnv& iAlfEnv; - - /** - * iToolbar - * Used for Touch ToolBar - */ - CAknToolbar* iToolbar; - - /** - * Is the start up of application ongoing. - */ - TBool iStartUp; - - /** - * For Find in Music Shop - * - */ - CMPXFindInMShop* iMPXFindInShop; //For Find in Shop - -#ifdef __IRA_FEATURE_EQUALIZER - /** - * Used for activating the equalizer view - */ - CMPXViewPlugin* iMpxEqualizerViewPlugin; -#endif // __IRA_FEATURE_EQUALIZER - - /** - * iIndex - * Used for Context Navigation - */ - TInt iIndex; - - /** - * iPreset - * Used for storing the Current Logo Data - */ - CIRIsdsPreset* iCurrentPreset; - - /** - * iPreset1 - * Used for storing the Prev Logo Data - */ - CIRIsdsPreset* iPrevPreset1; - - /** - * iFadeStyle - * Used for directionality - */ - TIRFadeStyle iFadeStyle; - - /** - * iIsOn - * Used for handling Menupane - */ - TBool iIsOn; - - /** - * ipresets - * Used for Getting the Fav Presets - */ - RIRPresetArray ipresets; - - /** - * iBuffer - * Used for storing the Station Name - */ - RBuf iBuffer; - - /** - * iMenuPane - * Used for handling the MenuPane - */ - CEikMenuPane* iMenuPane; - - /** - * iDs - * Used for holding the Commands - */ - TIRIds iDs; - - - /** - * iStationsData - * Used for Referencing the Stations Data - */ - CDesCArrayFlat* iStationsData; - - /** - * iShowToolBar - * Used showing the Touch ToolBar - */ - TBool iShowToolBar; - - /** - * iMetadata - * Used For storing the Metadata - */ - RBuf iMetadata; - - /** - * iStereoMode - * Used For storing status of Stereo Mode - */ - TInt iStereoMode; - - - //Instance of CurrentOperationSettings - CIRSettings* iIRSettings; - - /** - *iSameUrl - *Used for showing the metadata - */ - TBool iSameUrl; - - /** - * Used For Pls - */ - CIRIsdsPreset *plsData; - - /** - * iPlsIndex - * Used for Context Navigation - */ - TInt iPlsIndex; - - /** - * iPresetValue - * Used for Loading the Logos - */ - TInt iPresetValue; - - /** - * iPrecount - * Used for Loading the Logos - */ - TInt iPrecount; - /** - * iDefaultLogo - * Used for Loading the Logos - */ - TBool iDefaultLogo; - /** - * iUpdateLastplayed - * Used for Upadating the Lastplayed Song - */ - TBool iUpdateLastplayed; - /** - * iUpdateStationName - * Used for Updating the Station Name - */ - TBool iUpdateStationName; - - /** - * iRockerIndex - * Used for Context Navigation - */ - TInt iRockerIndex; - - /** - * iPresetCount - * Used for storing the index Value - */ - TInt iPresetCount; - /** - * iVolumeBarValue - * Stores the VolumeBar Value - */ - TInt iVolumeBarValue; - - /** - * Flag used for When Equalizer is On. - */ - TBool iEaualizerOn; - /** - * iPlaying - * Checks Whether thr NowPlaying is Active or Not - */ - static TBool iPlaying; - - /** - * iVolPopup - * The Instance of AknVolume Popup. - */ - CAknVolumePopup* iVolPopup; - - /** - * Flag Set When Call is active. - */ - TBool iCallActive; - - - //Used for later in handling Stereo Mode - CStereoWidening* iStereoEffect; - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - /* - * iNextOrPrevRequest - * Checks whether an active request is pending - */ - TBool iNextOrPrevRequest; - /* - * iStationHasLogo - * Checks whether an active request is pending - */ - - TBool iStationHasLogo; - /** - * Indexes for items in Radio Idle, needed for keeping radio idle up to date. - */ - TInt iBitrateIndex; - TInt iNameIndex; - TInt iMetadataIndex; - TInt iPSNameIndex; - TInt iNameIndex1; - /* - * iLogoTimer - * Instance of Timer Class To start the Media Animation - */ - - CIRLogoTimer* iLogoTimer; - - /** - * Indicates, has this view been activated in the life time of - * the application. - */ - TBool iHasBeenActivated; - /** - * Indicates, has this view been activated in the life time of - * the application. - */ - TInt iCommandId; - TInt iSettingsValue; - TBool iVolumeMute; - TInt iLogoIndex; - TBool iShowBitrate; - - /** - * Timer for delayed cleanup of connections. - * Owned. - */ - CPeriodic* iConnectionCleanupTimer; -public: - /** - * The Alf container. Not owned. - */ - CIRNowPlayingViewContainer* iContainer; - - // TO Do: The Variable can be made private in Future - }; - -#endif // C_CIRNOWPLAYINGVIEW_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irnowplayingviewcontainer.h --- a/internetradio2.0/uiinc/irnowplayingviewcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Base Alfred control for the now playing view -* -*/ - - -#ifndef C_CIRNOWPLAYINGVIEWCONTAINER_H -#define C_CIRNOWPLAYINGVIEWCONTAINER_H - -#include "internetradioconfigurationflags.hrh" - -#ifdef MUL_USE_COMMON_COMPONENTS - -#include -#include - -#else - -#include - -#endif - -class CAlfEnv; -class CAlfAnchorLayout; -class CAlfDeckLayout; -class CAlfImageVisual; -class CAlfTextVisual; -class TAlfImage; -class CIRStationInformationDisplay; -class CIRStationLogoControl; -class CIRNowPlayingView; -class MTouchFeedback; -class CIRRadioIdle; - -#ifdef MUL_USE_COMMON_COMPONENTS -using namespace GestureHelper; -#endif - -/** - * Now playing container - * - * @since S60 v3.2 - */ -#ifdef MUL_USE_COMMON_COMPONENTS -class CIRNowPlayingViewContainer : public CGestureControl, public MGestureObserver -#else -class CIRNowPlayingViewContainer : public CAlfControl -#endif - { - public: - /** - * Two-phased constructor. - * - * Adds the control to the control group - * - * @param aEnv Alfred environment to use. - * @return The created object. Ownership is not transferred. - */ - static CIRNowPlayingViewContainer* NewL( CAlfEnv& aEnv,CIRNowPlayingView* instance ); - - /* Two-phased constructor. - * - * Adds the control to the control group - * - * @param aEnv Alfred environment to use. - * @return The created object. Ownership is not transferred. - */ - static CIRNowPlayingViewContainer* NewLC( CAlfEnv& aEnv,CIRNowPlayingView* aInstance ); - - /** - * Destructor. - */ - ~CIRNowPlayingViewContainer(); - - /** - * Returns a reference to the station logo control. - * - * @return Reference to the station logo control. - */ - CIRStationLogoControl& StationLogoControl(); - - /** - * Returns a reference to the radio idle control. - * - * @return Reference to the radio idle control. - */ - CIRRadioIdle& RadioIdle(); - /** - * Set the text in the visual. - * - * @param aText is the Bitrate Text - */ - void SetBitrateL( const TDesC& aText ); - - /** - * Set the text in the visual. - * - * @param aText RDS text - */ - - void SetByteCounterL( const TDesC& aText ); - - /** - * StationInformationDisplay() - * reyurns the Instance of the StationInformationDisplay - */ - - CIRStationInformationDisplay& StationInformationDisplay(); - - /** - * Layouts this control. - * - * TODO: Move this method to be private when CAlfControl is notified - * of portrait/landscape events. - */ - void LayoutControl(); - - - void SetLayoutAnchor( TInt aOrdinal, TInt aResourceId ); - /** - * Draw() - * Function used to Draw the View - */ - void DrawViewL(TBool aLogoStatus) ; - // from base class MGestureObserver - - #ifdef MUL_USE_COMMON_COMPONENTS - // from base class MGestureObserver - void HandleGestureL( const MGestureEvent& aEvent ); - #else - // from base class CAlfControl - TBool OfferEventL( const TAlfEvent& aEvent ); - #endif - -private: // Methods - - /** - * Constructor. - */ - CIRNowPlayingViewContainer(CAlfEnv& aEnv); - - /** - * Second-phase constructor. - * - * @param aEnv Alfred environment to use. - */ - void ConstructL(CIRNowPlayingView* instance); - - /** - *TriggerCommandL.() - * - * triggering the Commands to the view - */ - void TriggerCommandL(TInt iCommandId); - - /** - * KeyHitL() - * - * used for handling Key Events - */ - TBool KeyHitL( TInt aScanCode); - /** - * Touch feedback. - * Not owned. - */ - MTouchFeedback* iFeedback; - -private: // Members - - /** - * The Alfred environment - */ - CAlfEnv& iAlfEnv; - - /** - * Logo control. - * Not owned. - */ - CIRStationLogoControl* iLogoControl; - - /** - * The base layout to which all controls are layouted. - * Not owned. - */ - CAlfAnchorLayout* iLayout; - - /** - * Station information display. - * Not owned. - */ - CIRStationInformationDisplay* iStationInformationDisplay; - - /** - * RDS text visual. - * Not owned. - */ - CAlfTextVisual* iBitrate; - - /** - * RDS text visual. - * Not owned. - */ - - CAlfTextVisual* iByteCounter; - - - /** - * iNowPlayingView1 - * Used for Handling KeyEvents - */ - CIRNowPlayingView* iNowPlayingView; - - /** - * Radio Idle. - * Owned. - */ - CIRRadioIdle* iRadioIdle; - }; - - -#endif // C_CIRNOWPLAYINGVIEWCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irnowplayingwrapper.h --- a/internetradio2.0/uiinc/irnowplayingwrapper.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,917 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -/* --------------------------------------------------------------------------- -* Version history: -* Template version: -* -* -* Version: 19, Fri Sep 19 13:00:00 2008 by Rohit -* Ref: -* Added ASF detection and Integrated CIRAsfPlayer in Now Playing scenario -* -* -* ============================================================================ -*/ - -#ifndef IRNOWPLAYINGWRAPPER_H -#define IRNOWPLAYINGWRAPPER_H - -#include -#include -#include - -#include "irstreamsourceobserver.h" -#include "irctrlcommand.h" -#include "IRNetworkControllerObserver.h" //TIRConnectionType Defined -#include "irsessionlogger.h" //TConnectedFrom defined -#include -#include "IRActiveNetworkObserver.h" -class CIRStreamSource; -class CIRCtrlCmdObserver; -class CIRMediaClient; -class CIRReportGenerator; -class CIRSettings; -class CIRIsdsWrapper; -class CIRMetaData; -class CIRIsdsPreset; -class CIRUi; -class CAknWaitDialog; -class CIRAsfPlayer; - -//CONSTANTS - -//Ulr Validation -const TInt KMaxBufferSize = 256; -const TInt KMaxUrlSize = 256; -enum TSyncState - { - ESyncStateNull, - ESyncReqPending, - ESyncPsChanged, - EPsConnectionFailed, - EPsConnectionSuccessful - }; - -//for nowplaying view - -enum TIRViews -{ - ELastplayed=0, - EFav, - ESearch, - EHistoryView, - EStations, - EBrowseByTopStations, - EPls -}; - - -class CIRNowPlayingWrapper:public CBase, - public MIRStreamSourceObserver, - public MIRCtrlCmdObserver, - public MProgressDialogCallback, - public MIRActiveNetworkObserver - { - -public: - - /* Function : NewL - * function to return an instance of CIRIsdsWrapper - * Two phase constructor - */ - static CIRNowPlayingWrapper* NewL(CIRUi& aAppUi,CIRSettings& aIRSettings, - CIRIsdsWrapper& aIsdsWrapper); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRIsdsWrapper object, which will draw itself - * to aRect. - */ - static CIRNowPlayingWrapper* NewLC(CIRUi& aAppUi,CIRSettings& aIRSettings, - CIRIsdsWrapper& aIsdsWrapper); - - /** - * ~CIRIsdsWrapper - * Destructor. - */ - ~CIRNowPlayingWrapper(); - - /** - * ConstructL - * 2nd phase constructor. - * Perform the second phase construction of a - * CIRSearchView object. - */ - void ConstructL(); - - /** - * CIRSearchView. - * C++ default constructor. - */ - CIRNowPlayingWrapper(CIRUi& aAppUi,CIRSettings& aIRSettings,CIRIsdsWrapper& aIsdsWrapper); - - //MCLASSES FUNCTIONS - - /** - * MIRStreamSourceObserver::OpenComplete() - * Called when connected to the channel server - * To implement the fill of buffer - */ - void OpenComplete(); - - /** - * MIRStreamSourceObserver::ErrorConnecting() - * Called when there is an error when connecting to the channel server - * @Param aErrorCode Indicates the type of error as described in - * irstreamsourceerrors.h - */ - void ErrorConnecting(TInt aErrorCode); - - /** - * MIRStreamSourceObserver::PlayNow() - * Called to indicate to the player to start playing - */ - void PlayNow(); - - /** - * MIRStreamSourceObserver::Play() - * Triggers the play after reconnecting to the channel - */ - void Play(); - - /** - * MIRStreamSourceObserver::StopBuffering() - * Called to indicate to the player to stop buffering - */ - void StopBuffering(); - - /** - * MIRStreamSourceObserver::ConnectionEstablished(TInt aFeedValue) - * Called to indicate that the connection to channel server is sucessful - */ - void ConnectionEstablished(); - - /** - * MIRStreamSourceObserver::UpdateProgress() - * Called to provide teh buffer values - * @param aFeedValue used to pump the buffering value - */ - void UpdateProgress(TInt aFeedValue); - - /** - * Function : HandleMetaDataReceivedL - * Invoked when meta data is received. - * @param aMetaData The meta data that was received. - */ - void HandleMetaDataReceivedL( const CIRMetaData& aMetaData ); - - - // Callbacks for ASF Player - - /** - * MIRStreamSourceObserver::ErrorConnecting() - * Called when there is an error when connecting to the channel server - * @Param aErrorCode Indicates the type of error as described in - * irstreamsourceerrors.h - */ - void Asf_ErrorConnecting(TInt aErrorCode); - - /** - * MIRStreamSourceObserver::Asf_ConnectionEstablished(TInt aFeedValue) - * Called to indicate that the connection to channel server is sucessful - */ - void Asf_ConnectionEstablished(); - - /** - * MIRStreamSourceObserver::Asf_UpdateProgress() - * Called to provide teh buffer values - * @param aFeedValue used to pump the buffering value - */ - void Asf_UpdateProgress(TInt aFeedValue); - - /** - * Function : Asf_HandleMetaDataReceivedL - * Invoked when meta data is received. - * @param aMetaData The meta data that was received. - */ - void Asf_HandleMetaDataReceivedL( const CIRMetaData& aMetaData ); - - // MIRCtrlCmdObserver functions - - /** - * Function : MCrtlCmdCommand - * Function is pure virtual function which used to pass commands - * @param TIRControlCommmand represents the commands,which determines - * what action to be taken - * @param aValue represents any integer value if any, like buffering - * percentage - */ - void MCtrlCommand( TIRControlCommmand aCommand, TInt aValue ); - - /** - * Function : FetchVolume - * Function is pure virtual function which sents Request to get the - * current volume index - * @return volume index - */ - TInt FetchVolume(); - - /** - * Function : DoAudioFadeOut - * Function is pure virtual function, it is used to sent request start - * audio Fade Out - */ - void DoAudioFadeOut(); - - /** - * Function : PlayerChanged - * Function is pure virtual function, it is Notified Wnen Audio Player Changes - */ - void PlayerChanged(); - - /** - * ConnectToChannelL() - * This function is called to connect to a particular channel - */ - void ConnectToChannelL(CIRIsdsPreset& aPreset); - - /** - * SelectUrlUsingBitRate() - * Selects the proper URL based on settings of quality according to current network - */ - void SelectUrlUsingBitRateL(CIRIsdsPreset& aPreset); - - /** - * DisplayErrorNoteL() - * Display the error note - */ - void DisplayErrorNoteL(TInt aResourceId); - - /** - * DoConnectToServerL() - * Connects to Server. - */ - void DoConnectToServerL(const TDesC8& aUrl); - - /** - * GetAvailableBitRate() - * Selects proper bit rate from the settings - */ - TInt GetAvailableBitRate(TInt aQualiyRequired,const CIRIsdsPreset& aPreset) const; - - /** - * LogStartSession() - * Starts the session log session - */ - void LogStartSession(); - - /** - * SetCurrentChannelID() - * Function sets currently playing channel ID - */ - void SetCurrentChannelID(); - - /** - * ConnectToServerL() - * Starts playing the selected stream - */ - void ConnectToServerL(); - - /** - * SetCurrentConnectionSource - * Sets from where the current connection to the channel server is established. - */ - void SetCurrentConnectionSource(TConnectedFrom aConnectedFrom); - - /** - * DoErrorConnectingL - * Called by ErrorConnectingL when there is an error in connectiong - */ - void DoErrorConnectingL(TInt aErrorCode); - - /** - * ProgressBarCancelL() - * Cancels the Network request and stops the buffering on progressbar cancel - */ - void ProgressBarCancel(); - - /** - * DoPlayingStateChangedL() - * Handles internal state change and P&S when playing is stopped or started - */ - void DoPlayingStateChanged( TBool aPlaying ); - - /** - * DoPlayL() - * First try to reconnect to the last played channel url - */ - void DoPlayL(); - - /** - * StopNow() - * Function calls stop functionality - */ - void StopNow(); - - /** - * ClearMetaDataL - * Clears the current meta data information. - */ - void ClearMetaDataL(); - - //TInt GetSupportedMimeTypeL() - /** - * ListenToChannelL() - * Requests for listening to a particular channel - */ - void ListenToChannelL(CIRIsdsPreset* aPreset); - - /** - * MetaData() - * Returns the current meta data information. - */ - const CIRMetaData& MetaData() const; - - /** - * DialogDismissedL() - * Called when the refresh dialog is dismissed. - * @param aButtonId The button that was used to dismiss the dialog. - */ - void DialogDismissedL( TInt aButtonId ); - - /** - * BufferingTimerExpiredL() - * Called when the buffering times out - */ - static TInt BufferingTimerExpired(TAny* aPtr); - - /** - * HandlePlayError() - * Handles play error || should called only through MCtrlCommand - */ - void HandlePlayError(); - - /** - * SetOverlay() - * sets over lay enable flag - */ - void SetOverlay(TBool aPresent); - - /** - * PlayAndStopL() - * Performs play and stop functionality - */ - void PlayAndStopL(); - - /** - * LoadTerminateSession() - * The loading cancel result in session log end - */ - void LoadTerminateSessionL(); - - /** - * GetMediaClientInstance() - * Returns the Media Client Instance - */ - CIRMediaClient* GetMediaClientInstance(); - - /** - * GetReportGeneratorInstance() - * Returns the ReportGenerator Instance - */ - CIRReportGenerator* GetReportGeneratorInstance(); - - /** - * GetTerminatedLogOnCancelState() - * Returns the iTerminatedLogOnCancel Value - */ - TBool GetTerminatedLogOnCancelState(); - - /** - * GetSessionStartState() - * Returns the iSessionStart Value - */ - TBool GetSessionStartState(); - - /** - * SetSessionStartState() - * Sets the iSessionStart Value - */ - void SetSessionStartState(TBool aSessionStart); - /** - * CancelNetworkRequestL() - * Cancels the Network Request - */ - void CancelNetworkRequestL(); - /** - * SetVolumeL() - * Set the Volume of the Player Via Hardware Media Keys - */ - void SetVolumeL(TInt aIndex); - - /** - * IsProgress() - * Returns the iProgress Value - */ - TBool IsProgress(); - - /** - * SetConnectToServerState - * Sets the iConnectToServer Value - */ - void SetConnectToServerState(TBool aConnectToServer); - - /** - * GetConnectToServerState - * Returns the iConnectToServer Value - */ - TBool GetConnectToServerState(); - - /** - * GetPrevVolumeLevel - * Returns the Prev Volume When Message is Received - * Or Any NetWork Events - */ - TInt GetPrevVolumeLevel(); - - /** - * SetPrevVolumeLevel - * Sets the Volume For handling the Network Events - */ - - void SetPrevVolumeLevel(TInt aPrevVolume); - - /** - * SetMetadataL - * Sets the Metadata - */ - - void SetMetadataL(); - - /** - * PublishDataL - * Publish the Metadata Required for History - */ - void PublishDataL(); - - - /** - * StopPlayer - * Stop the Player - */ - void StopPlayer(); - - /** - * SetMedadataForErrotrConditions - * Sets the Metadata Flag During Error Conditions - */ - void SetMedadataForErrotrConditions(TBool aDisplayMetaData); - - /** - * GetMedadataForErrotrConditions - * Returns the Error condition to Nowplaying View - */ - TBool GetMedadataForErrotrConditions(); - /** - * GetMarquee - * Returns the iMarQuee which is Set During HandleMetadataReceived - */ - TBool GetMarquee(); - - /** - * SetMarquee - * Sets the Marquee value required for NowPlaying view - */ - void SetMarquee(TBool aMarquee); - /** - * SetView - * Set by Every View to its TIRViews when Listen is Done - */ - void SetView(TIRViews aContextViews); - - /** - * GetView - * Returns the View Where Listen Has Done - */ - TIRViews GetView(); - - /** - * SetAudioVolume() - * Call CPeriodic after the period is over - * @param volume level. - */ - void SetAudioVolume(TInt aValue); - - - /** - * CreateWaitDialogL() - * Called whenever Connecting to channel - */ - void CreateWaitDialogL(); - - /** - * DestroyWaitDialogL() - * Destroys the Wait Dialog - */ - void DestroyWaitDialogL(); - - /** - * SetProgress() - * Sets The Progress Value - */ - void SetProgress(TBool aProgress); - - /** - * GetChannelConnetedInfo() - * Returns Whether the channel connected or not - */ - TBool GetChannelConnetedInfo(); - - /** - * HandleNetworkDisconnected() - * Function called when network got disconnected While Buffering - */ - void HandleNetworkDisconnected(); - - /** - * HandleNetworkEstablished() - * Function called when network Connection Established In ALr - */ - - void HandleNetworkEstablished(); - - /** - * Removes whitespace characters. - * Called from HandleMetaDataReceivedL. - * @param string to be cleaned. - */ - void RemoveWhiteSpace( TDes& aBuf ); - - /** - * Checks The Call status. - * Checks the Call status Whether it is Incoming Call or OutGoing Call - */ - TBool CheckCallStatusL(); - //from MIRActiveNetworkObserver - - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - - /** - *TriggerCommandL.() - * - * triggering the Commands to the view - */ - void TriggerCommandL(TInt iCommandId); - - - /** - * GetSessionStartedFlag() - * Returns the iSessionStarted Flag Value - */ - TBool GetSessionStartedFlag(); - /** - * SetSessionStartedFlag() - * Sets the iSessionStartedFlag Value - */ - void SetSessionStartedFlag(TBool aSessionStartedFlag); - /** - * UpdateNmsLogEventsL() - * Updates Nms Log events - */ - void UpdateNmsLogEventsL(const TDesC& aNmsType); - - /** - * Function :SetListenFromIsdsValue() - * Sets when Listen from Isds is Done - * @param aListenFromIsds Sets when Listen from Isds is Done - */ - void SetListenFromIsdsValue(TInt aListenFromIsds); - - /** - * Function :SetListenFromIsdsValue() - * Sets When User Cancels Buffering - * @param aDialogCanceled Sets When User Cancels Buffering - */ - void SetWhenUserCancelsBufferingWaitBar(TInt aDialogCanceled); - - /** - * Function :SetWhenUserCancelsIsdsBufferingWaitBar() - * Sets When User Cancels Buffering WaitBar From Isds Listen - * @param aCancelFrmIsds Sets When User Cancels Buffering - */ - void SetWhenUserCancelsIsdsBufferingWaitBar(TInt aCancelFrmIsds); - - /** - * Function :GetWhenUserCancelsIsdsBufferingWaitBar() - * Returns When User Cancels Isds Buffering WaitBar - * @return Returns Cancels Isds Buffering WaitBar - */ - TInt GetWhenUserCancelsIsdsBufferingWaitBar(); - /** - * Function :SetLaunchNowPlayingView() - * Sets the varible if NowPlaying is active - * @param aLaunchNowplaying the variable being set - */ - void SetLaunchNowPlayingView(TBool aLaunchNowplaying ); - - /** - * Function :GetLaunchNowPlayingView() - * Returns the active state of NowPlaying View - * @return Returns the Nowplayinf View active State - */ - TBool GetLaunchNowPlayingView(); - /** - * Function :SetFavFocus() - * Sets the foucs in Mainview - * @param aFavIndex Focus to set in MainView - */ - void SetFavFocus(TInt aFavIndex ); - - /** - * Function :GetFavFocus() - * Returns the Current Focus to set - * @return Returns value to set focus in MainView - */ - TInt GetFavFocus(); - -private: - //Instance of MediaClient - CIRMediaClient* iPlayer; - - - //Instance of StreamSource - CIRStreamSource* iNetwork; - - //instance of command channel - CIRCtrlCmdObserver* iChannel; - - - - //Session Log - CIRReportGenerator *iReportGenerator; - - /** - * iIRSettings - * Instance of CurrentOperationSettings - */ - CIRSettings& iIRSettings; - - /** - * iIsdsWrapper - * Instance of ISDSWrapper - */ - CIRIsdsWrapper& iIsdsWrapper; - - /** - * CIRUi& aAppUi - * Instance of CIRUi - */ - CIRUi& iAppUi; - - /** - * Current meta data information. - * Owned. - */ - CIRMetaData* iMetaData; - - //index for URLs in iURLArray array - TInt iURLCount; - - //holds the array of URLs - CDesCArrayFlat* iURLArray; - - //multiple URL selection will be enabled only before connecting - //to particular channel server once connected this disabled until - //next time you try to connect to the channel this is monitored - //by this flag - TBool iMultipleURLSelect; - - TBool iConnectionRequestCancelled; - - //Indiacates that it is reconnecting to the channel - TBool iReConnecting; - - //last connected channels preset id - TInt iLastConnectedPresetId; - - //last connected channel url - TBuf iLastConnectedUrl; - - //Last played URL - TBuf iLastPlayedUrl; - - //last played channel's unique id - TInt iLastConnectedPresetUniqId; - - //checks if session log should be terminated on loading cancel - TBool iTerminatedLogOnCancel; - - // Used for checking the Audio has been fadein/fadeout - TBool iAudioFadein; - - // URL - TBuf iUrl; - - //checks whether a session is started - TBool iSessionStart; - - //this variable check whether the session should actually end or not - //in case of multiple url select - TBool iSessionShouldNotEnd; - - // Checks whether channel is Connected to Server or not - TBool iConnectToServer; - - // Check the Connection -// TSyncState iSyncState - - //stores the channel id of currently playing channel - TInt iChannelID; - - //Bitrate to subscribe - TInt iBitRateValue; - - // Checks whether the channel is connected or not - TBool iChannelConnect; - - //Holds the Network connection status - TBool iIsConnected; - - //Connected from information is stored in iConnectedFrom - TConnectedFrom iConnectedFrom; - - // Stores the error code - TInt iConnErrCode; - - // checks the Status of the Progress bar - TBool iProgress; - - //Flag used to test Radio Playback - TBool iPlayBack; - //Unconnected URL - TBuf iUnconnectedUrl; - - - /** - * iPrevVolumeLev - * Stores thr Prev Volume Level - */ - - TInt iPrevVolumeLevel; - - /** - * iBufferigSteamText - * Data for checking the text of the WaitDialog - */ - TBool iBufferigSteamText; - - /** - * iWaitDialog - * calls the waitdialog owned by - * CAknWaitDialog - */ - CAknWaitDialog* iWaitDialog; - - // Used for displaying Metadata - TBool iDisplayMetaData; - /** - * iMarquee - * Instance For Confirming Whether to Display Metadata - */ - TBool iMarquee; - - //User for testing Existence of Network request - TBool iCancelNetworkRequest; - - //For context navigation in nowplaying view// - TIRViews iContextViews; - - /** - * iCheckValue - * Instance Used to check While Connecting To a Channel - */ - TBool iCheckValue; - - /** - * iChannelConnected - * Instance Used to check whether the current - * channel is connected or not - */ - TBool iChannelConnected; - - /** - * iPlayandStop - * Set when Play or Stop is Done Fom Nowplaying View - */ - TBool iPlayandStop; - - /** - * iNotify - * Set when Connection is established during ALR - */ - TBool iNotify; - - /** - * iAsfPlayer - * ASF Player instance for ASF streaming - */ - CIRAsfPlayer* iAsfPlayer; - - /** - * iAsfStreaming - * Indicates ASF channel streaming is on - */ - TBool iAsfStreaming; - - /** - * iSessionStartedFlag - * sets when session startedL is called - */ - TBool iSessionStartedFlag; - /** - * iListenFromIsds - * When Listen From Isds is Done - */ - - TBool iListenFromIsds; - - /** - * iDialogCanceled - * when dialog is dismissed - */ - TBool iDialogCanceled; - - /** - * iCancelFrmIsds - * Cancel is Done from ISds - */ - TBool iCancelFrmIsds; - /** - * iLaunchNowplaying - * Set if NowPlaying View is Active - */ - TBool iLaunchNowplaying; - - /** - * iBufferingRequestCancelled - * Sets this Value When User Cancels buffering - */ - - TBool iBufferingRequestCancelled; - - TInt selectedbitrate ; - - TInt iUinqid; - - TInt iFavIndex; - TInt iQualityRequired; -public: - //Instance of CIRIsdsPreset - //contains the preset on which the connection attempt is made - CIRIsdsPreset* iNowPlayingPreset; - - //Instance of CIRIsdsPreset - //Contains the preset which is editable - CIRIsdsPreset* iEditStationPreset; - - //Holds the playing status - TBool iPlaying; - - /** - * iSyncPreset - * sets the status of synchronizing the preset - */ - TBool iSyncPreset; - }; - -#endif //IRNOWPLAYINGWRAPPER_H \ No newline at end of file diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irnwinfoobserver.h --- a/internetradio2.0/uiinc/irnwinfoobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef IRNWINFOOBSERVER_H -#define IRNWINFOOBSERVER_H - -#include - -class CIRUi; - -class CIRNwInfoObserver : public CActive - { -public: // Constructors and destructor - - /** - * Function : NewL - * Symbian OS two-phased constructor - * @param instance of ui - */ - static CIRNwInfoObserver* NewL(CIRUi* aUi); - - /** - * Function : NewLC - * Symbian OS two-phased constructor - * @param instance of ui - */ - static CIRNwInfoObserver* NewLC(CIRUi* aUi); - - /** - * Function : ~CIRNwInfoObserver - * Destructor. - */ - ~CIRNwInfoObserver(); - -public: - /** - * Function : IRStartNwMonitor - * starts network monitoring - */ - void IRStartNwMonitor(); - -private: - /** - * Function : ConstructL - * Function does all the initializations - * Two phase constructor - * @param CIRUi instance - */ - void ConstructL(CIRUi* aUi); - - /** - * Function : CIRNwInfoObserver - * By default, prohibit copy constructor - */ - CIRNwInfoObserver(); - - /** - * Function : IssueRequest - * Issue Subsequent network monitoring request - */ - void IssueRequest(); - - /** - * Function : DoCancel - * From CActive. Cancels the active object from observing System - * Agent events. . - */ - void DoCancel(); - - /** - * Function : RunL - * From CActive. Gets called by active object when a System Agent - * event occurs. - */ - void RunL(); - - /** - * Function : RunError - * Function which handles RunL error - * @param Error value - */ - TInt RunError(TInt aError); - -private: - - CIRUi* iUi; - CTelephony* iNwInfoObserver; - - TBool iFirstTime; - TBool iCurrentNetwork; - TBool iHomeNetworkType; - - TBuf<10> iCurrentNetworkMCC; - TBuf<10> iCurrentNetworkMNC; - TBuf<10> iHomeNetworkMCC; - TBuf<10> iHomeNetworkMNC; - - //Current Network - CTelephony::TNetworkInfoV1 iCurrentNetworkInfo; - CTelephony::TNetworkInfoV1Pckg iCurrentNetworkInfoV1Pckg; - - //Home Operator - CTelephony::TNetworkRegistrationV1 iHomeOperatorInfo; - CTelephony::TNetworkRegistrationV1Pckg iHomeOperatorInfoPckg; - }; - -#endif // IRNWINFOOBSERVER_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irplscontainer.h --- a/internetradio2.0/uiinc/irplscontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRPlsContainer -* -*/ - - -#ifndef CIRPLSCONTAINER_H -#define CIRPLSCONTAINER_H - -#include -#include -#include - -class CIRPlsView; -class CIRIsdsPreset; -class CIRDialogLauncher; -class CEikColumnListBox ; - -class CIRPlsContainer : public CCoeControl,public MEikListBoxObserver - - - { - -public: // Methods - - /** - * NewL. - * Two-phased constructor. - * Create a CIRPlsContainer object, which will draw itself to aRect. - * @param aRect The rectangle this view will be drawn to. - * @param aView which is a plsview's reference - * @return a pointer to the created instance of CIRPlsContainer. - */ - static CIRPlsContainer* NewL(const TRect& aRect ,CIRPlsView &aView ); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRPlsContainer object, which will draw itself - * to aRect. - * @param aRect Rectangle this view will be drawn to. - * @param aView which is a plsview's reference - * @return A pointer to the created instance of CIRPlsContainer. - */ - static CIRPlsContainer* NewLC(const TRect& aRect,CIRPlsView &aView); - /** - * ~CIRPlsViewContainer - * Destructor. - */ - ~CIRPlsContainer(); - - - /* - * 2nd phase constructor. - */ - void ConstructL( const TRect& aRect ); - - /** - * CIRPlsContainer() - * Default Constructor. - */ - - CIRPlsContainer(CIRPlsView& aView); - - /** - * GetCurrentItemIndex() - * To get the current Item index. - */ - TInt GetCurrentItemIndex() const; - - /** - * ListenToStationL() - * Function to listening to a station. - */ - void ListenToStationL(); - - /** - * CreatePresetL() - * Creating a preset object - */ - CIRIsdsPreset* CreatePresetL(); - - /** - * CreatePresetListL() - * Creating a Preset List - */ - void CreatePresetListL(); - - /** - * SaveL() - * Save a channel name to favorites DB. - */ - void SaveL(); - - /** - * SaveAllL() - * Save channel names to favorites DB. - */ - void SaveAllL(); - - /** - * Updates all items of the list by reading data from preset data base. - */ - void UpdateAllL() ; - - /** - * OfferKeyEventL() from CCoeControl - * - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * HandlePointerEventL - * Handles all the Pointer events - */ - void HandlePointerEventL( const TPointerEvent& aPointerEvent ); - - - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * HandleListBoxEventL() - * Handles any event on the List Box. - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - /** - * GetCount() - * Gets the count of the List. - */ - TInt GetCount() const; - - /** - * GetListBoxTopIndex() - * Gets the TopItemIndex. - */ - TInt GetListBoxTopIndex() const; - - /** - * SecondPls() - */ - void SecondPls(); - - /** - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); - - - -private: //Methods - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect ) const; - - /** - * DisplayErroronDBL() - * Displays error if favorites db is full. - */ - void DisplayErroronDBL(); - - /** - * DisplayErrorOnNoItemsL() - * Displays error if no streaming links - */ - void DisplayErrorOnNoItemsL(); - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Called by framework when the view size is changed. - */ - void SizeChanged(); - - - - -private: // Data - - /** - * Parent view of this container. - */ - CIRPlsView& iPlsView; - - // bool to check if all stations saved - TBool iSavedAllUrl; - - /** - * This array holds the list of preset objects to be saved - */ - RPointerArray iPresetList; - - /** - * Indicates if the preset list is present or not - */ - TBool iPresetListPresent; - - /* - * iIsPresetSaved - * array used to check whether the preset is saved - */ - RArray iIsPresetSaved; - - /* - * iPlsListBox - * CAknSingleStyleListBox listbox for the PLS list. - */ - CEikColumnListBox *iPlsListBox; - /* - * iListArray - * Pls List - */ - CDesCArray* iListArray; - - - }; - -#endif // CIRPlsContainer_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irplsplaylist.h --- a/internetradio2.0/uiinc/irplsplaylist.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Describes a PLS playlist. -* -*/ - - -#ifndef C_IRPLSPLAYLIST_H -#define C_IRPLSPLAYLIST_H - -#include - -class CIRPlsPlayListItem; -class RFile; - -/** - * Describes a PLS playlist. - */ -class CIRPlsPlayList : public CBase - { - -public: - - /** - * Two-phased constructor. - * - * @param aFileToParse Open file that is parsed to content of this object. - */ - static CIRPlsPlayList* NewL(RFile& aFileToParse); - - /** - * Two-phased constructor. - * - * @param aFileToParse Open file that is parsed to content of this object. - */ - static CIRPlsPlayList* NewLC(RFile& aFileToParse); - - /** - * Destructor. - */ - ~CIRPlsPlayList(); - - /** - * Adds new item to playlist to the specified index. - * Takes ownership of aItem. - * If there exists an item at specified index, it's replaced. - * - * @param aIndex Index to add item at. - * @param aItem The item to be added. - */ - void AddItemAtL( TInt aIndex, CIRPlsPlayListItem* aItem ); - - /** - * Removes item at specified index of this playlist. - * No-op, if no item was found with the index. - * - * @param aIndex Index to removed item at. - */ - void RemoveItemAt( TInt aIndex ); - - /** - * Returns item at specified index in this playlist. - * NULL is returned if no item found with the index. - * Ownership of item is not transferred. - * - * @param aIndex Index to return item from. - * @return The item at aIndex, or NULL. - */ - CIRPlsPlayListItem* ItemAt( TInt aIndex ) const; - - /** - * Returns the number of items in this playlist. - * - * @return The number of items. - */ - TInt Count() const; - -private: - - /** - * Constructor. - */ - CIRPlsPlayList(); - - /** - * Constructor. - * - * @param aFileToParse Open file that is parsed to content of this object. - */ - void ConstructL(RFile& aFileToParse); - - /** - * Parses a file content into this object. - * - * @param aFileToParse Open file that is parsed to content of this object. - */ - void ParseFileL(RFile& aFileToParse); - - /** - * Reads a single line of specified file at cursor position. - * The file must be open. Changes the position of cursor, - * so that this enables reading the whole file with sequential - * calls to this function. - * Fills the given buffer with content of line. The buffer must - * must be NULL when calling this function. - * When the last line is read and buffer filled, return value - * is KErrEof. - * Empty lines are skipped, only lines with content are returned! - * - * @param aFile The file to read from. - * @param aLineBuf The buffer to be filled. - * @return KErrNone or KErrEof - */ - void ReadLineL( RFile& aFile, HBufC8*& aLineBuf, TInt *aError ) const; - -private: // data - - /** - * Array of items in this list. - */ - RPointerArray iItems; - - /** - * Array of item indexes in this list. - */ - RArray iIndexes; - }; - -#endif // C_IRPLSPLAYLIST_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irplsplaylistitem.h --- a/internetradio2.0/uiinc/irplsplaylistitem.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Describes a single item in PLS playlist. -* -*/ - - -#ifndef C_IRPLSPLAYLISTITEM_H -#define C_IRPLSPLAYLISTITEM_H - -#include - -/** - * Describes a single item in PLS playlist. - * The item consists of File, Title and Length attributes. - */ -class CIRPlsPlayListItem : public CBase - { - -public: - - /** - * Two-phased constructor. - */ - static CIRPlsPlayListItem* NewL(); - - /** - * Two-phased constructor. - */ - static CIRPlsPlayListItem* NewLC(); - - /** - * Destructor. - */ - ~CIRPlsPlayListItem(); - - /** - * Sets new File attribute. The old attribute is replaced. - * - * @param aFile New File attribute. - */ - void SetFileL( const TDesC& aFile ); - - /** - * Sets new Title attribute. The old attribute is replaced. - * - * @param aTitle New Title attribute. - */ - void SetTitleL( const TDesC& aTitle ); - - /** - * Sets new Length attribute. The old attribute is replaced. - * - * @param aLength New Length attribute. - */ - void SetLength( TInt aLength ); - - /** - * Gets the File attribute. - * - * @return The File attribute. - */ - const TDesC& File() const; - - /** - * Gets the Title attribute. - * - * @return The Title attribute. - */ - const TDesC& Title() const; - - /** - * Gets the Length attribute. - * - * @return The Length attribute. - */ - TInt Length() const; - -private: - - /** - * Constructor. - */ - CIRPlsPlayListItem(); - - -private: // data - - /** - * "File" of this item. - */ - RBuf iFile; - - /** - * "Title" of this item. - */ - RBuf iTitle; - - /** - * "Length" of this item. - */ - TInt iLength; - }; - -#endif // C_IRPLSPLAYLISTITEM_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irplsview.h --- a/internetradio2.0/uiinc/irplsview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: view for pls list -* -*/ - - -#ifndef CIRPLSVIEW_H -#define CIRPLSVIEW_H - -#include -#include -#include "irbaseview.h" -#include "IRActiveNetworkObserver.h" - - -class CIRUi; -class CIRPlsContainer; -class CIRIsdsPreset; -class MIRActiveNetworkObserver; - -//========================================class declaration CIRPlsView============================================ - -/** - * This class Creates CIRPlsView. - * Handles the all the options defined for the view. - * - * @code - * Create instance of .pls view. - * CIRPlsView* self = new (ELeave) CIRPlsView; - * - * Create the instance of container. - * iContainer = CIRPlsView::NewL(AppUi()-> - ApplicationRect()); - * - * @endcode - * - */ -class CIRPlsView : public CIRBaseView, - public MAknToolbarObserver, - public MIRActiveNetworkObserver - { -public: - - /** - * NewL. - * Two-phased constructor. - * Create a CIRPlsView object, which will draw itself to aRect. - * @param aRect The rectangle this view will be drawn to. - * @return a pointer to the created instance of CIRPlsView. - */ - static CIRPlsView* NewL(const TRect& aRect); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRPlsView object, which will draw itself - * to aRect. - * @param aRect Rectangle this view will be drawn to. - * @return A pointer to the created instance of CIRPlsView. - */ - static CIRPlsView* NewLC(const TRect& aRect); - - /** - * ~CIRPlsView - * Destructor. - */ - ~CIRPlsView(); - - /** - * Id() - * defines the Id of the view. - * returns the UId of the view. - */ - TUid Id() const; - - - /** - * HandleCommandL() - * Handles the user input commands. - * @param aCommand The command generated by user keypress.. - */ - - void HandleCommandL(TInt aCommand); - - /** - * DynInitMenuPaneL() - * Dynamically loads the menu pane. - * @param aResourceId,the resource Id of the view. - * @param aMenuPane,Pointer to the menu pane. - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - //for listen and add to favorites - - -private: - - /** - * ConstructL - * 2nd phase constructor. - * Perform the second phase construction of a - * @param aRect The rectangle this view will be drawn to. - */ - void ConstructL(const TRect& aRect); - - /** - * CIRPlsView. - * C++ default constructor. - */ - CIRPlsView(); - - /** - * DoActivateL() - * Activates the view. - */ - void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage); - /** - * DoDeactivate() - * DeActivates the view. - */ - void DoDeactivate(); - - //added for touch toolbar - // From MAknToolbarObserver - void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar ); - - /** - * OfferToolbarEventL() - * Handles all the events for the touch tool bar. - */ - - void OfferToolbarEventL( TInt aCommand ); - - /** - * HandleStatusPaneSizeChange() - * Handles the Change in the status Pane - */ - - void HandleStatusPaneSizeChange(); - - /** - * HandleForegroundEventL() - * Handles the foreground event. - */ - - void HandleForegroundEventL( TBool aForeground ); - - /** - * ConstructToolbarL() - * Construct the touch toolbar. - */ - - void ConstructToolbarL(); - -public: - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - - /** - * SecondConstruct() - * To again initialise when Second pls file is opened. - */ - void SecondConstruct(); - - -private: - - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - - - //instance of CIRPlsViewContainer - CIRPlsContainer* iContainer; - - - }; - -#endif // IR_PLSVIEW_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irpropertyobserver.h --- a/internetradio2.0/uiinc/irpropertyobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,226 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef CIRPROPERTYOBSERVER_H -#define CIRPROPERTYOBSERVER_H - -#include -#include - -/** - * Defines text property with maximum size, that is RProperty:: - * KKMaxPropertySize bytes. - */ -typedef TBuf8 TIRTextProperty; - -/** - * MIRPropertyChangeObserver - * - * Abstract interface for handling property change events. - */ -class MIRPropertyChangeObserver -{ - -public: - - /** - * This is a callback function which is called when a property value of - * type int is changed. - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * - * @param aValue the new value - */ - virtual void HandlePropertyChangeL( - const TUid& aCategory, - const TUint aKey, - const TInt aValue ) = 0; - - /** - * This is a callback function which is called when a property value of - * type text is changed. - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aValue the new value - **/ - /*lint -save -e1053*/ - virtual void HandlePropertyChangeL( - const TUid& aCategory, - const TUint aKey, - const TIRTextProperty& aValue ) = 0; - /*lint -restore*/ - - /** - * This is a callback function which is called when a P&S components - * returns an error - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event - * @param aError an error code - */ - virtual void HandlePropertyChangeErrorL( - const TUid& aCategory, - const TUint aKey, - TInt aError) = 0; - -}; - - - -/** - * Observer class that observes changes of Property values and propogates - * them further. - * The class defines a handle to a property, a single data value representing - * an item of state information. - * - */ - class CIRPropertyObserver : public CActive - { - - public: // Constructors and destructor - - /** - * Two-phased constructor. - * - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aPropertyType property type to observe - */ - IMPORT_C static CIRPropertyObserver* NewL( - MIRPropertyChangeObserver& aObserver, - const TUid& aCategory, - const TUint aKey, - const RProperty::TType aPropertyType); - - /** - * Destructor. - */ - ~CIRPropertyObserver(); - - /** - * Updates an int value reference in correspondence with the current - * Property value - * - * @param aValue handle to a value which will be updated - **/ - IMPORT_C void GetValue( TInt& aValue ) const; - - /** - * Updates a text value reference in correspondence with the current - * Property value - * - * @param aValue handle to a value which will be updated - */ - /*lint -save -e1053*/ - IMPORT_C void GetValue( TIRTextProperty& aValue ) const; - /*lint -restore*/ - - /** - *Subscription of listened P&S keys - */ - void Subscribe(); - - -private: - - /** - * C++ default constructor overload. - * Two-phased constructor. - * - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aPropertyType property type to observe - */ - CIRPropertyObserver( - MIRPropertyChangeObserver& aObserver, - const TUid& aCategory, - const TUint aKey, - const RProperty::TType aPropertyType); - - /** - * By default Symbian 2nd phase constructor is private. - **/ - void ConstructL(); - -protected: - - // from base class Cactive - /** - * From CActive - * - * @see CActive::RunL() - */ - void RunL(); - - /** - * From CActive, - * - * @see CActive::DoCancel() - */ - void DoCancel(); - - -private: - - /** - * Value of a subscribed category property of type int. - */ - TInt iValueInt; - - /** - * Value of a subscribed category property of type text. - */ - TIRTextProperty iValueText; - - /** - * Handle to Publish And Subscribe component - */ - RProperty iProperty; - - /** - * Observer to be notified when particular Property value has changed - */ - MIRPropertyChangeObserver& iObserver; - - /** - * UID of Publish And Subscribe category - */ - TUid iCategory; - - /** - * Subkey to be used with Publish And Subscribe - */ - TUint iKey; - - /** - * Type of the observed property. - */ - RProperty::TType iPropertyType; - - }; - -#endif // CPROPERTYOBSERVER_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irpropertyobserver2.h --- a/internetradio2.0/uiinc/irpropertyobserver2.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for CIRPropertyObserver2 -* -*/ - - -#ifndef CIRPROPERTYOBSERVER2_H -#define CIRPROPERTYOBSERVER2_H - -#include -#include - -/** - * MIRPropertyChangeObserver2 - * - * Abstract interface for handling property change events. - */ -class MIRPropertyChangeObserver2 -{ - -public: - - /** - * This is a callback function which is called when a property value of - * type int is changed. - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * - * @param aValue the new value - */ - virtual void HandlePropertyChangeL( - const TUid& aCategory, - const TUint aKey, - const TInt aValue ) = 0; - - /** - * This is a callback function which is called when a property value of - * type byte array is changed. - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aValue the new value - **/ - virtual void HandlePropertyChangeL( - const TUid& aCategory, - const TUint aKey, - const TDesC8& aValue ) = 0; - - /** - * This is a callback function which is called when a property value of - * type text is changed. - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aValue the new value - **/ - virtual void HandlePropertyChangeL( - const TUid& aCategory, - const TUint aKey, - const TDesC& aValue ) = 0; - - /** - * This is a callback function which is called when a P&S components - * returns an error - * - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event - * @param aError an error code - */ - virtual void HandlePropertyChangeErrorL( - const TUid& aCategory, - const TUint aKey, - TInt aError) = 0; - -}; - - - -/** - * Observer class that observes changes of Property values and propogates - * them further. - * The class defines a handle to a property, a single data value representing - * an item of state information. - * - */ -NONSHARABLE_CLASS( CIRPropertyObserver2 ) : public CActive - { - - public: - - /** - * Property type. Cannot use RProperty::TType because EByteArray == EText. - */ - enum TIRPropertyType - { - EIRPropertyInt, // Integral property type. - EIRPropertyByteArray, // Byte-array (8 bit), max size 512 bytes - EIRPropertyText // Text (16 bit), max size 512 bytes - }; - - /** - * Two-phased constructor. - * - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aPropertyType property type to observe - */ - IMPORT_C static CIRPropertyObserver2* NewL( - MIRPropertyChangeObserver2& aObserver, - const TUid& aCategory, - const TUint aKey, - const TIRPropertyType aPropertyType); - - /** - * Destructor. - */ - ~CIRPropertyObserver2(); - - /** - * Subscribes the object to listen to the specified key. Does nothing if already active. - * Must be called after construction, or after calling Cancel(). - */ - IMPORT_C void ActivateL(); - - /** - * Returns current integer property value - * - * @return int value - */ - IMPORT_C TInt ValueInt() const; - - /** - * Returns current byte array property value - * - * @return byte array value - */ - IMPORT_C const TDesC8& ValueDes8() const; - - /** - * Returns current text property value - * - * @return text value - */ - IMPORT_C const TDesC& ValueDes() const; - -private: - - /** - * C++ default constructor overload. - * Two-phased constructor. - * - * @param aObserver a reference to the observer interface implementer - * @param aCategory UID of Publish And Subscribe category - * @param aKey subkey to specify the category event; to be used with - * Publish And Subscribe - * @param aPropertyType property type to observe - */ - CIRPropertyObserver2( - MIRPropertyChangeObserver2& aObserver, - const TUid& aCategory, - const TUint aKey, - const TIRPropertyType aPropertyType); - - /** - * By default Symbian 2nd phase constructor is private. - **/ - void ConstructL(); - -protected: - - // from base class Cactive - /** - * From CActive - * - * @see CActive::RunL() - */ - void RunL(); - - /** - * From CActive, - * - * @see CActive::DoCancel() - */ - void DoCancel(); - -private: // data - - /** - * Value of a subscribed category property of type int. - */ - TInt iValueInt; - - /** - * Value of a subscribed category property of type byte array. - */ - HBufC8* iValueByteArray; - - /** - * Value of a subscribed category property of type text. - */ - HBufC* iValueText; - - /** - * Handle to Publish And Subscribe component - */ - RProperty iProperty; - - /** - * Observer to be notified when particular Property value has changed - */ - MIRPropertyChangeObserver2& iObserver; - - /** - * UID of Publish And Subscribe category - */ - TUid iCategory; - - /** - * Subkey to be used with Publish And Subscribe - */ - TUint iKey; - - /** - * Type of the observed property. - */ - TIRPropertyType iPropertyType; - - }; - -#endif // CIRPROPERTYOBSERVER2_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irpubsub.h --- a/internetradio2.0/uiinc/irpubsub.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for CIRPubSub -* -*/ - - -#ifndef CIRPUBSUB_H -#define CIRPUBSUB_H - -#include - -#include "irpubsubkeys.h" - -class CIRMetaData; -class CIRPropertyObserver; - -/** - * Publish&Subscribe interface of Internet Radio Application. - */ -class CIRPubSub : public CBase - - //public MIRPropertyChangeObserver - { - -public: // Methods - - /** - * Static constructor. - */ - static CIRPubSub* NewL(); - - /** - * Destructor. - */ - virtual ~CIRPubSub(); - - /** - * Publishes active channel number to P&S. - * - * @param aChannelName The channel name to publish. - */ - void PublishChannel( const TDesC16& aChannelName ) const; - - /** - * Publishes volume level number to P&S. - * - * @param aVol The volume level to publish. - */ - void PublishVolume( TInt aVol ) const; - - /** - * Publishes active channel number to P&S. - * - * @param aPlayingState The state of palying to publish. - */ - void PublishPlayStop ( TIRStopPlayState aPlayingState ) const; - - /** - * Publishes application running state to P&S. - * - * @param aRunningState The application running state. - */ - void PublishApplicationRunningStateL( - TIRPSApplicationRunningState aRunningState ) const; - - /** - * Published meta data information. - * - * @param aMetaData Meta data information to publish. - */ - void PublishMetaDataL( const CIRMetaData& aMetaData ) const; - - /** - * Publishes active channel Type to P&S. - * - * @param aChannelName The channel Type to publish. - */ - void PublishChannelType ( TInt aChannelType ) const; - - /** - * Publishes active channel Id to P&S. - * - * @param aChannelId The channel Id to publish. - */ - void PublishChannelId ( TInt aChannelId ) const; - - void PublishChannelDesc(const TDesC16& aChannelDesc ) const ; - - void PublishChannelMusicFlag(const TDesC16& aChannelMusicFlag ) const ; - - - void PublishBufferingState(TIRBufferingState aState) const; - -private: //Methods - - /** - * C++ default constructor. - */ - CIRPubSub( ); - - void ConstructL(); - - /** - * Defines a property. - * - * @param aKey The key of the property. - * @param aAttr Attributes of the property. - * @param aDataProperty ETrue if the property is a data property, EFalse - * if it is a control property - */ - void DefinePropertyL( - TUint aKey, - TInt aAttr, - TBool aDataProperty ) const; - - /** - * Deletes a property. - * - * @param aKey The key of the property. - */ - void DeleteProperty( TUint aKey ) const; - - -private: // Data - - /** - * An array of handlers to P&S interface. - */ - RPointerArray iPropertyArray; -public : - - //iRapp application instance count - TInt iApplicationInstanceCount; - - }; - -#endif // CIRPUBSUB_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irradioidle.h --- a/internetradio2.0/uiinc/irradioidle.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,447 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -/* -* ============================================================================ -* Name : vrradioidle.h -* Part of : S60VisualRadio / UI -* Description : -* Version : -* -* ============================================================================== -*/ - -#ifndef IRRADIOIDLE_H_ -#define IRRADIOIDLE_H_ - -// INCLUDES - -#include -#include -#include -#include - -// FORWARD DECLARATIONS - -class CAlfGradientBrush; -class CAlfViewportLayout; -class CAlfEnv; - -// CONSTANTS - -/** Commands for radio idle. */ -enum TRadioIdleCommand - { - ESuspend = 0x4A, - EStartup, - EShutdown, - ERefresh, - EResetContent - }; - -// CLASS DEFINITIONS - -class MIRRadioIdleCommandObserver - { - public: - /** - * Called when change to the state of radio idle is wanted - */ - virtual void HandleCommandL( TRadioIdleCommand aCommand ) = 0; - }; - -/** -* CVRRadioIdle class -* -* Class launches animated information in the defined subregion of the display after startup delay. -* Launching and radio idle running can be suspended by giving ESuspend command via -* MVRRadioIdleCommandObserver interface. When suspended, -* background bitmap will replace the animated information and startup delay is reset to zero. -* The animation will start again after the delay. -*/ -NONSHARABLE_CLASS(CIRRadioIdle) : public CAlfControl, public MIRRadioIdleCommandObserver - { -public: // Constructors and destructor - - /** Display orientations. */ - enum TOrientation - { - EPortrait = 0x4A, - ELandscape, - EOrientationNone - }; - - /** - * Epoc two-phased constructor. - * @param aAlfEnv The Alfred environment. - * @param aControlGroupId The control group that this control is to be added to. - * @param aParentLayout The parent layout for the visuals. - */ - static CIRRadioIdle* NewL( CAlfEnv& aEnv, TInt aControlGroupId, CAlfLayout* aParentLayout ); - /** - * Destructor - */ - virtual ~CIRRadioIdle(); - -public: // Functions from base classes - /** - * From CAlfControl, takes care of alfred event handling. - */ - TBool OfferEventL( const TAlfEvent& aEvent ); - -public: // New functions - - /** States of radio idle. */ - enum TRadioIdleState - { - ERunning = 0xA0, - ESuspended, - EStopped - }; - - /** Radio idle modes. */ - enum TRadioIdleMode - { - EOnlyBackgroundText = 0xB0, - EBackgroundTextAndRadioIdleItems - }; - - /** Fade styles. */ - enum TRadioIdleFadeStyle - { - EFadeLeft = 0xC0, - EFadeRight, - EFadeStyleNone - }; - - /** - * Adds radio idle item text to be used in the radio idle - * @param aRadioIdleItemText Text of the radio idle item - * @return Index of the added item - */ - TInt AddRadioIdleContentL( const TDesC& aRadioIdleItemText ); - /** - * Updates radio idle item text in specified index - * @param aRadioIdleItemText Text of the radio idle item - * @param aIndex Index of the radio idle item to be updated - */ - void UpdateRadioIdleContent( const TDesC& aRadioIdleItemText, TInt aIndex ); - /** - * Removes all radio idle item texts - */ - void ResetRadioIdleContent(); - /** - * Returns number of radio idle content items - * @return content count - */ - TInt RadioIdleContentCount() const; - /** - * Sets the fade style for radio idle. - * @param aFadeStyle Fade style - */ - void SetIdleFadeStyle( TRadioIdleFadeStyle aFadeStyle ); - /** - * Sets the mode request for mode change. The mode - * will be changed as soon as possible. - * @param aRequestedMode Requested mode - */ - void SetModeChangeRequestL( TRadioIdleMode aRequestedMode ); - /** - * Retrieves the radio idle mode - */ - TRadioIdleMode Mode(); - /** - * Retrieves the radio idle state - */ - TRadioIdleState State(); - /** - * Sets primary color for the radio idle - * @param aColor The color that is used as primary color of radio idle - */ - void SetPrimaryColor( TRgb aColor ); - /** - * Sets secondary color for the radio idle - * @param aColor The color that is used as secondary color of radio idle - */ - void SetSecondaryColor( TRgb aColor ); - /** - * Sets the background color of the radio idle - * @param aColor The color that is used as the background color of the radio idle - */ - void SetBackgroundColor( TRgb aColor ); - /** - * Return orientation of the display - */ - TOrientation Orientation(); - /** - * Set orientation of the display - * @param aOrientation The display orientation - */ - void SetOrientation( TOrientation aOrientation ); - /** - * Calculates display layout - */ - void UpdateLayout(); - /** - * From MIRRadioIdleCommandObserver, takes care of radio idle command handling. - * @param aCommand Radio idle command - */ - void HandleCommandL( TRadioIdleCommand aCommand ); - -private: - /** - * C++ default constructor - */ - CIRRadioIdle(); - /** - * EPOC second phase constructor. - * @param aEnv Reference to the Hitchcock environment instance. - * @param aControlGroupId Id of the control group to which radio idle belongs. - * @param aParentLayout Pointer to parent layout. - */ - void ConstructL( CAlfEnv& aEnv, TInt aControlGroupId, CAlfLayout* aParentLayout ); - -private: // New functions - - /** Scroll directions for the radio idle item. */ - enum TRadioIdleItemScrollDirection - { - EScrollLeftToRight = 0xA0, - EScrollRightToLeft, - EScrollNone - }; - - /** Custom events for the radio idle. */ - enum TRadioIdleCustomEvent - { - ERadioIdleItemTransformationEnd = 0x5B, - ERadioIdleBackgroundTextScrollEnd, - EAfterStartupDelay, - ERadioIdleChangeMode, - ERadioIdleEventNone, - ERadioIdleFadeOutCompleted - }; - - /** - * Suspends radio idle and starts it again after startup delay - */ - void SuspendRadioIdle(); - /** - * Stops radio idle. Radio idle is set to stopped state. - */ - void ShutdownRadioIdle(); - /** - * Launches radio idle immediately. - * The background bitmap fades out and at the same time radio idle fades in - */ - void StartRadioIdleL(); - /** - * Starts radio idle again without reseting radio idle items. - */ - void RefreshL(); - /** - * Creates radio idle with passed number of the radio idle items - * @param aNumberOfRadioIdleItems Number of the radio idle items - */ - void AddRadioIdleL( const TInt aNumberOfRadioIdleItems ); - /** - * Creates the radio idle item to the passed radio idle view port. - * @param aRadioIdle The view port of the radio idle, ownership now transferred - * @param aRadioIdleItemText Text of the radio idle item - * @param aRadioIdleItemHasBackground TBool to indicate background visibility - * @param aBackgroundColor The background color of the radio idle item - * @param aBackgroundOpacity The background opacity of the radio idle item - */ - CAlfTextVisual* AddRadioIdleItemL( CAlfLayout* aRadioIdle, - const TDesC& aRadioIdleItemText, - const TDesC8& aTag, - TBool aRadioIdleItemHasBackground = EFalse, - const TRgb& aBackgroundColor = KRgbWhite, - const TReal32 aBackgroundOpacity = 0.5f ); - /** - * Creates, initializes and animates the radio idle background text visual - */ - void CreateBacgroundTextVisualL(); - /** - * Initializes the radio idle items - * @param aNumberOfRadioIdleItems Number of the radio idle items - */ - void InitializeRadioIdleItemsL( const TInt aNumberOfRadioIdleItems ); - /** - * Sets defined animation to the created radio idle items - */ - void AnimateRadioIdleItems(); - /** - * Retrieves text from randomly chosen radio idle item. - * Transfers ownership. - */ - HBufC* GetRandomRadioIdleContentL(); - /** - * Sets color, opacity and scaling settings to the radio idle item - * @param aRadioIdleItem The radio idle item, ownership not transferred - * @param aRadioIdleItemText Text of the radio idle item - * @param aTextStyleId Text style for text of the radio idle item - */ - void SetRadioIdleItemSettingsL( CAlfTextVisual* aRadioIdleItem, const TDesC& aRadioIdleItemText, - const TInt aTextStyleId ); - /** - * Sets translating animations to the radio idle item - * @param aRadioIdleItem The radio idle item, ownership not transferred - * @param aRandomSeed - */ - void SetRadioIdleItemAnimation( CAlfTextVisual* aRadioIdleItem ); - - /** - * Sets the radio idle mode - */ - void SetMode( TRadioIdleMode aMode ); - /** - * Fades in radio idle - * @param aNow If ETrue shows radio idle immediately otherwise - * fades with defined fading duration - */ - void RadioIdleFadeIn( TBool aNow = EFalse ); - /** - * Fades out radio idle - * @param aNow If ETrue hides radio idle immediately otherwise - * fades with defined fading duration - */ - void RadioIdleFadeOut( TBool aNow = EFalse ); - /** - * Sets and starts scrolling animation to CAlfTextVisual. - * The visual object is scrolled from current position to - * right side of the display - * @param aVisual a pointer to the visual object, ownership not transferred - */ - void ScrollToRight( CAlfTextVisual* aVisual ) const; - /** - * Sets and starts scrolling animation to CAlfTextVisual. - * The visual object is scrolled from current position to - * left side of the display - * @param aVisual a pointer to the visual object, ownership not transferred - */ - void ScrollToLeft( CAlfTextVisual* aVisual ) const; - /** - * todo - * @param aVisual a pointer to the visual object, ownership not transferred - * @param aTransitionTime Duration for reaching the target. - * @param aEventAfterScrollingEnd todo custom even that will be sent when transition time is end - */ - void SetScrollingToBackgroundText( CAlfTextVisual* aVisual, - TInt aTransitionTime, - TRadioIdleCustomEvent aEventAfterScrollingEnd = ERadioIdleEventNone ) ; - /** - * Sets fade-in animation to the CAlfVisual. - * @param aVisual a pointer to the visual object, ownership not transferred - * @param aTime Time duration after the visual object has been faded in. Fading duration in milliseconds - * @param aOpacity Target opacity value - */ - void FadeIn( CAlfVisual* aVisual, TInt aFadingTime, TReal32 aOpacity = 1.0f ) const; - /** - * Sets fade-out animation to the CAlfVisual. - * @param aVisual a pointer to the visual object, ownership not transferred - * @param aTime Time duration after the visual object has been faded out. Fading duration in milliseconds - * @param aOpacity Target opacity value - */ - void FadeOut( CAlfVisual* aVisual, TInt aFadingTime, TReal32 aOpacity = 0.0f ) const; - /** - * Translates the visual object with passed arguments - * @param aVisual a pointer to the visual object, ownership not transferred - * @param aX Translation value in the horizontal direction - * @param aY Translation value in the vertical direction - */ - void Translate( CAlfTextVisual* aTextVisual, const TAlfTimedValue& aX, - const TAlfTimedValue& aY ); - /** - * Scales the visual object with passed arguments - * @param aVisual a pointer to the visual object, ownership not transferred - * @param aX Scaling value in the horizontal direction - * @param aY Scaling value in the vertical direction - */ - void Scale( CAlfTextVisual* aTextVisual, const TAlfTimedValue& aX, const TAlfTimedValue& aY ); - /** - * Removes all transformations of the visual object such as the scaling and translating. - * @param aVisual a pointer to the visual object, ownership not transferred - */ - void LoadTextVisualIdentity( CAlfTextVisual* aTextVisual ); - /** - * Converts CAlfVisual reference to pointer - */ - CAlfVisual* GetPointer( CAlfVisual& aRef ); - /** - * Callback for radio idle item transformation end. - */ - void HandleRadioIdleItemTransformationEndEventL( const TAlfEvent& aEvent ); - /** - * Callback for background text transformation end. - */ - void HandleBackgroundTextScrollEndEventL( const TAlfEvent& aEvent ); - /** - * Randomly modifies a component of a radio idle text color. - */ - TInt DeviateColorComponent( TInt aBaseValue ); - -private: // Data - - /** Display orientation */ - TOrientation iOrientation; - - /** Visual of radio idle content. Not owned. */ - CAlfViewportLayout* iViewport; - /** Parent layout. Not owned. */ - CAlfLayout* iParentLayout; - /** Layout for radio idle */ - TAknLayoutRect iRadioIdleLayout; - - /** Fade style for radio idle */ - TRadioIdleFadeStyle iFadeStyle; - /** States of radio idle */ - TRadioIdleState iRadioIdleState; - /** Keeps track of the current radio idle mode */ - TRadioIdleMode iRadioIdleMode; - /** Keeps track of the requested mode */ - TRadioIdleMode iRadioIdleRequestedMode; - /** Counts the items that have finished their transformations for mode change */ - TInt iItemsTransformationEndEventCounter; - - /** Color to be used for the radio idle items */ - TRgb iRadioIdlePrimaryColor; - /** Color to be used for the radio idle items */ - TRgb iRadioIdleSecondaryColor; - /** Scroll direction for the radio idle item */ - TRadioIdleItemScrollDirection iScrollDirection; - - /** Array for the strings of the radio idle items. Owned. */ - CDesCArrayFlat* iRadioIdleItemArray; - /** Array for the text styles of the radio idle items */ - RArray iTextStyleIdArray; - - /** Background of radio idle. Not owned.*/ - CAlfGradientBrush* iRadioIdleBackgroundGradientBrush; - /** Text style id of the radio idle background text */ - TInt iRadioIdleItemBackgroundTextStyleId; - /** Color that is used as the background color of radio idle */ - TRgb iRadioIdleBackgroundColor; - /** Scroll direction for the radio idle background text */ - TRadioIdleItemScrollDirection iBackgroundTextScrollDirection; - /** Indicates whether fading is ongoing */ - TBool iFading; - /** Indicates whether there was a startup try when fading out radio idle */ - TBool iDelayedStartup; - - }; - -#endif /*VRRADIOIDLE_H_*/ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsearchresultsview.h --- a/internetradio2.0/uiinc/irsearchresultsview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,344 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRSearchResultsView -* -*/ - - -#ifndef CIRSEARCHRESULTSVIEW_H -#define CIRSEARCHRESULTSVIEW_H - -#include "irbaseview.h" -#include -#include -#include "MViewsResponseAndErrorObserver.h" -#include "MLogoDownloadObserver.h" - - -class CIRSearchResultsViewContainer; -class CAknButton; -class CIRAddManuallyStationForm; -class MLogoDownloadObserver; -class MIRActiveNetworkObserver; - -/** - * SearchResults View - */ -class CIRSearchResultsView : public CIRBaseView, - public MAknToolbarObserver, - public MViewsResponseAndErrorObserver, - public MLogoDownloadObserver, - public MIRActiveNetworkObserver - { - -public: //Methods - - /** - * NewLC() - * Static constructor. - */ - static CIRSearchResultsView* NewL(); - - /** - * NewLC() - * Static constructor. - */ - static CIRSearchResultsView* NewLC(); - - /** - *~CIRSearchResultsView() - * Destructor. - */ - ~CIRSearchResultsView(); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - /** - * HandleStatusPaneSizeChange() - * Event handler for status pane size changes. - */ - void HandleStatusPaneSizeChange(); - - /** - * void SetStatusPaneTextL() - * Sets the title pane of the search results view - */ - void SetStatusPaneTextL(); - - /** - * DynInitMenuPaneL() - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt /*aResourceId*/,CEikMenuPane* aMenuPane); - - //For Touch Toolbar - - /** - * OfferToolbarEventL - * gets toolbar events - */ - void OfferToolbarEventL( - TInt aCommand ); - - /** - * ConstructToolbarL - * constructs a toolbar - */ - void ConstructToolbarL(); - - /** - * HandleForegroundEventL() - * Foreground event handling function. - */ - void HandleForegroundEventL( TBool aForeground ); - - /** - * DialogDismissedL() - * Called by CAknwaitdialog when a dialog is dismissed - */ - - /** - * void ResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - - /** - * void PresetResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * AddToFavouritesL() - * Adds the selected channel to favorites - */ - void AddToFavouritesL(TInt aCurrentIndex,TInt aCommand); - - /** - * ListenChannelL() - * Request for listening to a channel - */ - void ListenChannelL(TInt aCurrentIndex); - - /** - * ErrorL() - * Handles error Conditions - */ - void ErrorL(); - /* - * ShowQueryDialogL() - * Implemented the function for search again - */ - void ShowQueryDialogL(const TDesC& aTitle, TDes& aBuffer); - /** - * PresetLogoDownloadedL() - * CallBack Function Returning the Preset With Logo - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * PresetLogoDownloadError() - * CallBack Function Returning the Preset With no Logo/Error while downloading - */ - void PresetLogoDownloadError(CIRIsdsPreset* /*aPreset*/); - - /** - * LogoRequestL() - * Called by the container of this view - */ - void LogoRequestL(); - - /** - * AdRequestL() - * Called by the container of this view - */ - void AdRequestL(); - /* - * GetActualIndex() - * returns the actual index - */ - TInt GetActualIndex(); - - /* - * CIRSearchResultsView::SetActualFilteredItemIndex () - * Sets the listen is from favourites or not - */ - void SetActualFilteredItemIndex(TInt aIndex); - - /* - * CIRSearchResultsView::GetFilteredIndex () - * returns the iFilteredIndex - */ - TInt GetFilteredIndex(); - /* - * GetFirstLaunchFlag() - * returns the whether the view is launching for the first time/ - * coming back from that has been activated from this view - */ - TBool GetFirstLaunchFlag() ; - /* - * SetToolbarItems - * Sets the touch tool bar items - */ - void SetToolbarItems(); - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); -protected: //Methods - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - -private: //Methods - - /** - * ConstructL() - * 2nd phase constructor - */ - void ConstructL(); - - /** - * CIRSearchResultsView() - * C++ default constructor. - */ - CIRSearchResultsView(); - -private: // Data - - /** - * iContainer - * Container for this view. - */ - CIRSearchResultsViewContainer* iContainer; - - /** - * iToolbarVisible - * Boolean value to determine if the toolbar is visible. - */ - TBool iToolbarVisible; - - - /** - * iIsSearchAgain - * to track whether the search again option is clicked or not - */ - TBool iIsSearchAgain; - - - /* - * Returns the actual index of the listbox - */ - TInt iIndex; - - /* - * Returns the filtered index of the listbox - */ - TInt iFilteredIndex; - TBool iFirstTimeLaunchFlag; - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - - /** - * iAddToFav - * Boolean value to determine if AddToFavorites was issued. - */ - TBool iAddToFav; - - /** - * iListenRequest - * Boolean value to determine if ListenRequest was issued. - */ - TBool iListenRequest; - - /* - * iSearchValue - * Used to determine if search is issued - */ - TInt iSearchValue; - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; -public: - - /** - * iSearchReqMade - * boolean value to know whether the search request - * has made to isds or not - */ - TBool iSearchReqMade; - - - }; - -#endif // CIRSEARCHRESULTSVIEW_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsearchresultsviewcontainer.h --- a/internetradio2.0/uiinc/irsearchresultsviewcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,448 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRSearchResultsViewContainer -* -*/ - - -#ifndef CIRSEARCHRESULTSVIEWCONTAINER_H -#define CIRSEARCHRESULTSVIEWCONTAINER_H - -#include -#include "irimageconverterobserver.h" -#include - -class CIRSearchResultsView; -class CAknIconArray; -class CIRImageConverter; - -/** - * This classes are used for Advertisements - */ -class CCustomListBox; -class CIRFilteredModel; -class MIRListBoxArray; -class CIRAdvertisingListBox; - - -/** - * Container for Search Results View. - */ -class CIRSearchResultsViewContainer : public CCoeControl,public MEikListBoxObserver, - public MIRImageConverterObserver - { - -public: // Methods - - /** - * NewL. - * Two-phased constructor. - * @param aRect The rectangle this view will be drawn to. - * @param aView which is a plsview's reference - * @return a pointer to the created instance of CIRSearchResultsViewContainer. - */ - static CIRSearchResultsViewContainer* NewL(const TRect& aRect ,CIRSearchResultsView &aView ); - - /** - * NewLC. - * Two-phased constructor. - * to aRect. - * @param aRect Rectangle this view will be drawn to. - * @param aView which is a plsview's reference - * @return A pointer to the created instance of CIRSearchResultsViewContainer. - */ - static CIRSearchResultsViewContainer* NewLC(const TRect& aRect,CIRSearchResultsView &aView); - - - /** - * ConstructL - * 2nd phase constructor. - */ - void ConstructL( const TRect& aRect); - - /** - * CIRSearchResultsViewContainer() - * C++ default constructor. - * @param aView View of this container. - */ - CIRSearchResultsViewContainer(CIRSearchResultsView &aSearchResultsView); - - /** - * ~CIRSearchResultsViewContainer() - * Destructor. - */ - ~CIRSearchResultsViewContainer(); - - /** - * UpdateSearchResultsViewL() - * updates the search results data to the search results list - */ - void UpdateSearchResultsViewL(); - - - // from base class CCoeControl - - /** - * From CCoeControl - * - * @see CCoeControl::OfferKeyEventL() - */ - - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - - /** - * From MEikListBoxObserver HandleListBoxEventL - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * GetCurrentItemIndex() - * returns the index of the currently selected item - */ - TInt GetCurrentItemIndex() const; - - /** - * GetListBoxTopIndex() - * returns the index of the top item - */ - TInt GetListBoxTopIndex() const; - - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * HandleResourceChange() - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); - - /** - * HandleImageConversionEventL() - * from base class MIRImageConverterObserver - */ - void HandleImageConversionEventL( - MIRImageConverterObserver::TIRImageConversionEvent /*aEvent*/, TInt aId, TInt aError ); - - /** - * HandleLogoErrorL() - * called from the iSearchResultsView when the logo is not downloaded - */ - void HandleLogoErrorL(); - - - void UpdateSearchResultsL(); - - /** - * CreateCustomListBoxL() - * Creates the custom listbox and updates the list according to that - */ - void CreateCustomListBoxL(); - - /** - * OpenUrlL() - * Used to connect to advertisement url - */ - void OpenUrlL( const TDesC& aHttpLink ); - /* - * CreateFindBoxL() - * Creates the find box for dynamic filtering - */ - CAknSearchField* CreateFindBoxL(CEikListBox* aListBox, - CTextListBoxModel* aModel, CAknSearchField::TSearchFieldStyle aStyle); - /* - * DisableFindBox() - * disable the listbox when focus is not present - */ - void DisableFindBox(); - - /** - * Function : Comparestrings - * Function called to get the actual index of the station - */ - void Comparestrings(); - - /* - * CIRSearchResultsViewContainer::GetFilterdModelPointer() - * returns pointer to filtered model. - */ - CIRFilteredModel* GetFilterdModelPointer(); - /* - * CIRSearchResultsViewContainer::GetFindString() - * returns the string in the findbox - */ - TDesC GetFindString(); - - /* - * CIRSearchResultsViewContainer::GetListPointer() - * returns pointer to Listbox. - */ - CIRAdvertisingListBox* GetListPointer(); - /* - * CIRSearchResultsViewContainer::GetSearchBoxPointer() - * returns the search box pointer. - */ - CAknSearchField* GetSearchBoxPointer(); - - /* - * CIRIsdsPreset* GetAdPreset() - * returns the advertisement preset - */ - CIRIsdsPreset* GetAdvPreset(); - /* - * CIRIsdsPreset* GetTempPreset() - * returns the temporary preset - */ - CIRIsdsPreset* GetTempPreset(); - /** - * CreateListBoxL() - * Creates ListBox depending upon the presence of Advertisement - */ - void CreateListBoxL(); - /** - * Formats list item string with given arguments - * - * @param aFirstRow text for first row - * @param aSecondRow text for second row - * @param aIconId Icon ID used on item - */ - HBufC* FormatItemStringLC( const TDesC& aFirstRow, TInt aIconId ); - /** - * GetLogoNotSupported() - * returns whether the advertisement is supported by the sdk r not - */ - TBool GetLogoNotSupported(); - /** - * Creates default (empty) icon - * - * @return Default icon - */ - CGulIcon* CreateDefaultIconL(); - /** - * PresetLogoDownloadL() - * Used to download the logos depending the preset values. - */ - void PresetLogoDownloadL(CIRIsdsPreset* aPreset); - -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& /*aRect*/ ) const; - - /** - * StartConvertL() - * used to convert the images depending the index passed - * - */ - void StartConvertL( CIRImageConverter& aConverter, TInt /*aIndex*/, TInt /*aId*/ ); - - - - -private: // Data - - /** - * iChannelNameArray - * array to hold the name of channels - */ - CDesCArray* iChannelNameArray; - - /** - * iChannelInfoArray - * array to hold the description of channels - */ - CDesCArray* iChannelInfoArray; - /** - * iItemArray - * array for the listbox model - */ - CDesCArray* iItemArray; - - /** - * iSearchResultsView - * reference of the SearchResultsView - */ - CIRSearchResultsView &iSearchResultsView; - - /** - * boolean for forcibly getting the logo from cache - */ - TBool iForceGet; - - /** - * response from the cache for the availability of logo(CacheNotValid,NotCached,CacheUseable) - */ - TInt iResult; - - /** - * to keep track of the icon array index - */ - TInt iIconIndex; - - /** - * to keep track of the logo url index(for temporary) - */ - TInt iLogoIndex; - /* - * iLandScapeCount - * used to call the aknfind s HandlePopupFindSizeChanged function only once - */ - TInt iLandScapeCount; - /* - * iInvalidIconIndices - * instance of RArray - */ - RArray iInvalidIconIndices; - - /* - * iLogosArray - * instance of RArray - */ - RArray iLogosArray; - - /* - * iNoLogosArray - * instance of RArray - */ - RArray iNoLogosArray; - - /* - * iCurrentItemConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iCurrentItemConverter; - - /* - * iAdBitmap - * instance of CFbsBitmap to store the advertisement - */ - CFbsBitmap* iAdBitmap; - -private: - - /** - * iStationsListBox - * Instance of the SearchResults ListBox - */ - CIRAdvertisingListBox* iSearchListBox; - - /* - * iConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iConverter; - - /** - * Temporary preset to store url and the logo data - */ - CIRIsdsPreset *iTempPreset; - - /** - * Temporary preset to store the raw data of Advertisements - */ - CIRIsdsPreset* iAdvPreset; - /* - * iFilteredModel - * Instance for CIRFilteredModel - */ - CIRFilteredModel* iFilteredModel; - - /* - * iAdPresent - * returns whether the advetisment is present or not - */ - TBool iAdPresent; - /* - * iBgContext - * Instance of CAknsBasicBackgroundControlContext - */ - CAknsBasicBackgroundControlContext* iBgContext; - /* - * iSearchTextBox - * Instance for CAknSearchField; - */ - CAknSearchField* iSearchBox; - /* - * iFindString - * Used to Get the Entered Search string - */ - TBuf iFindString; - /* - * iAdvString - * sets the advertisement string - */ - HBufC* iAdvString; - /* - * iListBoxArray - * Instance of MIRListBoxArray - */ - MIRListBoxArray* iListBoxArray; - /* - * iRequestForAdvertisement - * sets when the request for advertisment conversation is made - */ - TBool iRequestForAdvertisement; - /* - * iLogoDownloadError - * sets when the advertisment future is not supported - */ - TBool iLogoDownloadError; - /** - * iAdRequestStatusFlag - * sets when a request for advertisement is made. - */ - TBool iAdRequestStatusFlag; - /* - * iFilteredFlag - * This flag is set when dynamic filtering is done and - * will be reseted when the characters in the filter box is deleted - */ - TBool iFilteredFlag; - - TInt iError; - - }; - -#endif // CIRSEARCHRESULTSVIEWCONTAINER_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsettingscontainer.h --- a/internetradio2.0/uiinc/irsettingscontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef C_CIRSETTINGSCONTAINER_H -#define C_CIRSETTINGSCONTAINER_H - -//#include "vrcommonsettingscontainer.h" -#include "ircommonsettingscontainer.h" - -class CIRSettingsView; - -// Need to be changed. - -/** - * The container that holds all the setting items. - */ -NONSHARABLE_CLASS( CIRSettingsContainer ) : public CIRCommonSettingsContainer - { -public: // Methods - - /** - * Two-phased constructor. - * - * @param aModel The model that provides writing and reading of the settings. - */ - static CIRSettingsContainer* NewL(CIRSettingsView& aSettingsView); - - /** - * Two-phased constructor. - * - * @param aModel The model that provides writing and reading of the settings. - */ - static CIRSettingsContainer* NewLC(CIRSettingsView& aSettingsView); - - /** - * Destructor. - */ - ~CIRSettingsContainer(); - - /** - * Fades/unfades this container. - * - * @param aFaded ETrue if container is to be faded, otherwise EFalse - */ - void SetFaded(TBool aFaded) const; - -private: - - /** - * Constructor. - * - * @param aModel The model that provides writing and reading of the settings. - */ - CIRSettingsContainer(CIRSettingsView& aSettingsView); - - /** - * Second-phase constructor. - */ - void ConstructL(); - -// from base class CAknSettingItemList. - void EditItemL( TInt aIndex, TBool aCalledFromMenu ); - CAknSettingItem* CreateSettingItemL( TInt aSettingId ); - -// from base class CCoeControl - TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); - -private: - CIRSettingsView& iSettingsView; - }; - -#endif // C_CIRSETTINGSCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsettingsview.h --- a/internetradio2.0/uiinc/irsettingsview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: View class for Settings -* -*/ - - -#ifndef C_CIRSETTINGSVIEW_H -#define C_CIRSETTINGSVIEW_H - -// Need to be changed. - -#include "irsettingsviewbase.h" -#include "irsystemeventobserver.h" -#include "irbaseview.h" - - -/** - * Implementation of the settings view - * CVRSettingsViewBase needs to be changed to CIRSettingsViewBase - */ - -NONSHARABLE_CLASS( CIRSettingsView ) : public CIRSettingsViewBase, public MIRSystemEventObserver - - { -public: - - /** - * NewL() - * Static constructor. - */ - static CIRSettingsView* NewL(); - - /** - * Two-phased constructor. - * @param aShowRegionItem ETrue if region setting item is to be shown, otherwise EFalse - * @return The newly created object. - */ - static CIRSettingsView* NewLC(); - - /** - * Destructor. - */ - ~CIRSettingsView(); - - // from base class CAknView - - /* HandleCommandL() - * Command Handler - */ - void HandleCommandL( TInt aCommand ); - - /* HandleForegroundEventL() - * Handles changes in keyboard focus when an application switches to foreground - */ - void HandleForegroundEventL( TBool aForeground ); - - /* DynInitMenuPaneL() - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - -private: - - /** - * Constructor. - */ - CIRSettingsView(); - - /** - * Second-phase constructor. - * - * @param aShowRegionItem ETrue if region setting item is to be shown - */ - void ConstructL(); - -// from base class CIRSettingsViewBase - - /* CreateContainerL() - * Creates a new container - */ - void CreateContainerL(); - -// from base class CAknView - - /* Id() - * Returns the Id of the view - */ - TUid Id() const; - - /* DoActivateL() - * Activates the view - */ - void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /* DoDeactivate() - * Deactivates the view - */ - void DoDeactivate(); - -// from base class MIRSystemEventObserver - - /* HandleSystemEventL() - * Handles the system events - */ - void HandleSystemEventL(TIRSystemEventType aEventType); - - /* HandleViewStackL() - * handles the view stack - */ - void HandleViewStackL( ); - - }; - -#endif // C_CIRSETTINGSVIEW_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationdirectorycontainer.h --- a/internetradio2.0/uiinc/irstationdirectorycontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRStationDirectoryContainer -* -*/ - - -#ifndef CIRSTATIONDIRECTORYCONTAINER_H_ -#define CIRSTATIONDIRECTORYCONTAINER_H_ - -#include -#include -#include -#include - -class CIRStationDirectoryView; -class CAknDoubleStyleListBox; -/** - * Container for Channel List View. - */ -class CIRStationDirectoryContainer : public CCoeControl , public MEikListBoxObserver - { - -public: // Methods - - /** - * NewL. - * Two-phased constructor. - * Create a CIRStationDirectoryContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aStationsDirView The StationDirectory view's instance. - * @return a pointer to the created instance of CIRStationDirectoryContainer. - */ - static CIRStationDirectoryContainer* NewL( CIRStationDirectoryView& aStationsDirView, - const TRect& aRect ); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRStationDirectoryContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aStationsDirView The StationDirectory view's instance. - * @return a pointer to the created instance of CIRStationDirectoryContainer. - */ - static CIRStationDirectoryContainer* NewLC( CIRStationDirectoryView& aStationsDirView, - const TRect& aRect ); - /** - * Second-phase constructor. - * - * @param aRect Rect for Station Direcotry Container - */ - void ConstructL( const TRect& aRect ); - - /** - * C++ default constructor. - */ - CIRStationDirectoryContainer(CIRStationDirectoryView& aStationsDirView ); - - /** - * Destructor. - */ - ~CIRStationDirectoryContainer(); - - - /** - * From CCoeControl - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * From CCoeControl - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * GetCurrentItemIndex - * Returns the Current Selected index of the ListBox - */ - TInt GetCurrentItemIndex() const; - - /** - * From MEikListBoxObserver HandleListBoxEventL - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * HandleResourceChange() - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); - -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect) const; - -public: //Methods - - /** - * - * Sets items to the listbox. - */ - void PopulateStationListL(); - - /** - * CreateDiscoverStationDataL(TInt aTitle,TInt aDescription) - * Fetches the data from stringloader that should be displayed - * and sets it to the listbox. - */ - void CreateDiscoverStationDataL(TInt aTitle,TInt aDescription); - -private: // Data - - - /** - * List box used to display the list of items. - * Owned. - */ - CDesCArray* iItemArray; - - /** - * iStationDirView - * reference of the stations directory view - */ - CIRStationDirectoryView &iStationDirView; - - /** - * iListbox - * Data for the StationDirectory Listbox - */ - CAknDoubleStyleListBox* iListbox; - -}; - -#endif /*CIRSTATIONDIRECTORYCONTAINER_H_*/ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationdirectoryview.h --- a/internetradio2.0/uiinc/irstationdirectoryview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,221 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRStationsDirectoryView -* -*/ - - -#ifndef C_CIRSTATIONDIRECTORYVIEW_H -#define C_CIRSTATIONDIRECTORYVIEW_H - - - -#include "irbaseview.h" -#include "MViewsResponseAndErrorObserver.h" -#include "IRActiveNetworkObserver.h" - -class CIRStationDirectoryContainer; -class MIRActiveNetworkObserver; - -class CIRStationDirectoryView : public CIRBaseView , - public MViewsResponseAndErrorObserver, - public MIRActiveNetworkObserver -{ -public: - - //ENums to indicate the currently selected item in the listbox. - enum TCurrentSelectedItem - { - EGenreData=0, - ELanguageData, - ECountryData, - ETopStationData - }; - - /** - * NewL() - * Static constructor. - */ - static CIRStationDirectoryView* NewL(); - - /** - * NewLC() - * Static constructor. - */ - static CIRStationDirectoryView* NewLC(); - - /** - * ~CIRStationDirectoryView() - * Destructor - */ - ~CIRStationDirectoryView(); - - // from base class CIRBaseView - - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - /** - * DoCategoryRequestL() - * Issues a request ti Isds for the Stations - */ - void DoCategoryRequestL(); - - /** - * ResponseL() - * Activates the Category view after getting the IsdsResponse - */ - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - - /** - * ErrorL() - * Handles the errors from Isds - */ - void ErrorL(); - - /** - * PresetResponseL - * Issues a listen request - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * DynInitMenuPaneL - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * ActivateCategoryViewL - * Activates the Stations view - */ - void ActivateCategoryViewL(); - /* - * RefreshView() - * Refreshes the view when layout changes. - */ - void RefreshView(); -protected: - - // from base class CIRBaseView - - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate( ); - - /** - * From CAknView - */ - void HandleStatusPaneSizeChange(); - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); - -private: - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * C++ default constructor. - */ - CIRStationDirectoryView(); - -public: - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - -private: - - /** - * Container for this view. - * Owned - */ - CIRStationDirectoryContainer* iContainer; - - /** - * iLoadingCancelled - * Data whether loading has been cancelled - */ - TBool iLoadingCancelled; - - /* - * iRequestIssued - * Checks whether the request has been issued - */ - TBool iRequestIssued; - - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; - -}; -#endif /*C_CIRSTATIONDIRECTRORYVIEW_H_*/ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationinfocontainer.h --- a/internetradio2.0/uiinc/irstationinfocontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,224 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRStationInfoContainer -* -*/ - - -/* --------------------------------------------------------------------------- -* Version history: -* Template version: -* -* -* Version: 3, Thu Jul 3 16:30:00 2008 by Rohit -* Ref: -* Codescanner fixes -* -* Version: 2, Thu May 22 19:20:00 2008 by Rohit -* Ref: -* Implemented StationInfo landscape view. Adjusted line spacings per UI spec. -* -* Version: 1, Wed Apr 30 16:15:00 2008 by Rohit -* Ref: -* Created. Implemented StationInfo potrait view -* -* -* ============================================================================ -*/ - -#ifndef CIRSTATIONINFOCONTAINER_H -#define CIRSTATIONINFOCONTAINER_H - -// INCLUDES -#include // CCoeControl -#include // TCharFormat, TCharFormatMask -#include - -#include "IRStationInfoView.h" -#include "irimageconverterobserver.h" - -// FORWARD DECLARATIONS -class CAknsBasicBackgroundControlContext; -class CEikRichTextEditor; -class CFbsBitmap; -class CIRImageConverter; - -/** - * Container for Station information View. - */ -class CIRStationInfoContainer : public CCoeControl, public MIRImageConverterObserver -{ -public: // Constructors and destructor - - static CIRStationInfoContainer* NewL( const TRect& aRect, CIRStationInfoView* aView ); - - /** - * Destructor. - */ - virtual ~CIRStationInfoContainer(); - -public: // Functions from base classes - - /** - * From CoeControl, returns the number of control contained by this class. - * @return Number of controls contained - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl, returns handle to control pointed by aIndex - * @param aIndex Wanted control's index [0..n] - * @return Handle to wanted control - */ - CCoeControl* ComponentControl( TInt aIndex ) const; - - /** - * From CCoeControl, Handles key events - * @param aKeyEvent The key event - * @param aType The type of key event (key, key up or key down) - * @return Indicates whether or not the key event was used by this control. - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * MIRImageConverterObserver::HandleImageConversionEventL() - * @param aEvent The event that occurred. - * @param aId Identifier for the conversion. - * @param aError One of the standard system error codes. - */ - void HandleImageConversionEventL( MIRImageConverterObserver::TIRImageConversionEvent aEvent, - TInt aId, TInt aError ); - - /** - * Issues logo scaling request - */ - void StartConvertStationLogoL(); - - /** - * Renders the logo and text in the view as per the current resolution - */ - void ReloadStationInformationL(); - -protected: // Functions from base classes - - /** - * From CCoeControl, used for skins - * @param aId An encapsulated object type id - * @return Pointer to the object provided. - */ - TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); - - /** - * From CoeControl - * Called by the framework when container size changes - */ - void SizeChanged(); - - /** - * From CoeControl - * Handles a change to the control's resources - * @param aType A message UID value - */ - void HandleResourceChange( TInt aType ); - -private: // Functions - - /** - * C++ default constructor. - */ - CIRStationInfoContainer( CIRStationInfoView* aView); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( const TRect& aRect ); - - /** - * Overridden from CCoeControl. - * @param aRect Rectangle which needs drawing - */ - void Draw( const TRect &aRect ) const; - - /** - * Initializes the rich text with font, color, anti-aliasing - */ - void CreateRichTextDataL(); - - /** - * Instantiates RichTextEditor - * @return Initialized RichTextEditor - */ - CEikRichTextEditor* CreateEditorL(); - - /** - * Renders the logo in the view as per the current resolution - * @param aEditor RichTextEditor ref - * @param aIsLandscape True if orientation is landscape, else False - */ - void DisplayStationLogoL( CEikRichTextEditor* aEditor, TBool aIsLandscape = EFalse); - - /** - * Reads station info from preset and renders the text in the view - * @param aIsLandscape True if orientation is landscape, else False - */ - void DisplayStationInfoL( TBool aIsLandscape = EFalse ); - - /** - * @return true if station logo available, else false. - */ - TBool IsStationSupportsLogo(); - - - /** - * @return true if station is from ISDS, false if user-defined. - */ - TBool IsISDSStation(); - -private: // Data - - // Skin background context. - CAknsBasicBackgroundControlContext* iBgContext; - - // RichTextEditor to show logo in landscape orientation - CEikRichTextEditor* iEditorLogo; - - // RichTextEditor to show logo/text in potrait orientation, - // text in landscape orientation - CEikRichTextEditor* iEditor; - - // the scaled bitmap - CFbsBitmap* iBitmap; - - // the scaled bitmap mask - CFbsBitmap* iBitmapMask; - - // view reference - CIRStationInfoView *iStationInfoView; - - // API wrapper to convert and scale image - CIRImageConverter* iConverter; - - // parent rect - TRect iClientRect; - - // Set When Any error during Image Conversion - TInt iError; - - TBool iImageDrawn; - - }; - -#endif // EVEDETAILCONTAINER_H - -// End of File diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationinfopicture.h --- a/internetradio2.0/uiinc/irstationinfopicture.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef IRSTATIONINFOPICTURE_H_ -#define IRSTATIONINFOPICTURE_H_ - -#include - -class CWindowGc; -class TSize; -class CFbsBitmap; - - -class CIRStationInfoPicture : public CPicture -{ - public: - - CIRStationInfoPicture(CWindowGc& gc,CFbsBitmap& aBitmap,CFbsBitmap& aBitmapMask); - - void Draw( CGraphicsContext& aGc, const TPoint& aTopLeft, - const TRect& aClipRect, MGraphicsDeviceMap* aMap ) const; - void ExternalizeL( RWriteStream& aStream ) const; - void GetOriginalSizeInTwips( TSize& aSize ) const; - protected: - TSize iSizeInTwips; - CFbsBitmap* iBitmap; - CFbsBitmap* iBitmapMask; -}; - - -#endif /*IRSTATIONINFOPICTURE_H_*/ diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationinfoview.h --- a/internetradio2.0/uiinc/irstationinfoview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRStationInfoView -* -*/ - - -/* --------------------------------------------------------------------------- -* Version history: -* Template version: -* -* -* Version: 2, Thu Jul 3 16:30:00 2008 by Rohit -* Ref: -* Codescanner fixes -* -* Version: 1, Wed Apr 30 16:15:00 2008 by Rohit -* Ref: -* Created. Implemented StationInfo potrait view -* -* -* ============================================================================ -*/ - -#ifndef CIRSTATIONINFOVIEW_H -#define CIRSTATIONINFOVIEW_H - -#include -#include - -#include "irbaseview.h" -#include "MLogoDownloadObserver.h" - -class CIRStationInfoContainer; -class CIRIsdsPreset; -class CIRPreset; -class CAknWaitDialog; - -/** - * Channel List View, displays a list of preset FM / visual radio channels. - */ -class CIRStationInfoView : public CIRBaseView, - public MLogoDownloadObserver - { - -public: - - /** - * Static constructor. - */ - static CIRStationInfoView* NewLC(const TRect& aRect); - - /** - * Destructor. - */ - ~CIRStationInfoView(); - - static CIRStationInfoView* NewL(const TRect& aRect); - - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - - /** - * From MLogoDownloadObserver - * - * Invoked after requested logo is downloaded - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * From MLogoDownloadObserver - * - * Invoked if an error has occured while logo is downloading or no logo data available - */ - void PresetLogoDownloadError(CIRIsdsPreset* aPreset); - - /** - * SetStationPresetL - * Copies the given preset to member iStationPreset for display - * @param aPreset Station Preset given by invoking view - */ - void SetStationPresetL( CIRIsdsPreset* aPreset ); - - /** - * SetStationPresetL - * Copies the given preset to member iStationPreset for display - * @param aPreset Station Preset given by invoking view - */ - void SetStationPresetL( CIRPreset* aPreset ); - - /** - * GetStationPresetL - * - * - */ - CIRIsdsPreset* GetStationPresetL( ); - -protected: - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage */); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - /** - * From CAknView - * - * @see CAknView::HandleStatusPaneSizeChange() - */ - void HandleStatusPaneSizeChange(); - -private: - - /** - * 2nd phase constructor - */ - void ConstructL(const TRect& /*aRect*/); - - /** - * C++ default constructor. - */ - CIRStationInfoView(); - -private: // Data - - /** - * Container for this view. - */ - CIRStationInfoContainer* iContainer; - -public: - /** - * Station Preset to display Station Info - */ - CIRIsdsPreset* iStationPreset; - - }; - -#endif // CIRStationInfoView_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationsview.h --- a/internetradio2.0/uiinc/irstationsview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,332 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRStationsView -* -*/ - - -#ifndef CIRSTATIONSVIEW_H -#define CIRSTATIONSVIEW_H - -#include "irbaseview.h" -#include -#include -#include "MViewsResponseAndErrorObserver.h" -#include "MLogoDownloadObserver.h" - -class CIRStationsViewContainer; -class MLogoDownloadObserver; -class MIRActiveNetworkObserver; - -/** - * SearchResults View - */ -class CIRStationsView : public CIRBaseView, - public MAknToolbarObserver, - public MViewsResponseAndErrorObserver, - public MLogoDownloadObserver, - public MIRActiveNetworkObserver - { - -public: //Methods - - /** - * NewL() - * Static constructor. - */ - static CIRStationsView* NewL(); - /** - * NewLC() - * Static constructor. - */ - static CIRStationsView* NewLC(); - - /** - *~CIRStationsView() - * Destructor. - */ - ~CIRStationsView(); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - /** - * void SetStatusPaneTextL() - * Sets the title pane of the search results view - */ - void SetStatusPaneTextL() const; - - /** - * DynInitMenuPaneL - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * ListenChannelL() - * Issues a listen request - */ - virtual void ListenChannelL(TInt aCurrentIndex); - - void OfferToolbarEventL(TInt aCommand ); - - /** - * ConstructToolbarL() - * Constructs a touch toolbar - */ - virtual void ConstructToolbarL(); - - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - - /** - * From CAknView - */ - void HandleStatusPaneSizeChange(); - - - /** - * void CIRCategoryView::ResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void ResponseL( CIRIsdsPreset* aPreset = NULL ); - - /** - * ErrorL() - * Handles the errors from Isds - */ - void ErrorL(); - - /** - * PresetResponseL - * Issues a listen request - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * AddToFavouritesL() - * Issues a request for adding to favourites - */ - virtual void AddToFavouritesL(TInt aCurrentIndex,TInt aCommand); - - /** - * DisplayStationInformationL() - * Issues a request for Station Info view - */ - virtual void DisplayStationInformationL(TInt aCurrentIndex,TInt aCommand); - - /** - * PresetLogoDownloadedL() - * CallBack Function Returning the Preset With Logo - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * PresetLogoDownloadError() - * CallBack Function Returning the Preset With no Logo/error while downloading logo - */ - void PresetLogoDownloadError(CIRIsdsPreset* aPreset); - - /** - * LogoRequestL() - * Called by the container of this view - */ - void LogoRequestL(); - /** - * LogoRequestL() - * Called by the container of this view - */ - void AdRequestL(); - - - /** - * GetFilteredIndex() - * Returns the filtered Index - */ - virtual TInt GetFilteredIndex(); - - /** - * SetLoadingCancelled - * Sets iLoadingCancelled to aValue - */ - void SetLoadingCancelled(TBool aValue); - - /** - * SetActualFilteredItemIndex() - * sets the original index of the filtered item - */ - void SetActualFilteredItemIndex(TInt aIndex); - - /** - * GetActualFilteredItemIndex - * Gets the actual index of the station - */ - TInt GetActualFilteredItemIndex(); - /* - * GetStationsViewActualIndex() - * returns the actual index - */ - TInt GetStationsViewActualIndex(); - /* - * GetFirstLaunchFlag() - * returns the whether the view is launching for the first time/ - * coming back from that has been activated from this view - */ - virtual TBool GetFirstLaunchFlag() ; - /* - * SetToolbarItems - * Sets the touch tool bar items - */ - virtual void SetToolbarItems(); - - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); - - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - virtual void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); -protected: //Methods - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - -public: //Methods - - /** - * ConstructL() - * 2nd phase constructor - */ - void ConstructL(); - - /** - * CIRStationsView() - * C++ default constructor. - */ - CIRStationsView(); - -private: - - /* - * iLoadingCancelled - * Data whether loading has been cancelled - */ - TBool iLoadingCancelled; - - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - /* iListenRequest - * Checks whether request is for listen - */ - TBool iListenRequest; - - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - TBool iToolbarVisible; - TBool iCommandState; - - TInt iIndex; - TInt iFilteredIndex; - - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; - - TBool iFirstTimeLaunchFlag; - - /** - * iAddToFav - * Boolean value to determine if AddToFavorites was issued. - */ - TBool iAddToFav; - - - /** - * iStationDetails - * Boolean value to determine if StationDetails request was issued. - */ - TBool iStationDetails; - -public: - /** - * iContainer - * Container for this view. - */ - CIRStationsViewContainer* iContainer; - - - - /** - * iResultsReqMade - * boolean value to know whether the results(topstations/list of channels) - * request has made to isds or not - */ - TBool iResultsReqMade; - }; - -#endif // CIRSTATIONSVIEW_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irstationsviewcontainer.h --- a/internetradio2.0/uiinc/irstationsviewcontainer.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,393 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRStationsViewContainer -* -*/ - - -#ifndef CIRSTATIONSVIEWCONTAINER_H -#define CIRSTATIONSVIEWCONTAINER_H - -#include -#include -#include -#include - -#include "irimageconverterobserver.h" - -class CIRStationsView; -class CIRStationsViewContainer; -class CAknIconArray; -class CIRImageConverter; -/** - * This classes are used for Advertisements - */ -class CIRFilteredModel; -class MIRListBoxArray; -class CIRAdvertisingListBox; -/** - * Container for Search Results View. - */ -class CIRStationsViewContainer : public CCoeControl/*public CAknDoubleStyleListBox*/ , public MEikListBoxObserver, - public MIRImageConverterObserver - { - -public: // Methods - - - /** - * NewL. - * Two-phased constructor. - * Create a CIRStationsViewContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aView The Stations/TopStations view's instance. - * @return a pointer to the created instance of CIRStationsViewContainer. - */ - static CIRStationsViewContainer* NewL( CIRStationsView& aView, const TRect& aRect ); - - /** - * NewLC. - * Two-phased constructor. - * Create a CIRStationsViewContainer object, which will draw itself to aRect - * @param aRect The rectangle this view will be drawn to. - * @param aView The Stations/TopStations view's instance. - * @return a pointer to the created instance of CIRStationsViewContainer. - */ - static CIRStationsViewContainer* NewLC( CIRStationsView& aView, const TRect& aRect ); - /** - * ConstructL - * 2nd phase constructor. - */ - void ConstructL( const TRect& aRect); - - /** - * CIRStationsViewContainer() - * C++ default constructor. - * @param aView View of this container. - */ - CIRStationsViewContainer(CIRStationsView& aView); - - /** - * ~CIRStationsViewContainer() - * Destructor. - */ - ~CIRStationsViewContainer(); - - /** - * UpdateSearchResultsViewL() - * updates the search results data to the search results list - */ - void UpdateStationsViewL(); - - /** - * HandleLogoErrorL() - * called from the iStationsView when the logo is not downloaded - */ - void HandleLogoErrorL(); - - - // from base class CCoeControl - - /** - * From CCoeControl - * @see CCoeControl::OfferKeyEventL() - */ - - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * From MEikListBoxObserver HandleListBoxEventL - */ - void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); - - - - /** - * From CCoeControl - * - * @see CCoeControl::GetHelpContext( TCoeHelpContext& aContext ) const - */ - void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * GetCurrentItemIndex() - * returns the index of the currently selected item - */ - TInt GetCurrentItemIndex() const; - - /** - * GetListBoxTopIndex() - * returns the index of the top item - */ - TInt GetListBoxTopIndex() const; - - /** - * CountComponentControls() const - * returns the number of components in the view. - */ - TInt CountComponentControls() const; - - /** - * ComponentControl() - * returns the pointer to the control - */ - CCoeControl* ComponentControl(TInt aIndex) const ; - - /** - * SizeChanged() - * Responds to changes to the size and position of the contents of this control. - */ - void SizeChanged(); - - /** - * HandleResourceChange() - * Handles a change to the control's resources. - */ - void HandleResourceChange(TInt aType); - /* - * CreateFindBoxL() - * Creates the find box for dynamic filtering - */ - CAknSearchField* CreateFindBoxL(CEikListBox* aListBox, - CTextListBoxModel* aModel, CAknSearchField::TSearchFieldStyle aStyle); - /* - * DisableFindBox() - * disable the listbox when foxus is not present - */ - void DisableFindBox(); - - /** - * Function : Comparestrings - * Function called to get the actual index of the station - */ - void Comparestrings(); - - /** - * HandleImageConversionEventL() - * from base class MIRImageConverterObserver - */ - void HandleImageConversionEventL( MIRImageConverterObserver::TIRImageConversionEvent aEvent, - TInt aId, TInt aError ); - /** - * PresetLogoDownloadL() - * Used to download the logos depending the preset values. - */ - void PresetLogoDownloadL(CIRIsdsPreset* aPreset); - /** - * CreateCustomListBoxL() - * Creates the custom listbox and updates the list according to that - */ - void CreateCustomListBoxL(); - /** - * CreateListBoxL() - * Creates ListBox depending upon the presence of Advertisement - */ - void CreateListBoxL(); - /** - * OpenUrlL() - * Used to connect to advertisement url - */ - void OpenUrlL( const TDesC& aHttpLink ); - /** - * GetLogoNotSupported() - * returns whether the advertisement is supported by the sdk r not - */ - TBool GetLogoNotSupported(); - /** - * Creates default (empty) icon - * - * @return Default icon - */ - CGulIcon* CreateDefaultIconL(); - /* - * GetFilterdModelPointer() - * returns pointer to filtered model. - */ - CIRFilteredModel* GetFilterdModelPointer(); - /* - * GetSearchBoxPointer() - * returns the search box pointer. - */ - CAknSearchField* GetSearchBoxPointer(); -private: //Methods - - - // from base class CCoeControl - /** - * From CCoeControl - * - * @see CCoeControl::Draw( const TRect& aRect ) const - */ - void Draw( const TRect& aRect ) const; - /** - * StartConvertL() - * used to convert the images depending the index passed - * - */ - void StartConvertL( CIRImageConverter& aConverter, TInt aIndex, TInt aId ); - /** - * Formats list item string with given arguments - * - * @param aFirstRow text for first row - * @param aSecondRow text for second row - * @param aIconId Icon ID used on item - */ - HBufC* FormatItemStringLC( const TDesC& aFirstRow, TInt aIconId ); - /* - * iFilteredFlag - * This flag is set when dynamic filtering is done and - * will be reseted when the characters in the filter box is deleted - */ - TBool iFilteredFlag; - -private: - /** - * iItemArray - * array for the listbox model - */ - CDesCArray* iItemArray; - /** - * iView - * Data for CIRStationsView view - */ - CIRStationsView& iView; - - /* - * iCurrentItemConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iCurrentItemConverter; - - /** - * boolean for forcibly getting the logo from cache - */ - TBool iForceGet; - - /** - * response from the cache for the availability of logo(CacheNotValid,NotCached,CacheUseable) - */ - TInt iResult; - - /** - * to keep track of the icon array index - */ - TInt iIconIndex; - - - /** - * to keep track of the logo url index(for temporary) - */ - TInt iLogoIndex; - - /* - * iInvalidIconIndices - * instance of RArray - */ - RArray iInvalidIconIndices; - - /* - * iLogosArray - * instance of RArray - */ - RArray iLogosArray; - - /* - * iNoLogosArray - * instance of RArray - */ - RArray iNoLogosArray; - - - CFbsBitmap* iAdBitmap; - /** - * iAdRequestStatusFlag - * sets when a request for advertisement is made. - */ - TBool iAdRequestStatusFlag; - /* - * iConverter - * instance of CIRImageConverter - */ - CIRImageConverter* iConverter; - - /* - * iFilteredModel - * Instance for CIRFilteredModel - */ - CIRFilteredModel* iFilteredModel; - /* - * iAdPresent - * returns whether the advetisment is present or not - */ - TBool iAdPresent; - /* - * iBgContext - * Instance of CAknsBasicBackgroundControlContext - */ - CAknsBasicBackgroundControlContext* iBgContext; - /* - * iAdvString - * sets the advertisement string - */ - HBufC* iAdvString; - /* - * iListBoxArray - * Instance of MIRListBoxArray - */ - MIRListBoxArray* iListBoxArray; - /* - * iRequestForAdvertisement - * sets when the request for advertisment conversation is made - */ - TBool iRequestForAdvertisement; - /* - * iLogoDownloadError - * sets when the advertisment future is not supported - */ - TBool iLogoDownloadError; - /* - * iLandScapeCount - * used to call the aknfind s HandlePopupFindSizeChanged function only once - */ - TInt iLandScapeCount; - - /* - * iSearchTextBox - * Instance for CAknSearchField; - */ - CAknSearchField* iStationsSearchBox; -public: - - /** - * iStationsListBox - * Instance of the Stations ListBox - */ - CIRAdvertisingListBox* iStationsListBox; - /** - * Temporary preset to store url and the logo data - */ - CIRIsdsPreset *iTempPreset; - /* - * iFindString - * Used to Get the Entered Search string - */ - TBuf iFindString; - /** - * Temporary preset to store the raw data of Advertisements - */ - CIRIsdsPreset* iAdvPreset; - TInt iError; - }; - -#endif // CIRSTATIONSVIEWCONTAINER_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsystemeventcollector.h --- a/internetradio2.0/uiinc/irsystemeventcollector.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of CIRSystemEventCollector -* -*/ - - -#ifndef CIRSYSTEMEVENTCOLLECTOR_H -#define CIRSYSTEMEVENTCOLLECTOR_H - - - -#include - -#include "iraudioroutingobserver.h" -#include "irdiskspacewatcherobserver.h" -#include "irheadseteventobserver.h" -#include "irsystemeventdetectorobserver.h" -#include "irsystemeventobserver.h" - -class CIRAccessoryObserver; -class CIRDiskSpaceWatcher; -class CIRSystemEventDetector; - -/** - * Collects system events and forwards them to observers - * Class also wraps up the getters for some system states - * - * @lib vrsystemutils.lib - */ -NONSHARABLE_CLASS(CIRSystemEventCollector) : - public CBase, - public MIRAudioRoutingObserver, - public MIRDiskSpaceWatcherObserver, - public MIRHeadsetEventObserver, - public MIRSystemEventDetectorObserver - { -public: - - /** - * Two-phased constructor. - */ - IMPORT_C static CIRSystemEventCollector* NewL(); - - /** - * Destructor - */ - ~CIRSystemEventCollector(); - - /** - * Adds a system event observer - * - * @param aSystemObserver The observer to be added - */ - IMPORT_C void AddObserverL( MIRSystemEventObserver* aSystemObserver ); - - /** - * Removes a system event observer - * - * @param aSystemObserver The observer to be removed - */ - IMPORT_C void RemoveObserver( MIRSystemEventObserver* aSystemObserver ); - - /** - * Returns data network coverage state (wlan or mobile). - * - * @return ETrue if there is network coverage - */ - IMPORT_C TBool IsNetworkCoverage() const; - - /** - * Returns mobile network coverage state. - * - * @return ETrue if there is network coverage - */ - IMPORT_C TBool IsMobileNetworkCoverage() const; - - /** - * Returns current call state. - * - * @return ETrue if call is active - */ - IMPORT_C TBool IsCallActive() const; - - /** - * Returns current audio resources state. - * - * @return ETrue if audio resources are available - */ - IMPORT_C TBool IsAudioResourcesAvailable() const; - - /** - * Returns current headset connection status - * - * @return - */ - IMPORT_C TBool IsHeadsetConnected() const; - - /** - * Returns the state of disk space - */ - IMPORT_C TBool IsDiskSpaceBelowCriticalLevel() const; - - /** - * Returns current Voice UI state. - * - * @return ETrue if Voice UI is active, EFalse otherwise - */ - IMPORT_C TBool IsVoiceUiActive() const; - -private: - - CIRSystemEventCollector(); - - void ConstructL(); - - void NotifyObserversL(TIRSystemEventType aEvent); - -// from base class MIRSystemEventDetectorObserver - void NetworkUpCallbackL(); - void NetworkDownCallbackL(); - void CallActivatedCallbackL(); - void CallDeactivatedCallbackL(); - void AudioResourcesAvailableL(); - void AudioAutoResumeForbiddenL(); - void ErrorCallbackL(TInt aError); - -// from base class MIRHeadsetEventObserver - void HeadsetConnectedCallbackL(); - void HeadsetDisconnectedCallbackL(); - -// from base class MIRDiskSpaceWatcherObserver - void NotifyLowDiskSpaceL(); - -// from base class MIRAudioRoutingObserver - void AudioRoutingChangedL(TVROutputDestination aOutputDestination); - -private: // data - - /** - * Array of system event observers - */ - RPointerArray iSystemEventObservers; - - /** - * Detects system events - */ - CIRSystemEventDetector* iSystemEventDetector; - - /** - * Detects low disk space - */ - CIRDiskSpaceWatcher* iDiskSpaceWatcher; - - /** - * Observer for accessory events - */ - CIRAccessoryObserver* iHeadsetObserver; - }; - -#endif // CIRSYSTEMEVENTCOLLECTOR_H diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsystemeventdetector.h --- a/internetradio2.0/uiinc/irsystemeventdetector.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for CIRSystemEventDetector. -* -*/ - - -#ifndef IRSYSTEMEVENTDETECTOR_H -#define IRSYSTEMEVENTDETECTOR_H - -#include - -#include "irpropertyobserver2.h" - -class MIRSystemEventDetectorObserver; - -/** -* Catches notification of the call and network state changes. -* -* Class provides implementation to detect system events and notify UI components of the event, -* Class keeps several instances of CVPropertyObserver, and those instances send event notifications -* about the particular system component state change. -*/ -NONSHARABLE_CLASS( CIRSystemEventDetector ) : public CBase, public MIRPropertyChangeObserver2 - { - public: - - /** - * Two-phased constructor. - * @param aObserver a reference to the observer interface implementer - */ - static CIRSystemEventDetector* NewL(MIRSystemEventDetectorObserver& aObserver); - - /** - * Destructor. - */ - virtual ~CIRSystemEventDetector(); - - /** - * Returns network coverage state (wlan or mobile). - */ - TBool IsNetworkCoverage() const; - - /** - * Returns mobile network coverage state. - */ - TBool IsMobileNetworkCoverage() const; - - /** - * Returns current call state. - */ - TBool IsCallActive() const; - - /** - * Returns current audio resources state. - * @return audio resources state - */ - TBool IsAudioResourcesAvailable() const; - - /** - * Returns current Voice UI state. - * @return ETrue if Voice UI is active, EFalse otherwise - */ - TBool IsVoiceUiActive() const; - - protected: - -// from base class MIRPropertyChangeObserver2 - void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TInt aValue); - void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TDesC8& aValue); - void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TDesC& aValue); - void HandlePropertyChangeErrorL(const TUid& aCategory, const TUint aKey, TInt aError); - - private: - - /** - * By default EPOC constructor is private. - */ - void ConstructL(); - - /** - * Used internally to change network coverage status and report it to observer. - **/ - void CIRSystemEventDetector::SetNetworkCoverageL( const TBool aIsMobileNetworkCoverage, - const TBool aIsWlanCoverage ); - - /** - * C++ default constructor. - * @param aObserver a reference to the observer interface implementer - */ - CIRSystemEventDetector(MIRSystemEventDetectorObserver& aObserver); - - private: // Data - - /**Observer which will be notified of the call and network state changes*/ - MIRSystemEventDetectorObserver& iObserver; - - /** handler to Publish & Subscribe interface*/ - CIRPropertyObserver2* iCallStatusObserver; - /** handler to Publish & Subscribe interface*/ - CIRPropertyObserver2* iNetworkStatusObserver; - /** handler to Publish & Subscribe interface*/ - CIRPropertyObserver2* iVoiceUiObserver; - /** handler to Publish & Subscribe interface*/ - CIRPropertyObserver2* iAudioPolicyObserver; - /** handler to Publish & Subscribe interface*/ - CIRPropertyObserver2* iWlanObserver; - - /**Indicator for the mobile network status*/ - TBool iIsMobileNetworkCoverage; - - /**Indicator for the wlan network status*/ - TBool iIsWlanCoverage; - - /**Indicator for the call status*/ - TBool iIsCallActive; - - /** Array of audio policy categories that VR must not resume after. */ - RArray iNoAutoResumeAudioCategories; - - /** Indicator for audio resource status. */ - TBool iIsAudioResourcesAvailable; - - /** Indicator for Voice UI status. */ - TBool iIsVoiceUiActive; - }; - -#endif // IRSYSTEMEVENTDETECTOR_H - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsystemeventdetectorobserver.h --- a/internetradio2.0/uiinc/irsystemeventdetectorobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Interface to observe system events. -* Implementer will be notified each time particular system component state has changed -* -* -*/ -/* -* ============================================================================ -* Name : IRSystemEventDetectorObserver.h -* Part of : -* Origin : -* Created : -* Description: -* Interface to observe system events. -* Implementer will be notified each time particular system component state has changed -* -* Version : -* --------------------------------------------------------------------------- - -/** @file IRSystemEventDetectorObserver.h */ - -#ifndef MIRSYSTEMEVENTDETECTOROBSERVER_H -#define MIRSYSTEMEVENTDETECTOROBSERVER_H - -// CLASS DECLARATION -/** -* -* Observer for the call and network state. Implementer will be notified each time the state has changed -*/ -class MIRSystemEventDetectorObserver - { - - public: // New functions - - /** - * This callback notifies when networks comes up. - */ - virtual void NetworkUpCallbackL() = 0; - - /** - * This callback notifies when network goes down. - */ - virtual void NetworkDownCallbackL() = 0; - - /** - * This callback notifies when call becomes active. - */ - virtual void CallActivatedCallbackL() = 0; - - /** - * This callback notifies when call becomes deactive. - */ - virtual void CallDeactivatedCallbackL() = 0; - - /** - * This callback notifies when audio resources become available. - */ - virtual void AudioResourcesAvailableL() = 0; - - /** - * This callback notifies when audio auto resuming is forbidden. - */ - virtual void AudioAutoResumeForbiddenL() = 0; - - /** - * This callback notifies when an error occured - * @param an error code - */ - virtual void ErrorCallbackL(TInt aError) = 0; - }; - -#endif // MIRSYSTEMEVENTDETECTOROBSERVER_H - -// End of File diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irsystemeventobserver.h --- a/internetradio2.0/uiinc/irsystemeventobserver.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* ?description_line -* ?description_line -* ?description_line -* -*/ -/* -* ============================================================================ -* Name : IRSystemEventObserver.h -* Part of : -* Origin : -* Created : -* Description: -* ?description_line -* ?description_line -* ?description_line -* Version : -* -* --------------------------------------------------------------------------- -* Version history: -* ============================================================================ -*/ -/** @file IRSystemEventObserver.h */ - -#ifndef IRSYSTEMEVENTOBSERVER_H -#define IRSYSTEMEVENTOBSERVER_H - - -// INCLUDES - -// DATA TYPES - -/** Type of system event */ -enum TIRSystemEventType - { - EIRHeadsetConnected, ///< Headset was connected - EIRHeadsetDisconnected, ///< Headset was disconnected - EIRNetworkCoverageUp, ///< Network coverage detected - EIRNetworkCoverageDown, ///< Network coverage lost - EIRCallActivated, ///< Call activated or ringing - EIRCallDeactivated, ///< Call disconnected - EIRLowDiskSpace, ///< Low disk space - EIRAudioRoutingHeadset, ///< Audio routed through headset - EIRAudioRoutingSpeaker, ///< Audio routed through speaker (IHF) - EIRAudioResourcesAvailable, ///< Audio resources have become available - EIRAudioAutoResumeForbidden ///< Audio auto resuming is forbidden - }; - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Observer for any system event state change. -*/ -class MIRSystemEventObserver - { - public: // Methods - - /** - * Called when system event occurs. - * @param aEventType Type of the event - */ - virtual void HandleSystemEventL(TIRSystemEventType aEventType) = 0; - - }; - -#endif // IRSYSTEMEVENTOBSERVER_H - -// End of File diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irtopstationsview.h --- a/internetradio2.0/uiinc/irtopstationsview.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,268 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header for CIRTopStationsView -* -*/ - - -#ifndef CIRTOPSTATIONSVIEW_H -#define CIRTOPSTATIONSVIEW_H - -#include "irbaseview.h" -#include "irstationsview.h" -#include -#include - - -class CIRStationsViewContainer; - -class MIRActiveNetworkObserver; - - -/** - * SearchResults View - */ -class CIRTopStationsView : public CIRStationsView - - { - -public: //Methods - - /** - * NewL() - * Static constructor. - */ - static CIRTopStationsView* NewL(); - /** - * NewLC() - * Static constructor. - */ - static CIRTopStationsView* NewLC(); - - /** - *~CIRTopStationsView() - * Destructor. - */ - ~CIRTopStationsView(); - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::Id() const - */ - TUid Id() const; - - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL( TInt aCommand ); - - /** - * DynInitMenuPaneL - * Dynamically initialises a menu pane - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - void OfferToolbarEventL(TInt aCommand ); - - /** - * ConstructToolbarL() - * Constructs a touch toolbar - */ - void ConstructToolbarL(); - - - /** - * ListenChannelL() - * Issues a listen request - */ - void ListenChannelL(TInt aCurrentIndex); - - /** - * From CAknView - */ - void HandleStatusPaneSizeChange(); - - /** - * From CAknView - * - * @see CAknView::HandleForegroundEventL( TBool aForeground ) - */ - void HandleForegroundEventL( TBool aForeground ); - - /** - * Called when the refresh dialog is dismissed. - * @param aButtonId The button that was used to dismiss the dialog. - */ - void DialogDismissedL( TInt aButtonId ); - - /** - * void CIRCategoryView::ResponseL() - * Activates the Stations view after getting the IsdsResponse - */ - void ResponseL(CIRIsdsPreset* aPreset = NULL ); - - /** - * PresetResponseL - * Issues a listen request - */ - void PresetResponseL(CIRIsdsPreset* aPreset); - - /** - * AddToFavouritesL() - * Issues a request for adding to favourites - */ - void AddToFavouritesL(TInt aCurrentIndex,TInt aCommand); - - /** - * ErrorL() - * Handles the errors from Isds - */ - void ErrorL(); - - - /** - * PresetLogoDownloadedL() - * CallBack Function Returning the Preset With Logo - */ - void PresetLogoDownloadedL(CIRIsdsPreset* aPreset); - - /** - * PresetLogoDownloadError() - * CallBack Function Returning the Preset With no logo/error while downloading log - */ - void PresetLogoDownloadError(CIRIsdsPreset* aPreset); - /* - * GetTopStationsActualIndex() - * returns the actual index of the element in the list - */ - TInt GetTopStationsActualIndex(); - - /** - * GetFilteredIndex() - * Returns the filtered Index - */ - TInt GetFilteredIndex(); - /* - * GetFirstLaunchFlag() - * returns the whether the view is launching for the first time/ - * coming back from that has been activated from this view - */ - TBool GetFirstLaunchFlag() ; - /* - * SetToolbarItems - * Sets the touch tool bar items - */ - void SetToolbarItems(); - - //from MIRActiveNetworkObserver - /** - * Notifies all observers whose network request is active - * to reissue the request - * NotifyActiveNetworkObserversL() - */ - void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent); - - /** - * Notifies all observers whose network request is active - * to reset the pending request status - * ResetPendingRequests() - */ - void ResetPendingRequests(TBool aValue); - - - // from base class MIRSystemEventObserver - void HandleSystemEventL( TIRSystemEventType aEventType ); -protected: //Methods - - // from base class CAknView - /** - * From CAknView - * - * @see CAknView::DoActivateL(const TVwsViewId& aPrevViewId, - * TUid aCustomMessageId, - * const TDesC8& aCustomMessage) - */ - void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From CAknView - * - * @see CAknView::DoDeactivate() - */ - void DoDeactivate(); - - -private: //Methods - - /** - * ConstructL() - * 2nd phase constructor - */ - void ConstructL(); - - /** - * CIRTopStationsView() - * C++ default constructor. - */ - CIRTopStationsView(); - - TInt iTopStationsFilteredIndex; - TBool iFirstTimeLaunchFlag; - /* - * iRequestPending - * Checks whether an active request is pending - */ - TBool iRequestPending; - - - /* iListenRequest - * Checks whether request is for listen - */ - TBool iListenRequest; - - - /** - * iAddToFav - * Boolean value to determine if AddToFavorites was issued. - */ - TBool iAddToFav; - /* - * iCallRequestPending - * Indicates whether delayed activation of command is required (Call Handling) - */ - TBool iCallRequestPending; - /* - * iCommand - * Command to be executed (view activation) after Preset downloads - */ - TInt iCommand; - -public: - /** - * iResultsReqMade - * boolean value to know whether the results(topstations/list of channels) - * request has made to isds or not - */ - TBool iResultsReqMade; - - }; - -#endif // CIRTOPSTATIONSVIEW_H - - diff -r 2e1adbfc62af -r ee64f059b8e1 internetradio2.0/uiinc/irui.h --- a/internetradio2.0/uiinc/irui.h Mon May 03 12:25:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1467 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -/* --------------------------------------------------------------------------- -* Version history: -* Template version: -* -* -* Version: 25, Tue Mar 19 18:00:00 2008 by Rohit -* Ref: -* Implemented change request to display Byte Counter in KB till 0.1 MB, and in MB threrafter -* -* Version: 24, Tue Feb 28 18:00:00 2008 by Rohit/Kranthi -* Ref: -* MIRCtrlCmdObserver::MCtrlCommand() function signature changed (Merged IRv1.0 Engine code changes) -* -* -* ============================================================================ -*/ - -#ifndef IRUI_H -#define IRUI_H - -#include -#include -#include -#include -#include "internetradioconfigurationflags.hrh" - -#include -//For IAD -#ifdef FF_IAUPDATE -#include -#endif - -//starting adding of ui code -#include "irbat.h" -#include "irctrlcommand.h" -#include "irnetworkcontrollerobserver.h" -#include "irpropertyobserver.h" -#include "irsessionparams.h" -#include "irstreamsourceobserver.h" -#include "misdsresponseobserver.h" -#include "IRdatatransferobserver.h" -#include "irfirsttimeview.h" -#include "irsettingsview.h" -#include "irsystemeventobserver.h" //For system events -#include "irpubsubkeys.h" -#include "IRControlEventObserver.h" - -class CIRSettingsView; -class CIRBaseView; -class CIRCtrlCmdObserver; -class CIRDiscoverStationsView; -class CIRFavoritesDb; -class CIRMediaClient; -class CIRNetworkController; -class CIRNowPlayingView; -class CIRNwInfoObserver; -class CIROTAUpdate; -class CIRPubSub; -class CIRReportGenerator; -class CIRSettings; -class CIRStreamSource; -class CAlfEnv; -class CIRAlarmObserver; -class CIRMessageObserver; -class CIRBrowseChannelItems; -class CIRBrowseCatagoryItems; -class CIRLastPlayedStationInfo; -class CIconFileProvider; -class CIRFirstTimeView; -class CIRAddManuallyStationView; -class CIRStationDirectoryView; -class CIRCategoryView; -class CIRSearchResultsView; -class CIRStationsView; -class CIRTopStationsView; -class CIRPlsView; -class CIRCostWarningView; -class CIRMainView; -class CIRDialogLauncher; -class CAknWaitDialog; -class CIRIsdsWrapper; -class CIRNowPlayingWrapper; -class CIRViewStack; -class CIRSystemEventCollector; //For system events -class CIRStationInfoView; -class CIRHistoryListView; -class CRemConInterfaceSelector; -class CRemConCoreApiTarget; -class MProEngNotifyHandler; -//For IAD -class CIAUpdate; -class CIAUpdateParameters; -class CIRControlEventObserver; - -#ifdef __IRA_FEATURE_BACKSTEPPING_SERVICE -class CIRBackSteppingServiceWrapper; -#endif // __IRA_FEATURE_BACKSTEPPING_SERVICE - - -//Network Indicator -_LIT(KGprs,"Gprs"); -_LIT(K3G,"3G"); -_LIT(KWiFi,"WiFi"); -_LIT(KEdge,"Edge"); - -//CONSTANTS DECLARATION - -//Resolution -const TInt KIRLowResolution = 176; -const TInt KIRQVGAResolution = 240; -const TInt KIRPotraitResolution = 320; -//Ulr Validation -const TInt KMaxBufSize = 256; -const TInt KSmallBufSize = 32; -const TInt KSearchStringChar = 100; -const TInt KLoop = 3; -const TInt KScrollAmount =20; -const TInt KScrollDelay = 1000000; -const TInt KInterval = 200000; - -//charging Animation time -const TInt KChargingAnimTimer = 500000; - -//For help context -#define KUIDIRAPP 0x2000B499 -const TUid KIRMCVUid = {KUIDIRAPP}; - -//add for now can change later -enum TIROverLayText - { - KIROverLayTextNotDefined = 0, - KIROverLayTextBuffering, - KIROverLayTextLoading, - KIROverLayTextSearching, - KIROverLayTextConnecting - }; - - - enum TIRKeyboardKeys -{ - EIRKeyboardKey0 = 0x30, - EIRKeyboardKey1 = 0x31, - EIRKeyboardKey2 = 0x32, - EIRKeyboardKey3 = 0x33, - EIRKeyboardKey4 = 0x34, - EIRKeyboardKey5 = 0x35, - EIRKeyboardKey6 = 0x36, - EIRKeyboardKey7 = 0x37, - EIRKeyboardKey8 = 0x38, - EIRKeyboardKey9 = 0x39 -}; - - -const TInt KSearchBoxTextLength = 100; -const TInt KFindStringLength = 10; - - -//========================================class declaration CIRUi============================================ - - - - -/** - * This class Creates CIRUi. - * Controls the entire Ui. - * It creates the instance's of all the views. - * Instantiates NetworkController,IsdsClient,IsdsPreset,MediaClient,FavouritesDb,IRPubSub - * - * @code - * Controls the user commands - * HandleCommandL() - * - * Handle window server events - * HandleWsEventL() - * - * Display the battery value - * DisplayBatteryValueL() - * - * Redraw the currently activated view - * ActivateCurrentView() - * - * Update the current network status - * UpdateCurrentNetwork() - * - * Connect to server - * iNetwork->ConnectToServerL(iUrl) - * - * Call back called when category data recieved - * IsdsCatogoryDataReceivedL() - * - * Call play - * iPlayer->Play() - * - * @endcode - * - */ -class MAknEditingStateIndicator - { -public: - - enum TAknEditingState - { - EStateNone, - ET9Upper, - ET9Lower, - ET9Shifted, - ENumeric, - EMultitapUpper, - EMultitapLower, - EMultitapShifted, - }; - -public: - virtual void SetState(TAknEditingState aState) = 0; - virtual CAknIndicatorContainer *IndicatorContainer() = 0; - }; - -class CIRUi :public CAknViewAppUi, public MIRNetworkController, - public MCoeForegroundObserver,public MIRPropertyChangeObserver, - public MIRDataTransferObserver, -#ifdef FF_IAUPDATE - public MIAUpdateObserver, -#endif - public MRemConCoreApiTargetObserver,public MProEngProfileActivationObserver, - public MIRSystemEventObserver, - public MCoeViewActivationObserver - { -public: - /** - * ConstructL - * 2nd phase constructor. - * Perform the second phase construction of a - * CIRUi object. - */ - void ConstructL(); - - /** - * CIRCategoryView. - * C++ default constructor. - */ - CIRUi(); - - /** - * ~CIRCategoryView - * Destructor. - */ - ~CIRUi(); - - /** - * GetWrapperInstance() - * Returns the instance of the IsdsWrapper object - */ - - CIRIsdsWrapper* GetWrapperInstance(); - /** - * HandleCommandL() - * Handles the user input commands. - * @param input command - */ - - /** - * GetNowPlayingWrapperInstance() - * Returns the instance of the CIRNowPlayingWrapper object - */ - CIRNowPlayingWrapper* GetNowPlayingWrapperInstance(); - /** - * From CAknView - * - * @see CAknView::HandleCommandL( TInt aCommand ) - */ - void HandleCommandL(TInt aCommand); - - /** - * IRHandleCommandL() - * Saves the index of the selected item from the listbox. - * @param currently selected item index. - * @param user command - */ - void IRHandleCommandL(TInt aIndex,TInt aCommand); - - /** - * SavePrevIDL() - * Saves the previousID of the view. - * @param previousID of the view. - * @param user command. - */ - void SavePrevIDL(const TUid& aPrevID,TInt aCommand); - - /** - * HandleStatusPaneSizeChange() - * Called by framework whenever the resource is changed. - */ - void HandleStatusPaneSizeChange(); - - /** - * HandleWsEventL() - * Called by framework on an window server event. - * @param window server event - */ - void HandleWsEventL( const TWsEvent& aEvent,CCoeControl* aDestination ); - - /** - * HandleKeyEventL() - * Called by framework on an window server event. - * @param window server event - */ - TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); - - /** - * IconProvider() - * @return the instance of icon provider.. - */ - CIconFileProvider* IconProvider(); - - /** - * GetMifFilePath(). - * @return the full path of mif file. - */ - TFileName GetMifFilePath() const; - - /** - * GetPrivatePath(). - * Returns the full path of the file. - * @return filepath - */ - TFileName GetPrivatePath()const; - /** - * ActivateCurrentView(). - * Redraws the currently active view. - * @param Uid of the currently active view. - */ - void ActivateCurrentView(const TUid& aUid) const; - - /** - * VerifyNetworkConnectivityL() - * verify whether the network is connected or not - * This function can leave if displaying of info note leaves hence - * this leave can be ignored - * @param aObserver The delayed action observer to receive the event when network connection is established. - * @return the bool that informs the network connectivity status. - */ - TBool VerifyNetworkConnectivityL(); - - /** - * HandleGainingForeground() - * This is call back function which observes application focus gaining - * foreground - */ - void HandleGainingForeground(); - - /** - * HandleLosingForeground() - * Function handles when application looses foreground focus - */ - void HandleLosingForeground(); - /** - * LosingForeground - * Function handles when application looses foreground focus - */ - void LosingForeground(); - - - /** - * ViewStack() - * Returns pointer to the view stack. - * @return Pointer to view stack. - */ - CIRViewStack& ViewStack(); - - /** - * ForwardBackCommandToBsWrapperL() - * Forwards back command to Back Stepping Service wrapper. - * @return Returns ETrue if Back Stepping Service consumes the back command, otherwise returns EFalse. - */ - - TBool ForwardBackCommandToBsWrapperL(); - - /** - * ActiveView() - * Function returns the UID of the Current Active view - **/ - TUid ActiveView() const; - - /** - * FocusWhenSelectGot() - * Funtion is called to get the flag when an listbox item is selected - * so that the next view gets activated - **/ - TBool FocusWhenSelectGot() const; - - /** - * FocusWhenSelectSet() - * Funtion is called to set flag when an listbox item is selected - * so that the next view gets activated - **/ - void FocusWhenSelectSet(TBool aFocus); - - /** - * OpenFileL() - * Open the file using Document's instance - * @param filename to be opened - */ - void OpenFileL( const TDesC& aFileName ); - - - /** - * GainingForeGroundL() - * Function handles when application gains foreground focus - */ - void GainingForeGroundL(); - /** - * MrccatoCommand() - * This is called to decrease the volume - * @param aOperationId Operation Id - * @param aButtonAct Button Action - */ - void MrccatoCommand(TRemConCoreApiOperationId aOperationId, - TRemConCoreApiButtonAction aButtonAct); - - /** - * From MRemConCoreApiTargetObserver. - */ - void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, - TRemConCoreApiButtonAction aButtonAct); - - /** - * SetVolume() - * Call CPeriodic after the period is over - * @param volume level. - */ - void SetVolume(TInt aValue); - - /** - * Returns a reference to System event collector - */ - CIRSystemEventCollector& SystemEventCollector(); - - /** - * IRNetworkEventL() - * - */ - virtual void IRNetworkEventL(TIRNetworkEvent aEvent); - - /** - * UpdateCurrentNetwork() - * Updates the CurrentNetwork - * @param MCC - * @param MNC - */ - void UpdateCurrentNetwork(const TDesC& aCurrentNetworkMCC, - const TDesC& aCurrentNetworkMNC); - - /** - * UpdateHomeNetwork() - * Updates the home - * @param MCC - * @param MNC - */ - void UpdateHomeNetwork(const TDesC& aCurrentNetworkMCC, - const TDesC& aCurrentNetworkMNC); - - - /** - * ParseAndPrepareUrl() - * Checks for the URL whether its valid or not - * @param URL - */ - TBool ParseAndPrepareUrl(const TDesC& aUrl); - - /** - * SetCurrentNetworkType() - * Sets Current Network Being Used - */ - void SetCurrentNetworkType(); - - /** - * GetCurrentNetworkType() - * Returns Current Network Being Used - */ - TDesC& GetCurrentNetworkType(); - - /** - * SetPlayStateWhileCall() - * Sets This Value When Stoping the Player - * While Call is Active - */ - void SetPlayStateWhileCall(TBool aPlayTerminated); - /** - * GetPlayStateWhileCall()() - * Returns the Value of Play state - * While Call is Active - */ - TBool GetPlayStateWhileCall(); - - /** - * IsEmbedded() - */ - TBool IsEmbedded() const; - - /** - * IsCallActive() - * @return the state of call - **/ - TBool IsCallActive(); - - /** - * HandlePropertyChangeL - * Derived from MIRPropertyChangeObserver - */ - virtual void HandlePropertyChangeL(const TUid& aCategory, - const TUint aKey, const TInt aValue ); - - /** - * HandlePropertyChangeL - * Derived from MIRPropertyChangeObserver - */ - virtual void HandlePropertyChangeL(const TUid& aCategory, - const TUint aKey, const TIRTextProperty& aValue ); - - /** - * HandlePropertyChangeErrorL - * Derived from MIRPropertyChangeObserver - */ - virtual void HandlePropertyChangeErrorL(const TUid& aCategory, - const TUint aKey, TInt aError); - - /** - * CurrentViewContainer - * Returns the pointer of the active view container - */ - CIRBaseView* CurrentViewContainer(); - - /** - * IsOverLayActive() - *Returns the status of the loading or buffering - */ - TBool IsOverLayActive() const; - - /** - * The last selected browsing category - * - * @return The selected item as TCurrentSelectedItem, of KErrNotFound - */ - TInt SelectedBrowsingCategory() const; - /** - * Checks if current screen orientation is landscape - * - * @return ETrue if orientation is landscape, otherwise EFalse - */ - TBool IsLandscapeOrientation() const; - /** - * Cancels the pending delayed action. - */ - void CancelDelayedAction(); - - /** - * DisplayNetworkIconL(TBool aNetworkFlag,CGulIcon* aNetworkBitmap;TIRConnectionType aConnectionType, TInt aBitmapId, TInt aMaskId=-1, const TDesC& aDisplayConnectionType) - * Display the Connection Icon - */ - void DisplayNetworkIconL(CGulIcon** aNetworkBitmap, TIRConnectionType aConnectionType, - TInt aBitmapId, TInt aMaskId, const TDesC& aDisplayConnectionType); - - /** - * FlashNetworkIConL(TBool aNetworkFlag,CGulIcon* aNetworkBitmap;TIRConnectionType aConnectionType, TInt aBitmapId, TInt aMaskId=-1, const TDesC& aDisplayConnectionType) - * Flash the Network Icon - */ - void FlashNetworkIConL(CGulIcon** aNetworkBitmap, TIRConnectionType aConnectionType, - TInt aBitmapId, TInt aMaskId); - - /** - * SetCommandSetL(TInt aResourceId) - * Function is called to set the CBA buttons Dynamically - */ - void SetCommandSetL(TInt aResourceId); - - /* IsFirstTime() - * Determines whether this view is launched first time or not. - */ - TBool IsFirstTime(); - - /** - * DisplayErrorNoteL() - * Display the error note - * @param string id from the resource - **/ - void DisplayErrorNoteL(TInt aResourceId); - - /** - * DisplayErrorNoteL() - * Display the error note - * @param string id from the resource - **/ - void DisplayErrorNoteL(TInt aResourceId, const TDesC & aString); - - /** - * DisplayInformationL(const TDesC& aResourceDisp) - * Display the information note. - */ - void DisplayInformationL(TInt aResourceId, TInt aInt); - - /** - * DisplayInformationL(const TDesC& aResourceDisp) - * Display the information note. - */ - void DisplayInformationL(TInt aResourceId, const TDesC & aString = KNullDesC); - - /** - * Retrieves current Byte Counter for displaying in Now playing view - */ - void UpdateNowPlayingByteCounter(); - - /** - * Triggers the view according to layout change. - */ - void TriggerCommand(); - /** - * IsForeground() - * Function To Check Whether Application is in Foreground. - */ - TBool IsForeground(); - /** - * ParsePlsDataL() - * Parse the PLS data - * @param file to be parsed - */ - void ParsePlsDataL(CFileStore*& /*aFileStore*/, RFile& aFile); - /** - * ConnectToPlsUrlL() - * Connects to PLS URL - */ - void ConnectToPlsUrlL(); - /** - * GetPlsActiavted() - * @return bool whether T&C or cost warning view are accepted or not - */ - TBool GetPlsActiavted() const; - /** - * SetPlsActiavted() - * Sets bool if T&C or cost warning view are not accepted - * @param bool to be set - */ - void SetPlsActiavted(TBool aPlsactivated); - /** - * GetBgWhenLockState() - * returns the iBgWhenLock lock state - */ - TBool GetBgWhenLockState(); - /** - * GetCurrentOperatorValue() - * returns the iCurrentOperator value - */ - TInt GetCurrentOperatorValue(); - /** - * GetHomeOperatorValue() - * returns the vallue of iHomeOperator - */ - TInt GetHomeOperatorValue(); - /** - * GetCallActiveState() - * returns whether iCallActive variable is true/false - */ - TBool GetCallActiveState(); - /** - * GetNetworkControllerInstance() - * returns the iNetworkController - */ - CIRNetworkController* GetNetworkControllerInstance(); - /** - * GetNowPlayingViewInstance() - * returns instance od nowplaying view - */ - CIRNowPlayingView* GetNowPlayingViewInstance(); - /** - * GetPubSubManagerInstance() - * returns instace of publish subscriber - */ - CIRPubSub* GetPubSubManagerInstance(); - /** - * GetCurrentThreadIDValue() - * returns the Current thread ID - */ - TUint64 GetCurrentThreadIDValue(); - /** - * GetFavPresetsInstance() - * returns instace of Favourite preset - */ - CIRFavoritesDb* GetFavPresetsInstance(); - /** - * GetNetworkType() - * returns Network Connection Type - */ - TIRConnectionType GetNetworkType(); - /** - * GetCallConnectedState() - * returns the iCallConnected state - */ - TBool GetCallConnectedState(); - /** - * SetActivationPendingValue() - * assign the Id value to iActionPending - */ - void SetActivationPendingValue(TUid aUid); - /** - * GetPresentViewID() - * returns the present view ID - */ - TUid GetPresentViewID(); - - /** - * HandleAlarmStart() - * Handles when an alarm comes - */ - void HandleAlarmStart(); - - /** - * HandleAlarmEnd() - * Handles when an alarm ends - */ - void HandleAlarmEnd(); - - /** - * HandleInitialAlarmEvent() - * Handles initial event when alarm comes - */ - void HandleInitialAlarmEvent(); - - /** - * HandleMessageAlertL() - * Handles when a new message comes - */ - void HandleMessageAlertL(); - - /** - * GetPlsIndex() - * Returns the Pls Index - */ - TInt GetPlsIndex(); - - /** - * SetPlsIndex() - * Sets the Pls Index - */ - void SetPlsIndex(TInt aPlsIndex); - - /** - * GetBgLock() - * Returns whether the Bground is Locked - */ - TBool GetBgLock(); - - /** - * SetBgLock() - * Sets the BGround whether it is Locked or Unlocked - */ - void SetBgLock(TBool aBgWhenLock); - - /** - * GetEditStation() - * Returns whether The station can be edited Or not - */ - TBool GetEditStation(); - - /** - * SetEditStation() - * Sets the iIsEditStation Flag To determine whether the station - * can be Edited - */ - void SetEditStation(TBool aIsEditStation); - - /** - * IsOfflineProfile() - * Function returns True if the Current Profile is Offline - */ - TBool IsOfflineProfile(); - - // Abstract method for handling profile activation event. - void HandleProfileActivatedL (TInt aProfileId); - void HandleProfileActivationNotificationError (TInt) ; - - /** - * Checks if free disk space is under pre-set limit. Also - * shows information note telling user to delete some data. - * Some operations should check the disk space with this - * function before proceeding and possibly cancel the process. - * - * @return ETrue if disk space is under limit, EFalse otherwise. - */ - TBool CheckAndNotifyLowDiskSpaceL() const; - - /* MIRSystemEventObserver::HandleSystemEventL() - * Handles the system events - */ - void HandleSystemEventL(TIRSystemEventType aEventType); - - /* - * Changes the state of the player - */ - void PlayerStateChangedL(TIRStopPlayState aState); - - /* - * from base class MCoeViewActivationObserver - */ - void HandleViewActivation(const TVwsViewId& aNewlyActivatedViewId, - const TVwsViewId& aViewIdToBeDeactivated ); - -private: - - /** - * NetworkAnimationTimerExpiredL - * Called when the buffering times out - **/ - static TInt NetworkAnimationTimerExpired(TAny* aPtr); - - /** - * GetLockInfo() - * To get the information about phone lock - * @param TBool Return true if the phone is Locked. - **/ - TBool GetLockInfo(); - - /** - * Updates the subscriber identifier (IMSI code) and sets the Terms & Conditions display as necessary. - */ - void UpdateSubscriberIdL(); - /** - * HandleDataTransferEventL() - * CallBack which Returns the ByteCounter - **/ - - void HandleDataTransferEventL( const MIRDataTransferTracker::TIRDataTransferPckg& aData ); - - /** - * ResetVolumeTimer() - * Set the volume bar timer for displaying volume bar - * @param time interval for which volume bar is to be displayed - */ - void ResetVolumeTimer( TInt aVolumeTimer ); - - /** - * IsVolumeBarPressed() - * checks whether volume bar is pressed - * @return ETrue whether volume bar key is pressed - */ - TBool IsVolumeBarPressed(); - - /** - * IsVolumeUp() - * checks whether volume bar is pressed - * @return ETrue if volume is increased and EFalse if volume is decreased - */ - TBool IsVolumeUp(); - - - - - /** - * Updates the landscape data. This is done separately - * and not in IsLandscapeOrientation method as - * IsLandscapeOrientation MUST NOT do a window server flush - */ - void UpdateLandscapeInformation(); - - /** - *CIRUi::CreateWritablePrivatePath() - *Only for ROM SDK3.2 - *creates a private path in c drive if it doesnot exist (for rom install) - */ - void CreateWritablePrivatePath(); - - // from base class MIAUpdateObserve -#ifdef FF_IAUPDATE - void CheckUpdatesComplete(TInt aErrorCode, TInt aAvailableUpdates); - void UpdateComplete(TInt aErrorCode, CIAUpdateResult* aResult); - void UpdateQueryComplete(TInt aErrorCode, TBool aUpdateNow); -#endif - - -public: - /* - * HandleResourceChangeL( TInt aType ) - * Handles the changes in the resolution - */ - void HandleResourceChangeL( TInt aType ); - - -// Handles call functionalities when the call is active state or inactive state - void HandleCallActiveL(TIRSystemEventType aEventType); - - TInt ChooseLayoutResource( TInt aNormalPortraitRes, - TInt aMirroredPortraitRes, TInt aNormalLandscapeRes, - TInt aMirroredLandscapeRes ) const; - /* - * GetSkinColor - * Returns the Current Color - */ - TRgb GetSkinColor(); - /* - * ChooseToolBarIcons - * Returns the ToolbarBirmap Id For The Current Theme - */ - TInt ChooseToolBarBitmaps(TInt aBlack,TInt aWhite); - /* - * ChooseToolBarMaskId - * Returns the ToolbarBirmap Id For The Current Theme - */ - TInt ChooseToolBarMaskId(TInt aBlackMask,TInt aWhiteMask); - - /* - * SetHistory - * Set the Flag From All the Views When Go to nowplaying Is Done - */ - void SetHistory(TBool aHistory); - - - /* - * GetAlarm - * Return the iAlarmTerminated Flag - */ - TBool GetAlarm(); - - //Methods to determine if any channel was added to favorites - TBool IsFlagIfAnyFavL(); - - void SetMainView(TBool val); - - /** - * FindInMusicStoreCounter() - * Counter of how many times a user has started - * "FindInMusicStore" - */ - void FindInMusicStoreCounter(); - - /** - * GetFindInMusicStoreCount() - * Gets the value of how many times a user has started - * "FindInMusicStore" - */ - void GetFindInMusicStoreCount(TInt& aFindInMStoreCount); - - RArray& GetPlsSaved() ; - - void SetListenFromPls(TBool aValue); - - TBool GetListenFromPls(); - - /** - * Used to determine the current profile - * @return TInt describing the profile value - */ - TInt DetermineCurrentProfile() const; - - void SetListenFromSecondPls(TBool aValue); - TBool GetListenFromSecondPls(); - - /** - * Brings VRA task to foreground. - */ - void BringToForeground() const; - - /** - * Sends VRA task to background. - */ - void SendToBackground() const; - - -private: //Added by Snigdha for HomeScreen - - - /** - * Handles action handler command line parameter. - * - * @param aTail The tail of the command line; command id is expected. - */ - void ProcessActionHandlerCommandParameter( const TDesC8& aTail ); - - /** - * Parses the command line options and calls option specific methods. Supports existing and extended - * command line interfaces. - * - * in old CLI, the expected format of aTail is "N", where N is a preset ID. - * - * in new CLI, the expected format is "-