--- a/internetradio2.0/bmarm/irdatastructuresu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/bmarm/irdatastructuresu.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,135 +1,128 @@
EXPORTS
- _ZN12CIROTAUpdate10ConstructLEv @ 1 NONAME
- _ZN12CIROTAUpdate10SetVersionERK7TDesC16 @ 2 NONAME
- _ZN12CIROTAUpdate12InternalizeLER11RReadStream @ 3 NONAME
- _ZN12CIROTAUpdate15SetUpdateMethodERK7TDesC16 @ 4 NONAME
- _ZN12CIROTAUpdate17SetUpdateIntervalERK7TDesC16 @ 5 NONAME
- _ZN12CIROTAUpdate4NewLEv @ 6 NONAME
- _ZN12CIROTAUpdate5NewLCEv @ 7 NONAME
- _ZN12CIROTAUpdate9SetOTAUrlERK7TDesC16 @ 8 NONAME
- _ZN13CIRIsdsPreset10SetGenreIdERK7TDesC16 @ 9 NONAME
- _ZN13CIRIsdsPreset11SetLangCodeERK7TDesC16 @ 10 NONAME
- _ZN13CIRIsdsPreset11SetLangInfoERK7TDesC16S2_ @ 11 NONAME
- _ZN13CIRIsdsPreset11SetLogoDataERK6TDesC8 @ 12 NONAME
- _ZN13CIRIsdsPreset11SetUrlCountEi @ 13 NONAME
- _ZN13CIRIsdsPreset11SetUrlCountEv @ 14 NONAME
- _ZN13CIRIsdsPreset12ExternalizeLER12RWriteStream @ 15 NONAME
- _ZN13CIRIsdsPreset12InternalizeLER11RReadStream @ 16 NONAME
- _ZN13CIRIsdsPreset12SetGenreInfoERK7TDesC16S2_ @ 17 NONAME
- _ZN13CIRIsdsPreset12SetGenreNameERK7TDesC16 @ 18 NONAME
- _ZN13CIRIsdsPreset12SetShortDescERK7TDesC16 @ 19 NONAME
- _ZN13CIRIsdsPreset14SetChannelTypeEi @ 20 NONAME
- _ZN13CIRIsdsPreset14SetCountryCodeERK7TDesC16 @ 21 NONAME
- _ZN13CIRIsdsPreset14SetCountryInfoERK7TDesC16S2_ @ 22 NONAME
- _ZN13CIRIsdsPreset14SetCountryNameERK7TDesC16 @ 23 NONAME
- _ZN13CIRIsdsPreset14SetDescriptionERK7TDesC16 @ 24 NONAME
- _ZN13CIRIsdsPreset17GetUrlForBitrateLEi @ 25 NONAME
- _ZN13CIRIsdsPreset18GetChannelBitrateLEi @ 26 NONAME
- _ZN13CIRIsdsPreset19SetAdvertisementUrlERK7TDesC16 @ 27 NONAME
- _ZN13CIRIsdsPreset19SetLastModifiedTimeERK7TDesC16 @ 28 NONAME
- _ZN13CIRIsdsPreset19SetMusicStoreStatusERK7TDesC16 @ 29 NONAME
- _ZN13CIRIsdsPreset21SetAdvertisementInUseERK7TDesC16 @ 30 NONAME
- _ZN13CIRIsdsPreset22GetExactUrlForBitrateLEi @ 31 NONAME
- _ZN13CIRIsdsPreset4NewLEv @ 32 NONAME
- _ZN13CIRIsdsPreset5NewLCEv @ 33 NONAME
- _ZN13CIRIsdsPreset5SetIdERK7TDesC16 @ 34 NONAME
- _ZN13CIRIsdsPreset5SetIdEi @ 35 NONAME
- _ZN13CIRIsdsPreset6GetUrlEi @ 36 NONAME
- _ZN13CIRIsdsPreset7SetLangERK7TDesC16 @ 37 NONAME
- _ZN13CIRIsdsPreset7SetNameERK7TDesC16 @ 38 NONAME
- _ZN13CIRIsdsPreset7SetUrlLERK7TDesC16 @ 39 NONAME
- _ZN13CIRIsdsPreset7SetUrlLERK7TDesC16S2_S2_ @ 40 NONAME
- _ZN13CIRIsdsPreset7SetUrlLERK7TDesC16S2_i @ 41 NONAME
- _ZN13CIRIsdsPreset8SetIndexEi @ 42 NONAME
- _ZN13CIRIsdsPreset9SetImgUrlERK7TDesC16 @ 43 NONAME
- _ZN13CIRIsdsPreset9SetUniqIdEm @ 44 NONAME
- _ZN13CIRIsdsPresetC1Ev @ 45 NONAME
- _ZN13CIRIsdsPresetC2Ev @ 46 NONAME
- _ZN13CIRIsdsPresetaSERKS_ @ 47 NONAME
- _ZN16CIRAdvertisement11SetAdvInUseERK7TDesC16 @ 48 NONAME
- _ZN16CIRAdvertisement14SetVisibleTimeERK7TDesC16 @ 49 NONAME
- _ZN16CIRAdvertisement4NewLEv @ 50 NONAME
- _ZN16CIRAdvertisement5NewLCEv @ 51 NONAME
- _ZN16CIRAdvertisement6SetURLERK7TDesC16 @ 52 NONAME
- _ZN16CIRAdvertisement8SetUsageERK7TDesC16 @ 53 NONAME
- _ZN18CIRLastPlayedSongs11GetSongNameEv @ 54 NONAME
- _ZN18CIRLastPlayedSongs11SetSongNameERK7TDesC16 @ 55 NONAME
- _ZN18CIRLastPlayedSongs12ExternalizeLER12RWriteStream @ 56 NONAME
- _ZN18CIRLastPlayedSongs12InternalizeLER11RReadStream @ 57 NONAME
- _ZN18CIRLastPlayedSongs13GetArtistNameEv @ 58 NONAME
- _ZN18CIRLastPlayedSongs13SetArtistNameERK7TDesC16 @ 59 NONAME
- _ZN18CIRLastPlayedSongs4NewLEv @ 60 NONAME
- _ZN18CIRLastPlayedSongs5NewLCEv @ 61 NONAME
- _ZN18CIRLastPlayedSongsaSERKS_ @ 62 NONAME
- _ZN19CIRChannelServerUrl10SetBitRateEi @ 63 NONAME
- _ZN19CIRChannelServerUrl12ExternalizeLER12RWriteStream @ 64 NONAME
- _ZN19CIRChannelServerUrl12InternalizeLER11RReadStream @ 65 NONAME
- _ZN19CIRChannelServerUrl12SetServerUrlERK7TDesC16 @ 66 NONAME
- _ZN19CIRChannelServerUrl13SetServerNameERK7TDesC16 @ 67 NONAME
- _ZN19CIRChannelServerUrl4NewLEv @ 68 NONAME
- _ZN19CIRChannelServerUrl5NewLCEv @ 69 NONAME
- _ZN19CIRChannelServerUrlaSERKS_ @ 70 NONAME
- _ZN21CIRBrowseChannelItems10SetBitrateERK7TDesC16 @ 71 NONAME
- _ZN21CIRBrowseChannelItems10SetBitrateERK7TDesC16S2_ @ 72 NONAME
- _ZN21CIRBrowseChannelItems10SetBitrateERK7TDesC16S2_S2_ @ 73 NONAME
- _ZN21CIRBrowseChannelItems11SetImageUrlERK7TDesC16 @ 74 NONAME
- _ZN21CIRBrowseChannelItems12InternalizeLER11RReadStream @ 75 NONAME
- _ZN21CIRBrowseChannelItems12SetBannerUrlERK7TDesC16 @ 76 NONAME
- _ZN21CIRBrowseChannelItems16SetGetOperationLERK7TDesC16 @ 77 NONAME
- _ZN21CIRBrowseChannelItems18SetClickThroughUrlERK7TDesC16 @ 78 NONAME
- _ZN21CIRBrowseChannelItems4NewLEv @ 79 NONAME
- _ZN21CIRBrowseChannelItems5NewLCEv @ 80 NONAME
- _ZN21CIRBrowseChannelItems7SetSizeERK7TDesC16 @ 81 NONAME
- _ZN21CIRBrowseChannelItems8SetTextLERK7TDesC16S2_S2_ @ 82 NONAME
- _ZN22CIRBrowseCatagoryItems12InternalizeLER11RReadStream @ 83 NONAME
- _ZN22CIRBrowseCatagoryItems12SetBannerUrlERK7TDesC16 @ 84 NONAME
- _ZN22CIRBrowseCatagoryItems15SetGetOperationERK7TDesC16 @ 85 NONAME
- _ZN22CIRBrowseCatagoryItems18SetClickThroughUrlERK7TDesC16 @ 86 NONAME
- _ZN22CIRBrowseCatagoryItems4NewLEv @ 87 NONAME
- _ZN22CIRBrowseCatagoryItems5NewLCEv @ 88 NONAME
- _ZN22CIRBrowseCatagoryItems7SetSizeERK7TDesC16 @ 89 NONAME
- _ZN22CIRBrowseCatagoryItems8SetTextLERK7TDesC16S2_ @ 90 NONAME
- _ZNK12CIROTAUpdate12ExternalizeLER12RWriteStream @ 91 NONAME
- _ZNK13CIRIsdsPreset10GetGenreIdEv @ 92 NONAME
- _ZNK13CIRIsdsPreset11GetLangNameEv @ 93 NONAME
- _ZNK13CIRIsdsPreset11GetLogoDataEv @ 94 NONAME
- _ZNK13CIRIsdsPreset11GetUrlCountEv @ 95 NONAME
- _ZNK13CIRIsdsPreset12GetCountryIdEv @ 96 NONAME
- _ZNK13CIRIsdsPreset12GetGenreNameEv @ 97 NONAME
- _ZNK13CIRIsdsPreset14GetChannelTypeEv @ 98 NONAME
- _ZNK13CIRIsdsPreset14GetCountryNameEv @ 99 NONAME
- _ZNK13CIRIsdsPreset14GetDescriptionEv @ 100 NONAME
- _ZNK13CIRIsdsPreset16GetChannelUrlAtLEi @ 101 NONAME
- _ZNK13CIRIsdsPreset19GetAdvertisementUrlEv @ 102 NONAME
- _ZNK13CIRIsdsPreset19GetLastModifiedTimeEv @ 103 NONAME
- _ZNK13CIRIsdsPreset19GetMusicStoreStatusEv @ 104 NONAME
- _ZNK13CIRIsdsPreset19GetShortDescriptionEv @ 105 NONAME
- _ZNK13CIRIsdsPreset20GetAvailableBitratesER6RArrayIiE @ 106 NONAME
- _ZNK13CIRIsdsPreset21GetAdvertisementInUseEv @ 107 NONAME
- _ZNK13CIRIsdsPreset5GetIdEv @ 108 NONAME
- _ZNK13CIRIsdsPreset6UniqIdEv @ 109 NONAME
- _ZNK13CIRIsdsPreset7GetNameEv @ 110 NONAME
- _ZNK13CIRIsdsPreset8GetIndexEv @ 111 NONAME
- _ZNK13CIRIsdsPreset9GetImgUrlEv @ 112 NONAME
- _ZNK13CIRIsdsPreset9GetLangIdEv @ 113 NONAME
- _ZNK16CIRAdvertisement10ConstructLEv @ 114 NONAME
- _ZNK19CIRChannelServerUrl10GetBitRateEv @ 115 NONAME
- _ZNK19CIRChannelServerUrl12GetServerUrlEv @ 116 NONAME
- _ZNK19CIRChannelServerUrl13GetServerNameEv @ 117 NONAME
- _ZNK21CIRBrowseChannelItems12ExternalizeLER12RWriteStream @ 118 NONAME
- _ZNK22CIRBrowseCatagoryItems12ExternalizeLER12RWriteStream @ 119 NONAME
- _ZTI12CIROTAUpdate @ 120 NONAME ; #<TI>#
- _ZTI13CIRIsdsPreset @ 121 NONAME ; #<TI>#
- _ZTI16CIRAdvertisement @ 122 NONAME ; #<TI>#
- _ZTI18CIRLastPlayedSongs @ 123 NONAME ; #<TI>#
- _ZTI19CIRChannelServerUrl @ 124 NONAME ; #<TI>#
- _ZTI21CIRBrowseChannelItems @ 125 NONAME ; #<TI>#
- _ZTI22CIRBrowseCatagoryItems @ 126 NONAME ; #<TI>#
- _ZTV12CIROTAUpdate @ 127 NONAME ; #<VT>#
- _ZTV13CIRIsdsPreset @ 128 NONAME ; #<VT>#
- _ZTV16CIRAdvertisement @ 129 NONAME ; #<VT>#
- _ZTV18CIRLastPlayedSongs @ 130 NONAME ; #<VT>#
- _ZTV19CIRChannelServerUrl @ 131 NONAME ; #<VT>#
- _ZTV21CIRBrowseChannelItems @ 132 NONAME ; #<VT>#
- _ZTV22CIRBrowseCatagoryItems @ 133 NONAME ; #<VT>#
+ _ZN12CIROTAUpdate10ConstructLEv @ 1 NONAME
+ _ZN12CIROTAUpdate10SetVersionERK7TDesC16 @ 2 NONAME
+ _ZN12CIROTAUpdate12InternalizeLER11RReadStream @ 3 NONAME
+ _ZN12CIROTAUpdate15SetUpdateMethodERK7TDesC16 @ 4 NONAME
+ _ZN12CIROTAUpdate17SetUpdateIntervalERK7TDesC16 @ 5 NONAME
+ _ZN12CIROTAUpdate4NewLEv @ 6 NONAME
+ _ZN12CIROTAUpdate5NewLCEv @ 7 NONAME
+ _ZN12CIROTAUpdate9SetOTAUrlERK7TDesC16 @ 8 NONAME
+ _ZN13CIRIsdsPreset10SetGenreIdERK7TDesC16 @ 9 NONAME
+ _ZN13CIRIsdsPreset11SetLangCodeERK7TDesC16 @ 10 NONAME
+ _ZN13CIRIsdsPreset11SetLangInfoERK7TDesC16S2_ @ 11 NONAME
+ _ZN13CIRIsdsPreset11SetLogoDataERK6TDesC8 @ 12 NONAME
+ _ZN13CIRIsdsPreset11SetUrlCountEi @ 13 NONAME
+ _ZN13CIRIsdsPreset11SetUrlCountEv @ 14 NONAME
+ _ZN13CIRIsdsPreset12ExternalizeLER12RWriteStream @ 15 NONAME
+ _ZN13CIRIsdsPreset12InternalizeLER11RReadStream @ 16 NONAME
+ _ZN13CIRIsdsPreset12SetGenreInfoERK7TDesC16S2_ @ 17 NONAME
+ _ZN13CIRIsdsPreset12SetGenreNameERK7TDesC16 @ 18 NONAME
+ _ZN13CIRIsdsPreset12SetShortDescERK7TDesC16 @ 19 NONAME
+ _ZN13CIRIsdsPreset14SetChannelTypeEi @ 20 NONAME
+ _ZN13CIRIsdsPreset14SetCountryCodeERK7TDesC16 @ 21 NONAME
+ _ZN13CIRIsdsPreset14SetCountryInfoERK7TDesC16S2_ @ 22 NONAME
+ _ZN13CIRIsdsPreset14SetCountryNameERK7TDesC16 @ 23 NONAME
+ _ZN13CIRIsdsPreset14SetDescriptionERK7TDesC16 @ 24 NONAME
+ _ZN13CIRIsdsPreset17GetUrlForBitrateLEi @ 25 NONAME
+ _ZN13CIRIsdsPreset18GetChannelBitrateLEi @ 26 NONAME
+ _ZN13CIRIsdsPreset19SetAdvertisementUrlERK7TDesC16 @ 27 NONAME
+ _ZN13CIRIsdsPreset19SetLastModifiedTimeERK7TDesC16 @ 28 NONAME
+ _ZN13CIRIsdsPreset19SetMusicStoreStatusERK7TDesC16 @ 29 NONAME
+ _ZN13CIRIsdsPreset21SetAdvertisementInUseERK7TDesC16 @ 30 NONAME
+ _ZN13CIRIsdsPreset22GetExactUrlForBitrateLEi @ 31 NONAME
+ _ZN13CIRIsdsPreset4NewLEv @ 32 NONAME
+ _ZN13CIRIsdsPreset5NewLCEv @ 33 NONAME
+ _ZN13CIRIsdsPreset5SetIdERK7TDesC16 @ 34 NONAME
+ _ZN13CIRIsdsPreset5SetIdEi @ 35 NONAME
+ _ZN13CIRIsdsPreset6GetUrlEi @ 36 NONAME
+ _ZN13CIRIsdsPreset7SetLangERK7TDesC16 @ 37 NONAME
+ _ZN13CIRIsdsPreset7SetNameERK7TDesC16 @ 38 NONAME
+ _ZN13CIRIsdsPreset7SetUrlLERK7TDesC16S2_S2_ @ 39 NONAME
+ _ZN13CIRIsdsPreset7SetUrlLERK7TDesC16S2_i @ 40 NONAME
+ _ZN13CIRIsdsPreset9SetImgUrlERK7TDesC16 @ 41 NONAME
+ _ZN13CIRIsdsPresetaSERKS_ @ 42 NONAME
+ _ZN16CIRAdvertisement11SetAdvInUseERK7TDesC16 @ 43 NONAME
+ _ZN16CIRAdvertisement14SetVisibleTimeERK7TDesC16 @ 44 NONAME
+ _ZN16CIRAdvertisement4NewLEv @ 45 NONAME
+ _ZN16CIRAdvertisement5NewLCEv @ 46 NONAME
+ _ZN16CIRAdvertisement6SetURLERK7TDesC16 @ 47 NONAME
+ _ZN16CIRAdvertisement8SetUsageERK7TDesC16 @ 48 NONAME
+ _ZN18CIRLastPlayedSongs11GetSongNameEv @ 49 NONAME
+ _ZN18CIRLastPlayedSongs11SetSongNameERK7TDesC16 @ 50 NONAME
+ _ZN18CIRLastPlayedSongs12ExternalizeLER12RWriteStream @ 51 NONAME
+ _ZN18CIRLastPlayedSongs12InternalizeLER11RReadStream @ 52 NONAME
+ _ZN18CIRLastPlayedSongs13GetArtistNameEv @ 53 NONAME
+ _ZN18CIRLastPlayedSongs13SetArtistNameERK7TDesC16 @ 54 NONAME
+ _ZN18CIRLastPlayedSongs4NewLEv @ 55 NONAME
+ _ZN18CIRLastPlayedSongs5NewLCEv @ 56 NONAME
+ _ZN18CIRLastPlayedSongsaSERKS_ @ 57 NONAME
+ _ZN19CIRChannelServerUrl10SetBitRateEi @ 58 NONAME
+ _ZN19CIRChannelServerUrl12ExternalizeLER12RWriteStream @ 59 NONAME
+ _ZN19CIRChannelServerUrl12InternalizeLER11RReadStream @ 60 NONAME
+ _ZN19CIRChannelServerUrl12SetServerUrlERK7TDesC16 @ 61 NONAME
+ _ZN19CIRChannelServerUrl13SetServerNameERK7TDesC16 @ 62 NONAME
+ _ZN19CIRChannelServerUrl4NewLEv @ 63 NONAME
+ _ZN19CIRChannelServerUrl5NewLCEv @ 64 NONAME
+ _ZN19CIRChannelServerUrlaSERKS_ @ 65 NONAME
+ _ZN21CIRBrowseChannelItems10SetBitrateERK7TDesC16 @ 66 NONAME
+ _ZN21CIRBrowseChannelItems10SetBitrateERK7TDesC16S2_ @ 67 NONAME
+ _ZN21CIRBrowseChannelItems10SetBitrateERK7TDesC16S2_S2_ @ 68 NONAME
+ _ZN21CIRBrowseChannelItems11SetImageUrlERK7TDesC16 @ 69 NONAME
+ _ZN21CIRBrowseChannelItems12InternalizeLER11RReadStream @ 70 NONAME
+ _ZN21CIRBrowseChannelItems12SetBannerUrlERK7TDesC16 @ 71 NONAME
+ _ZN21CIRBrowseChannelItems16SetGetOperationLERK7TDesC16 @ 72 NONAME
+ _ZN21CIRBrowseChannelItems18SetClickThroughUrlERK7TDesC16 @ 73 NONAME
+ _ZN21CIRBrowseChannelItems4NewLEv @ 74 NONAME
+ _ZN21CIRBrowseChannelItems5NewLCEv @ 75 NONAME
+ _ZN21CIRBrowseChannelItems7SetSizeERK7TDesC16 @ 76 NONAME
+ _ZN21CIRBrowseChannelItems8SetTextLERK7TDesC16S2_S2_ @ 77 NONAME
+ _ZN22CIRBrowseCatagoryItems12InternalizeLER11RReadStream @ 78 NONAME
+ _ZN22CIRBrowseCatagoryItems12SetBannerUrlERK7TDesC16 @ 79 NONAME
+ _ZN22CIRBrowseCatagoryItems15SetGetOperationERK7TDesC16 @ 80 NONAME
+ _ZN22CIRBrowseCatagoryItems18SetClickThroughUrlERK7TDesC16 @ 81 NONAME
+ _ZN22CIRBrowseCatagoryItems4NewLEv @ 82 NONAME
+ _ZN22CIRBrowseCatagoryItems5NewLCEv @ 83 NONAME
+ _ZN22CIRBrowseCatagoryItems7SetSizeERK7TDesC16 @ 84 NONAME
+ _ZN22CIRBrowseCatagoryItems8SetTextLERK7TDesC16S2_ @ 85 NONAME
+ _ZNK12CIROTAUpdate12ExternalizeLER12RWriteStream @ 86 NONAME
+ _ZNK13CIRIsdsPreset10GetGenreIdEv @ 87 NONAME
+ _ZNK13CIRIsdsPreset11GetLangNameEv @ 88 NONAME
+ _ZNK13CIRIsdsPreset11GetLogoDataEv @ 89 NONAME
+ _ZNK13CIRIsdsPreset11GetUrlCountEv @ 90 NONAME
+ _ZNK13CIRIsdsPreset12GetCountryIdEv @ 91 NONAME
+ _ZNK13CIRIsdsPreset12GetGenreNameEv @ 92 NONAME
+ _ZNK13CIRIsdsPreset14GetChannelTypeEv @ 93 NONAME
+ _ZNK13CIRIsdsPreset14GetCountryNameEv @ 94 NONAME
+ _ZNK13CIRIsdsPreset14GetDescriptionEv @ 95 NONAME
+ _ZNK13CIRIsdsPreset16GetChannelUrlAtLEi @ 96 NONAME
+ _ZNK13CIRIsdsPreset19GetAdvertisementUrlEv @ 97 NONAME
+ _ZNK13CIRIsdsPreset19GetLastModifiedTimeEv @ 98 NONAME
+ _ZNK13CIRIsdsPreset19GetMusicStoreStatusEv @ 99 NONAME
+ _ZNK13CIRIsdsPreset19GetShortDescriptionEv @ 100 NONAME
+ _ZNK13CIRIsdsPreset20GetAvailableBitratesER6RArrayIiE @ 101 NONAME
+ _ZNK13CIRIsdsPreset21GetAdvertisementInUseEv @ 102 NONAME
+ _ZNK13CIRIsdsPreset5GetIdEv @ 103 NONAME
+ _ZNK13CIRIsdsPreset7GetNameEv @ 104 NONAME
+ _ZNK13CIRIsdsPreset9GetImgUrlEv @ 105 NONAME
+ _ZNK13CIRIsdsPreset9GetLangIdEv @ 106 NONAME
+ _ZNK16CIRAdvertisement10ConstructLEv @ 107 NONAME
+ _ZNK19CIRChannelServerUrl10GetBitRateEv @ 108 NONAME
+ _ZNK19CIRChannelServerUrl12GetServerUrlEv @ 109 NONAME
+ _ZNK19CIRChannelServerUrl13GetServerNameEv @ 110 NONAME
+ _ZNK21CIRBrowseChannelItems12ExternalizeLER12RWriteStream @ 111 NONAME
+ _ZNK22CIRBrowseCatagoryItems12ExternalizeLER12RWriteStream @ 112 NONAME
+ _ZTI12CIROTAUpdate @ 113 NONAME DATA 12
+ _ZTI13CIRIsdsPreset @ 114 NONAME DATA 12
+ _ZTI16CIRAdvertisement @ 115 NONAME DATA 12
+ _ZTI18CIRLastPlayedSongs @ 116 NONAME DATA 12
+ _ZTI19CIRChannelServerUrl @ 117 NONAME DATA 12
+ _ZTI21CIRBrowseChannelItems @ 118 NONAME DATA 12
+ _ZTI22CIRBrowseCatagoryItems @ 119 NONAME DATA 12
+ _ZTV12CIROTAUpdate @ 120 NONAME DATA 20
+ _ZTV13CIRIsdsPreset @ 121 NONAME DATA 20
+ _ZTV16CIRAdvertisement @ 122 NONAME DATA 20
+ _ZTV18CIRLastPlayedSongs @ 123 NONAME DATA 20
+ _ZTV19CIRChannelServerUrl @ 124 NONAME DATA 20
+ _ZTV21CIRBrowseChannelItems @ 125 NONAME DATA 20
+ _ZTV22CIRBrowseCatagoryItems @ 126 NONAME DATA 20
--- a/internetradio2.0/bmarm/irfavoritesdbu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/bmarm/irfavoritesdbu.def Thu Jul 22 16:31:41 2010 +0100
@@ -24,4 +24,5 @@
_ZThn4_N14CIRFavoritesDb20HandlePresetChangedLEi4TUidN17MPSPresetObserver9TPSReasonE @ 23 NONAME ABSENT ; #<thunk>#
_ZN14CIRFavoritesDb19GetAllSortedPresetsEv @ 24 NONAME
_ZN14CIRFavoritesDb20IncreasePlayedTimesLERK13CIRIsdsPreset @ 25 NONAME
+ _ZN14CIRFavoritesDb13RenamePresetLERK13CIRIsdsPresetRK7TDesC16 @ 26 NONAME
--- a/internetradio2.0/bmarm/irnetworkcontrolleru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/bmarm/irnetworkcontrolleru.def Thu Jul 22 16:31:41 2010 +0100
@@ -18,12 +18,8 @@
_ZN20CIRNetworkController32RegisterLogoDataTransferTrackerLER12RHTTPSession @ 17 NONAME
_ZN20CIRNetworkController5CloseEv @ 18 NONAME
_ZN20CIRNetworkController5OpenLEP20MIRNetworkController @ 19 NONAME
- _ZNK20CIRNetworkController13GetBearerListEv @ 20 NONAME
- _ZNK20CIRNetworkController14GetNetworkListEv @ 21 NONAME
- _ZNK20CIRNetworkController15IsWlanSupportedEv @ 22 NONAME
- _ZNK20CIRNetworkController16GetNetworkStatusEv @ 23 NONAME
- _ZNK20CIRNetworkController18GetAccessPointListEv @ 24 NONAME
- _ZNK20CIRNetworkController22IdentifyConnectionTypeEv @ 25 NONAME
- _ZNK20CIRNetworkController8GetIAPIdERm @ 26 NONAME
- _ZNK20CIRNetworkController9GetApListEv @ 27 NONAME
+ _ZNK20CIRNetworkController15IsWlanSupportedEv @ 20 NONAME
+ _ZNK20CIRNetworkController16GetNetworkStatusEv @ 21 NONAME
+ _ZNK20CIRNetworkController22IdentifyConnectionTypeEv @ 22 NONAME
+ _ZNK20CIRNetworkController8GetIAPIdERm @ 23 NONAME
--- a/internetradio2.0/bwinscw/irdatastructuresu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/bwinscw/irdatastructuresu.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,121 +1,114 @@
EXPORTS
- ??0CIRIsdsPreset@@QAE@XZ @ 1 NONAME ; CIRIsdsPreset::CIRIsdsPreset(void)
- ??4CIRChannelServerUrl@@QAEAAV0@ABV0@@Z @ 2 NONAME ; class CIRChannelServerUrl & CIRChannelServerUrl::operator=(class CIRChannelServerUrl const &)
- ??4CIRIsdsPreset@@QAEAAV0@ABV0@@Z @ 3 NONAME ; class CIRIsdsPreset & CIRIsdsPreset::operator=(class CIRIsdsPreset const &)
- ??4CIRLastPlayedSongs@@QAEAAV0@ABV0@@Z @ 4 NONAME ; class CIRLastPlayedSongs & CIRLastPlayedSongs::operator=(class CIRLastPlayedSongs const &)
- ?ConstructL@CIRAdvertisement@@QBEXXZ @ 5 NONAME ; void CIRAdvertisement::ConstructL(void) const
- ?ConstructL@CIROTAUpdate@@QAEXXZ @ 6 NONAME ; void CIROTAUpdate::ConstructL(void)
- ?ExternalizeL@CIRBrowseCatagoryItems@@QBEXAAVRWriteStream@@@Z @ 7 NONAME ; void CIRBrowseCatagoryItems::ExternalizeL(class RWriteStream &) const
- ?ExternalizeL@CIRBrowseChannelItems@@QBEXAAVRWriteStream@@@Z @ 8 NONAME ; void CIRBrowseChannelItems::ExternalizeL(class RWriteStream &) const
- ?ExternalizeL@CIRChannelServerUrl@@QAEXAAVRWriteStream@@@Z @ 9 NONAME ; void CIRChannelServerUrl::ExternalizeL(class RWriteStream &)
- ?ExternalizeL@CIRIsdsPreset@@QAEXAAVRWriteStream@@@Z @ 10 NONAME ; void CIRIsdsPreset::ExternalizeL(class RWriteStream &)
- ?ExternalizeL@CIRLastPlayedSongs@@QAEXAAVRWriteStream@@@Z @ 11 NONAME ; void CIRLastPlayedSongs::ExternalizeL(class RWriteStream &)
- ?ExternalizeL@CIROTAUpdate@@QBEXAAVRWriteStream@@@Z @ 12 NONAME ; void CIROTAUpdate::ExternalizeL(class RWriteStream &) const
- ?GetAdvertisementInUse@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 13 NONAME ; class TDesC16 const & CIRIsdsPreset::GetAdvertisementInUse(void) const
- ?GetAdvertisementUrl@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 14 NONAME ; class TDesC16 const & CIRIsdsPreset::GetAdvertisementUrl(void) const
- ?GetArtistName@CIRLastPlayedSongs@@QAEAAVTDesC16@@XZ @ 15 NONAME ; class TDesC16 & CIRLastPlayedSongs::GetArtistName(void)
- ?GetAvailableBitrates@CIRIsdsPreset@@QBEHAAV?$RArray@H@@@Z @ 16 NONAME ; int CIRIsdsPreset::GetAvailableBitrates(class RArray<int> &) const
- ?GetBitRate@CIRChannelServerUrl@@QBEHXZ @ 17 NONAME ; int CIRChannelServerUrl::GetBitRate(void) const
- ?GetChannelBitrateL@CIRIsdsPreset@@QAEHH@Z @ 18 NONAME ; int CIRIsdsPreset::GetChannelBitrateL(int)
- ?GetChannelType@CIRIsdsPreset@@QBEHXZ @ 19 NONAME ; int CIRIsdsPreset::GetChannelType(void) const
- ?GetChannelUrlAtL@CIRIsdsPreset@@QBEABVTDesC16@@H@Z @ 20 NONAME ; class TDesC16 const & CIRIsdsPreset::GetChannelUrlAtL(int) const
- ?GetCountryId@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 21 NONAME ; class TDesC16 const & CIRIsdsPreset::GetCountryId(void) const
- ?GetCountryName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 22 NONAME ; class TDesC16 const & CIRIsdsPreset::GetCountryName(void) const
- ?GetDescription@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 23 NONAME ; class TDesC16 const & CIRIsdsPreset::GetDescription(void) const
- ?GetExactUrlForBitrateL@CIRIsdsPreset@@QAEPAVCDesC16ArrayFlat@@H@Z @ 24 NONAME ; class CDesC16ArrayFlat * CIRIsdsPreset::GetExactUrlForBitrateL(int)
- ?GetGenreId@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 25 NONAME ; class TDesC16 const & CIRIsdsPreset::GetGenreId(void) const
- ?GetGenreName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 26 NONAME ; class TDesC16 const & CIRIsdsPreset::GetGenreName(void) const
- ?GetId@CIRIsdsPreset@@QBEHXZ @ 27 NONAME ; int CIRIsdsPreset::GetId(void) const
- ?GetImgUrl@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 28 NONAME ; class TDesC16 const & CIRIsdsPreset::GetImgUrl(void) const
- ?GetIndex@CIRIsdsPreset@@QBEHXZ @ 29 NONAME ; int CIRIsdsPreset::GetIndex(void) const
- ?GetLangId@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 30 NONAME ; class TDesC16 const & CIRIsdsPreset::GetLangId(void) const
- ?GetLangName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 31 NONAME ; class TDesC16 const & CIRIsdsPreset::GetLangName(void) const
- ?GetLastModifiedTime@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 32 NONAME ; class TDesC16 const & CIRIsdsPreset::GetLastModifiedTime(void) const
- ?GetLogoData@CIRIsdsPreset@@QBEABVTDesC8@@XZ @ 33 NONAME ; class TDesC8 const & CIRIsdsPreset::GetLogoData(void) const
- ?GetMusicStoreStatus@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 34 NONAME ; class TDesC16 const & CIRIsdsPreset::GetMusicStoreStatus(void) const
- ?GetName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 35 NONAME ; class TDesC16 const & CIRIsdsPreset::GetName(void) const
- ?GetServerName@CIRChannelServerUrl@@QBEABVTDesC16@@XZ @ 36 NONAME ; class TDesC16 const & CIRChannelServerUrl::GetServerName(void) const
- ?GetServerUrl@CIRChannelServerUrl@@QBEABVTDesC16@@XZ @ 37 NONAME ; class TDesC16 const & CIRChannelServerUrl::GetServerUrl(void) const
- ?GetShortDescription@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 38 NONAME ; class TDesC16 const & CIRIsdsPreset::GetShortDescription(void) const
- ?GetSongName@CIRLastPlayedSongs@@QAEAAVTDesC16@@XZ @ 39 NONAME ; class TDesC16 & CIRLastPlayedSongs::GetSongName(void)
- ?GetUrl@CIRIsdsPreset@@QAEAAVCIRChannelServerUrl@@H@Z @ 40 NONAME ; class CIRChannelServerUrl & CIRIsdsPreset::GetUrl(int)
- ?GetUrlCount@CIRIsdsPreset@@QBEHXZ @ 41 NONAME ; int CIRIsdsPreset::GetUrlCount(void) const
- ?GetUrlForBitrateL@CIRIsdsPreset@@QAEPAVCDesC16ArrayFlat@@H@Z @ 42 NONAME ; class CDesC16ArrayFlat * CIRIsdsPreset::GetUrlForBitrateL(int)
- ?InternalizeL@CIRBrowseCatagoryItems@@QAEXAAVRReadStream@@@Z @ 43 NONAME ; void CIRBrowseCatagoryItems::InternalizeL(class RReadStream &)
- ?InternalizeL@CIRBrowseChannelItems@@QAEXAAVRReadStream@@@Z @ 44 NONAME ; void CIRBrowseChannelItems::InternalizeL(class RReadStream &)
- ?InternalizeL@CIRChannelServerUrl@@QAEXAAVRReadStream@@@Z @ 45 NONAME ; void CIRChannelServerUrl::InternalizeL(class RReadStream &)
- ?InternalizeL@CIRIsdsPreset@@QAEXAAVRReadStream@@@Z @ 46 NONAME ; void CIRIsdsPreset::InternalizeL(class RReadStream &)
- ?InternalizeL@CIRLastPlayedSongs@@QAEXAAVRReadStream@@@Z @ 47 NONAME ; void CIRLastPlayedSongs::InternalizeL(class RReadStream &)
- ?InternalizeL@CIROTAUpdate@@QAEXAAVRReadStream@@@Z @ 48 NONAME ; void CIROTAUpdate::InternalizeL(class RReadStream &)
- ?NewL@CIRAdvertisement@@SAPAV1@XZ @ 49 NONAME ; class CIRAdvertisement * CIRAdvertisement::NewL(void)
- ?NewL@CIRBrowseCatagoryItems@@SAPAV1@XZ @ 50 NONAME ; class CIRBrowseCatagoryItems * CIRBrowseCatagoryItems::NewL(void)
- ?NewL@CIRBrowseChannelItems@@SAPAV1@XZ @ 51 NONAME ; class CIRBrowseChannelItems * CIRBrowseChannelItems::NewL(void)
- ?NewL@CIRChannelServerUrl@@SAPAV1@XZ @ 52 NONAME ; class CIRChannelServerUrl * CIRChannelServerUrl::NewL(void)
- ?NewL@CIRIsdsPreset@@SAPAV1@XZ @ 53 NONAME ; class CIRIsdsPreset * CIRIsdsPreset::NewL(void)
- ?NewL@CIRLastPlayedSongs@@SAPAV1@XZ @ 54 NONAME ; class CIRLastPlayedSongs * CIRLastPlayedSongs::NewL(void)
- ?NewL@CIROTAUpdate@@SAPAV1@XZ @ 55 NONAME ; class CIROTAUpdate * CIROTAUpdate::NewL(void)
- ?NewLC@CIRAdvertisement@@SAPAV1@XZ @ 56 NONAME ; class CIRAdvertisement * CIRAdvertisement::NewLC(void)
- ?NewLC@CIRBrowseCatagoryItems@@SAPAV1@XZ @ 57 NONAME ; class CIRBrowseCatagoryItems * CIRBrowseCatagoryItems::NewLC(void)
- ?NewLC@CIRBrowseChannelItems@@SAPAV1@XZ @ 58 NONAME ; class CIRBrowseChannelItems * CIRBrowseChannelItems::NewLC(void)
- ?NewLC@CIRChannelServerUrl@@SAPAV1@XZ @ 59 NONAME ; class CIRChannelServerUrl * CIRChannelServerUrl::NewLC(void)
- ?NewLC@CIRIsdsPreset@@SAPAV1@XZ @ 60 NONAME ; class CIRIsdsPreset * CIRIsdsPreset::NewLC(void)
- ?NewLC@CIRLastPlayedSongs@@SAPAV1@XZ @ 61 NONAME ; class CIRLastPlayedSongs * CIRLastPlayedSongs::NewLC(void)
- ?NewLC@CIROTAUpdate@@SAPAV1@XZ @ 62 NONAME ; class CIROTAUpdate * CIROTAUpdate::NewLC(void)
- ?SetAdvInUse@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 63 NONAME ; void CIRAdvertisement::SetAdvInUse(class TDesC16 const &)
- ?SetAdvertisementInUse@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 64 NONAME ; void CIRIsdsPreset::SetAdvertisementInUse(class TDesC16 const &)
- ?SetAdvertisementUrl@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 65 NONAME ; void CIRIsdsPreset::SetAdvertisementUrl(class TDesC16 const &)
- ?SetArtistName@CIRLastPlayedSongs@@QAEXABVTDesC16@@@Z @ 66 NONAME ; void CIRLastPlayedSongs::SetArtistName(class TDesC16 const &)
- ?SetBannerUrl@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 67 NONAME ; void CIRBrowseCatagoryItems::SetBannerUrl(class TDesC16 const &)
- ?SetBannerUrl@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 68 NONAME ; void CIRBrowseChannelItems::SetBannerUrl(class TDesC16 const &)
- ?SetBitRate@CIRChannelServerUrl@@QAEXH@Z @ 69 NONAME ; void CIRChannelServerUrl::SetBitRate(int)
- ?SetBitrate@CIRBrowseChannelItems@@QAEXABVTDesC16@@00@Z @ 70 NONAME ; void CIRBrowseChannelItems::SetBitrate(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
- ?SetBitrate@CIRBrowseChannelItems@@QAEXABVTDesC16@@0@Z @ 71 NONAME ; void CIRBrowseChannelItems::SetBitrate(class TDesC16 const &, class TDesC16 const &)
- ?SetBitrate@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 72 NONAME ; void CIRBrowseChannelItems::SetBitrate(class TDesC16 const &)
- ?SetChannelType@CIRIsdsPreset@@QAEXH@Z @ 73 NONAME ; void CIRIsdsPreset::SetChannelType(int)
- ?SetClickThroughUrl@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 74 NONAME ; void CIRBrowseCatagoryItems::SetClickThroughUrl(class TDesC16 const &)
- ?SetClickThroughUrl@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 75 NONAME ; void CIRBrowseChannelItems::SetClickThroughUrl(class TDesC16 const &)
- ?SetCountryCode@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 76 NONAME ; void CIRIsdsPreset::SetCountryCode(class TDesC16 const &)
- ?SetCountryInfo@CIRIsdsPreset@@QAEXABVTDesC16@@0@Z @ 77 NONAME ; void CIRIsdsPreset::SetCountryInfo(class TDesC16 const &, class TDesC16 const &)
- ?SetCountryName@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 78 NONAME ; void CIRIsdsPreset::SetCountryName(class TDesC16 const &)
- ?SetDescription@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 79 NONAME ; void CIRIsdsPreset::SetDescription(class TDesC16 const &)
- ?SetGenreId@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 80 NONAME ; void CIRIsdsPreset::SetGenreId(class TDesC16 const &)
- ?SetGenreInfo@CIRIsdsPreset@@QAEXABVTDesC16@@0@Z @ 81 NONAME ; void CIRIsdsPreset::SetGenreInfo(class TDesC16 const &, class TDesC16 const &)
- ?SetGenreName@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 82 NONAME ; void CIRIsdsPreset::SetGenreName(class TDesC16 const &)
- ?SetGetOperation@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 83 NONAME ; void CIRBrowseCatagoryItems::SetGetOperation(class TDesC16 const &)
- ?SetGetOperationL@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 84 NONAME ; void CIRBrowseChannelItems::SetGetOperationL(class TDesC16 const &)
- ?SetId@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 85 NONAME ; void CIRIsdsPreset::SetId(class TDesC16 const &)
- ?SetId@CIRIsdsPreset@@QAEXH@Z @ 86 NONAME ; void CIRIsdsPreset::SetId(int)
- ?SetImageUrl@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 87 NONAME ; void CIRBrowseChannelItems::SetImageUrl(class TDesC16 const &)
- ?SetImgUrl@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 88 NONAME ; void CIRIsdsPreset::SetImgUrl(class TDesC16 const &)
- ?SetIndex@CIRIsdsPreset@@QAEXH@Z @ 89 NONAME ; void CIRIsdsPreset::SetIndex(int)
- ?SetLang@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 90 NONAME ; void CIRIsdsPreset::SetLang(class TDesC16 const &)
- ?SetLangCode@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 91 NONAME ; void CIRIsdsPreset::SetLangCode(class TDesC16 const &)
- ?SetLangInfo@CIRIsdsPreset@@QAEXABVTDesC16@@0@Z @ 92 NONAME ; void CIRIsdsPreset::SetLangInfo(class TDesC16 const &, class TDesC16 const &)
- ?SetLastModifiedTime@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 93 NONAME ; void CIRIsdsPreset::SetLastModifiedTime(class TDesC16 const &)
- ?SetLogoData@CIRIsdsPreset@@QAEXABVTDesC8@@@Z @ 94 NONAME ; void CIRIsdsPreset::SetLogoData(class TDesC8 const &)
- ?SetMusicStoreStatus@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 95 NONAME ; void CIRIsdsPreset::SetMusicStoreStatus(class TDesC16 const &)
- ?SetName@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 96 NONAME ; void CIRIsdsPreset::SetName(class TDesC16 const &)
- ?SetOTAUrl@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 97 NONAME ; void CIROTAUpdate::SetOTAUrl(class TDesC16 const &)
- ?SetServerName@CIRChannelServerUrl@@QAEXABVTDesC16@@@Z @ 98 NONAME ; void CIRChannelServerUrl::SetServerName(class TDesC16 const &)
- ?SetServerUrl@CIRChannelServerUrl@@QAEXABVTDesC16@@@Z @ 99 NONAME ; void CIRChannelServerUrl::SetServerUrl(class TDesC16 const &)
- ?SetShortDesc@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 100 NONAME ; void CIRIsdsPreset::SetShortDesc(class TDesC16 const &)
- ?SetSize@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 101 NONAME ; void CIRBrowseCatagoryItems::SetSize(class TDesC16 const &)
- ?SetSize@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 102 NONAME ; void CIRBrowseChannelItems::SetSize(class TDesC16 const &)
- ?SetSongName@CIRLastPlayedSongs@@QAEXABVTDesC16@@@Z @ 103 NONAME ; void CIRLastPlayedSongs::SetSongName(class TDesC16 const &)
- ?SetTextL@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@0@Z @ 104 NONAME ; void CIRBrowseCatagoryItems::SetTextL(class TDesC16 const &, class TDesC16 const &)
- ?SetTextL@CIRBrowseChannelItems@@QAEXABVTDesC16@@00@Z @ 105 NONAME ; void CIRBrowseChannelItems::SetTextL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
- ?SetURL@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 106 NONAME ; void CIRAdvertisement::SetURL(class TDesC16 const &)
- ?SetUniqId@CIRIsdsPreset@@QAEXK@Z @ 107 NONAME ; void CIRIsdsPreset::SetUniqId(unsigned long)
- ?SetUpdateInterval@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 108 NONAME ; void CIROTAUpdate::SetUpdateInterval(class TDesC16 const &)
- ?SetUpdateMethod@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 109 NONAME ; void CIROTAUpdate::SetUpdateMethod(class TDesC16 const &)
- ?SetUrlCount@CIRIsdsPreset@@QAEXH@Z @ 110 NONAME ; void CIRIsdsPreset::SetUrlCount(int)
- ?SetUrlCount@CIRIsdsPreset@@QAEXXZ @ 111 NONAME ; void CIRIsdsPreset::SetUrlCount(void)
- ?SetUrlL@CIRIsdsPreset@@QAEXABVTDesC16@@00@Z @ 112 NONAME ; void CIRIsdsPreset::SetUrlL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
- ?SetUrlL@CIRIsdsPreset@@QAEXABVTDesC16@@0H@Z @ 113 NONAME ; void CIRIsdsPreset::SetUrlL(class TDesC16 const &, class TDesC16 const &, int)
- ?SetUrlL@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 114 NONAME ; void CIRIsdsPreset::SetUrlL(class TDesC16 const &)
- ?SetUsage@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 115 NONAME ; void CIRAdvertisement::SetUsage(class TDesC16 const &)
- ?SetVersion@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 116 NONAME ; void CIROTAUpdate::SetVersion(class TDesC16 const &)
- ?SetVisibleTime@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 117 NONAME ; void CIRAdvertisement::SetVisibleTime(class TDesC16 const &)
- ?UniqId@CIRIsdsPreset@@QBEKXZ @ 118 NONAME ; unsigned long CIRIsdsPreset::UniqId(void) const
- _E32Dll=__E32Dll ; Entry point for emulation
+ ?NewLC@CIRBrowseChannelItems@@SAPAV1@XZ @ 1 NONAME ; class CIRBrowseChannelItems * CIRBrowseChannelItems::NewLC(void)
+ ?SetSize@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 2 NONAME ; void CIRBrowseChannelItems::SetSize(class TDesC16 const &)
+ ?GetUrl@CIRIsdsPreset@@QAEAAVCIRChannelServerUrl@@H@Z @ 3 NONAME ; class CIRChannelServerUrl & CIRIsdsPreset::GetUrl(int)
+ ?ExternalizeL@CIRLastPlayedSongs@@QAEXAAVRWriteStream@@@Z @ 4 NONAME ; void CIRLastPlayedSongs::ExternalizeL(class RWriteStream &)
+ ?GetShortDescription@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 5 NONAME ; class TDesC16 const & CIRIsdsPreset::GetShortDescription(void) const
+ ?GetLastModifiedTime@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 6 NONAME ; class TDesC16 const & CIRIsdsPreset::GetLastModifiedTime(void) const
+ ?GetLangId@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 7 NONAME ; class TDesC16 const & CIRIsdsPreset::GetLangId(void) const
+ ?SetLastModifiedTime@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 8 NONAME ; void CIRIsdsPreset::SetLastModifiedTime(class TDesC16 const &)
+ ?GetGenreName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 9 NONAME ; class TDesC16 const & CIRIsdsPreset::GetGenreName(void) const
+ ?GetGenreId@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 10 NONAME ; class TDesC16 const & CIRIsdsPreset::GetGenreId(void) const
+ ?SetLangCode@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 11 NONAME ; void CIRIsdsPreset::SetLangCode(class TDesC16 const &)
+ ?SetName@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 12 NONAME ; void CIRIsdsPreset::SetName(class TDesC16 const &)
+ ?SetUsage@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 13 NONAME ; void CIRAdvertisement::SetUsage(class TDesC16 const &)
+ ?SetImgUrl@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 14 NONAME ; void CIRIsdsPreset::SetImgUrl(class TDesC16 const &)
+ ?NewL@CIROTAUpdate@@SAPAV1@XZ @ 15 NONAME ; class CIROTAUpdate * CIROTAUpdate::NewL(void)
+ ?GetUrlForBitrateL@CIRIsdsPreset@@QAEPAVCDesC16ArrayFlat@@H@Z @ 16 NONAME ; class CDesC16ArrayFlat * CIRIsdsPreset::GetUrlForBitrateL(int)
+ ??4CIRIsdsPreset@@QAEAAV0@ABV0@@Z @ 17 NONAME ; class CIRIsdsPreset & CIRIsdsPreset::operator=(class CIRIsdsPreset const &)
+ ?SetImageUrl@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 18 NONAME ; void CIRBrowseChannelItems::SetImageUrl(class TDesC16 const &)
+ ?SetVisibleTime@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 19 NONAME ; void CIRAdvertisement::SetVisibleTime(class TDesC16 const &)
+ ?GetSongName@CIRLastPlayedSongs@@QAEAAVTDesC16@@XZ @ 20 NONAME ; class TDesC16 & CIRLastPlayedSongs::GetSongName(void)
+ ?GetCountryName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 21 NONAME ; class TDesC16 const & CIRIsdsPreset::GetCountryName(void) const
+ ?SetDescription@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 22 NONAME ; void CIRIsdsPreset::SetDescription(class TDesC16 const &)
+ ?SetChannelType@CIRIsdsPreset@@QAEXH@Z @ 23 NONAME ; void CIRIsdsPreset::SetChannelType(int)
+ ?ConstructL@CIRAdvertisement@@QBEXXZ @ 24 NONAME ; void CIRAdvertisement::ConstructL(void) const
+ ?InternalizeL@CIRChannelServerUrl@@QAEXAAVRReadStream@@@Z @ 25 NONAME ; void CIRChannelServerUrl::InternalizeL(class RReadStream &)
+ ?GetChannelType@CIRIsdsPreset@@QBEHXZ @ 26 NONAME ; int CIRIsdsPreset::GetChannelType(void) const
+ ?SetLangInfo@CIRIsdsPreset@@QAEXABVTDesC16@@0@Z @ 27 NONAME ; void CIRIsdsPreset::SetLangInfo(class TDesC16 const &, class TDesC16 const &)
+ ?SetShortDesc@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 28 NONAME ; void CIRIsdsPreset::SetShortDesc(class TDesC16 const &)
+ ?SetBitrate@CIRBrowseChannelItems@@QAEXABVTDesC16@@00@Z @ 29 NONAME ; void CIRBrowseChannelItems::SetBitrate(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
+ ?GetMusicStoreStatus@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 30 NONAME ; class TDesC16 const & CIRIsdsPreset::GetMusicStoreStatus(void) const
+ ?SetClickThroughUrl@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 31 NONAME ; void CIRBrowseCatagoryItems::SetClickThroughUrl(class TDesC16 const &)
+ ?NewLC@CIRLastPlayedSongs@@SAPAV1@XZ @ 32 NONAME ; class CIRLastPlayedSongs * CIRLastPlayedSongs::NewLC(void)
+ ?NewLC@CIRChannelServerUrl@@SAPAV1@XZ @ 33 NONAME ; class CIRChannelServerUrl * CIRChannelServerUrl::NewLC(void)
+ ?InternalizeL@CIRIsdsPreset@@QAEXAAVRReadStream@@@Z @ 34 NONAME ; void CIRIsdsPreset::InternalizeL(class RReadStream &)
+ ?SetUrlCount@CIRIsdsPreset@@QAEXXZ @ 35 NONAME ; void CIRIsdsPreset::SetUrlCount(void)
+ ?SetLogoData@CIRIsdsPreset@@QAEXABVTDesC8@@@Z @ 36 NONAME ; void CIRIsdsPreset::SetLogoData(class TDesC8 const &)
+ ?SetGenreInfo@CIRIsdsPreset@@QAEXABVTDesC16@@0@Z @ 37 NONAME ; void CIRIsdsPreset::SetGenreInfo(class TDesC16 const &, class TDesC16 const &)
+ ?SetBitrate@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 38 NONAME ; void CIRBrowseChannelItems::SetBitrate(class TDesC16 const &)
+ ?NewL@CIRAdvertisement@@SAPAV1@XZ @ 39 NONAME ; class CIRAdvertisement * CIRAdvertisement::NewL(void)
+ ?SetAdvertisementInUse@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 40 NONAME ; void CIRIsdsPreset::SetAdvertisementInUse(class TDesC16 const &)
+ ?NewL@CIRChannelServerUrl@@SAPAV1@XZ @ 41 NONAME ; class CIRChannelServerUrl * CIRChannelServerUrl::NewL(void)
+ ?GetUrlCount@CIRIsdsPreset@@QBEHXZ @ 42 NONAME ; int CIRIsdsPreset::GetUrlCount(void) const
+ ?NewL@CIRLastPlayedSongs@@SAPAV1@XZ @ 43 NONAME ; class CIRLastPlayedSongs * CIRLastPlayedSongs::NewL(void)
+ ?NewL@CIRIsdsPreset@@SAPAV1@XZ @ 44 NONAME ; class CIRIsdsPreset * CIRIsdsPreset::NewL(void)
+ ?SetCountryCode@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 45 NONAME ; void CIRIsdsPreset::SetCountryCode(class TDesC16 const &)
+ ?SetClickThroughUrl@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 46 NONAME ; void CIRBrowseChannelItems::SetClickThroughUrl(class TDesC16 const &)
+ ?GetDescription@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 47 NONAME ; class TDesC16 const & CIRIsdsPreset::GetDescription(void) const
+ ?SetSize@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 48 NONAME ; void CIRBrowseCatagoryItems::SetSize(class TDesC16 const &)
+ ?ExternalizeL@CIRChannelServerUrl@@QAEXAAVRWriteStream@@@Z @ 49 NONAME ; void CIRChannelServerUrl::ExternalizeL(class RWriteStream &)
+ ?SetServerUrl@CIRChannelServerUrl@@QAEXABVTDesC16@@@Z @ 50 NONAME ; void CIRChannelServerUrl::SetServerUrl(class TDesC16 const &)
+ ?SetGetOperationL@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 51 NONAME ; void CIRBrowseChannelItems::SetGetOperationL(class TDesC16 const &)
+ ?NewLC@CIRIsdsPreset@@SAPAV1@XZ @ 52 NONAME ; class CIRIsdsPreset * CIRIsdsPreset::NewLC(void)
+ ?InternalizeL@CIROTAUpdate@@QAEXAAVRReadStream@@@Z @ 53 NONAME ; void CIROTAUpdate::InternalizeL(class RReadStream &)
+ ?GetCountryId@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 54 NONAME ; class TDesC16 const & CIRIsdsPreset::GetCountryId(void) const
+ ?GetImgUrl@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 55 NONAME ; class TDesC16 const & CIRIsdsPreset::GetImgUrl(void) const
+ ?SetUrlL@CIRIsdsPreset@@QAEXABVTDesC16@@0H@Z @ 56 NONAME ; void CIRIsdsPreset::SetUrlL(class TDesC16 const &, class TDesC16 const &, int)
+ ?SetAdvertisementUrl@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 57 NONAME ; void CIRIsdsPreset::SetAdvertisementUrl(class TDesC16 const &)
+ ?GetServerUrl@CIRChannelServerUrl@@QBEABVTDesC16@@XZ @ 58 NONAME ; class TDesC16 const & CIRChannelServerUrl::GetServerUrl(void) const
+ ?SetCountryInfo@CIRIsdsPreset@@QAEXABVTDesC16@@0@Z @ 59 NONAME ; void CIRIsdsPreset::SetCountryInfo(class TDesC16 const &, class TDesC16 const &)
+ ?NewLC@CIRAdvertisement@@SAPAV1@XZ @ 60 NONAME ; class CIRAdvertisement * CIRAdvertisement::NewLC(void)
+ ?NewLC@CIRBrowseCatagoryItems@@SAPAV1@XZ @ 61 NONAME ; class CIRBrowseCatagoryItems * CIRBrowseCatagoryItems::NewLC(void)
+ ?SetGetOperation@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 62 NONAME ; void CIRBrowseCatagoryItems::SetGetOperation(class TDesC16 const &)
+ ?ExternalizeL@CIROTAUpdate@@QBEXAAVRWriteStream@@@Z @ 63 NONAME ; void CIROTAUpdate::ExternalizeL(class RWriteStream &) const
+ ?GetName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 64 NONAME ; class TDesC16 const & CIRIsdsPreset::GetName(void) const
+ ?GetServerName@CIRChannelServerUrl@@QBEABVTDesC16@@XZ @ 65 NONAME ; class TDesC16 const & CIRChannelServerUrl::GetServerName(void) const
+ ?SetTextL@CIRBrowseChannelItems@@QAEXABVTDesC16@@00@Z @ 66 NONAME ; void CIRBrowseChannelItems::SetTextL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
+ ?SetGenreName@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 67 NONAME ; void CIRIsdsPreset::SetGenreName(class TDesC16 const &)
+ ?GetChannelBitrateL@CIRIsdsPreset@@QAEHH@Z @ 68 NONAME ; int CIRIsdsPreset::GetChannelBitrateL(int)
+ ?GetId@CIRIsdsPreset@@QBEHXZ @ 69 NONAME ; int CIRIsdsPreset::GetId(void) const
+ ?GetLangName@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 70 NONAME ; class TDesC16 const & CIRIsdsPreset::GetLangName(void) const
+ ?SetOTAUrl@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 71 NONAME ; void CIROTAUpdate::SetOTAUrl(class TDesC16 const &)
+ ?GetArtistName@CIRLastPlayedSongs@@QAEAAVTDesC16@@XZ @ 72 NONAME ; class TDesC16 & CIRLastPlayedSongs::GetArtistName(void)
+ ?SetId@CIRIsdsPreset@@QAEXH@Z @ 73 NONAME ; void CIRIsdsPreset::SetId(int)
+ ?SetUrlCount@CIRIsdsPreset@@QAEXH@Z @ 74 NONAME ; void CIRIsdsPreset::SetUrlCount(int)
+ ?ConstructL@CIROTAUpdate@@QAEXXZ @ 75 NONAME ; void CIROTAUpdate::ConstructL(void)
+ ?InternalizeL@CIRBrowseCatagoryItems@@QAEXAAVRReadStream@@@Z @ 76 NONAME ; void CIRBrowseCatagoryItems::InternalizeL(class RReadStream &)
+ ?SetURL@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 77 NONAME ; void CIRAdvertisement::SetURL(class TDesC16 const &)
+ ?ExternalizeL@CIRBrowseChannelItems@@QBEXAAVRWriteStream@@@Z @ 78 NONAME ; void CIRBrowseChannelItems::ExternalizeL(class RWriteStream &) const
+ ?GetBitRate@CIRChannelServerUrl@@QBEHXZ @ 79 NONAME ; int CIRChannelServerUrl::GetBitRate(void) const
+ ?NewLC@CIROTAUpdate@@SAPAV1@XZ @ 80 NONAME ; class CIROTAUpdate * CIROTAUpdate::NewLC(void)
+ ?SetUpdateInterval@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 81 NONAME ; void CIROTAUpdate::SetUpdateInterval(class TDesC16 const &)
+ ?ExternalizeL@CIRBrowseCatagoryItems@@QBEXAAVRWriteStream@@@Z @ 82 NONAME ; void CIRBrowseCatagoryItems::ExternalizeL(class RWriteStream &) const
+ ?GetAvailableBitrates@CIRIsdsPreset@@QBEHAAV?$RArray@H@@@Z @ 83 NONAME ; int CIRIsdsPreset::GetAvailableBitrates(class RArray<int> &) const
+ ?SetGenreId@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 84 NONAME ; void CIRIsdsPreset::SetGenreId(class TDesC16 const &)
+ ?ExternalizeL@CIRIsdsPreset@@QAEXAAVRWriteStream@@@Z @ 85 NONAME ; void CIRIsdsPreset::ExternalizeL(class RWriteStream &)
+ ?GetChannelUrlAtL@CIRIsdsPreset@@QBEABVTDesC16@@H@Z @ 86 NONAME ; class TDesC16 const & CIRIsdsPreset::GetChannelUrlAtL(int) const
+ ?GetExactUrlForBitrateL@CIRIsdsPreset@@QAEPAVCDesC16ArrayFlat@@H@Z @ 87 NONAME ; class CDesC16ArrayFlat * CIRIsdsPreset::GetExactUrlForBitrateL(int)
+ ?SetBitrate@CIRBrowseChannelItems@@QAEXABVTDesC16@@0@Z @ 88 NONAME ; void CIRBrowseChannelItems::SetBitrate(class TDesC16 const &, class TDesC16 const &)
+ ?SetSongName@CIRLastPlayedSongs@@QAEXABVTDesC16@@@Z @ 89 NONAME ; void CIRLastPlayedSongs::SetSongName(class TDesC16 const &)
+ ?NewL@CIRBrowseChannelItems@@SAPAV1@XZ @ 90 NONAME ; class CIRBrowseChannelItems * CIRBrowseChannelItems::NewL(void)
+ ?SetTextL@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@0@Z @ 91 NONAME ; void CIRBrowseCatagoryItems::SetTextL(class TDesC16 const &, class TDesC16 const &)
+ ?SetId@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 92 NONAME ; void CIRIsdsPreset::SetId(class TDesC16 const &)
+ ?SetArtistName@CIRLastPlayedSongs@@QAEXABVTDesC16@@@Z @ 93 NONAME ; void CIRLastPlayedSongs::SetArtistName(class TDesC16 const &)
+ ?InternalizeL@CIRBrowseChannelItems@@QAEXAAVRReadStream@@@Z @ 94 NONAME ; void CIRBrowseChannelItems::InternalizeL(class RReadStream &)
+ ?SetUpdateMethod@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 95 NONAME ; void CIROTAUpdate::SetUpdateMethod(class TDesC16 const &)
+ ?SetLang@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 96 NONAME ; void CIRIsdsPreset::SetLang(class TDesC16 const &)
+ ?GetAdvertisementUrl@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 97 NONAME ; class TDesC16 const & CIRIsdsPreset::GetAdvertisementUrl(void) const
+ ??4CIRChannelServerUrl@@QAEAAV0@ABV0@@Z @ 98 NONAME ; class CIRChannelServerUrl & CIRChannelServerUrl::operator=(class CIRChannelServerUrl const &)
+ ??4CIRLastPlayedSongs@@QAEAAV0@ABV0@@Z @ 99 NONAME ; class CIRLastPlayedSongs & CIRLastPlayedSongs::operator=(class CIRLastPlayedSongs const &)
+ ?SetUrlL@CIRIsdsPreset@@QAEXABVTDesC16@@00@Z @ 100 NONAME ; void CIRIsdsPreset::SetUrlL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
+ ?SetBannerUrl@CIRBrowseChannelItems@@QAEXABVTDesC16@@@Z @ 101 NONAME ; void CIRBrowseChannelItems::SetBannerUrl(class TDesC16 const &)
+ ?SetCountryName@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 102 NONAME ; void CIRIsdsPreset::SetCountryName(class TDesC16 const &)
+ ?SetBannerUrl@CIRBrowseCatagoryItems@@QAEXABVTDesC16@@@Z @ 103 NONAME ; void CIRBrowseCatagoryItems::SetBannerUrl(class TDesC16 const &)
+ ?SetServerName@CIRChannelServerUrl@@QAEXABVTDesC16@@@Z @ 104 NONAME ; void CIRChannelServerUrl::SetServerName(class TDesC16 const &)
+ ?SetBitRate@CIRChannelServerUrl@@QAEXH@Z @ 105 NONAME ; void CIRChannelServerUrl::SetBitRate(int)
+ ?SetMusicStoreStatus@CIRIsdsPreset@@QAEXABVTDesC16@@@Z @ 106 NONAME ; void CIRIsdsPreset::SetMusicStoreStatus(class TDesC16 const &)
+ ?GetAdvertisementInUse@CIRIsdsPreset@@QBEABVTDesC16@@XZ @ 107 NONAME ; class TDesC16 const & CIRIsdsPreset::GetAdvertisementInUse(void) const
+ ?SetAdvInUse@CIRAdvertisement@@QAEXABVTDesC16@@@Z @ 108 NONAME ; void CIRAdvertisement::SetAdvInUse(class TDesC16 const &)
+ ?InternalizeL@CIRLastPlayedSongs@@QAEXAAVRReadStream@@@Z @ 109 NONAME ; void CIRLastPlayedSongs::InternalizeL(class RReadStream &)
+ ?SetVersion@CIROTAUpdate@@QAEXABVTDesC16@@@Z @ 110 NONAME ; void CIROTAUpdate::SetVersion(class TDesC16 const &)
+ ?NewL@CIRBrowseCatagoryItems@@SAPAV1@XZ @ 111 NONAME ; class CIRBrowseCatagoryItems * CIRBrowseCatagoryItems::NewL(void)
+ ?GetLogoData@CIRIsdsPreset@@QBEABVTDesC8@@XZ @ 112 NONAME ; class TDesC8 const & CIRIsdsPreset::GetLogoData(void) const
--- a/internetradio2.0/bwinscw/irfavoritesdbu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/bwinscw/irfavoritesdbu.def Thu Jul 22 16:31:41 2010 +0100
@@ -23,5 +23,4 @@
?SwapPresetsInDbL@CIRFavoritesDb@@QAEXHHHH@Z @ 22 NONAME ; void CIRFavoritesDb::SwapPresetsInDbL(int, int, int, int)
?GetAllSortedPresets@CIRFavoritesDb@@QAEABV?$RPointerArray@VCIRPreset@@@@XZ @ 23 NONAME ; class RPointerArray<class CIRPreset> const & CIRFavoritesDb::GetAllSortedPresets(void)
?IncreasePlayedTimesL@CIRFavoritesDb@@QAEHABVCIRIsdsPreset@@@Z @ 24 NONAME ; int CIRFavoritesDb::IncreasePlayedTimesL(class CIRIsdsPreset const &)
- _E32Dll=__E32Dll ; Entry point for emulation
-
+ ?RenamePresetL@CIRFavoritesDb@@QAEHABVCIRIsdsPreset@@ABVTDesC16@@@Z @ 25 NONAME ; int CIRFavoritesDb::RenamePresetL(class CIRIsdsPreset const &, class TDesC16 const &)
--- a/internetradio2.0/bwinscw/irnetworkcontrolleru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/bwinscw/irnetworkcontrolleru.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,29 +1,25 @@
EXPORTS
- ?CancelConnecting@CIRNetworkController@@QAEXXZ @ 1 NONAME ; void CIRNetworkController::CancelConnecting(void)
- ?ChooseAccessPointL@CIRNetworkController@@QAEXH@Z @ 2 NONAME ; void CIRNetworkController::ChooseAccessPointL(int)
- ?Close@CIRNetworkController@@QAEXXZ @ 3 NONAME ; void CIRNetworkController::Close(void)
- ?DataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 4 NONAME ; class MIRDataTransferTracker & CIRNetworkController::DataTransferTracker(void)
- ?DeleteActiveNetworkObserver@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 5 NONAME ; void CIRNetworkController::DeleteActiveNetworkObserver(class MIRActiveNetworkObserver &)
- ?GetAccessPointList@CIRNetworkController@@QBEPBVCDesC16Array@@XZ @ 6 NONAME ; class CDesC16Array const * CIRNetworkController::GetAccessPointList(void) const
- ?GetApList@CIRNetworkController@@QBE?BV?$RArray@K@@XZ @ 7 NONAME ; class RArray<unsigned long> const CIRNetworkController::GetApList(void) const
- ?GetBearerList@CIRNetworkController@@QBE?BV?$RArray@K@@XZ @ 8 NONAME ; class RArray<unsigned long> const CIRNetworkController::GetBearerList(void) const
- ?GetIAPId@CIRNetworkController@@QBEHAAK@Z @ 9 NONAME ; int CIRNetworkController::GetIAPId(unsigned long &) const
- ?GetIRConnection@CIRNetworkController@@QAEAAVRConnection@@XZ @ 10 NONAME ; class RConnection & CIRNetworkController::GetIRConnection(void)
- ?GetIRSocketServer@CIRNetworkController@@QAEAAVRSocketServ@@XZ @ 11 NONAME ; class RSocketServ & CIRNetworkController::GetIRSocketServer(void)
- ?GetNetworkList@CIRNetworkController@@QBE?BV?$RArray@K@@XZ @ 12 NONAME ; class RArray<unsigned long> const CIRNetworkController::GetNetworkList(void) const
- ?GetNetworkStatus@CIRNetworkController@@QBEHXZ @ 13 NONAME ; int CIRNetworkController::GetNetworkStatus(void) const
- ?GetUAProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 14 NONAME ; class HBufC8 * CIRNetworkController::GetUAProfString(void)
- ?GetWapProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 15 NONAME ; class HBufC8 * CIRNetworkController::GetWapProfString(void)
- ?IdentifyConnectionType@CIRNetworkController@@QBE?AW4TIRConnectionType@@XZ @ 16 NONAME ; enum TIRConnectionType CIRNetworkController::IdentifyConnectionType(void) const
- ?InitializeHttpSessionL@CIRNetworkController@@QAEXABVRHTTPSession@@W4TIRTransferCategory@MIRDataTransferTracker@@@Z @ 17 NONAME ; void CIRNetworkController::InitializeHttpSessionL(class RHTTPSession const &, enum MIRDataTransferTracker::TIRTransferCategory)
- ?IsHandingOverConnection@CIRNetworkController@@QAEHXZ @ 18 NONAME ; int CIRNetworkController::IsHandingOverConnection(void)
- ?IsOfflineMode@CIRNetworkController@@QAEHXZ @ 19 NONAME ; int CIRNetworkController::IsOfflineMode(void)
+ ?GetUAProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 1 NONAME ; class HBufC8 * CIRNetworkController::GetUAProfString(void)
+ ?GetWapProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 2 NONAME ; class HBufC8 * CIRNetworkController::GetWapProfString(void)
+ ?IsOfflineMode@CIRNetworkController@@QAEHXZ @ 3 NONAME ; int CIRNetworkController::IsOfflineMode(void)
+ ?GetIRSocketServer@CIRNetworkController@@QAEAAVRSocketServ@@XZ @ 4 NONAME ; class RSocketServ & CIRNetworkController::GetIRSocketServer(void)
+ ?IsHandingOverConnection@CIRNetworkController@@QAEHXZ @ 5 NONAME ; int CIRNetworkController::IsHandingOverConnection(void)
+ ?GetIAPId@CIRNetworkController@@QBEHAAK@Z @ 6 NONAME ; int CIRNetworkController::GetIAPId(unsigned long &) const
+ ?RegisterActiveNetworkObserverL@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 7 NONAME ; void CIRNetworkController::RegisterActiveNetworkObserverL(class MIRActiveNetworkObserver &)
+ ?IdentifyConnectionType@CIRNetworkController@@QBE?AW4TIRConnectionType@@XZ @ 8 NONAME ; enum TIRConnectionType CIRNetworkController::IdentifyConnectionType(void) const
+ ?GetNetworkStatus@CIRNetworkController@@QBEHXZ @ 9 NONAME ; int CIRNetworkController::GetNetworkStatus(void) const
+ ?ResetConnectionStatus@CIRNetworkController@@QAEXXZ @ 10 NONAME ; void CIRNetworkController::ResetConnectionStatus(void)
+ ?DeleteActiveNetworkObserver@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 11 NONAME ; void CIRNetworkController::DeleteActiveNetworkObserver(class MIRActiveNetworkObserver &)
+ ?GetIRConnection@CIRNetworkController@@QAEAAVRConnection@@XZ @ 12 NONAME ; class RConnection & CIRNetworkController::GetIRConnection(void)
+ ?OpenL@CIRNetworkController@@SAPAV1@PAVMIRNetworkController@@@Z @ 13 NONAME ; class CIRNetworkController * CIRNetworkController::OpenL(class MIRNetworkController *)
+ ?NewL@CIRNetworkObserver@@SAPAV1@PAVCIRNetworkController@@@Z @ 14 NONAME ; class CIRNetworkObserver * CIRNetworkObserver::NewL(class CIRNetworkController *)
+ ?CancelConnecting@CIRNetworkController@@QAEXXZ @ 15 NONAME ; void CIRNetworkController::CancelConnecting(void)
+ ?ChooseAccessPointL@CIRNetworkController@@QAEXH@Z @ 16 NONAME ; void CIRNetworkController::ChooseAccessPointL(int)
+ ?DataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 17 NONAME ; class MIRDataTransferTracker & CIRNetworkController::DataTransferTracker(void)
+ ?NotifyActiveNetworkObserversL@CIRNetworkController@@QAEXW4TIRNetworkEvent@@@Z @ 18 NONAME ; void CIRNetworkController::NotifyActiveNetworkObserversL(enum TIRNetworkEvent)
+ ?InitializeHttpSessionL@CIRNetworkController@@QAEXABVRHTTPSession@@W4TIRTransferCategory@MIRDataTransferTracker@@@Z @ 19 NONAME ; void CIRNetworkController::InitializeHttpSessionL(class RHTTPSession const &, enum MIRDataTransferTracker::TIRTransferCategory)
?IsWlanSupported@CIRNetworkController@@QBEHXZ @ 20 NONAME ; int CIRNetworkController::IsWlanSupported(void) const
- ?LogoDataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 21 NONAME ; class MIRDataTransferTracker & CIRNetworkController::LogoDataTransferTracker(void)
- ?NewL@CIRNetworkObserver@@SAPAV1@PAVCIRNetworkController@@@Z @ 22 NONAME ; class CIRNetworkObserver * CIRNetworkObserver::NewL(class CIRNetworkController *)
- ?NotifyActiveNetworkObserversL@CIRNetworkController@@QAEXW4TIRNetworkEvent@@@Z @ 23 NONAME ; void CIRNetworkController::NotifyActiveNetworkObserversL(enum TIRNetworkEvent)
- ?OpenL@CIRNetworkController@@SAPAV1@PAVMIRNetworkController@@@Z @ 24 NONAME ; class CIRNetworkController * CIRNetworkController::OpenL(class MIRNetworkController *)
- ?RegisterActiveNetworkObserverL@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 25 NONAME ; void CIRNetworkController::RegisterActiveNetworkObserverL(class MIRActiveNetworkObserver &)
- ?RegisterLogoDataTransferTrackerL@CIRNetworkController@@QAEXAAVRHTTPSession@@@Z @ 26 NONAME ; void CIRNetworkController::RegisterLogoDataTransferTrackerL(class RHTTPSession &)
- ?ResetConnectionStatus@CIRNetworkController@@QAEXXZ @ 27 NONAME ; void CIRNetworkController::ResetConnectionStatus(void)
+ ?Close@CIRNetworkController@@QAEXXZ @ 21 NONAME ; void CIRNetworkController::Close(void)
+ ?RegisterLogoDataTransferTrackerL@CIRNetworkController@@QAEXAAVRHTTPSession@@@Z @ 22 NONAME ; void CIRNetworkController::RegisterLogoDataTransferTrackerL(class RHTTPSession &)
+ ?LogoDataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 23 NONAME ; class MIRDataTransferTracker & CIRNetworkController::LogoDataTransferTracker(void)
--- a/internetradio2.0/cachemgmtsrc/ircachemgmt.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/cachemgmtsrc/ircachemgmt.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -450,15 +450,16 @@
{
iPtrCategory->ResetAndDestroy();
}
+ else
+ {
+ break;
+ }
for(TInt iter=0;iter<aCountItems;iter++)
{
ptr=CIRBrowseCatagoryItems::NewL();
CleanupStack::PushL(ptr);
instream>>*ptr;
- if (iPtrCategory)
- {
- iPtrCategory->AppendL(ptr);
- }
+ iPtrCategory->AppendL(ptr);
CleanupStack::Pop(ptr);
}
CleanupStack::PopAndDestroy( &instream );
--- a/internetradio2.0/dataproviderinc/irdataprovider.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/dataproviderinc/irdataprovider.h Thu Jul 22 16:31:41 2010 +0100
@@ -222,6 +222,13 @@
*/
void SetOffsetSeconds( const TTime& aTime );
+ /**
+ * CIRDataProvider::UnzipFileL()
+ * Unzip the gz file to xml file
+ * @param aOutputFile out put file
+ */
+ void UnzipFileL( const TDesC& aOutputFile );
+
private:
/**
@@ -248,6 +255,11 @@
*/
RFile iFile;
+ /**
+ * Name of the Xml Gz file to be created
+ */
+ TFileName iXmlGzFilePath;
+
/**
* Name of the Xml file to be created
*/
--- a/internetradio2.0/dataproviderinc/irdataproviderconstants.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/dataproviderinc/irdataproviderconstants.h Thu Jul 22 16:31:41 2010 +0100
@@ -34,6 +34,8 @@
_LIT8( KAcceptCharset, "iso-8859-1, utf-8, iso-10646-ucs-2; q=0.6" );
// Used to specify the Accept Language
_LIT8( KAcceptLanguage, "en" );
+// Used to specify the Accept encoding
+_LIT8( KAcceptEncoding, "gzip" );
// Some texts for header output
_LIT( KDPColon, ": " );
// Default Content-Type
--- a/internetradio2.0/dataprovidersrc/irdataprovider.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/dataprovidersrc/irdataprovider.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -15,6 +15,9 @@
*
*/
+#include <ezgzip.h>
+#include <bautils.h>
+#include <f32file.h>
#include "irdataprovider.h"
#include "irdataproviderobserver.h"
@@ -23,6 +26,9 @@
#include "irhttprequestdata.h"
#include "irsettings.h"
+_LIT( KGzXmlFile, "iSdsResponse.xml.gz" );
+_LIT( KXmlFile, "iSdsResponse.xml" );
+
// ---------------------------------------------------------------------------
// CIRDataProvider::NewL(MIRDataProviderObserver& aObserver)
// Creates instance of CIRDataProvider.
@@ -110,7 +116,7 @@
// Create or replace the file used to store xml response from iSDS
- User::LeaveIfError(iFile.Replace( iFsSession, iXmlFilePath, EFileWrite ));
+ User::LeaveIfError(iFile.Replace( iFsSession, iXmlGzFilePath, EFileWrite ));
iHttpDataProvider->CancelTransaction();
TInt err = iHttpDataProvider->IssueHttpRequestL( aRequestObject );
@@ -179,6 +185,10 @@
iFile.Close();
iDataProviderTimer->Cancel();
+ // unzip the gz file
+ TRAP_IGNORE( UnzipFileL( iXmlFilePath ) );
+ // delete the original gz file
+ BaflUtils::DeleteFile( iFsSession, iXmlGzFilePath );
// Need to take a member to a local variable, as the IRHttpDataReceived may initiate
// an IRHttpIssueRequestL() call, causing the headers to be replaced with empty ones, and
// causing crashes.
@@ -341,8 +351,7 @@
void CIRDataProvider::ConstructL() // second-phase constructor
{
IRLOG_DEBUG( "CIRDataProvider::ConstructL - Entering" );
- _LIT( KXmlFile, "iSdsResponse.xml" );
- ConstructL(KXmlFile);
+ ConstructL( KGzXmlFile );
iHttpDataProvider->iSetNonUAProfUserAgent = EFalse;
IRLOG_DEBUG( "CIRDataProvider::ConstructL - Exiting" );
}
@@ -359,8 +368,10 @@
iDataProviderTimer = CIRDataProviderTimer::NewL( EPriorityHigh, *this );
User::LeaveIfError(iFsSession.Connect());
iIRSettings = CIRSettings::OpenL();
- iXmlFilePath = iIRSettings->PrivatePath();
- iXmlFilePath.Append( aFileName );
+ iXmlGzFilePath = iIRSettings->PrivatePath();
+ iXmlFilePath = iXmlGzFilePath;
+ iXmlGzFilePath.Append( aFileName );
+ iXmlFilePath.Append( KXmlFile );
iTimeOut = iIRSettings->GetTimeOut();
iHttpDataProvider->iSetNonUAProfUserAgent = ETrue;
IRLOG_DEBUG( "CIRDataProvider::ConstructL(const TDesC &aFileName) - Exiting." );
@@ -430,4 +441,25 @@
IRLOG_DEBUG( "CIRDataProvider::SetOffsetSeconds - Exiting." );
}
+// ---------------------------------------------------------------------------
+// CIRDataProvider::UnzipFileL
+// ---------------------------------------------------------------------------
+//
+void CIRDataProvider::UnzipFileL( const TDesC& aOutputFile )
+ {
+ IRLOG_DEBUG( "CIRDataProvider::UnzipFileL - Enter." );
+ RFile outputFile;
+ CleanupClosePushL( outputFile );
+ User::LeaveIfError( outputFile.Replace( iFsSession, aOutputFile,
+ EFileStream | EFileWrite | EFileShareExclusive ) );
+ CEZGZipToFile* gZip =
+ CEZGZipToFile::NewLC( iFsSession, iXmlGzFilePath, outputFile );
+ while ( gZip->InflateL() )
+ {
+ // unzip the gz file, quit when finish
+ }
+ CleanupStack::PopAndDestroy( gZip );
+ CleanupStack::PopAndDestroy( &outputFile );
+ IRLOG_DEBUG( "CIRDataProvider::UnzipFileL - Exit." );
+ }
--- a/internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -667,6 +667,12 @@
IRLOG_DEBUG2( "CIRHttpDataProvider::BuildHeadersL - HTTP::EAcceptLanguage = %S", &logstr );
}
+ // Add Accept-Encoding: gzip HTTP request header. The server will use compression to improve data
+ // transfer speed.
+ SetHeaderL( header, HTTP::EAcceptEncoding, KAcceptEncoding );
+ logstr.Copy(KAcceptEncoding);
+ IRLOG_DEBUG2( "CIRHttpDataProvider::BuildHeadersL - HTTP::EAcceptEncoding = %S", &logstr );
+
// Set the If-Modified-Since header if required
if ( aRequestInfo.isIfModifiedSet )
{
@@ -740,12 +746,16 @@
TInt pfCount = pf.Count();
for(ii=0;ii<pf.Count();ii++)
{
- TBuf<KSize> z;
- TBuf<KSize> z1;
+ RBuf z;
+ RBuf z1;
TBool first;
//file extensions
const CDesC8Array &fe=pf[ii]->SupportedFileExtensions();
first=TRUE;
+ z.CreateL(KSize);
+ z.CleanupClosePushL();
+ z1.CreateL(KSize);
+ z1.CleanupClosePushL();
z1.Zero();
for(j=0;j<fe.Count();j++)
{
@@ -787,7 +797,7 @@
tempD++;
}
};
-
+ CleanupStack::PopAndDestroy(2);
};// for play formats
}
--- a/internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -22,7 +22,6 @@
#include "irnetworkcontroller.h"
#include "ircachemgmt.h"
#include "irhttprequestdata.h"
-#include "irpreset.h"
#include "irdebug.h"
#include "irdataproviderconstants.h"
#include "iractivenetworkobserver.h"
--- a/internetradio2.0/datastructuresinc/irisdspreset.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/datastructuresinc/irisdspreset.h Thu Jul 22 16:31:41 2010 +0100
@@ -73,16 +73,13 @@
*/
~CIRIsdsPreset();
-
- /**
- *CIRIsdsPreset::CIRIsdsPreset()
- *standard C++ constructor
- */
- IMPORT_C CIRIsdsPreset();
-
-
protected:
-
+ /**
+ *CIRIsdsPreset::CIRIsdsPreset()
+ *standard C++ constructor
+ */
+ CIRIsdsPreset();
+
/**
*CIRIsdsPreset::ConstructL()
*standard second phase constructor(Leaveable)
@@ -243,13 +240,6 @@
IMPORT_C void SetUrlCount(TInt aCnt);
/**
- *CIRIsdsPreset::SetIndex()
- *sets the index for the preset.used only for presets in the fav list
- *@param aInt
- */
- IMPORT_C void SetIndex(TInt aInt);
-
- /**
*CIRIsdsPreset::SetUrlL()
*sets the channel server url
*@param aServerName ,server name
@@ -273,13 +263,6 @@
*@param aChannelType userdefined,isds,adhoc
*/
IMPORT_C void SetChannelType(TInt aChannelType);
-
- /**
- *CIRIsdsPreset::SetUrlL()
- *sets the url for a channel server
- *@param aUrl
- */
- IMPORT_C void SetUrlL(const TDesC &aUrl);
/**
@@ -380,13 +363,6 @@
IMPORT_C TInt GetChannelType() const;
/**
- *CIRIsdsPreset::GetIndex()
- *gets the channel index
- *@return TInt
- */
- IMPORT_C TInt GetIndex() const;
-
- /**
*CIRIsdsPreset::GetGenreId()
*gets the channel genreid
*@return TDesC
@@ -433,20 +409,6 @@
*/
IMPORT_C const TDesC8& GetLogoData() const;
- /*
- *CIRIsdsPreset::GetLogoSize()
- *gets the Logo Size
- *@return TSize&
- */
- IMPORT_C const TSize& GetLogoSize() const;
-
- /**
- *CIRIsdsPreset::SGetUrl()
- *gets the channel url from zeroth position
- *@return TInt
- */
- IMPORT_C TInt GetUrl() const;
-
/**
*CIRIsdsPreset::GetMusicStoreStatus()
*gets the musicStoreEnabled
@@ -494,20 +456,6 @@
*/
IMPORT_C CDesCArrayFlat* GetExactUrlForBitrateL(TInt aBitrate);
- /**
- *CIRIsdsPreset::UniqId()
- *gets the unique id
- *@return TUint32
- */
- IMPORT_C TUint32 UniqId() const;
-
- /**
- *CIRIsdsPreset::SetUniqId()
- *sets the unique id for the preset
- *@param aId
- */
- IMPORT_C void SetUniqId( TUint32 aId);
-
/**
*CIRIsdsPreset::GetChannelUrlAtL()
*sets the lastmodified time stamp
@@ -547,14 +495,10 @@
};
private:
- //unique id generated for the preset saved at favourite
- TUint32 iUniqId;
//no of channel urls
TInt iChannelUrlCount;
//0 for user defined 1 for isds type.
TInt iType;
- //index in the preset table
- TInt iIndex;
//isds generated preset id
TInt iPresetId;
//preset name
--- a/internetradio2.0/datastructuressrc/irchannelserverurl.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/datastructuressrc/irchannelserverurl.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -114,7 +114,7 @@
if( NULL == iServerName )
{
CIRChannelServerUrl *tempUrl = const_cast<CIRChannelServerUrl*>(this);
- tempUrl->iServerName = HBufC::NewL(0);
+ tempUrl->iServerName = HBufC::New(0);
}
return *iServerName;
}
@@ -131,7 +131,7 @@
if( NULL == iURL )
{
CIRChannelServerUrl *tempUrl = const_cast<CIRChannelServerUrl*>(this);
- tempUrl->iURL = HBufC::NewL(0);
+ tempUrl->iURL = HBufC::New(0);
}
return *iURL;
}
@@ -212,28 +212,24 @@
{
IRLOG_DEBUG( "CIRChannelServerUrl::ExternalizeL - Entering" );
TInt len;
- if( !iServerName )
+ if(iServerName && (len=iServerName->Length()) > 0)
{
- len=0;
- aWriteStream.WriteInt32L(len);
- }
- else
- {
- len=iServerName->Length();
aWriteStream.WriteInt32L(len);
aWriteStream << *iServerName;
}
-
- if(!iURL )
+ else
{
- len=0;
+ aWriteStream.WriteInt32L(0);
+ }
+
+ if(iURL && (len=iURL->Length()) > 0)
+ {
aWriteStream.WriteInt32L(len);
+ aWriteStream << *iURL;
}
else
{
- len=iURL->Length();
- aWriteStream.WriteInt32L(len);
- aWriteStream << *iURL;
+ aWriteStream.WriteInt32L(0);
}
aWriteStream.WriteInt32L(iBitrate);
--- a/internetradio2.0/datastructuressrc/irisdspreset.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/datastructuressrc/irisdspreset.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -104,7 +104,7 @@
//standard two phased constructor
// ---------------------------------------------------------------------------
//
-EXPORT_C CIRIsdsPreset::CIRIsdsPreset()
+CIRIsdsPreset::CIRIsdsPreset()
{
IRLOG_DEBUG( "CIRIsdsPreset::CIRIsdsPreset" );
}
@@ -451,20 +451,6 @@
IRLOG_DEBUG( "CIRIsdsPreset::SetUrlCount - Exiting." );
}
-
-// ---------------------------------------------------------------------------
-//CIRIsdsPreset::SetIndex()
-//Function to set iIndex
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CIRIsdsPreset::SetIndex(TInt aInt)
- {
- IRLOG_DEBUG( "CIRIsdsPreset::SetIndex - Entering" );
- iIndex=aInt;
- IRLOG_DEBUG( "CIRIsdsPreset::SetIndex - Exiting." );
- }
-
-
// ---------------------------------------------------------------------------
//CIRIsdsPreset::SetUrl()
//Function to set Url parameter
@@ -534,21 +520,6 @@
IRLOG_DEBUG( "CIRIsdsPreset::SetChannelType - Exiting." );
}
-
-// ---------------------------------------------------------------------------
-//CIRIsdsPreset::SetUrl()
-//Function to set Url parameter
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CIRIsdsPreset::SetUrlL(const TDesC &aUrl)
- {
- IRLOG_DEBUG( "CIRIsdsPreset::SetUrlL - Entering" );
- CIRChannelServerUrl * hold=CIRChannelServerUrl::NewL();
- hold->SetServerUrl(aUrl);
- iUrlArray->AppendL(hold);
- IRLOG_DEBUG( "CIRIsdsPreset::SetUrlL - Exiting" );
- }
-
// ---------------------------------------------------------------------------
//CIRIsdsPreset::SetMusicStoreStatus()
//Function to set iMusicStoreStatus parameter
@@ -573,9 +544,7 @@
{
IRLOG_DEBUG( "CIRIsdsPreset::ExternalizeL - Entering" );
//! externalize TInts s
- aWriteStream.WriteUint32L(iUniqId);
aWriteStream.WriteInt32L(iPresetId);
- aWriteStream.WriteInt32L(iIndex);
aWriteStream.WriteInt32L(iType);
aWriteStream.WriteInt32L(iChannelUrlCount);
@@ -614,9 +583,7 @@
{
IRLOG_DEBUG( "CIRIsdsPreset::InternalizeL - Entering" );
//! Internalize TInts s
- iUniqId = aReadStream.ReadUint32L();
iPresetId=aReadStream.ReadInt32L();
- iIndex=aReadStream.ReadInt32L();
iType=aReadStream.ReadInt32L();
iChannelUrlCount=aReadStream.ReadInt32L();
@@ -800,19 +767,6 @@
return iType;
}
-
-// ---------------------------------------------------------------------------
-//CIRIsdsPreset::GetIndex()
-//Function to get iIndex
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CIRIsdsPreset::GetIndex() const
- {
- IRLOG_DEBUG( "CIRIsdsPreset::GetIndex" );
- return iIndex;
- }
-
-
// ---------------------------------------------------------------------------
//CIRIsdsPreset::GetGenreId()
//Function to get iGenereId
@@ -990,9 +944,7 @@
}
iChannelUrlCount=aPreset.iChannelUrlCount;
iType=aPreset.iType; //0 for user defined 1 for isds type.
- iIndex=aPreset.iIndex;
iPresetId = aPreset.iPresetId;
- iUniqId=aPreset.iUniqId;
IRLOG_DEBUG( "CIRIsdsPreset::operator= - Exiting." );
return *this;
}
@@ -1187,23 +1139,3 @@
IRLOG_DEBUG( "CIRIsdsPreset::SortInOrderL - Exiting." );
return;
}
-//----------------------------------------------------------------------------
-// TInt UniqId()
-//
-//----------------------------------------------------------------------------
-EXPORT_C TUint32 CIRIsdsPreset::UniqId() const
- {
- IRLOG_DEBUG( "CIRIsdsPreset::UniqId" );
- return iUniqId;
- }
-//----------------------------------------------------------------------------
-// SetUniqId(TInt)
-//
-//----------------------------------------------------------------------------
-EXPORT_C void CIRIsdsPreset::SetUniqId( TUint32 aId)
- {
- IRLOG_DEBUG( "CIRIsdsPreset::SetUniqId - Entering" );
- iUniqId = aId;
- IRLOG_DEBUG( "CIRIsdsPreset::SetUniqId - Exiting" );
- }
-
--- a/internetradio2.0/favoritesdbinc/irfavoritesdb.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/favoritesdbinc/irfavoritesdb.h Thu Jul 22 16:31:41 2010 +0100
@@ -19,8 +19,8 @@
#ifndef IRFAVORITESDB_H
#define IRFAVORITESDB_H
-#include <pspresetobserver.h>
-#include <psserv.h>
+#include "pspresetobserver.h"
+#include "psserv.h"
class CIRIsdsPreset;
class CIRPreset;
@@ -199,6 +199,8 @@
*/
IMPORT_C TInt IncreasePlayedTimesL(const CIRIsdsPreset &aIsdsPreset);
+ IMPORT_C TInt RenamePresetL(const CIRIsdsPreset &aIsdsPreset, const TDesC &aNewName);
+
private:
/**CIRFavoritesDb::HandlePresetChangedL()
--- a/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,9 +16,8 @@
*/
-#include <pspresetnotifier.h>
-#include <pstransaction.h>
-
+#include "pspresetnotifier.h"
+#include "pstransaction.h"
#include "irdebug.h"
#include "irfavoritesdb.h"
#include "irisdspreset.h"
@@ -180,8 +179,6 @@
preset->CIRIsdsPresetToCIRPresetImpl(aPreset);
//setname of CPSPresetInterface is called
preset->SetNameL( aPreset.GetName() );
- //asign the preset id of the fav preset to uniqid value of the preset
- aPreset.SetUniqId(preset->Id());
transaction->CommitL();
CleanupStack::PopAndDestroy( transaction );
//added to check multiple insertion
@@ -206,7 +203,7 @@
IRLOG_DEBUG( "CIRFavoritesDb::AddPresetL(des des int int)" );
iMoveStatus=EFalse;
CIRIsdsPreset* saveItem;
- saveItem = CIRIsdsPreset::NewL();
+ saveItem = CIRIsdsPreset::NewLC();
saveItem->SetName(aName);
saveItem->SetUrlCount(1);//only one url is saved for manually added channel
saveItem->SetChannelType(EUserDefined);
@@ -214,7 +211,8 @@
//bitrate set to zero so that it is accessible to all kinds of bitrate settings
saveItem->SetUrlL(KNotAvailable,aURl,0);
AddPresetL(*saveItem,aReturn);
- delete saveItem;
+ CleanupStack::PopAndDestroy(saveItem);
+
IRLOG_DEBUG( "CIRFavoritesDb::AddPresetL(des des int int) - Exiting." );
}
@@ -238,6 +236,8 @@
{
if( aId == iFavPresetList[i]->Id())
{
+ //before Remove, the memory should be freed ahead.
+ delete iFavPresetList[i];
iFavPresetList.Remove(i);
break;
}
@@ -407,30 +407,34 @@
//
EXPORT_C void CIRFavoritesDb::ReplacePresetL( CIRIsdsPreset& aNewPreset )
- {
+{
IRLOG_DEBUG( "CIRFavoritesDb::ReplacePresetL" );
iMoveStatus=EFalse;
CIRPreset* preset;
TInt index = SearchPreset(aNewPreset.GetId(),KNullId);
//actual index
if (index >= 0)
- {
+ {
ASSERT( index >= 0 || index < iFavPresetList.Count() );
index = iFavPresetList[index]->Index();
preset = PresetByIndex(index);
- if(preset)
- {
- CPSTransaction* transaction = preset->CreateTransactionLC();
+ if (preset)
+ {
+ CPSTransaction* transaction = preset->CreateTransactionLC();
//change the preset data and commit
+ //update 'name' only if this station has not been renamed before
+ if (preset->GetRenamed())
+ {
+ aNewPreset.SetName(preset->Name());
+ }
preset->CIRIsdsPresetToCIRPresetImpl(aNewPreset);
preset->SetChannelType(EIsdsPreset);
- preset->SetNameL( aNewPreset.GetName() );
transaction->CommitL();
CleanupStack::PopAndDestroy( transaction );
- }
- }
+ }
+ }
IRLOG_DEBUG( "CIRFavoritesDb::ReplacePresetL - Exiting." );
- }
+}
//---------------------------------------------------------------------------
//CIRFavoritesDb::ReplaceUserDefinedPresetL()
@@ -580,6 +584,43 @@
return KErrNone;
}
+EXPORT_C TInt CIRFavoritesDb::RenamePresetL(const CIRIsdsPreset &aIsdsPreset, const TDesC &aNewName)
+{
+ TInt index = 0;
+ if (aIsdsPreset.GetChannelType() == 0)
+ {
+ index = SearchUserDefinedPreset(aNewName, aIsdsPreset.GetChannelUrlAtL(0));
+ if (KErrNotFound != index)
+ {
+ //there is already a user-defined station with same name and url
+ return KErrAlreadyExists;
+ }
+ else
+ {
+ index = SearchUserDefinedPreset(aIsdsPreset.GetName(), aIsdsPreset.GetChannelUrlAtL(0));
+ }
+ }
+ else
+ {
+ index = SearchPreset(aIsdsPreset.GetId(), KNullId);
+ }
+
+ if (KErrNotFound == index)
+ {
+ return KErrNotFound;
+ }
+
+ CIRPreset *irPreset = iFavPresetList[index];
+ //open a transaction with the preset server
+ CPSTransaction* transaction = irPreset->CreateTransactionLC();
+ irPreset->SetNameL(aNewName);
+ irPreset->SetRenamed();
+ transaction->CommitL();
+ CleanupStack::PopAndDestroy(transaction);
+
+ return KErrNone;
+}
+
//---------------------------------------------------------------------------
//CIRFavoritesDb::ConstructL()
//Standard 2nd phase construction
--- a/internetradio2.0/filerecognizerinc/irrecognizer.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/filerecognizerinc/irrecognizer.h Thu Jul 22 16:31:41 2010 +0100
@@ -80,7 +80,12 @@
/*
* try to recognize a m3u file and decide whether it should be launched by InternetRadio application
*/
- void RecognizeM3uFileL(const TDesC8& aBuffer);
+ void RecognizeM3uFileL(const TDesC& aFileName);
+
+ /*
+ * check if specified protocol streaming links are in aBuffer
+ */
+ TBool CheckStreamingLinks(TDes8& aBuffer, const TDesC8& aProtocol);
};
#endif //IRRECOGNIZER_H
--- a/internetradio2.0/filerecognizersrc/irrecognizer.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/filerecognizersrc/irrecognizer.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -17,6 +17,7 @@
#include <implementationproxy.h>
+#include <f32file.h>
#include "irdebug.h"
#include "irrecognizer.h"
@@ -26,8 +27,7 @@
//(32 bits to 31 bits)
// Uid of the recogniser
//const TUid KUidIRRecognizer={0x2000B499}
-// maximum amount of buffer space we will ever use
-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;
@@ -38,7 +38,6 @@
_LIT8(KPlsMimeType,"audio/x-scpls");
_LIT(KM3uExtension, ".m3u");
-_LIT8(KM3uMimeType, "audio/x-mpegurl");
// ================= MEMBER FUNCTIONS =======================
@@ -52,8 +51,8 @@
CApaDataRecognizerType::EHigh)
{
IRLOG_DEBUG( "CApaRecognizerEx::CApaRecognizerEx()" );
- // It supports 2 mime type
- iCountDataTypes = 2;
+ // It only supports 1 mime type
+ iCountDataTypes = 1;
IRLOG_DEBUG( "CApaRecognizerEx::CApaRecognizerEx() - Exiting." );
}
@@ -89,7 +88,7 @@
TUint CApaRecognizerEx::PreferredBufSize()
{
IRLOG_DEBUG( "CApaRecognizerEx::PreferredBufSize" );
- return KMaxBufferLength;
+ return 0;
}
// ---------------------------------------------------------------------------
@@ -104,11 +103,7 @@
{
return TDataType(KPlsMimeType);
}
- else if (1 == aIndex)
- {
- return TDataType(KM3uMimeType);
- }
- else
+ else
{
ASSERT(0);
return TDataType(KNullDesC8);
@@ -140,7 +135,7 @@
else if (aName.Right(KM3uFileExtensionsMightBeValid).CompareF(
KM3uExtension)==0)
{
- RecognizeM3uFileL(aBuffer);
+ RecognizeM3uFileL(aName);
IRLOG_DEBUG( "CApaRecognizerEx::DoRecognizeL - Exiting (2)." );
return;
}
@@ -148,15 +143,93 @@
}
}
-void CApaRecognizerEx::RecognizeM3uFileL(const TDesC8& /*aBuffer*/)
+void CApaRecognizerEx::RecognizeM3uFileL(const TDesC& aFileName)
{
- // _LIT8(KHttpProtocol, "http");
- // _LIT8(KMmsProtocol, "mms");
- // _LIT8(KRtspProtocol, "rtsp");
+ _LIT8(KHttpProtocol, "http");
+ _LIT8(KMmsProtocol, "mms");
+ _LIT8(KRtspProtocol, "rtsp");
+
+ RFs fs;
+ User::LeaveIfError(fs.Connect());
+ RFile file;
+ TInt ret = file.Open(fs, aFileName, EFileRead);
+ if (KErrNone != ret)
+ {
+ fs.Close();
+ return;
+ }
+
+ RBuf8 content;
+ TInt maxLen = 0;
+ file.Size(maxLen);
+ content.Create(maxLen);
+ file.Read(content);
//try to use descriptor method to parse the buffer
- iConfidence = ECertain;
- iDataType = TDataType(KM3uMimeType);
+ if (CheckStreamingLinks(content, KHttpProtocol) ||
+ CheckStreamingLinks(content, KMmsProtocol) ||
+ CheckStreamingLinks(content, KRtspProtocol))
+ {
+ iConfidence = ECertain;
+ iDataType = TDataType(KPlsMimeType);
+ }
+
+ content.Close();
+ file.Close();
+ fs.Close();
+}
+
+TBool CApaRecognizerEx::CheckStreamingLinks(TDes8& aBuffer, const TDesC8& aProtocol)
+{
+ TBool ret = EFalse;
+ _LIT8(KNewLine, "\n");
+
+ //initially, remain points to aBuffer
+ TPtrC8 remain(aBuffer);
+ TInt newLinePos = remain.Find(KNewLine);
+
+ while (KErrNotFound != newLinePos)
+ {
+ //copy a new line to RBuf8
+ RBuf8 left;
+ left.Create(remain.Left(newLinePos));
+ left.TrimLeft();
+ left.LowerCase();
+
+ //after trim left, does this line start with aProtocol?
+ if (left.Left(aProtocol.Length()) == aProtocol)
+ {
+ ret = ETrue;
+ }
+ left.Close();
+
+ if (ret)
+ {
+ break;
+ }
+ else
+ {
+ //remain points to the right part
+ remain.Set(remain.Right(remain.Length() - newLinePos - 1));
+ newLinePos = remain.Find(KNewLine);
+ }
+ }
+
+ if (!ret && remain.Length() > 0)
+ {
+ //last line doesn't end with '\n'
+ RBuf8 last;
+ last.Create(remain);
+ last.TrimLeft();
+ last.LowerCase();
+ if (last.Left(aProtocol.Length()) == aProtocol)
+ {
+ ret = ETrue;
+ }
+ last.Close();
+ }
+
+ return ret;
}
// -----------------------------------------------------------------------------
--- a/internetradio2.0/group/bld.inf Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/group/bld.inf Thu Jul 22 16:31:41 2010 +0100
@@ -52,7 +52,6 @@
irdataprovider.mmp
irsessionlog.mmp
isdsclient.mmp
-irsonghistory.mmp
irrecognizer.mmp
--- a/internetradio2.0/group/irdataprovider.mmp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/group/irdataprovider.mmp Thu Jul 22 16:31:41 2010 +0100
@@ -41,6 +41,9 @@
USERINCLUDE ../presetplugininc
USERINCLUDE ../cachemgmtinc
USERINCLUDE ../sessionloginc
+USERINCLUDE ../../presetserver/include
+USERINCLUDE ../../presetserver/clientinc
+USERINCLUDE ../../presetserver/serverinc
APP_LAYER_SYSTEMINCLUDE
// TODO will be removed after the changes of /epoc32/include
@@ -85,7 +88,7 @@
LIBRARY pops.lib
LIBRARY responsemsg.lib
LIBRARY smts.lib
-
+LIBRARY ezlib.lib
//test end
--- a/internetradio2.0/group/irfavoritesdb.mmp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/group/irfavoritesdb.mmp Thu Jul 22 16:31:41 2010 +0100
@@ -32,7 +32,9 @@
USERINCLUDE ../datastructuresinc
USERINCLUDE ../presetplugininc
USERINCLUDE ../xmlparserinc
-
+USERINCLUDE ../../presetserver/include
+USERINCLUDE ../../presetserver/clientinc
+USERINCLUDE ../../presetserver/serverinc
// Default system include paths for application layer modules.
--- a/internetradio2.0/group/irrecognizer.mmp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/group/irrecognizer.mmp Thu Jul 22 16:31:41 2010 +0100
@@ -48,6 +48,6 @@
LIBRARY euser.lib
LIBRARY apmime.lib
+LIBRARY efsrv.lib
+LIBRARY flogger.lib
-LIBRARY flogger.lib
-
--- a/internetradio2.0/group/presetplugin.mmp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/group/presetplugin.mmp Thu Jul 22 16:31:41 2010 +0100
@@ -27,13 +27,14 @@
SOURCE irpresetimpl.cpp
-SOURCE irchannelserverurlimpl.cpp
SOURCE irpresetpluginproxy.cpp
USERINCLUDE ../presetplugininc
USERINCLUDE ../include
USERINCLUDE ../datastructuresinc
+USERINCLUDE ../../presetserver/clientinc
+USERINCLUDE ../../presetserver/serverinc
// Default system include paths for application layer modules.
APP_LAYER_SYSTEMINCLUDE
--- a/internetradio2.0/include/irpubsubkeys.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/include/irpubsubkeys.h Thu Jul 22 16:31:41 2010 +0100
@@ -164,5 +164,10 @@
const TUint32 KIRPSBufferingState = { KIRPubSubBase + 0x00000012 };
+/********************************************************************
+* KIRPubSubBase + 0x00000015 should be reserved for startup key which is defined in \qtinternetradio\irqcommon\inc\irservicedef.h
+*const unsigned long int KInternetRadioStartupKey = 0x00000035; // = KIRPubSubBase + 0x00000015
+*/
+
#endif // IRPUBSUBKEYS_H
--- a/internetradio2.0/install/ir_package.pkg Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/install/ir_package.pkg Thu Jul 22 16:31:41 2010 +0100
@@ -243,7 +243,6 @@
"\Epoc32\release\armv5\urel\IRNetworkController.dll" -"!:\sys\bin\IRNetworkController.dll"
"\Epoc32\release\armv5\urel\irsettings.dll" -"!:\sys\bin\irsettings.dll"
"\Epoc32\release\armv5\urel\IRSessionLog.dll" -"!:\sys\bin\IRSessionLog.dll"
-"\Epoc32\release\armv5\urel\IRSongHistory.dll" -"!:\sys\bin\IRSongHistory.dll"
;"\Epoc32\release\armv5\urel\IRSettingsView.dll" -"!:\sys\bin\IRSettingsView.dll"
;"\Epoc32\release\armv5\urel\irgeneralsettings200.dll" -"!:\sys\bin\irgeneralsettings200.dll"
;"\Epoc32\release\armv5\urel\IRActiveIdleEngine.dll" -"!:\sys\bin\IRActiveIdleEngine.dll"
--- a/internetradio2.0/install/ir_package_deb.pkg Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/install/ir_package_deb.pkg Thu Jul 22 16:31:41 2010 +0100
@@ -243,7 +243,6 @@
"\Epoc32\release\armv5\udeb\IRNetworkController.dll" -"!:\sys\bin\IRNetworkController.dll"
"\Epoc32\release\armv5\udeb\irsettings.dll" -"!:\sys\bin\irsettings.dll"
"\Epoc32\release\armv5\udeb\IRSessionLog.dll" -"!:\sys\bin\IRSessionLog.dll"
-"\Epoc32\release\armv5\udeb\IRSongHistory.dll" -"!:\sys\bin\IRSongHistory.dll"
;"\Epoc32\release\armv5\udeb\IRSettingsView.dll" -"!:\sys\bin\IRSettingsView.dll"
;"\Epoc32\release\armv5\udeb\irgeneralsettings200.dll" -"!:\sys\bin\irgeneralsettings200.dll"
;"\Epoc32\release\armv5\udeb\IRActiveIdleEngine.dll" -"!:\sys\bin\IRActiveIdleEngine.dll"
--- a/internetradio2.0/networkcontrollerinc/irnetworkcontroller.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/networkcontrollerinc/irnetworkcontroller.h Thu Jul 22 16:31:41 2010 +0100
@@ -23,10 +23,6 @@
#include <es_sock.h>
#include <rhttpsession.h>
-//Added for ALR/SNAP
-#include <cmmanager.h>
-#include <connpref.h>
-#include <commdbconnpref.h>
#include <comms-infras/cs_mobility_apiext.h>
#include "iractivenetworkobserver.h"
@@ -38,25 +34,6 @@
class CIRSettings;
class MIRActiveNetworkObserver;
-typedef RArray<TUint32> RDestinationArray;
-
-//Added for ALR/SNAP
-enum TUserDefinedSelection
- {
- EUserDefinedSelectionAlwaysAsk = 0,
- EUserDefinedSelectionDefaultConnection,
- EUserDefinedSelectionDestination,
- EUserDefinedSelectionConnectionMethod
- };
-
-
-namespace CommsDat
- {
- class CMDBSession;
- }
-
-using namespace CommsDat;
-
/**
* This class provides the interface to IRNetworkController component
*
@@ -102,18 +79,6 @@
* // this is used by download manager for choosing the access point
* iNetworkController->GetIAPId();
*
- * // This API returns the list of available access points
- * iNetworkController->GetAccessPointList();
- *
- * // This API returns the list of bearer ids for available access points
- * iNetworkController->GetBearerList();
- *
- * // This API returns the list of network ids for available access points
- * iNetworkController->GetNetworkList();
- *
- * // This API returns the list of iap ids for available access points
- * iNetworkController->GetApList();
- *
* // This API is called to initiate access point selection
* iNetworkController->ChooseAccessPointL();
*
@@ -203,30 +168,6 @@
IMPORT_C TInt GetIAPId(TUint32& aIapId) const;
/**
- * Returns the list of available access points
- * @return CDesCArray* array specifying the access point names
- */
- IMPORT_C const CDesCArray* GetAccessPointList() const;
-
- /**
- * Returns the list of bearer ids for available access points
- * @return const RArray<TUint32> array specifying the bearer ids
- */
- IMPORT_C const RArray<TUint32> GetBearerList() const;
-
- /**
- * Returns the list of network ids for available access points
- * @return const RArray<TUint32> array specifying the network ids
- */
- IMPORT_C const RArray<TUint32> GetNetworkList() const;
-
- /**
- * Returns the list of iap ids for available access points
- * @return const RArray<TUint32> array specifying the iap ids
- */
- IMPORT_C const RArray<TUint32> GetApList() const;
-
- /**
* Configures the Access Point which is used by all the components for network connectivity
*/
IMPORT_C void ChooseAccessPointL(TBool aDefaultConnection = ETrue);
@@ -522,21 +463,6 @@
CDesCArrayFlat* iIapList;
/**
- * Array of bearer ids for access points
- */
- RArray<TUint32> iBearerList;
-
- /**
- * Array of network ids for access points
- */
- RArray<TUint32> iNetworkList;
-
- /**
- * Array of iap ids for access points
- */
- RArray<TUint32> iIapIdList;
-
- /**
* Indicates if WiFi is supported or not
*/
TBool iIsWlanSupported;
--- a/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -23,7 +23,6 @@
#include <featdiscovery.h>
#include <features.hrh>
#include <ProfileEngineSDKCRKeys.h>
-#include <WebUtilsInternalCRKeys.h>
#include <httpstringconstants.h>
#include <StringLoader.h>
#include <data_caging_path_literals.hrh>
@@ -37,19 +36,39 @@
#include "iractivenetworkobserver.h"
-//for ALR/SNAP
-#include <cmmanager.h>
-#include <cmdestination.h>
-
const TInt KMaxIRUAProfLength = 250; // Max length of the UAProf string
const TInt KIRDefaultUAProfBufferSize = 0x80;
const TUint KIRESockMessageSlots = 16;
-const TUint32 KIRUniqueWlanId = 0x2000883F; // Just to make it unique
const TInt KArraySize = 5;
const TInt KWlanStringMaxLength = 9;
const TInt KTwo = 2;
+// ---------------------------------------------------------------------------
+// define in WebUtilsSDKCRKeys.h
+// ---------------------------------------------------------------------------
+//
+const TUid KCRUidWebUtils = {0x101F8731};//Web APIs removal and Internet Radio build break
+
+// ---------------------------------------------------------------------------
+// define in WebUtilsInternalCRKeys.h
+// ---------------------------------------------------------------------------
+//
+// Compatability fragment of useragent string
+const TUint32 KWebUtilsUsrAg2 = 0x00000001;
+
+// PlatformVersion fragment of useragent string
+const TUint32 KWebUtilsUsrAg3 = 0x00000002;
+
+// MidPVersion fragment of useragent string
+const TUint32 KWebUtilsUsrAg4 = 0x00000003;
+
+// CLDConfiguration fragment of useragent string
+const TUint32 KWebUtilsUsrAg5 = 0x00000004;
+
+// Url to useragent profile
+const TUint32 KWebUtilsUaProf = 0x00000008;
+
// To Format the UAProf string
_LIT(KIRUAProfSpace," ");
@@ -77,6 +96,13 @@
CleanupStack::Pop(networkController);
}
networkController->iSingletonInstances++;
+
+ if (NULL != aObserver)
+ {
+ networkController->iObserver = aObserver;
+ networkController->iIRNetworkObserver->SetObserver(aObserver);
+ }
+
IRLOG_DEBUG( "CIRNetworkController::OpenL - Exiting." );
return networkController;
}
@@ -237,49 +263,6 @@
}
// ---------------------------------------------------------------------------
-// CIRNetworkController::GetAccessPointList
-// Reset the connection status to Disconnected statet
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const CDesCArray* CIRNetworkController::GetAccessPointList() const
-{
- IRLOG_DEBUG( "CIRNetworkController::GetAccessPointList" );
- return iIapList;
-}
-
-// ---------------------------------------------------------------------------
-// CIRNetworkController::GetBearerList
-// Reset the connection status to Disconnected statet
-//
-EXPORT_C const RArray<TUint32> CIRNetworkController::GetBearerList() const
-{
- IRLOG_DEBUG( "CIRNetworkController::GetBearerList" );
- return iBearerList;
-}
-
-// ---------------------------------------------------------------------------
-// CIRNetworkController::GetNetworkList
-// Reset the connection status to Disconnected statet
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const RArray<TUint32> CIRNetworkController::GetNetworkList() const
-{
- IRLOG_DEBUG( "CIRNetworkController::GetNetworkList" );
- return iNetworkList;
-}
-
-// ---------------------------------------------------------------------------
-// CIRNetworkController::GetApList
-// Reset the connection status to Disconnected statet
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const RArray<TUint32> CIRNetworkController::GetApList() const
-{
- IRLOG_DEBUG( "CIRNetworkController::GetApList" );
- return iIapIdList;
-}
-
-// ---------------------------------------------------------------------------
// CIRNetworkController::ChooseAccessPointL
// Configures the Access Point which is used by all the components for network
// connectivity
@@ -306,6 +289,13 @@
// Always validate the Access Points status
if ( ValidateAccessPointsL() )
{
+ if(NULL != iMobility)
+ {
+ iMobility->Cancel();
+ delete iMobility;
+ iMobility = NULL;
+ }
+
// Connect to the Symbian Socket Server
iIRNetworkConnection->Close();
iIRSocketServer.Close();
@@ -507,7 +497,13 @@
_LIT(KErrorMsg,"Method Close not called");
__ASSERT_ALWAYS(iSingletonInstances == 0, User::Panic(KErrorMsg, KErrCorrupt));
- delete iMobility;
+ if(NULL != iMobility)
+ {
+ iMobility->Cancel();
+ delete iMobility;
+ iMobility = NULL;
+ }
+
if (IsActive())
{
Cancel();
@@ -528,9 +524,7 @@
}
delete iIRNetworkObserver;
iIRSocketServer.Close();
- iBearerList.Close();
- iNetworkList.Close();
- iIapIdList.Close();
+
if (iIapList)
{
iIapList->Reset();
@@ -598,9 +592,6 @@
// Reset all the comms info
iIapList->Reset();
- iBearerList.Reset();
- iNetworkList.Reset();
- iIapIdList.Reset();
#ifndef __WINS__
CIRFilteredApReader* filteredReader = CIRFilteredApReader::
@@ -615,9 +606,6 @@
CleanupStack::PushL( iapRecord );
iIapList->AppendL( iapRecord->iRecordName.GetL() );
- iBearerList.AppendL( static_cast<TUint32>(iapRecord->iBearer) );
- iNetworkList.AppendL( static_cast<TUint32>(iapRecord->iNetwork) );
- iIapIdList.AppendL( iapRecord->RecordId() );
CleanupStack::PopAndDestroy( iapRecord );
iapRecord = filteredReader->NextRecordL();
@@ -638,9 +626,6 @@
CCDIAPRecord* iapRecord =
static_cast<CCDIAPRecord*> (iapSet->iRecords[i]);
iIapList->AppendL(iapRecord->iRecordName.GetL());
- iBearerList.AppendL(static_cast<TUint32> (iapRecord->iBearer));
- iNetworkList.AppendL(static_cast<TUint32> (iapRecord->iNetwork));
- iIapIdList.AppendL(iapRecord->RecordId());
}
CleanupStack::PopAndDestroy(2, dbSession);
@@ -655,10 +640,6 @@
TBuf<KWlanStringMaxLength> wlanString;
wlanString.Copy(KIRWLanName);
iIapList->AppendL(wlanString);
- TUint32 WlanIdentifier(KIRUniqueWlanId);
- iBearerList.AppendL(WlanIdentifier);
- iNetworkList.AppendL((TUint32)KErrNotFound);
- iIapIdList.AppendL((TUint32)KErrNotFound);
}
#endif
@@ -847,6 +828,14 @@
void CIRNetworkController::DoCancel()
{
IRLOG_DEBUG( "CIRNetworkController::DoCancel - Entering" );
+
+ if(NULL != iMobility)
+ {
+ iMobility->Cancel();
+ delete iMobility;
+ iMobility = NULL;
+ }
+
iIRNetworkConnection->Stop();
iIRNetworkConnection->Close();
iIRSocketServer.Close();
--- a/internetradio2.0/networkcontrollersrc/irnetworkobserver.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/networkcontrollersrc/irnetworkobserver.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -181,7 +181,14 @@
{
if(iMonitoringRequired)
{
- iMonitorObserver->IRNetworkEventL(ENetworkConnectionDisconnected);
+ if (iMonitorObserver)
+ {
+ iMonitorObserver->IRNetworkEventL(ENetworkConnectionDisconnected);
+ }
+ else
+ {
+ iNetworkController->NotifyActiveNetworkObserversL(ENetworkConnectionDisconnected);
+ }
}
}
}
@@ -369,60 +376,30 @@
case EBearerGPRS:
{
iIRConnectionType = EGprs;
- if(iMonitoringRequired)
- {
- // Intimate the connection established event
- iMonitorObserver->IRNetworkEventL(
- ENetworkConnectionEstablished);
- }
}
break;
case EBearerEdgeGPRS:
{
iIRConnectionType = EEdge;
- if(iMonitoringRequired)
- {
- // Intimate the connection established event
- iMonitorObserver->IRNetworkEventL(
- ENetworkConnectionEstablished);
- }
}
break;
case EBearerWLAN:
{
iIRConnectionType = EWiFi;
- if(iMonitoringRequired)
- {
- // Intimate the connection established event
- iMonitorObserver->IRNetworkEventL(
- ENetworkConnectionEstablished);
- }
}
break;
case EBearerWCDMA:
{
iIRConnectionType = EWcdma;
- if(iMonitoringRequired)
- {
- // Intimate the connection established event
- iMonitorObserver->IRNetworkEventL(
- ENetworkConnectionEstablished);
- }
}
break;
case EBearerCDMA2000:
{
iIRConnectionType = ECdma2000;
- if(iMonitoringRequired)
- {
- // Intimate the connection established event
- iMonitorObserver->IRNetworkEventL(
- ENetworkConnectionEstablished);
- }
}
break;
@@ -430,17 +407,25 @@
{
#ifdef __WINS__
iIRConnectionType = EGprs;
- if(iMonitoringRequired)
- {
- // Intimate the connection established event
- iMonitorObserver->IRNetworkEventL(
- ENetworkConnectionEstablished);
- }
#endif
}
break;
}
+
+ if (iMonitoringRequired)
+ {
+ if (iMonitorObserver)
+ {
+ // Intimate the connection established event
+ iMonitorObserver->IRNetworkEventL(ENetworkConnectionEstablished);
+ }
+ else
+ {
+ iNetworkController->NotifyActiveNetworkObserversL(ENetworkConnectionEstablished);
+ }
+ }
+
iNetworkController->ResetHandingOverConnection();
}
break;
--- a/internetradio2.0/presetplugininc/irchannelserverurlimpl.h Mon Jun 21 22:33:45 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +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 IRCHANNELSERVERURLIMPL_H
-#define IRCHANNELSERVERURLIMPL_H
-
-#include <e32base.h>
-
-class RReadStream;
-class RWriteStream;
-
-/**
- * This class provides the basic structure to hold the preset's url data
- *information that come from the isds server.
- *It also provides the basic getter and setter functions to
- *manage the preset's url information.
- *has been provided
- *
- */
-class CIRChannelServerUrlImpl:public CBase
- {
-public:
-
-
- /**CIRChannelServerUrlImpl::NewL()
- *Static function
- *standard two phased constructor
- *@param void
- *@return *CIRChannelServerUrlImpl
- **/
- static CIRChannelServerUrlImpl* NewL();
-
-
- /**CIRChannelServerUrlImpl::NewLC()
- *Static function
- *standard two phased constructor
- *@param void
- *@return *CIRChannelServerUrlImpl
- **/
- static CIRChannelServerUrlImpl* NewLC();
-
-
- /**CIRChannelServerUrlImpl::SetServerName()
- *sets server name
- *@param TDesC
- *@return void
- **/
- void SetServerName(const TDesC& aServerName);
-
-
- /**CIRChannelServerUrlImpl::SetServerUrl()
- *sets server url
- *@param TDesC
- *@return void
- **/
- void SetServerUrl(const TDesC& aServerUrl);
-
-
- /**CIRChannelServerUrlImpl::SetBitRate()
- *sets server bitrate
- *@param TInt
- *@return void
- **/
- void SetBitRate(TInt aBitrate);
-
-
- /**CIRChannelServerUrlImpl::GetServerName()
- *gets server name
- *@param void
- *@return TDesC
- **/
- TDesC& GetServerName();
-
-
- /**CIRChannelServerUrlImpl::GetServerUrl()
- *gets server url
- *@param void
- *@return TDesC
- **/
- TDesC& GetServerUrl();
-
-
- /**CIRChannelServerUrlImpl::GetBitRate()
- *gets server bitrate
- *@param void
- *@return TInt
- **/
- TInt GetBitRate();
-
-
- /**CIRChannelServerUrlImpl::~CIRChannelServerUrl()
- *standard C++ destructor
- *@param NA
- *@return NA
- **/
- ~CIRChannelServerUrlImpl();
-
-
- /**CIRChannelServerUrlImpl::=()
- *standard C++ copy constructor(deep copy)
- *@param CIRChannelServerUrl
- *@return NA
- **/
- CIRChannelServerUrlImpl& operator=(const CIRChannelServerUrlImpl& churl);
-
-
- /**CIRChannelServerUrlImpl::ExternalizeL()
- *function to externalize url data
- *@param CIRChannelServerUrl
- *@return NA
- **/
- void ExternalizeL(RWriteStream& aWriteStream);
-
- /**CIRChannelServerUrlImpl::InternalizeL()
- *function to internalize url data
- *@param CIRChannelServerUrlImpl
- *@return NA
- **/
- void InternalizeL(RReadStream& aReadStream);
-
-protected:
-
-
- /**CIRChannelServerUrlImpl::ConstructL()
- *standard second phase construction
- *@param void
- *@return void
- **/
- void ConstructL();
-
-public:
- //channel server name
- HBufC *iServerName;
- //channel server url
- HBufC *iURL;
- //bitrate supported by channel server
- TInt iBitrate;
- };
-
-#endif//IRCHANNELSERVERURLIMPL_H
\ No newline at end of file
--- a/internetradio2.0/presetplugininc/irpreset.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/presetplugininc/irpreset.h Thu Jul 22 16:31:41 2010 +0100
@@ -20,9 +20,11 @@
#define IRPRESET_H
#include <badesca.h>
-#include <pspresetinterface.h>
+
+#include "pspresetinterface.h"
class CIRIsdsPreset;
+class CIRChannelServerUrl;
const TUid KIRPreset = { 0x10009DC1 };
@@ -295,6 +297,13 @@
*/
virtual const TDesC& GetAdvertisementUrl() const=0;
+ /**
+ *CIRPreset::GetAdvertisementInUse()
+ *gets the channel advertisement In Use
+ *@return TDesC
+ */
+ virtual const TDesC& GetAdvertisementInUse() const = 0;
+
/**
*CIRPreset::GetImgUrl()
*gets the channel image url
@@ -309,6 +318,8 @@
*/
virtual TInt GetUrlCount()const=0;
+ virtual CIRChannelServerUrl& GetUrl(TInt aIndex) const = 0;
+
/*
* get the channel url at specified position
*
@@ -337,20 +348,6 @@
*/
virtual void CopyPresetData(CIRIsdsPreset& aIsdsPreset) const =0;
- /**
- *CIRPreset::UniqId()
- *gets the unique id
- *@return TUint32
- */
- virtual TUint32 UniqId()=0;
-
- /**
- *CIRPreset::SetUniqId()
- *sets the unique id for the preset
- *@param aId
- */
- virtual void SetUniqId( const TUint32 aId)=0;
-
/**
* Sets the logo data for this preset for a specific size.
*
@@ -376,6 +373,10 @@
* Set the played times of the channel
*/
virtual void SetPlayedTimes(TInt aPlayedTimes) = 0;
+
+ virtual TBool GetRenamed() const = 0;
+
+ virtual void SetRenamed() = 0;
};
#endif //end of IRPRESET_H
--- a/internetradio2.0/presetplugininc/irpresetimpl.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/presetplugininc/irpresetimpl.h Thu Jul 22 16:31:41 2010 +0100
@@ -318,6 +318,8 @@
*/
const TDesC& GetAdvertisementUrl() const;
+ const TDesC& GetAdvertisementInUse() const;
+
/**
*CIRPresetImpl::GetImgUrl()
*gets the channel image url
@@ -332,19 +334,14 @@
*/
TInt GetUrlCount()const;
+ CIRChannelServerUrl& GetUrl(TInt aIndex) const;
+
/*
*CIRPresetImpl::GetLogoData()
*gets the Logo Data
*@return TDesC8&
*/
const TDesC8& GetLogoData() const;
-
- /**
- *CIRPresetImpl::GetUrl()
- *gets the channel url from zeroth position
- *@return CIRChannelServerUrlImpl&
- */
- CIRChannelServerUrlImpl& GetUrl(TInt aInt)const;
/*
* get the channel url at specified position
@@ -390,20 +387,6 @@
*/
RArray<TInt>& GetAvailableBitrates();
- /**
- *CIRPresetImpl::UniqId()
- *gets the unique id
- *@return TUint32
- */
- TUint32 UniqId() ;
-
- /**
- *CIRPresetImpl::SetUniqId()
- *sets the unique id for the preset
- *@param aId
- */
- void SetUniqId( TUint32 aUniqId);
-
/*
* Returns the played times of the channel
*/
@@ -414,6 +397,10 @@
*/
void SetPlayedTimes(TInt aPlayedTimes);
+ TBool GetRenamed() const;
+
+ void SetRenamed();
+
protected:
/**CIRPresetImpl::CIRIsdsPreset()
@@ -449,11 +436,6 @@
private:
/**
- * unique id generated for the preset saved at favourite
- */
- TUint32 iUniqId;
-
- /**
* no of channel urls
*/
TInt iChannelUrlCount;
@@ -464,11 +446,6 @@
TInt iType;
/**
- * index in the preset table
- */
- //TInt iIndex;not required
-
- /**
* isds generated preset id
*/
TInt iPresetId;
@@ -544,24 +521,21 @@
*/
RBuf iMusicStoreStatus;
-
/**
* url array
*/
- CDesCArrayFlat* iUrlForBitrate;
-
- /**
- * url array
- */
- CArrayPtrFlat<CIRChannelServerUrlImpl>* iUrlArray;
+ CArrayPtrFlat<CIRChannelServerUrl>* iUrlArray;
/**
* bitrate array
*/
RArray<TInt> iBitrateArray;
- //added by Peter on June 23rd, 2009
+ //how many times the station has been played
TInt iPlayedTimes;
+
+ //if the station is renamed after it's added into favorites
+ TBool iRenamed;
};
#endif //end of IRPRESETIMPL_H
--- a/internetradio2.0/presetpluginsrc/irchannelserverurlimpl.cpp Mon Jun 21 22:33:45 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +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
-*
-*/
-
-
-#include <s32strm.h>
-
-#include "irchannelserverurlimpl.h"
-#include "irdebug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::NewL()
-// Static function
-// standard two phased constructor
-// ---------------------------------------------------------------------------
-//
-CIRChannelServerUrlImpl* CIRChannelServerUrlImpl::NewL()
- {
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::NewL" );
- CIRChannelServerUrlImpl* self=CIRChannelServerUrlImpl::NewLC();
- CleanupStack::Pop(self);
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::NewL - Exiting." );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::NewLC()
-// Static function
-// standard two phased constructor
-// ---------------------------------------------------------------------------
-//
-CIRChannelServerUrlImpl* CIRChannelServerUrlImpl::NewLC()
- {
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::NewLC" );
- CIRChannelServerUrlImpl* self=new(ELeave)CIRChannelServerUrlImpl;
- CleanupStack::PushL(self);
- self->ConstructL();
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::NewLC - Exiting." );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::SetServerName()
-// sets server name
-// ---------------------------------------------------------------------------
-//
-void CIRChannelServerUrlImpl::SetServerName(const TDesC& aServerName)
- {
- iServerName=aServerName.Alloc();
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::SetServerUrl()
-// sets server url
-// ---------------------------------------------------------------------------
-//
-void CIRChannelServerUrlImpl::SetServerUrl(const TDesC& aServerUrl)
- {
- iURL=aServerUrl.Alloc();
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::SetBitRate()
-// sets server bitrate
-// ---------------------------------------------------------------------------
-//
-void CIRChannelServerUrlImpl::SetBitRate(TInt aBitrate)
- {
- iBitrate=aBitrate;
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::GetServerName()
-// gets server name
-// ---------------------------------------------------------------------------
-//
-TDesC& CIRChannelServerUrlImpl::GetServerName()
- {
- if( NULL == iServerName )
- {
- iServerName = HBufC::NewL(0);
- }
-
- return *iServerName;
- }
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::GetServerUrl()
-// gets server url
-// ---------------------------------------------------------------------------
-//
-TDesC& CIRChannelServerUrlImpl::GetServerUrl()
- {
- if( NULL == iURL )
- {
- iURL = HBufC::NewL(0);
- }
- return *iURL;
- }
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::GetBitRate()
-// gets server bitrate
-// ---------------------------------------------------------------------------
-//
-TInt CIRChannelServerUrlImpl::GetBitRate()
- {
- return iBitrate;
- }
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::~CIRChannelServerUrlImpl()
-// destructor
-// ---------------------------------------------------------------------------
-//
-CIRChannelServerUrlImpl::~CIRChannelServerUrlImpl()
- {
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::~CIRChannelServerUrlImpl" );
- delete iServerName;
- delete iURL;
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::~CIRChannelServerUrlImpl - Exiting." );
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::=()
-// standard C++ copy constructor(deep copy)
-// ---------------------------------------------------------------------------
-//
-CIRChannelServerUrlImpl& CIRChannelServerUrlImpl::operator=(
- const CIRChannelServerUrlImpl& churl)
- {
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::operator=" );
- if(&churl == this)
- {
- return *this;
- }
- iServerName=churl.iServerName;
- iURL=churl.iURL;
- iBitrate=churl.iBitrate;
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::operator= - Exiting." );
- return *this;
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::ExternalizeL()
-// function to externalize url data
-// ---------------------------------------------------------------------------
-//
-void CIRChannelServerUrlImpl::ExternalizeL(RWriteStream& aWriteStream)
- {
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::ExternalizeL" );
- //algo
- //1.check if data is present for the particular member variable
- //2.if yes get the length of the data and externalize the length and then the data
- //3.if no data is present write the length as 0.
- TInt len;
- if(iServerName)
- {
- len=iServerName->Length();
- aWriteStream.WriteInt32L(len);
- aWriteStream << *iServerName;
- }
- else
- {
- len=0;
- aWriteStream.WriteInt32L(len);
- }
-
- if(iURL)
- {
- len=iURL->Length();
- aWriteStream.WriteInt32L(len);
- aWriteStream << *iURL;
- }
- else
- {
- len=0;
- aWriteStream.WriteInt32L(len);
- }
-
- aWriteStream.WriteInt32L(iBitrate);
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::ExternalizeL - Exiting." );
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::InternalizeL()
-// function to internalize url data
-// ---------------------------------------------------------------------------
-//
-void CIRChannelServerUrlImpl::InternalizeL(RReadStream& aReadStream)
- {
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::InternalizeL" );
- //algo
- //1.get the length of the data
- //2.read that many bytes
- //3.if read length is zero. skip..
- TInt len;
- len= aReadStream.ReadInt32L();
- if(len)
- {
- iServerName=HBufC::NewL(aReadStream,len);
- }
-
- len=aReadStream.ReadInt32L();
- if(len)
- {
- iURL=HBufC::NewL(aReadStream,len);
- }
- iBitrate=aReadStream.ReadInt32L();
- IRLOG_DEBUG( "CIRChannelServerUrlImpl::InternalizeL - Exiting." );
- }
-
-
-// ---------------------------------------------------------------------------
-// CIRChannelServerUrlImpl::ConstructL()
-// standard second phase construction
-// ---------------------------------------------------------------------------
-//
-void CIRChannelServerUrlImpl::ConstructL()
- {
- //no implementation
- return;
- }
-
--- a/internetradio2.0/presetpluginsrc/irpresetimpl.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/presetpluginsrc/irpresetimpl.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -18,13 +18,11 @@
#include <s32strm.h>
#include "irchannelserverurl.h"
-#include "irchannelserverurlimpl.h"
#include "irdebug.h"
#include "irpresetimpl.h"
#include "irisdspreset.h"
const TInt KUrlArrayMaxLength = 128;
-const TInt KUrlForBitrateMaxLength = 128;
// ======== MEMBER FUNCTIONS ========
@@ -69,9 +67,9 @@
IRLOG_DEBUG( "CIRPresetImpl::ConstructL" );
BaseConstructL(aParams);
iUrlArray=
- new (ELeave) CArrayPtrFlat<CIRChannelServerUrlImpl>(
+ new (ELeave) CArrayPtrFlat<CIRChannelServerUrl>(
KUrlArrayMaxLength);
- iUrlForBitrate=new (ELeave) CDesCArrayFlat(KUrlForBitrateMaxLength);
+
IRLOG_DEBUG( "CIRPresetImpl::ConstructL - Exiting." );
}
@@ -97,7 +95,7 @@
iGenereName.Close();
iGenereId.Close();
iMusicStoreStatus.Close();
- delete iUrlForBitrate;
+
if (iUrlArray)
{
iUrlArray->ResetAndDestroy();
@@ -337,7 +335,7 @@
const TDesC &aBitrate)
{
IRLOG_DEBUG( "CIRPresetImpl::SetUrlL" );
- CIRChannelServerUrlImpl* hold=CIRChannelServerUrlImpl::NewL();
+ CIRChannelServerUrl* hold=CIRChannelServerUrl::NewL();
hold->SetServerName(aServerName);
hold->SetServerUrl(aUrl);
TLex conv(aBitrate);
@@ -361,7 +359,7 @@
TInt aBitrate)
{
IRLOG_DEBUG( "CIRPresetImpl::SetUrlL(const TDesC &aServerName,const TDesC &aUrl,TInt aBitrate)" );
- CIRChannelServerUrlImpl* hold=CIRChannelServerUrlImpl::NewL();
+ CIRChannelServerUrl* hold=CIRChannelServerUrl::NewL();
hold->SetServerName(aServerName);
hold->SetServerUrl(aUrl);
hold->SetBitRate(aBitrate);
@@ -483,6 +481,11 @@
return iAdvertisementUrl;
}
+const TDesC& CIRPresetImpl::GetAdvertisementInUse() const
+{
+ return iAdvertisementInUse;
+}
+
// ---------------------------------------------------------------------------
// CIRPresetImpl::GetImgUrl()
// Function to get iImgUrl
@@ -503,6 +506,12 @@
return iChannelUrlCount;
}
+CIRChannelServerUrl& CIRPresetImpl::GetUrl(TInt aIndex) const
+{
+ ASSERT( aIndex >= 0 && aIndex < iUrlArray->Count() );
+ return ((*iUrlArray->At(aIndex)));
+}
+
/*
* get the channel url at specified position
*
@@ -513,17 +522,6 @@
}
// ---------------------------------------------------------------------------
-// CIRPresetImpl::GetUrl()
-// Function to get iLanguageCode
-// ---------------------------------------------------------------------------
-//
-CIRChannelServerUrlImpl& CIRPresetImpl::GetUrl(TInt aInt)const
- {
- ASSERT( aInt >= 0 && aInt < iUrlArray->Count() );
- return ((*iUrlArray->At(aInt)));
- }
-
-// ---------------------------------------------------------------------------
// CIRPresetImpl::GetDescription()
// Function to get iDescription
// ---------------------------------------------------------------------------
@@ -580,7 +578,6 @@
return *this;
}
//copy data members
- iUniqId = aPreset.iUniqId;
iPresetId = aPreset.iPresetId;
TRAP_IGNORE(SetNameL(aPreset.Name()))
@@ -666,7 +663,6 @@
{
IRLOG_DEBUG( "CIRPresetImpl::ExternalizeL" );
//! externalize TInts s
- aWriteStream.WriteUint32L(iUniqId);
aWriteStream.WriteInt32L(iPresetId);
aWriteStream.WriteInt32L(iType);
aWriteStream.WriteInt32L(iChannelUrlCount);
@@ -854,6 +850,8 @@
//added by Peter on June 23rd, 2009
aWriteStream.WriteInt32L(iPlayedTimes);
+ aWriteStream.WriteInt32L(iRenamed);
+
IRLOG_DEBUG( "CIRPresetImpl::ExternalizeL - Exiting." );
}
@@ -868,7 +866,6 @@
{
IRLOG_DEBUG( "CIRPresetImpl::InternalizeL" );
//! Internalize TInts s
- iUniqId = aReadStream.ReadUint32L();
iPresetId=aReadStream.ReadInt32L();
iType=aReadStream.ReadInt32L();
iChannelUrlCount=aReadStream.ReadInt32L();
@@ -978,16 +975,19 @@
}
//internalizing the preset data
- CIRChannelServerUrlImpl *url = NULL;
+ CIRChannelServerUrl *url = NULL;
for(TInt cnt=0;cnt<iChannelUrlCount;cnt++)
{
- url = CIRChannelServerUrlImpl::NewLC();
+ url = CIRChannelServerUrl::NewLC();
url->InternalizeL(aReadStream);
iUrlArray->AppendL(url);
CleanupStack::Pop(url);
}
iPlayedTimes = aReadStream.ReadInt32L();
+
+ iRenamed = aReadStream.ReadInt32L();
+
IRLOG_DEBUG( "CIRPresetImpl::InternalizeL - Exiting." );
}
@@ -1001,7 +1001,6 @@
void CIRPresetImpl::CIRIsdsPresetToCIRPresetImpl(const CIRIsdsPreset& aIsdsPreset)
{
IRLOG_DEBUG( "CIRPresetImpl::CIRIsdsPresetToCIRPresetImpl" );
- iUniqId = aIsdsPreset.UniqId();
iPresetId = aIsdsPreset.GetId();
iChannelUrlCount = aIsdsPreset.GetUrlCount();
iType = aIsdsPreset.GetChannelType(); //0 for user defined 1 for isds type.
@@ -1075,7 +1074,6 @@
void CIRPresetImpl::CopyPresetData(CIRIsdsPreset& aIsdsPreset) const
{
IRLOG_DEBUG( "CIRPresetImpl::CopyPresetData" );
- aIsdsPreset.SetUniqId( this->Id() );
aIsdsPreset.SetId( iPresetId );
aIsdsPreset.SetUrlCount( iChannelUrlCount );
aIsdsPreset.SetChannelType( iType ); //0 for user defined 1 for isds type.
@@ -1135,21 +1133,6 @@
return iBitrateArray;
}
-//----------------------------------------------------------------------------
-// TInt UniqId()
-//----------------------------------------------------------------------------
-TUint32 CIRPresetImpl::UniqId()
- {
- return iUniqId;
- }
-//----------------------------------------------------------------------------
-// SetUniqId(TInt)
-//----------------------------------------------------------------------------
-void CIRPresetImpl::SetUniqId( TUint32 aId)
- {
- iUniqId = aId;
- }
-
/*
* Returns the played times of the channel
*/
@@ -1165,3 +1148,13 @@
{
iPlayedTimes = aPlayedTimes;
}
+
+TBool CIRPresetImpl::GetRenamed() const
+{
+ return iRenamed;
+}
+
+void CIRPresetImpl::SetRenamed()
+{
+ iRenamed = ETrue;
+}
--- a/internetradio2.0/rom/internetradio.iby Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/rom/internetradio.iby Thu Jul 22 16:31:41 2010 +0100
@@ -36,9 +36,6 @@
file=ABI_DIR\BUILD_DIR\irnetworkcontroller.dll SHARED_LIB_DIR\irnetworkcontroller.dll
file=ABI_DIR\BUILD_DIR\irsettings.dll SHARED_LIB_DIR\irsettings.dll
file=ABI_DIR\BUILD_DIR\irsessionlog.dll SHARED_LIB_DIR\irsessionlog.dll
-file=ABI_DIR\BUILD_DIR\irsonghistory.dll SHARED_LIB_DIR\irsonghistory.dll
-
-data=DATAZ_\RESOURCE_FILES_DIR\apps\irnetworkcontroller.rsc RESOURCE_FILES_DIR\apps\irnetworkcontroller.rsc
data=DATAZ_\RESOURCE_FILES_DIR\plugins\presetplugin.rsc RESOURCE_FILES_DIR\plugins\presetplugin.rsc
data=DATAZ_\RESOURCE_FILES_DIR\plugins\irrfsplugin.rsc RESOURCE_FILES_DIR\plugins\irrfsplugin.rsc
--- a/internetradio2.0/sessionloginc/irsessionlogger.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/sessionloginc/irsessionlogger.h Thu Jul 22 16:31:41 2010 +0100
@@ -460,7 +460,10 @@
/**
* unicode buffer
*/
- TBuf<256> iUniCodeBuf; //Unicode
+ //"MAX_URL_CHARACTOR_NUMBER = 255" is defined
+ // in iropenwebaddressview.cpp, it is 8bit len char.
+ // the memory should be double when tranfer 8bit to 16bit.
+ TBuf<512> iUniCodeBuf; //Unicode
/**
* utf 8 buffer
--- a/internetradio2.0/songhistoryinc/irsonghistorydb.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/songhistoryinc/irsonghistorydb.h Thu Jul 22 16:31:41 2010 +0100
@@ -81,25 +81,28 @@
- /**
- * Function : AddToSongHistoryDbL()
- * adds the song history entry into data base
- * @param various channel information
- */
- TBool AddToSongHistoryDbL( const TDesC& aSongName,
- const TDesC& aArtistName,
- const TDesC& aChannelName,
- const TDesC& aChannelUrl,
- RBuf& aDelSongName,
- RBuf& aDelArtistname,
- RBuf& aDelChannelName,
- RBuf& aDelChannelUrl,
- TInt aChannelType,
- TInt aChannelId,
- TInt aBitrate,
- const TDesC& aChannelDesc,
- const TDesC& aImageUrl,
- const TDesC& aMusicFlag);
+ /**
+ * Function : AddToSongHistoryDbL()
+ * adds the song history entry into data base
+ * @param various channel information
+ */
+ TBool AddToSongHistoryDbL( const TDesC& aSongName,
+ const TDesC& aArtistName,
+ const TDesC& aChannelName,
+ const TDesC& aChannelUrl,
+ RBuf& aDelSongName,
+ RBuf& aDelArtistname,
+ RBuf& aDelChannelName,
+ RBuf& aDelChannelUrl,
+ TInt aChannelType,
+ TInt aChannelId,
+ TInt aBitrate,
+ const TDesC& aChannelDesc,
+ const TDesC& aImageUrl,
+ const TDesC& aGenreName,
+ const TDesC& aCountryName,
+ const TDesC& aLanguageName,
+ const TDesC& aMusicFlag);
/**
* Function : AddToSongHistoryDb2L()
* adds the song history entry into data base
@@ -107,6 +110,7 @@
*/
TBool AddToSongHistoryDb2L( const TDesC& aSongName,
const TDesC& aArtistName,
+ const TDesC& aChannelName,
const TDesC& aMusicFlag);
@@ -180,22 +184,28 @@
* Updates the song history DB when there is a channel change in the isds.
*/
TInt UpdateSongHistoryDbL( TInt aChannelId,
- const TDesC& aChannelName,
const TDesC& aChannelUrl,
const TDesC& aImageUrl,
+ const TDesC& aGenreName,
+ const TDesC& aCountryName,
+ const TDesC& aLanguageName,
const TDesC& aMusicFlag);
/*
* search if a record already exists in database. If yes, delete it.
*/
void SearchAndDeleteRecordL(const TDesC& aChannelName, const TDesC& aChannelUrl,
- TInt aChannelType);
+ TInt aChannelType, TInt aPresetId);
/*
- * delete a recorder by the index
+ * delete a recorder by the index, for station history database
* */
TInt DeleteOneHistory(TInt aIndex);
+ /*
+ * delete a recorder by the index, for songhistory database
+ * */
+ TInt DeleteOneSongHistory(TInt aIndex);
private:
@@ -218,9 +228,9 @@
* ---------------------------------------------------------------------------
* SongHistoryTable
*---------------------------
- *| SongName | ArtistName | ChannelName | ChannelUrl | ChannelType | ChannelId | Bitrate | ChannelDesc | ImageUrl
+ *| SongName | ArtistName | ChannelName | ChannelUrl | ChannelType | ChannelId | Bitrate | ChannelDesc | ImageUrl | GenreName | CountryName | LanguageName | MusicStatus
*---------------------------
- *|EDbColText| EDbColText | EDbColText | EDbColText | EDbColUint8 | EDbColUint16 | EDbColUint16 | EDbColText | EDbColText
+ *|EDbColText| EDbColText | EDbColText | EDbColText | EDbColUint8 | EDbColUint16 | EDbColUint16 | EDbColText | EDbColText | EDbColText | EDbColText | EDbColText | EDbColText
*----------------------------------------------------------------------------
*/
void CreateSongHistoryTablesL();
@@ -232,9 +242,9 @@
* ---------------------------------------------------------------------------
* SongHistoryTable
*---------------------------
- *| SongName | ArtistName | MusicStatusFlag
+ *| SongName | ArtistName | ChannelName | MusicStatusFlag
*---------------------------
- *|EDbColText| EDbColText | EDbColText |
+ *|EDbColText| EDbColText | EDbColText | EDbColText |
*----------------------------------------------------------------------------
*/
void CreateSongHistoryTables2L();
@@ -266,6 +276,11 @@
*/
TInt DeleteOneHistoryL(TInt aIndex);
+ /**
+ * to wrapper the delete leaving
+ */
+ TInt DeleteOneSongHistoryL(TInt aIndex);
+
/**
* Data-structure to hold unique channel info
*/
--- a/internetradio2.0/songhistoryinc/irsonghistoryinfo.h Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/songhistoryinc/irsonghistoryinfo.h Thu Jul 22 16:31:41 2010 +0100
@@ -65,6 +65,9 @@
TInt aBitrate,
RBuf& aChannelDesc,
RBuf& aImageUrl,
+ RBuf& aGenreName,
+ RBuf& aCountryName,
+ RBuf& aLanguageName,
RBuf& aMusicStoreStatus );
/**
@@ -190,8 +193,44 @@
*CIRSongHistoryInfo::SetImageUrl()
*Function to set channel image Url
* @param RBuf aImageUrl
+ */
+ void SetImageUrl(RBuf& aImageUrl) ;
+ /**
+ *IRQSongHistoryInfo::GetGenreName()
+ *Function to get channel genre name
+ *@return RBuf& instance
*/
- void SetImageUrl(RBuf& aImageUrl) ;
+ IMPORT_C const RBuf& GetGenreName() const;
+ /**
+ *CIRSongHistoryInfo::SetGenreName()
+ *Function to set channel genre name
+ * @param RBuf aGenreName
+ */
+ void SetGenreName(const RBuf& aGenreName);
+ /**
+ *IRQSongHistoryInfo::GetCountryName()
+ *Function to get channel country name
+ *@return RBuf& instance
+ */
+ IMPORT_C const RBuf& GetCountryName() const;
+ /**
+ *CIRSongHistoryInfo::SetCountryName()
+ *Function to set channel country name
+ * @param RBuf& aCountryName
+ */
+ void SetCountryName(const RBuf& aCountryName);
+ /**
+ *IRQSongHistoryInfo::getLanguageName()
+ *Function to get channel language name
+ *@return RBuf& instance
+ */
+ IMPORT_C const RBuf& GetLanguageName() const;
+ /**
+ *CIRSongHistoryInfo::SetLanguageName()
+ *Function to set channel language name
+ * @param RBuf aLanguageName
+ */
+ void SetLanguageName(const RBuf& aLanguageName);
/**
*CIRSongHistoryInfo::SetChannelMusicStatus()
*Function to set Channel MusicStoreStatus
@@ -248,7 +287,10 @@
/**
* Channel Description.
*/
- RBuf iImageUrl;
+ RBuf iImageUrl;
+ RBuf iGenreName;
+ RBuf iCountryName;
+ RBuf iLanguageName;
/**
* Channel Id.
*/
--- a/internetradio2.0/songhistorysrc/irsonghistorydb.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/songhistorysrc/irsonghistorydb.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -58,6 +58,9 @@
_LIT( KSongHistoryDBBitrateColumn, "Bitrate" );
_LIT( KSongHistoryDBChannelDescColumn, "ChannelDescription" );
_LIT( KSongHistoryDBImageUrlColumn, "ImageUrl" );
+_LIT( KSongHistoryDBGenreNameColumn, "GenreName" );
+_LIT( KSongHistoryDBCountryNameColumn, "CountryName" );
+_LIT( KSongHistoryDBLanguageNameColumn, "LanguageName" );
_LIT( KSongHistoryDBMusicStatusColumn, "MusicStoreStatus" );
_LIT(KSongHistoryDbFile,"songhistoryDb.db");
@@ -154,20 +157,23 @@
// ---------------------------------------------------------------------------
//
TBool CIRSongHistoryDb::AddToSongHistoryDbL(const TDesC& aSongName,
- const TDesC& aArtistName,
- const TDesC& aChannelName,
- const TDesC& aChannelUrl,
- RBuf& aDelSongName,
- RBuf& aDelArtistName,
- RBuf& aDelChannelName,
- RBuf& aDelChannelUrl,
- TInt aChannelType,
- TInt aChannelId,
- TInt aBitrate,
- const TDesC& aChannelDesc,
- const TDesC& aImageUrl,
- const TDesC& aMusicFlag
- )
+ const TDesC& aArtistName,
+ const TDesC& aChannelName,
+ const TDesC& aChannelUrl,
+ RBuf& aDelSongName,
+ RBuf& aDelArtistName,
+ RBuf& aDelChannelName,
+ RBuf& aDelChannelUrl,
+ TInt aChannelType,
+ TInt aChannelId,
+ TInt aBitrate,
+ const TDesC& aChannelDesc,
+ const TDesC& aImageUrl,
+ const TDesC& aGenreName,
+ const TDesC& aCountryName,
+ const TDesC& aLanguageName,
+ const TDesC& aMusicFlag
+ )
{
IRLOG_DEBUG( "CIRSongHistoryDb::AddSongHistoryStartL" );
@@ -215,6 +221,9 @@
const TPtrC &channelUrl = aChannelUrl.Left(KIRDbMaxStrLen);
const TPtrC &channelDesc = aChannelDesc.Left(KIRDbMaxStrLen);
const TPtrC &imageUrl = aImageUrl.Left(KIRDbMaxStrLen);
+ const TPtrC &genreName = aGenreName.Left(KIRDbMaxStrLen);
+ const TPtrC &countryName = aCountryName.Left(KIRDbMaxStrLen);
+ const TPtrC &languageName = aLanguageName.Left(KIRDbMaxStrLen);
TInt songLen = aSongName.Length();
TInt artistLen = aArtistName.Length();
@@ -235,6 +244,9 @@
iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBBitrateColumn ), aBitrate);
iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBChannelDescColumn ), channelDesc);
iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBImageUrlColumn ), imageUrl);
+ iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBGenreNameColumn ), genreName);
+ iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBCountryNameColumn ), countryName);
+ iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBLanguageNameColumn ), languageName);
iSongHistoryTable.SetColL(columns->ColNo( KSongHistoryDBMusicStatusColumn ), aMusicFlag);
iSongHistoryTable.PutL();
);
@@ -256,9 +268,10 @@
// adds the history song into the db
// Returns ETure if songHistory count exceeds 100, else EFalse
// ---------------------------------------------------------------------------
-
+
TBool CIRSongHistoryDb::AddToSongHistoryDb2L( const TDesC& aSongName,
const TDesC& aArtistName,
+ const TDesC& aChannelName,
const TDesC& aMusicFlag)
{
IRLOG_DEBUG( "CIRSongHistoryDb::AddToSongHistoryDb2L" );
@@ -323,14 +336,15 @@
const TPtrC &songName = aSongName.Left(KIRDbMaxStrLen);
const TPtrC &artistName = aArtistName.Left(KIRDbMaxStrLen);
+ const TPtrC &channelName = aChannelName.Left(KIRDbMaxStrLen);
const TPtrC &musicFlag = aMusicFlag.Left(KIRDbMaxStrLen);
TInt songLen = aSongName.Length();
TInt artistLen = aArtistName.Length();
- if( songLen + artistLen > KMaxSize )
+ if( songLen + artistLen > KMaxSize || aChannelName.Length() > KMaxSize)
{
- IRLOG_DEBUG3( "CIRSongHistoryDb::AddSongHistoryStartL - LONG METADATA %d, %d", songLen, artistLen );
+ IRLOG_DEBUG3( "CIRSongHistoryDb::AddToSongHistoryDb2L - too long song info: %d or channel info: %d", songLen+artistLen, aChannelName.Length() );
}
TRAP(error,//trap start
@@ -338,6 +352,7 @@
iSongHistoryTable2.InsertL();
iSongHistoryTable2.SetColL(columns->ColNo( KSongHistoryDBSongNameColumn ), songName);
iSongHistoryTable2.SetColL(columns->ColNo( KSongHistoryDBArtistNameColumn ), artistName);
+ iSongHistoryTable2.SetColL(columns->ColNo( KSongHistoryDBChannelNameColumn ), channelName);
iSongHistoryTable2.SetColL(columns->ColNo( KSongHistoryDBMusicStatusColumn ), musicFlag);
iSongHistoryTable2.PutL();
);
@@ -378,6 +393,9 @@
TInt bitrateColumn = columns->ColNo( KSongHistoryDBBitrateColumn );
TInt channelDescColumn = columns->ColNo( KSongHistoryDBChannelDescColumn );
TInt imageUrlColumn = columns->ColNo( KSongHistoryDBImageUrlColumn );
+ TInt genreNameColumn = columns->ColNo( KSongHistoryDBGenreNameColumn );
+ TInt countryNameColumn = columns->ColNo( KSongHistoryDBCountryNameColumn );
+ TInt languageNameColumn = columns->ColNo( KSongHistoryDBLanguageNameColumn );
TInt musicStatusColumn = columns->ColNo( KSongHistoryDBMusicStatusColumn );
delete columns;
@@ -399,6 +417,9 @@
TInt bitrate;
RBuf channelDesc;
RBuf imageUrl;
+ RBuf genreName;
+ RBuf countryName;
+ RBuf languageName;
RBuf channelMusicStatus;
songName.CreateL(iSongHistoryTable.ColDes( songColumn ));
@@ -425,16 +446,26 @@
imageUrl.CreateL(iSongHistoryTable.ColDes( imageUrlColumn ));
imageUrl.CleanupClosePushL();
+ genreName.CreateL(iSongHistoryTable.ColDes( genreNameColumn ));
+ genreName.CleanupClosePushL();
+
+ countryName.CreateL(iSongHistoryTable.ColDes( countryNameColumn ));
+ countryName.CleanupClosePushL();
+
+ languageName.CreateL(iSongHistoryTable.ColDes( languageNameColumn ));
+ languageName.CleanupClosePushL();
+
channelMusicStatus.CreateL(iSongHistoryTable.ColDes( musicStatusColumn ));
channelMusicStatus.CleanupClosePushL();
aHistoryDataArr[song]->SetHistoryInfo(songName, artistName, channelUrl,
channelName,channelType,channelId,bitrate,channelDesc ,
- imageUrl, channelMusicStatus);
- ++song;
-
-
+ imageUrl, genreName, countryName, languageName, channelMusicStatus);
+ ++song;
CleanupStack::PopAndDestroy(&channelMusicStatus);
+ CleanupStack::PopAndDestroy(&languageName);
+ CleanupStack::PopAndDestroy(&countryName);
+ CleanupStack::PopAndDestroy(&genreName);
CleanupStack::PopAndDestroy(&imageUrl);
CleanupStack::PopAndDestroy(&channelDesc);
CleanupStack::PopAndDestroy(&channelUrl);
@@ -465,6 +496,7 @@
CDbColSet* columns = iSongHistoryTable2.ColSetL();
TInt songColumn = columns->ColNo( KSongHistoryDBSongNameColumn );
TInt artistColumn = columns->ColNo( KSongHistoryDBArtistNameColumn );
+ TInt channelNameColumn = columns->ColNo( KSongHistoryDBChannelNameColumn );
TInt musicStatusColumn = columns->ColNo( KSongHistoryDBMusicStatusColumn );
delete columns;
@@ -477,7 +509,7 @@
iSongHistoryTable2.GetL();
RBuf songName;
- RBuf artistInfo;
+ RBuf artistInfo, channelName;
RBuf musicStatus;
songName.Create(iSongHistoryTable2.ColDes( songColumn ));
@@ -486,15 +518,20 @@
artistInfo.Create(iSongHistoryTable2.ColDes( artistColumn ));
artistInfo.CleanupClosePushL();
+ channelName.Create(iSongHistoryTable2.ColDes( channelNameColumn ));
+ channelName.CleanupClosePushL();
+
musicStatus.Create(iSongHistoryTable2.ColDes(musicStatusColumn));
musicStatus.CleanupClosePushL();
aSongEntries[song]->SetSongName(songName);
aSongEntries[song]->SetArtist(artistInfo);
+ aSongEntries[song]->SetChannelName(channelName);
aSongEntries[song]->SetChannelMusicStatus(musicStatus);
++song;
CleanupStack::PopAndDestroy(&musicStatus);
+ CleanupStack::PopAndDestroy(&channelName);
CleanupStack::PopAndDestroy(&artistInfo);
CleanupStack::PopAndDestroy(&songName);
}
@@ -586,6 +623,54 @@
return KErrNone;
}
+TInt CIRSongHistoryDb::DeleteOneSongHistory(TInt aIndex)
+{
+ IRLOG_DEBUG( "CIRSongHistoryDb::DeleteOneSongHistory - Entering" );
+
+ TInt retValue = 0;
+ TRAPD(error,(retValue = DeleteOneSongHistoryL(aIndex)));
+
+ if( KErrNone != error )
+ {
+ return error;
+ }
+
+ if( KErrNone != retValue)
+ {
+ return retValue;
+ }
+ IRLOG_DEBUG( "CIRSongHistoryDb::DeleteOneSongHistory - exiting" );
+ return KErrNone;
+}
+
+TInt CIRSongHistoryDb::DeleteOneSongHistoryL(TInt aIndex)
+{
+ IRLOG_DEBUG( "CIRSongHistoryDb::DeleteOneSongHistoryL - Entering" );
+ TInt totalCount = iSongHistoryTable2.CountL();
+ if (aIndex < 0 || aIndex >= totalCount)
+ {
+ return KErrArgument;
+ }
+
+ iSongHistoryTable2.LastL();
+ TInt tempIndex = 0;
+ while (tempIndex < aIndex)
+ {
+ TRAPD(error,iSongHistoryTable2.PreviousL());
+ if (KErrNone != error)
+ {
+ Compact();
+ return error;
+ }
+ tempIndex++;
+ }
+
+ iSongHistoryTable2.GetL();
+ iSongHistoryTable2.DeleteL();
+ IRLOG_DEBUG( "CIRSongHistoryDb::DeleteOneSongHistoryL - exiting" );
+ return KErrNone;
+}
+
// ---------------------------------------------------------------------------
// Function : ClearAllSongHistoryFromDb2
// delete all the entries from the database.
@@ -667,9 +752,9 @@
* ---------------------------------------------------------------------------
* SongHistoryTable
*---------------------------
-*| SongName | ArtistName | ChannelName | ChannelUrl | ChannelType | ChannelId | Bitrate | ChannelDesc | ImageUrl
+*| SongName | ArtistName | ChannelName | ChannelUrl | ChannelType | ChannelId | Bitrate | ChannelDesc | ImageUrl | GenreName | CountryName | LanguageName | MusicStatus
*---------------------------
-*|EDbColText| EDbColText | EDbColText | EDbColText | EDbColUint8 | EDbColUint16 | EDbColUint16 | EDbColText | EDbColText
+*|EDbColText| EDbColText | EDbColText | EDbColText | EDbColUint8 | EDbColUint16 | EDbColUint16 | EDbColText | EDbColText | EDbColText | EDbColText | EDbColText | EDbColText
*----------------------------------------------------------------------------
*/
void CIRSongHistoryDb::CreateSongHistoryTablesL()
@@ -687,6 +772,9 @@
columns->AddL( TDbCol( KSongHistoryDBBitrateColumn, EDbColUint16 ) );
columns->AddL( TDbCol( KSongHistoryDBChannelDescColumn, EDbColText, KMaxColumnLength ) );
columns->AddL( TDbCol( KSongHistoryDBImageUrlColumn, EDbColText, KMaxColumnLength ) );
+ columns->AddL( TDbCol( KSongHistoryDBGenreNameColumn, EDbColText, KMaxColumnLength ) );
+ columns->AddL( TDbCol( KSongHistoryDBCountryNameColumn, EDbColText, KMaxColumnLength ) );
+ columns->AddL( TDbCol( KSongHistoryDBLanguageNameColumn, EDbColText, KMaxColumnLength ) );
columns->AddL( TDbCol( KSongHistoryDBMusicStatusColumn, EDbColText, KMaxColumnLength ) );
);
User::LeaveIfError( error );
@@ -704,9 +792,9 @@
* ---------------------------------------------------------------------------
* SongHistoryTable
*---------------------------
-*| SongName | ArtistName | MusicStatusFlag
+*| SongName | ArtistName | ChannelName | MusicStatusFlag
*---------------------------
-*|EDbColText| EDbColText | EDbColText
+*|EDbColText| EDbColText | EDbColText | EDbColText
*----------------------------------------------------------------------------
*/
void CIRSongHistoryDb::CreateSongHistoryTables2L()
@@ -716,7 +804,8 @@
TRAPD( error,
columns->AddL( TDbCol( KSongHistoryDBSongNameColumn, EDbColText, KMaxColumnLength ) );
- columns->AddL( TDbCol( KSongHistoryDBArtistNameColumn, EDbColText, KMaxColumnLength) );
+ columns->AddL( TDbCol( KSongHistoryDBArtistNameColumn, EDbColText, KMaxColumnLength) );
+ columns->AddL( TDbCol( KSongHistoryDBChannelNameColumn, EDbColText, KMaxColumnLength) );
columns->AddL( TDbCol( KSongHistoryDBMusicStatusColumn, EDbColText, KMaxColumnLength ) );
);
User::LeaveIfError( error );
@@ -942,6 +1031,9 @@
TInt bitrateColumn = columns->ColNo( KSongHistoryDBBitrateColumn );
TInt channelDescColumn = columns->ColNo( KSongHistoryDBChannelDescColumn );
TInt imageUrlColumn = columns->ColNo( KSongHistoryDBImageUrlColumn );
+ TInt genreNameColumn = columns->ColNo( KSongHistoryDBGenreNameColumn );
+ TInt countryNameColumn = columns->ColNo( KSongHistoryDBCountryNameColumn );
+ TInt languageNameColumn = columns->ColNo( KSongHistoryDBLanguageNameColumn );
TInt musicStatusColumn = columns->ColNo( KSongHistoryDBMusicStatusColumn );
delete columns;
@@ -953,12 +1045,18 @@
iSongHistoryTable.GetL();
// Extracting the values from the database.
TInt channelId;
- RBuf imageUrl;
+ RBuf imageUrl, genreName, countryName, languageName;
RBuf channelMusicStatus;
channelId=iSongHistoryTable.ColUint16( channelIdColumn );
- imageUrl.Create(iSongHistoryTable.ColDes( imageUrlColumn ));
- imageUrl.CleanupClosePushL();
+ imageUrl.Create(iSongHistoryTable.ColDes( imageUrlColumn ));
+ imageUrl.CleanupClosePushL();
+ genreName.Create(iSongHistoryTable.ColDes( genreNameColumn ));
+ genreName.CleanupClosePushL();
+ countryName.Create(iSongHistoryTable.ColDes( countryNameColumn ));
+ countryName.CleanupClosePushL();
+ languageName.Create(iSongHistoryTable.ColDes( languageNameColumn ));
+ languageName.CleanupClosePushL();
channelMusicStatus.Create(iSongHistoryTable.ColDes( musicStatusColumn ));
channelMusicStatus.CleanupClosePushL();
@@ -968,11 +1066,17 @@
iSongHistoryTable.UpdateL();
iSongHistoryTable.SetColL(channelTypeColumn, 0);
iSongHistoryTable.SetColL(channelIdColumn, 0);
- iSongHistoryTable.SetColL(imageUrlColumn, KNo);
+ iSongHistoryTable.SetColL(imageUrlColumn, KNo);
+ iSongHistoryTable.SetColL(genreNameColumn, KNo);
+ iSongHistoryTable.SetColL(countryNameColumn, KNo);
+ iSongHistoryTable.SetColL(languageNameColumn, KNo);
iSongHistoryTable.SetColL(musicStatusColumn, KNo);
iSongHistoryTable.PutL();
}
CleanupStack::PopAndDestroy(&channelMusicStatus);
+ CleanupStack::PopAndDestroy(&languageName);
+ CleanupStack::PopAndDestroy(&countryName);
+ CleanupStack::PopAndDestroy(&genreName);
CleanupStack::PopAndDestroy(&imageUrl);
}
iSongHistoryTable.Reset();
@@ -1032,17 +1136,18 @@
//
TInt CIRSongHistoryDb::UpdateSongHistoryDbL( TInt aChannelId,
- const TDesC& aChannelName,
const TDesC& aChannelUrl,
- const TDesC& aImageUrl,
+ const TDesC& aImageUrl,
+ const TDesC& aGenreName,
+ const TDesC& aCountryName,
+ const TDesC& aLanguageName,
const TDesC& aMusicFlag)
{
IRLOG_DEBUG( "CIRSongHistoryDb::UpdateSongHistoryDbL" );
TBool channelChanged = EFalse ;
- TInt compFlagName ;
TInt compFlagUrl ;
- TInt compFlagImageUrl ;
+ TInt compFlagImageUrl, compFlagGenreName, compFlagCountryName, compFlagLanguageName;
TInt compFlagMusic ;
TInt compUrlChange ;
@@ -1052,12 +1157,14 @@
}
CDbColSet* columns = iSongHistoryTable.ColSetL();
- TInt channelColumn = columns->ColNo( KSongHistoryDBChannelNameColumn );
TInt channelUrlColumn = columns->ColNo( KSongHistoryDBChannelUrlColumn );
TInt channelTypeColumn = columns->ColNo( KSongHistoryDBChannelTypeColumn );
TInt channelIdColumn = columns->ColNo( KSongHistoryDBChannelIdColumn );
TInt channelDescColumn = columns->ColNo( KSongHistoryDBChannelDescColumn );
TInt imageUrlColumn = columns->ColNo( KSongHistoryDBImageUrlColumn );
+ TInt genreNameColumn = columns->ColNo( KSongHistoryDBGenreNameColumn );
+ TInt countryNameColumn = columns->ColNo( KSongHistoryDBCountryNameColumn );
+ TInt languageNameColumn = columns->ColNo( KSongHistoryDBLanguageNameColumn );
TInt musicStatusColumn = columns->ColNo( KSongHistoryDBMusicStatusColumn );
delete columns;
@@ -1069,19 +1176,22 @@
{
iSongHistoryTable.GetL();
// Extracting the values from the database.
- RBuf channelName;
RBuf channelUrl;
- RBuf imageUrl;
+ RBuf imageUrl, genreName, countryName, languageName;
TInt channelId;
RBuf channelMusicStatus;
- channelName.Create(iSongHistoryTable.ColDes( channelColumn ));
- channelName.CleanupClosePushL();
channelUrl.Create(iSongHistoryTable.ColDes( channelUrlColumn ));
channelUrl.CleanupClosePushL();
imageUrl.Create(iSongHistoryTable.ColDes( imageUrlColumn ));
imageUrl.CleanupClosePushL();
+ genreName.Create(iSongHistoryTable.ColDes( genreNameColumn ));
+ genreName.CleanupClosePushL();
+ countryName.Create(iSongHistoryTable.ColDes( countryNameColumn ));
+ countryName.CleanupClosePushL();
+ languageName.Create(iSongHistoryTable.ColDes( languageNameColumn ));
+ languageName.CleanupClosePushL();
channelId=iSongHistoryTable.ColUint16( channelIdColumn );
@@ -1090,17 +1200,12 @@
if(aChannelId == channelId)
{
- compFlagName = (channelName).Compare(aChannelName);
compFlagUrl = (channelUrl).Compare(aChannelUrl);
- compFlagImageUrl = (imageUrl).Compare(aImageUrl);
+ compFlagImageUrl = (imageUrl).Compare(aImageUrl);
+ compFlagGenreName = (genreName).Compare(aGenreName);
+ compFlagCountryName = (countryName).Compare(aCountryName);
+ compFlagLanguageName = (languageName).Compare(aLanguageName);
compFlagMusic = (channelMusicStatus).Compare(aMusicFlag);
- if(compFlagName)
- {
- iSongHistoryTable.UpdateL();
- iSongHistoryTable.SetColL(channelColumn, aChannelName);
- iSongHistoryTable.PutL();
- channelChanged = ETrue ;
- }
compUrlChange = (aChannelUrl).Compare(KNo);
if(compFlagUrl && compUrlChange)
@@ -1110,13 +1215,34 @@
iSongHistoryTable.PutL();
channelChanged = ETrue ;
}
- if(compFlagImageUrl)
- {
- iSongHistoryTable.UpdateL();
- iSongHistoryTable.SetColL(imageUrlColumn, aImageUrl);
- iSongHistoryTable.PutL();
- channelChanged = ETrue ;
- }
+ if(compFlagImageUrl)
+ {
+ iSongHistoryTable.UpdateL();
+ iSongHistoryTable.SetColL(imageUrlColumn, aImageUrl);
+ iSongHistoryTable.PutL();
+ channelChanged = ETrue ;
+ }
+ if(compFlagGenreName)
+ {
+ iSongHistoryTable.UpdateL();
+ iSongHistoryTable.SetColL(genreNameColumn, aGenreName);
+ iSongHistoryTable.PutL();
+ channelChanged = ETrue ;
+ }
+ if(compFlagCountryName)
+ {
+ iSongHistoryTable.UpdateL();
+ iSongHistoryTable.SetColL(countryNameColumn, aCountryName);
+ iSongHistoryTable.PutL();
+ channelChanged = ETrue ;
+ }
+ if(compFlagLanguageName)
+ {
+ iSongHistoryTable.UpdateL();
+ iSongHistoryTable.SetColL(languageNameColumn, aLanguageName);
+ iSongHistoryTable.PutL();
+ channelChanged = ETrue ;
+ }
if(compFlagMusic)
{
iSongHistoryTable.UpdateL();
@@ -1127,9 +1253,11 @@
}
CleanupStack::PopAndDestroy(&channelMusicStatus);
+ CleanupStack::PopAndDestroy(&languageName);
+ CleanupStack::PopAndDestroy(&countryName);
+ CleanupStack::PopAndDestroy(&genreName);
CleanupStack::PopAndDestroy(&imageUrl);
CleanupStack::PopAndDestroy(&channelUrl);
- CleanupStack::PopAndDestroy(&channelName);
}
iSongHistoryTable.Reset();
@@ -1138,12 +1266,13 @@
}
void CIRSongHistoryDb::SearchAndDeleteRecordL(const TDesC& aChannelName, const TDesC& aChannelUrl,
- TInt aChannelType)
+ TInt aChannelType, TInt aPresetId)
{
CDbColSet* columns = iSongHistoryTable.ColSetL();
TInt channelNameColumn = columns->ColNo( KSongHistoryDBChannelNameColumn );
TInt channelUrlColumn = columns->ColNo( KSongHistoryDBChannelUrlColumn );
TInt channelTypeColumn = columns->ColNo( KSongHistoryDBChannelTypeColumn );
+ TInt channelIdColumn = columns->ColNo(KSongHistoryDBChannelIdColumn);
delete columns;
columns = NULL;
@@ -1154,11 +1283,27 @@
TPtrC channelName = iSongHistoryTable.ColDes(channelNameColumn);
TPtrC channelUrl = iSongHistoryTable.ColDes(channelUrlColumn);
TInt channelType = iSongHistoryTable.ColInt(channelTypeColumn);
+ TInt channelId = iSongHistoryTable.ColInt(channelIdColumn);
- if (aChannelName == channelName && aChannelUrl == channelUrl && aChannelType == channelType)
+ if (0 == aChannelType)
{
- iSongHistoryTable.DeleteL();
- return;
+ //user-defined channel
+ if (aChannelName == channelName && aChannelUrl == channelUrl)
+ {
+ iSongHistoryTable.DeleteL();
+ break;
+ }
+ }
+ else
+ {
+ //channel from ISDS server
+ if (aChannelName == channelName && aPresetId == channelId)
+ {
+ iSongHistoryTable.DeleteL();
+ break;
+ }
}
}
+
+ iSongHistoryTable.Reset();
}
--- a/internetradio2.0/songhistorysrc/irsonghistoryinfo.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/internetradio2.0/songhistorysrc/irsonghistoryinfo.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -59,7 +59,10 @@
iChannelDescription.Close();
- iImageUrl.Close();
+ iImageUrl.Close();
+ iGenreName.Close();
+ iCountryName.Close();
+ iLanguageName.Close();
iMusicStoreStatus.Close();
@@ -124,7 +127,7 @@
{
iChannelDescription.Create(aChannelDesc);
}
- // ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
// CIRSongHistoryInfo::SetImageUrl
// Sets Channel image Url
// ---------------------------------------------------------------------------
@@ -133,6 +136,36 @@
{
iImageUrl.Create(aImageUrl);
}
+
+ // ---------------------------------------------------------------------------
+ // CIRSongHistoryInfo::SetGenreName
+ // Set channel genre name
+ // ---------------------------------------------------------------------------
+ //
+void CIRSongHistoryInfo::SetGenreName(const RBuf& aGenreName)
+{
+ iGenreName.Create(aGenreName);
+}
+
+// ---------------------------------------------------------------------------
+// CIRSongHistoryInfo::SetCountryName
+// Set channel country name
+// ---------------------------------------------------------------------------
+//
+void CIRSongHistoryInfo::SetCountryName(const RBuf& aCountryName)
+{
+ iCountryName.Create(aCountryName);
+}
+
+// ---------------------------------------------------------------------------
+// CIRSongHistoryInfo::SetLanguageName
+// Set channel language name
+// ---------------------------------------------------------------------------
+//
+void CIRSongHistoryInfo::SetLanguageName(const RBuf& aLanguageName)
+{
+ iLanguageName.Create(aLanguageName);
+}
// ---------------------------------------------------------------------------
// CIRSongHistoryInfo::SetChannelMusicStatus
// Sets Channel's MusicStoreStatus
@@ -175,6 +208,7 @@
// Sets Song History Information.
// ---------------------------------------------------------------------------
//
+
EXPORT_C void CIRSongHistoryInfo::SetHistoryInfo(RBuf& aSongName,
RBuf& aArtist,
RBuf& aStreamUrl,
@@ -183,7 +217,10 @@
TInt aChannelId,
TInt aBitrate,
RBuf& aChannelDesc,
- RBuf& aImageUrl,
+ RBuf& aImageUrl,
+ RBuf& aGenreName,
+ RBuf& aCountryName,
+ RBuf& aLanguageName,
RBuf& aMusicStoreStatus
)
{
@@ -196,6 +233,9 @@
SetBitrate(aBitrate);
SetChannelDesc(aChannelDesc);
SetImageUrl(aImageUrl);
+ SetGenreName(aGenreName);
+ SetCountryName(aCountryName);
+ SetLanguageName(aLanguageName);
SetChannelMusicStatus(aMusicStoreStatus);
}
@@ -249,15 +289,45 @@
return iChannelDescription;
}
- // ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
// CIRSongHistoryInfo::GetImageUrl
// Gets Channel image Url
// ---------------------------------------------------------------------------
//
-EXPORT_C const RBuf& CIRSongHistoryInfo::GetImageUrl() const
-{
- return iImageUrl;
-}
+ EXPORT_C const RBuf& CIRSongHistoryInfo::GetImageUrl() const
+ {
+ return iImageUrl;
+ }
+ // ---------------------------------------------------------------------------
+ // CIRSongHistoryInfo::GetGenreName
+ // Get channel genre name
+ // ---------------------------------------------------------------------------
+ //
+
+const RBuf& CIRSongHistoryInfo::GetGenreName() const
+ {
+ return iGenreName;
+ }
+
+// ---------------------------------------------------------------------------
+// CIRSongHistoryInfo::GetCountryName
+// Get channel country name
+// ---------------------------------------------------------------------------
+//
+const RBuf& CIRSongHistoryInfo::GetCountryName() const
+ {
+ return iCountryName;
+ }
+
+// ---------------------------------------------------------------------------
+// CIRSongHistoryInfo::GetLanguageName
+// Get channel language name
+// ---------------------------------------------------------------------------
+//
+const RBuf& CIRSongHistoryInfo::GetLanguageName() const
+ {
+ return iLanguageName;
+ }
// ---------------------------------------------------------------------------
// CIRSongHistoryInfo::GetChannelType
--- a/layers.sysdef.xml Mon Jun 21 22:33:45 2010 +0100
+++ b/layers.sysdef.xml Thu Jul 22 16:31:41 2010 +0100
@@ -15,9 +15,9 @@
<unit unitID="qtinternetradio" mrp="" bldFile="&layer_real_source_path;/qtinternetradio" name="qtinternetradio" proFile="all.pro" qmakeArgs="-r -config rom"/>
</module>
</layer>
- <layer name="app_test_layer">
+ <layer name="qt_unit_test_layer">
<module name="qtinternetradio_test">
- <unit unitID="qtinternetradio_test" mrp="" bldFile="&layer_real_source_path;/qtinternetradio/internal/tsrc" name="qtinternetradio_test" proFile="tsrc.pro" qmakeArgs="-r -config rom"/>
+ <unit unitID="qtinternetradio_test" mrp="" bldFile="&layer_real_source_path;/qtinternetradio/internal/tsrc" name="qtinternetradio_test" proFile="tsrc.pro" qmakeArgs="-r" filter="TA_InternetRadio"/>
</module>
</layer>
</systemModel>
--- a/presetserver/clientinc/pspresetinterface.h Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientinc/pspresetinterface.h Thu Jul 22 16:31:41 2010 +0100
@@ -19,8 +19,8 @@
#ifndef C_CPSPRESETINTERFACE_H
#define C_CPSPRESETINTERFACE_H
-#include <pspresetobserver.h>
-#include <pstransaction.h>
+#include "pspresetobserver.h"
+#include "pstransaction.h"
const TUid KPSPresetInterface = { 0x10281CB6 }; /**< The ECOM interface UID for preset plugins. */
--- a/presetserver/clientinc/psserv.h Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientinc/psserv.h Thu Jul 22 16:31:41 2010 +0100
@@ -19,9 +19,10 @@
#ifndef R_RPSSERV_H
#define R_RPSSERV_H
-#include <pscommon.h>
#include <s32mem.h>
+#include "pscommon.h"
+
class CPSPresetInterface;
/**
--- a/presetserver/clientinc/psservnotifier.h Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientinc/psservnotifier.h Thu Jul 22 16:31:41 2010 +0100
@@ -19,8 +19,8 @@
#ifndef R_RPSPRESETNOTIFIER_H
#define R_RPSPRESETNOTIFIER_H
-#include <pscommon.h>
-#include <pspresetobserver.h>
+#include "pscommon.h"
+#include "pspresetobserver.h"
class RPSServ;
--- a/presetserver/clientinc/psservsession.h Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientinc/psservsession.h Thu Jul 22 16:31:41 2010 +0100
@@ -20,7 +20,8 @@
#define R_RPSSERVSESSION_H
#include <e32base.h>
-#include <pscommon.h>
+
+#include "pscommon.h"
class RPSServ;
--- a/presetserver/clientsrc/Pspresetinterface.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientsrc/Pspresetinterface.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -17,12 +17,12 @@
#include <ecom.h>
-#include <pscommon.h>
-#include <pspresetinterface.h>
-#include <pspresetnotifier.h>
-#include <pstransaction.h>
#include <s32mem.h>
+#include "pscommon.h"
+#include "pspresetinterface.h"
+#include "pspresetnotifier.h"
+#include "pstransaction.h"
#include "psdebug.h"
#include "psservsession.h"
--- a/presetserver/clientsrc/Pspresetnotifier.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientsrc/Pspresetnotifier.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,9 +16,8 @@
*/
-#include <pspresetnotifier.h>
-#include <psserv.h>
-
+#include "pspresetnotifier.h"
+#include "psserv.h"
#include "psservnotifier.h"
const TInt KPSDefaultNotifierPriority = CActive::EPriorityLow; // Priority of the non-preset notifiers.
--- a/presetserver/clientsrc/Psserv.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientsrc/Psserv.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,8 +16,8 @@
*/
-#include <pspresetinterface.h>
-#include <psserv.h>
+#include "pspresetinterface.h"
+#include "psserv.h"
// ======== LOCAL FUNCTIONS ========
--- a/presetserver/clientsrc/Psservnotifier.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientsrc/Psservnotifier.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,9 +16,8 @@
*/
-#include <pscommon.h>
-#include <psserv.h>
-
+#include "pscommon.h"
+#include "psserv.h"
#include "psservnotifier.h"
// ======== LOCAL FUNCTIONS ========
--- a/presetserver/clientsrc/Psservsession.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientsrc/Psservsession.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,9 +16,8 @@
*/
-#include <pscommon.h>
-#include <psserv.h>
-
+#include "pscommon.h"
+#include "psserv.h"
#include "psservsession.h"
// ---------------------------------------------------------------------------
--- a/presetserver/clientsrc/Pstransaction.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/clientsrc/Pstransaction.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,7 +16,7 @@
*/
-#include <pstransaction.h>
+#include "pstransaction.h"
// ---------------------------------------------------------------------------
// Two-phased constructor.
--- a/presetserver/group/bld.inf Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/group/bld.inf Thu Jul 22 16:31:41 2010 +0100
@@ -21,14 +21,6 @@
ARMV5 WINSCW
PRJ_EXPORTS
-../clientinc/pspresetinterface.h /epoc32/include/pspresetinterface.h
-../clientinc/pspresetnotifier.h /epoc32/include/pspresetnotifier.h
-../clientinc/psserv.h /epoc32/include/psserv.h
-../clientinc/psserv.inl /epoc32/include/psserv.inl
-../clientinc/pstransaction.h /epoc32/include/pstransaction.h
-../include/pscommon.h /epoc32/include/pscommon.h
-../serverinc/pspresetobserver.h /epoc32/include/pspresetobserver.h
-
backup_registration.xml /epoc32/data/z/private/10281cb5/backup_registration.xml
../rom/presetserver.iby CORE_APP_LAYER_IBY_EXPORT_PATH(presetserver.iby)
--- a/presetserver/group/psclient.mmp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/group/psclient.mmp Thu Jul 22 16:31:41 2010 +0100
@@ -40,6 +40,7 @@
SOURCE Pstransaction.cpp
USERINCLUDE ../clientinc
+USERINCLUDE ../serverinc
USERINCLUDE ../include
APP_LAYER_SYSTEMINCLUDE
--- a/presetserver/group/psserver.mmp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/group/psserver.mmp Thu Jul 22 16:31:41 2010 +0100
@@ -46,6 +46,7 @@
USERINCLUDE ../include
USERINCLUDE ../serverinc
+USERINCLUDE ../clientinc
APP_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(ecom)
--- a/presetserver/include/pscommon.h Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/include/pscommon.h Thu Jul 22 16:31:41 2010 +0100
@@ -20,7 +20,8 @@
#define PSCOMMON_H
#include <e32std.h>
-#include <pspresetobserver.h>
+
+#include "pspresetobserver.h"
const TInt KPSVersionMajor = 1; /**< Major version number of the server. */
const TInt KPSVersionMinor = 0; /**< Minor version number of the server. */
--- a/presetserver/rom/presetserver.iby Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/rom/presetserver.iby Thu Jul 22 16:31:41 2010 +0100
@@ -23,7 +23,6 @@
file = ABI_DIR\BUILD_DIR\psclient100.dll SHARED_LIB_DIR\psclient100.dll
-data = DATAZ_\SYSTEM\install\presetserver.sis SYSTEM\install\presetserver.sis
data = ZPRIVATE\10281cb5\backup_registration.xml PRIVATE\10281cb5\backup_registration.xml
ECOM_PLUGIN(psrfsplugin.dll, 10282bb2.rsc)
--- a/presetserver/serverinc/psserver.h Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/serverinc/psserver.h Thu Jul 22 16:31:41 2010 +0100
@@ -19,9 +19,8 @@
#ifndef C_CPSSERVER_H
#define C_CPSSERVER_H
-#include <pscommon.h>
-#include <pspresetobserver.h>
-
+#include "pscommon.h"
+#include "pspresetobserver.h"
#include "psdatabase.h"
#include "pspropertyobserver.h"
--- a/presetserver/serversrc/Psdatabase.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/serversrc/Psdatabase.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -17,8 +17,8 @@
#include <bautils.h>
-#include <pscommon.h>
+#include "pscommon.h"
#include "psdebug.h"
#include "pspendingpreset.h"
#include "psdatabase.h"
--- a/presetserver/serversrc/Psdatabasecleanup.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/serversrc/Psdatabasecleanup.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -17,8 +17,8 @@
#include <ecom.h>
-#include <pspresetinterface.h>
+#include "pspresetinterface.h"
#include "psdatabase.h"
#include "psdatabasecleanup.h"
#include "psdebug.h"
--- a/presetserver/serversrc/Psserver.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/serversrc/Psserver.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -15,10 +15,9 @@
*
*/
-
-#include <pscommon.h>
#include <sbdefs.h>
+#include "pscommon.h"
#include "psdatabasecleanup.h"
#include "psdebug.h"
#include "pspendingpreset.h"
--- a/presetserver/serversrc/Pssession.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/presetserver/serversrc/Pssession.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -15,10 +15,9 @@
*
*/
-
-#include <pscommon.h>
#include <s32mem.h>
+#include "pscommon.h"
#include "psdebug.h"
#include "psserver.h"
#include "pssession.h"
--- a/qtinternetradio/all.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/all.pro Thu Jul 22 16:31:41 2010 +0100
@@ -37,7 +37,8 @@
irqnetworkcontroller \
irqsonghistory \
irqnwkinfoobserver \
- irqstatisticsreporter \
+ irqstatisticsreporter \
+ irhswidgetplugin \
ui
SYMBIAN_PLATFORMS = WINSCW ARMV5
--- a/qtinternetradio/bwins/irqfavoritesu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/bwins/irqfavoritesu.def Thu Jul 22 16:31:41 2010 +0100
@@ -28,4 +28,5 @@
?qt_metacast@IRQFavoritesDB@@UAEPAXPBD@Z @ 27 NONAME ; void * IRQFavoritesDB::qt_metacast(char const *)
?getStaticMetaObject@IRQFavoritesDB@@SAABUQMetaObject@@XZ @ 28 NONAME ; struct QMetaObject const & IRQFavoritesDB::getStaticMetaObject(void)
??0IRQFavoritesDB@@QAE@XZ @ 29 NONAME ; IRQFavoritesDB::IRQFavoritesDB(void)
+ ?renamePreset@IRQFavoritesDB@@QAEHABVIRQPreset@@ABVQString@@@Z @ 30 NONAME ; int IRQFavoritesDB::renamePreset(class IRQPreset const &, class QString const &)
--- a/qtinternetradio/bwins/irqloggeru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/bwins/irqloggeru.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,11 +1,12 @@
EXPORTS
?uninstallMessageHandler@FileLogger@@AAEXXZ @ 1 NONAME ; void FileLogger::uninstallMessageHandler(void)
?handleMessage@FileLogger@@CAXW4QtMsgType@@PBD@Z @ 2 NONAME ; void FileLogger::handleMessage(enum QtMsgType, char const *)
- ??0MethodLogger@@QAE@PBD@Z @ 3 NONAME ; MethodLogger::MethodLogger(char const *)
- ?connectAndAssert@@YA_NPBVQObject@@PBD01W4ConnectionType@Qt@@@Z @ 4 NONAME ; bool connectAndAssert(class QObject const *, char const *, class QObject const *, char const *, enum Qt::ConnectionType)
- ??1FileLogger@@QAE@XZ @ 5 NONAME ; FileLogger::~FileLogger(void)
- ?writeLog@SymbianLogger@@SAXABVQString@@@Z @ 6 NONAME ; void SymbianLogger::writeLog(class QString const &)
- ?connectAndTest@@YA_NPBVQObject@@PBD01W4ConnectionType@Qt@@@Z @ 7 NONAME ; bool connectAndTest(class QObject const *, char const *, class QObject const *, char const *, enum Qt::ConnectionType)
- ?installMessageHandler@FileLogger@@AAEXABVQString@@_N@Z @ 8 NONAME ; void FileLogger::installMessageHandler(class QString const &, bool)
- ??0FileLogger@@QAE@ABVQString@@_N@Z @ 9 NONAME ; FileLogger::FileLogger(class QString const &, bool)
- ??1MethodLogger@@QAE@XZ @ 10 NONAME ; MethodLogger::~MethodLogger(void)
\ No newline at end of file
+ ?installLogDir@@YAXXZ @ 3 NONAME ; void installLogDir(void)
+ ??0MethodLogger@@QAE@PBD@Z @ 4 NONAME ; MethodLogger::MethodLogger(char const *)
+ ?connectAndAssert@@YA_NPBVQObject@@PBD01W4ConnectionType@Qt@@@Z @ 5 NONAME ; bool connectAndAssert(class QObject const *, char const *, class QObject const *, char const *, enum Qt::ConnectionType)
+ ??1FileLogger@@QAE@XZ @ 6 NONAME ; FileLogger::~FileLogger(void)
+ ?writeLog@SymbianLogger@@SAXABVQString@@@Z @ 7 NONAME ; void SymbianLogger::writeLog(class QString const &)
+ ?connectAndTest@@YA_NPBVQObject@@PBD01W4ConnectionType@Qt@@@Z @ 8 NONAME ; bool connectAndTest(class QObject const *, char const *, class QObject const *, char const *, enum Qt::ConnectionType)
+ ?installMessageHandler@FileLogger@@AAEXABVQString@@_N@Z @ 9 NONAME ; void FileLogger::installMessageHandler(class QString const &, bool)
+ ??0FileLogger@@QAE@ABVQString@@_N@Z @ 10 NONAME ; FileLogger::FileLogger(class QString const &, bool)
+ ??1MethodLogger@@QAE@XZ @ 11 NONAME ; MethodLogger::~MethodLogger(void)
\ No newline at end of file
--- a/qtinternetradio/bwins/irqnetworkcontrolleru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/bwins/irqnetworkcontrolleru.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,19 +1,15 @@
EXPORTS
- ?getNetworkList@IRQNetworkController@@QAEXAAV?$QList@K@@@Z @ 1 NONAME ; void IRQNetworkController::getNetworkList(class QList<unsigned long> &)
- ?isWlanSupported@IRQNetworkController@@QBE_NXZ @ 2 NONAME ; bool IRQNetworkController::isWlanSupported(void) const
- ?getIAPId@IRQNetworkController@@QBE?AW4IRQError@@AAK@Z @ 3 NONAME ; enum IRQError IRQNetworkController::getIAPId(unsigned long &) const
- ?getApIdList@IRQNetworkController@@QAEXAAV?$QList@K@@@Z @ 4 NONAME ; void IRQNetworkController::getApIdList(class QList<unsigned long> &)
- ?cancelConnecting@IRQNetworkController@@QAEXXZ @ 5 NONAME ; void IRQNetworkController::cancelConnecting(void)
- ?isHandlingOverConnection@IRQNetworkController@@QAE_NXZ @ 6 NONAME ; bool IRQNetworkController::isHandlingOverConnection(void)
- ?getBearerList@IRQNetworkController@@QAEXAAV?$QList@K@@@Z @ 7 NONAME ; void IRQNetworkController::getBearerList(class QList<unsigned long> &)
- ?getAccessPointList@IRQNetworkController@@QAEXAAVQStringList@@@Z @ 8 NONAME ; void IRQNetworkController::getAccessPointList(class QStringList &)
- ?identifyConnectionType@IRQNetworkController@@QBE?AW4IRQConnectionType@@XZ @ 9 NONAME ; enum IRQConnectionType IRQNetworkController::identifyConnectionType(void) const
- ?openInstance@IRQNetworkController@@SAPAV1@XZ @ 10 NONAME ; class IRQNetworkController * IRQNetworkController::openInstance(void)
- ?closeInstance@IRQNetworkController@@QAEXXZ @ 11 NONAME ; void IRQNetworkController::closeInstance(void)
- ?notifyActiveNetworkObservers@IRQNetworkController@@QAEXW4IRQNetworkEvent@@@Z @ 12 NONAME ; void IRQNetworkController::notifyActiveNetworkObservers(enum IRQNetworkEvent)
- ?getNetworkStatus@IRQNetworkController@@QBE_NXZ @ 13 NONAME ; bool IRQNetworkController::getNetworkStatus(void) const
- ?resetConnectionStatus@IRQNetworkController@@QAEXXZ @ 14 NONAME ; void IRQNetworkController::resetConnectionStatus(void)
- ?isOfflineMode@IRQNetworkController@@QAE_NXZ @ 15 NONAME ; bool IRQNetworkController::isOfflineMode(void)
- ?isConnectRequestIssued@IRQNetworkController@@QBE_NXZ @ 16 NONAME ; bool IRQNetworkController::isConnectRequestIssued(void) const
- ?chooseAccessPoint@IRQNetworkController@@QAEXXZ @ 17 NONAME ; void IRQNetworkController::chooseAccessPoint(void)
+ ?isWlanSupported@IRQNetworkController@@QBE_NXZ @ 1 NONAME ; bool IRQNetworkController::isWlanSupported(void) const
+ ?getIAPId@IRQNetworkController@@QBE?AW4IRQError@@AAK@Z @ 2 NONAME ; enum IRQError IRQNetworkController::getIAPId(unsigned long &) const
+ ?cancelConnecting@IRQNetworkController@@QAEXXZ @ 3 NONAME ; void IRQNetworkController::cancelConnecting(void)
+ ?isHandlingOverConnection@IRQNetworkController@@QAE_NXZ @ 4 NONAME ; bool IRQNetworkController::isHandlingOverConnection(void)
+ ?identifyConnectionType@IRQNetworkController@@QBE?AW4IRQConnectionType@@XZ @ 5 NONAME ; enum IRQConnectionType IRQNetworkController::identifyConnectionType(void) const
+ ?openInstance@IRQNetworkController@@SAPAV1@XZ @ 6 NONAME ; class IRQNetworkController * IRQNetworkController::openInstance(void)
+ ?closeInstance@IRQNetworkController@@QAEXXZ @ 7 NONAME ; void IRQNetworkController::closeInstance(void)
+ ?notifyActiveNetworkObservers@IRQNetworkController@@QAEXW4IRQNetworkEvent@@@Z @ 8 NONAME ; void IRQNetworkController::notifyActiveNetworkObservers(enum IRQNetworkEvent)
+ ?getNetworkStatus@IRQNetworkController@@QBE_NXZ @ 9 NONAME ; bool IRQNetworkController::getNetworkStatus(void) const
+ ?resetConnectionStatus@IRQNetworkController@@QAEXXZ @ 10 NONAME ; void IRQNetworkController::resetConnectionStatus(void)
+ ?isOfflineMode@IRQNetworkController@@QAE_NXZ @ 11 NONAME ; bool IRQNetworkController::isOfflineMode(void)
+ ?isConnectRequestIssued@IRQNetworkController@@QBE_NXZ @ 12 NONAME ; bool IRQNetworkController::isConnectRequestIssued(void) const
+ ?chooseAccessPoint@IRQNetworkController@@QAEXXZ @ 13 NONAME ; void IRQNetworkController::chooseAccessPoint(void)
--- a/qtinternetradio/bwins/irqsonghistoryu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/bwins/irqsonghistoryu.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,47 +1,56 @@
EXPORTS
- ?handleSongMetaDataReceivedL@IRQSongHistoryEngine@@AAEXABVIRQMetaData@@AAVQString@@@Z @ 1 NONAME ; void IRQSongHistoryEngine::handleSongMetaDataReceivedL(class IRQMetaData const &, class QString &)
- ?getSongName@IRQSongInfo@@QBEABVQString@@XZ @ 2 NONAME ; class QString const & IRQSongInfo::getSongName(void) const
- ?getImageUrl@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 3 NONAME ; class QString const & IRQSongHistoryInfo::getImageUrl(void) const
- ?getChannelType@IRQSongHistoryInfo@@QBEHXZ @ 4 NONAME ; int IRQSongHistoryInfo::getChannelType(void) const
- ?GetChannelId@CIRSongHistoryInfo@@QBEHXZ @ 5 NONAME ; int CIRSongHistoryInfo::GetChannelId(void) const
- ??1IRQSongHistoryInfo@@QAE@XZ @ 6 NONAME ; IRQSongHistoryInfo::~IRQSongHistoryInfo(void)
- ?handleMetaDataReceived@IRQSongHistoryEngine@@QAEXABVIRQMetaData@@ABVIRQPreset@@@Z @ 7 NONAME ; void IRQSongHistoryEngine::handleMetaDataReceived(class IRQMetaData const &, class IRQPreset const &)
- ?getAllSongHistory@IRQSongHistoryEngine@@QAEXAAV?$QList@PAVIRQSongInfo@@@@@Z @ 8 NONAME ; void IRQSongHistoryEngine::getAllSongHistory(class QList<class IRQSongInfo *> &)
- ??0IRQSongHistoryInfo@@QAE@XZ @ 9 NONAME ; IRQSongHistoryInfo::IRQSongHistoryInfo(void)
- ?GetChannelDesc@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 10 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelDesc(void) const
- ?getChannelId@IRQSongHistoryInfo@@QBEHXZ @ 11 NONAME ; int IRQSongHistoryInfo::getChannelId(void) const
- ?SetHistoryInfo@CIRSongHistoryInfo@@QAEXAAVRBuf16@@000HHH000@Z @ 12 NONAME ; void CIRSongHistoryInfo::SetHistoryInfo(class RBuf16 &, class RBuf16 &, class RBuf16 &, class RBuf16 &, int, int, int, class RBuf16 &, class RBuf16 &, class RBuf16 &)
- ?GetStreamUrl@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 13 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetStreamUrl(void) const
- ?closeInstance@IRQSongHistoryEngine@@QAEXXZ @ 14 NONAME ; void IRQSongHistoryEngine::closeInstance(void)
- ?setMusicshopStatus@IRQSongInfo@@QAEXABVQString@@@Z @ 15 NONAME ; void IRQSongInfo::setMusicshopStatus(class QString const &)
- ?GetSongInfo@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 16 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetSongInfo(void) const
- ?setAllInfo@IRQSongInfo@@QAEXABVQString@@00@Z @ 17 NONAME ; void IRQSongInfo::setAllInfo(class QString const &, class QString const &, class QString const &)
- ?getChannelDesc@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 18 NONAME ; class QString const & IRQSongHistoryInfo::getChannelDesc(void) const
- ?updateSongHistoryDb@IRQSongHistoryEngine@@QAEXHABVQString@@000@Z @ 19 NONAME ; void IRQSongHistoryEngine::updateSongHistoryDb(int, class QString const &, class QString const &, class QString const &, class QString const &)
- ?syncHistory@IRQSongHistoryEngine@@QAEXH@Z @ 20 NONAME ; void IRQSongHistoryEngine::syncHistory(int)
- ?getAllHistory@IRQSongHistoryEngine@@QAEXAAV?$QList@PAVIRQSongHistoryInfo@@@@@Z @ 21 NONAME ; void IRQSongHistoryEngine::getAllHistory(class QList<class IRQSongHistoryInfo *> &)
- ?NewLC@CIRSongHistoryInfo@@SAPAV1@XZ @ 22 NONAME ; class CIRSongHistoryInfo * CIRSongHistoryInfo::NewLC(void)
- ?handleSongMetaDataReceived@IRQSongHistoryEngine@@QAEXABVIRQMetaData@@AAVQString@@@Z @ 23 NONAME ; void IRQSongHistoryEngine::handleSongMetaDataReceived(class IRQMetaData const &, class QString &)
- ?GetChannelMusicStatus@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 24 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelMusicStatus(void) const
- ?GetBitrate@CIRSongHistoryInfo@@QBEHXZ @ 25 NONAME ; int CIRSongHistoryInfo::GetBitrate(void) const
- ?getArtistName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 26 NONAME ; class QString const & IRQSongHistoryInfo::getArtistName(void) const
- ?getMusicStoreStatus@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 27 NONAME ; class QString const & IRQSongHistoryInfo::getMusicStoreStatus(void) const
- ?getBitrate@IRQSongHistoryInfo@@QBEHXZ @ 28 NONAME ; int IRQSongHistoryInfo::getBitrate(void) const
- ?GetChannelName@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 29 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelName(void) const
- ?NewL@CIRSongHistoryInfo@@SAPAV1@XZ @ 30 NONAME ; class CIRSongHistoryInfo * CIRSongHistoryInfo::NewL(void)
- ?getMusicshopStatus@IRQSongInfo@@QBEABVQString@@XZ @ 31 NONAME ; class QString const & IRQSongInfo::getMusicshopStatus(void) const
- ?setSongName@IRQSongInfo@@QAEXABVQString@@@Z @ 32 NONAME ; void IRQSongInfo::setSongName(class QString const &)
- ?getArtistName@IRQSongInfo@@QBEABVQString@@XZ @ 33 NONAME ; class QString const & IRQSongInfo::getArtistName(void) const
- ?setArtistName@IRQSongInfo@@QAEXABVQString@@@Z @ 34 NONAME ; void IRQSongInfo::setArtistName(class QString const &)
- ?openInstance@IRQSongHistoryEngine@@SAPAV1@XZ @ 35 NONAME ; class IRQSongHistoryEngine * IRQSongHistoryEngine::openInstance(void)
- ?clearAllHistory@IRQSongHistoryEngine@@QAEHXZ @ 36 NONAME ; int IRQSongHistoryEngine::clearAllHistory(void)
- ?clearAllSongHistory@IRQSongHistoryEngine@@QAEHXZ @ 37 NONAME ; int IRQSongHistoryEngine::clearAllSongHistory(void)
- ?getChannelName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 38 NONAME ; class QString const & IRQSongHistoryInfo::getChannelName(void) const
- ?getSongName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 39 NONAME ; class QString const & IRQSongHistoryInfo::getSongName(void) const
- ??1CIRSongHistoryInfo@@UAE@XZ @ 40 NONAME ; CIRSongHistoryInfo::~CIRSongHistoryInfo(void)
- ?GetImageUrl@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 41 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetImageUrl(void) const
- ?GetArtistInfo@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 42 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetArtistInfo(void) const
- ?getStreamUrl@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 43 NONAME ; class QString const & IRQSongHistoryInfo::getStreamUrl(void) const
- ?GetChannelType@CIRSongHistoryInfo@@QBEHXZ @ 44 NONAME ; int CIRSongHistoryInfo::GetChannelType(void) const
+ ?setStationName@IRQSongInfo@@QAEXABVQString@@@Z @ 1 NONAME ; void IRQSongInfo::setStationName(class QString const &)
+ ?getSongName@IRQSongInfo@@QBEABVQString@@XZ @ 2 NONAME ; class QString const & IRQSongInfo::getSongName(void) const
+ ?GetCountryName@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 3 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetCountryName(void) const
+ ?getImageUrl@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 4 NONAME ; class QString const & IRQSongHistoryInfo::getImageUrl(void) const
+ ?getStationName@IRQSongInfo@@QBEABVQString@@XZ @ 5 NONAME ; class QString const & IRQSongInfo::getStationName(void) const
+ ?getChannelType@IRQSongHistoryInfo@@QBEHXZ @ 6 NONAME ; int IRQSongHistoryInfo::getChannelType(void) const
+ ?GetChannelId@CIRSongHistoryInfo@@QBEHXZ @ 7 NONAME ; int CIRSongHistoryInfo::GetChannelId(void) const
+ ??1IRQSongHistoryInfo@@QAE@XZ @ 8 NONAME ; IRQSongHistoryInfo::~IRQSongHistoryInfo(void)
+ ?handleMetaDataReceived@IRQSongHistoryEngine@@QAEXABVIRQMetaData@@ABVIRQPreset@@@Z @ 9 NONAME ; void IRQSongHistoryEngine::handleMetaDataReceived(class IRQMetaData const &, class IRQPreset const &)
+ ?getCountryName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 10 NONAME ; class QString const & IRQSongHistoryInfo::getCountryName(void) const
+ ?getAllSongHistory@IRQSongHistoryEngine@@QAEXAAV?$QList@PAVIRQSongInfo@@@@@Z @ 11 NONAME ; void IRQSongHistoryEngine::getAllSongHistory(class QList<class IRQSongInfo *> &)
+ ??0IRQSongHistoryInfo@@QAE@XZ @ 12 NONAME ; IRQSongHistoryInfo::IRQSongHistoryInfo(void)
+ ?GetChannelDesc@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 13 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelDesc(void) const
+ ?getChannelId@IRQSongHistoryInfo@@QBEHXZ @ 14 NONAME ; int IRQSongHistoryInfo::getChannelId(void) const
+ ?GetStreamUrl@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 15 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetStreamUrl(void) const
+ ?closeInstance@IRQSongHistoryEngine@@QAEXXZ @ 16 NONAME ; void IRQSongHistoryEngine::closeInstance(void)
+ ?setMusicshopStatus@IRQSongInfo@@QAEXABVQString@@@Z @ 17 NONAME ; void IRQSongInfo::setMusicshopStatus(class QString const &)
+ ?GetSongInfo@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 18 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetSongInfo(void) const
+ ?GetLanguageName@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 19 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetLanguageName(void) const
+ ?getChannelDesc@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 20 NONAME ; class QString const & IRQSongHistoryInfo::getChannelDesc(void) const
+ ?syncHistory@IRQSongHistoryEngine@@QAEXH@Z @ 21 NONAME ; void IRQSongHistoryEngine::syncHistory(int)
+ ?getAllHistory@IRQSongHistoryEngine@@QAEXAAV?$QList@PAVIRQSongHistoryInfo@@@@@Z @ 22 NONAME ; void IRQSongHistoryEngine::getAllHistory(class QList<class IRQSongHistoryInfo *> &)
+ ?handleSongMetaDataReceived@IRQSongHistoryEngine@@QAEXABVIRQMetaData@@ABVIRQPreset@@@Z @ 23 NONAME ; void IRQSongHistoryEngine::handleSongMetaDataReceived(class IRQMetaData const &, class IRQPreset const &)
+ ?NewLC@CIRSongHistoryInfo@@SAPAV1@XZ @ 24 NONAME ; class CIRSongHistoryInfo * CIRSongHistoryInfo::NewLC(void)
+ ?GetChannelMusicStatus@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 25 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelMusicStatus(void) const
+ ?GetBitrate@CIRSongHistoryInfo@@QBEHXZ @ 26 NONAME ; int CIRSongHistoryInfo::GetBitrate(void) const
+ ?getArtistName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 27 NONAME ; class QString const & IRQSongHistoryInfo::getArtistName(void) const
+ ?GetGenreName@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 28 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetGenreName(void) const
+ ?SetHistoryInfo@CIRSongHistoryInfo@@QAEXAAVRBuf16@@000HHH000000@Z @ 29 NONAME ; void CIRSongHistoryInfo::SetHistoryInfo(class RBuf16 &, class RBuf16 &, class RBuf16 &, class RBuf16 &, int, int, int, class RBuf16 &, class RBuf16 &, class RBuf16 &, class RBuf16 &, class RBuf16 &, class RBuf16 &)
+ ?getMusicStoreStatus@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 30 NONAME ; class QString const & IRQSongHistoryInfo::getMusicStoreStatus(void) const
+ ?getGenreName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 31 NONAME ; class QString const & IRQSongHistoryInfo::getGenreName(void) const
+ ?getBitrate@IRQSongHistoryInfo@@QBEHXZ @ 32 NONAME ; int IRQSongHistoryInfo::getBitrate(void) const
+ ?getMusicshopStatus@IRQSongInfo@@QBEABVQString@@XZ @ 33 NONAME ; class QString const & IRQSongInfo::getMusicshopStatus(void) const
+ ?GetChannelName@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 34 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelName(void) const
+ ?NewL@CIRSongHistoryInfo@@SAPAV1@XZ @ 35 NONAME ; class CIRSongHistoryInfo * CIRSongHistoryInfo::NewL(void)
+ ?updateSongHistoryDb@IRQSongHistoryEngine@@QAEXHABVQString@@000000@Z @ 36 NONAME ; void IRQSongHistoryEngine::updateSongHistoryDb(int, class QString const &, class QString const &, class QString const &, class QString const &, class QString const &, class QString const &, class QString const &)
+ ?getLanguageName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 37 NONAME ; class QString const & IRQSongHistoryInfo::getLanguageName(void) const
+ ?setSongName@IRQSongInfo@@QAEXABVQString@@@Z @ 38 NONAME ; void IRQSongInfo::setSongName(class QString const &)
+ ?getArtistName@IRQSongInfo@@QBEABVQString@@XZ @ 39 NONAME ; class QString const & IRQSongInfo::getArtistName(void) const
+ ?setAllInfo@IRQSongInfo@@QAEXABVQString@@000@Z @ 40 NONAME ; void IRQSongInfo::setAllInfo(class QString const &, class QString const &, class QString const &, class QString const &)
+ ?deleteOneSongHistoryItem@IRQSongHistoryEngine@@QAE_NH@Z @ 41 NONAME ; bool IRQSongHistoryEngine::deleteOneSongHistoryItem(int)
+ ?setArtistName@IRQSongInfo@@QAEXABVQString@@@Z @ 42 NONAME ; void IRQSongInfo::setArtistName(class QString const &)
+ ?openInstance@IRQSongHistoryEngine@@SAPAV1@XZ @ 43 NONAME ; class IRQSongHistoryEngine * IRQSongHistoryEngine::openInstance(void)
+ ?clearAllHistory@IRQSongHistoryEngine@@QAEHXZ @ 44 NONAME ; int IRQSongHistoryEngine::clearAllHistory(void)
?deleteOneItem@IRQSongHistoryEngine@@QAE_NH@Z @ 45 NONAME ; bool IRQSongHistoryEngine::deleteOneItem(int)
+ ?clearAllSongHistory@IRQSongHistoryEngine@@QAEHXZ @ 46 NONAME ; int IRQSongHistoryEngine::clearAllSongHistory(void)
+ ?getSongName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 47 NONAME ; class QString const & IRQSongHistoryInfo::getSongName(void) const
+ ?getChannelName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 48 NONAME ; class QString const & IRQSongHistoryInfo::getChannelName(void) const
+ ?handleSongMetaDataReceivedL@IRQSongHistoryEngine@@AAEXABVIRQMetaData@@ABVIRQPreset@@@Z @ 49 NONAME ; void IRQSongHistoryEngine::handleSongMetaDataReceivedL(class IRQMetaData const &, class IRQPreset const &)
+ ??1CIRSongHistoryInfo@@UAE@XZ @ 50 NONAME ; CIRSongHistoryInfo::~CIRSongHistoryInfo(void)
+ ?GetImageUrl@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 51 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetImageUrl(void) const
+ ?getStreamUrl@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 52 NONAME ; class QString const & IRQSongHistoryInfo::getStreamUrl(void) const
+ ?GetArtistInfo@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 53 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetArtistInfo(void) const
+ ?GetChannelType@CIRSongHistoryInfo@@QBEHXZ @ 54 NONAME ; int CIRSongHistoryInfo::GetChannelType(void) const
--- a/qtinternetradio/bwins/irqsystemeventhandleru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/bwins/irqsystemeventhandleru.def Thu Jul 22 16:31:41 2010 +0100
@@ -18,4 +18,8 @@
?isBelowCriticalLevel@IRQSystemEventHandler@@QAE_N_J@Z @ 17 NONAME ; bool IRQSystemEventHandler::isBelowCriticalLevel(long long)
?trUtf8@IRQSystemEventHandler@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString IRQSystemEventHandler::trUtf8(char const *, char const *)
?tr@IRQSystemEventHandler@@SA?AVQString@@PBD0H@Z @ 19 NONAME ; class QString IRQSystemEventHandler::tr(char const *, char const *, int)
+ ?headsetDisconnected@IRQSystemEventHandler@@IAEXXZ @ 20 NONAME ; void IRQSystemEventHandler::headsetDisconnected(void)
+ ?callActivated@IRQSystemEventHandler@@IAEXXZ @ 21 NONAME ; void IRQSystemEventHandler::callActivated(void)
+ ?headsetConnected@IRQSystemEventHandler@@IAEXXZ @ 22 NONAME ; void IRQSystemEventHandler::headsetConnected(void)
+ ?callDeactivated@IRQSystemEventHandler@@IAEXXZ @ 23 NONAME ; void IRQSystemEventHandler::callDeactivated(void)
--- a/qtinternetradio/common.pri Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/common.pri Thu Jul 22 16:31:41 2010 +0100
@@ -15,7 +15,9 @@
DEFINES += SONGRECOGNITION_ENABLED
DEFINES += USER_DEFINED_DISKSPACE
DEFINES += USER_DEFINED_ISDSURL
+#DEFINES += NOWPLAYING_VIEW_OPTION_B
#DEFINES += ADV_ENABLED
+DEFINES += HS_WIDGET_ENABLED
# ##########################################################
# Logging flag definitions
--- a/qtinternetradio/eabi/irqfavoritesu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/eabi/irqfavoritesu.def Thu Jul 22 16:31:41 2010 +0100
@@ -28,4 +28,5 @@
_ZNK14IRQFavoritesDB9getUniqIdEi @ 27 NONAME
_ZTI14IRQFavoritesDB @ 28 NONAME DATA 12
_ZTV14IRQFavoritesDB @ 29 NONAME DATA 56
+ _ZN14IRQFavoritesDB12renamePresetERK9IRQPresetRK7QString @ 30 NONAME
--- a/qtinternetradio/eabi/irqloggeru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/eabi/irqloggeru.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,15 +1,16 @@
EXPORTS
- _Z14connectAndTestPK7QObjectPKcS1_S3_N2Qt14ConnectionTypeE @ 1 NONAME
- _Z16connectAndAssertPK7QObjectPKcS1_S3_N2Qt14ConnectionTypeE @ 2 NONAME
- _ZN10FileLogger13handleMessageE9QtMsgTypePKc @ 3 NONAME
- _ZN10FileLogger21installMessageHandlerERK7QStringb @ 4 NONAME
- _ZN10FileLogger23uninstallMessageHandlerEv @ 5 NONAME
- _ZN10FileLoggerC1ERK7QStringb @ 6 NONAME
- _ZN10FileLoggerC2ERK7QStringb @ 7 NONAME
- _ZN10FileLoggerD1Ev @ 8 NONAME
- _ZN10FileLoggerD2Ev @ 9 NONAME
- _ZN12MethodLoggerC1EPKc @ 10 NONAME
- _ZN12MethodLoggerC2EPKc @ 11 NONAME
- _ZN12MethodLoggerD1Ev @ 12 NONAME
- _ZN12MethodLoggerD2Ev @ 13 NONAME
- _ZN13SymbianLogger8writeLogERK7QString @ 14 NONAME
\ No newline at end of file
+ _Z13installLogDirv @ 1 NONAME
+ _Z14connectAndTestPK7QObjectPKcS1_S3_N2Qt14ConnectionTypeE @ 2 NONAME
+ _Z16connectAndAssertPK7QObjectPKcS1_S3_N2Qt14ConnectionTypeE @ 3 NONAME
+ _ZN10FileLogger13handleMessageE9QtMsgTypePKc @ 4 NONAME
+ _ZN10FileLogger21installMessageHandlerERK7QStringb @ 5 NONAME
+ _ZN10FileLogger23uninstallMessageHandlerEv @ 6 NONAME
+ _ZN10FileLoggerC1ERK7QStringb @ 7 NONAME
+ _ZN10FileLoggerC2ERK7QStringb @ 8 NONAME
+ _ZN10FileLoggerD1Ev @ 9 NONAME
+ _ZN10FileLoggerD2Ev @ 10 NONAME
+ _ZN12MethodLoggerC1EPKc @ 11 NONAME
+ _ZN12MethodLoggerC2EPKc @ 12 NONAME
+ _ZN12MethodLoggerD1Ev @ 13 NONAME
+ _ZN12MethodLoggerD2Ev @ 14 NONAME
+ _ZN13SymbianLogger8writeLogERK7QString @ 15 NONAME
\ No newline at end of file
--- a/qtinternetradio/eabi/irqnetworkcontrolleru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/eabi/irqnetworkcontrolleru.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,19 +1,15 @@
EXPORTS
- _ZN20IRQNetworkController11getApIdListER5QListImE @ 1 NONAME
- _ZN20IRQNetworkController12openInstanceEv @ 2 NONAME
- _ZN20IRQNetworkController13closeInstanceEv @ 3 NONAME
- _ZN20IRQNetworkController13getBearerListER5QListImE @ 4 NONAME
- _ZN20IRQNetworkController13isOfflineModeEv @ 5 NONAME
- _ZN20IRQNetworkController14getNetworkListER5QListImE @ 6 NONAME
- _ZN20IRQNetworkController16cancelConnectingEv @ 7 NONAME
- _ZN20IRQNetworkController17chooseAccessPointEv @ 8 NONAME
- _ZN20IRQNetworkController18getAccessPointListER11QStringList @ 9 NONAME
- _ZN20IRQNetworkController21resetConnectionStatusEv @ 10 NONAME
- _ZN20IRQNetworkController24isHandlingOverConnectionEv @ 11 NONAME
- _ZN20IRQNetworkController28notifyActiveNetworkObserversE15IRQNetworkEvent @ 12 NONAME
- _ZNK20IRQNetworkController15isWlanSupportedEv @ 13 NONAME
- _ZNK20IRQNetworkController16getNetworkStatusEv @ 14 NONAME
- _ZNK20IRQNetworkController22identifyConnectionTypeEv @ 15 NONAME
- _ZNK20IRQNetworkController22isConnectRequestIssuedEv @ 16 NONAME
- _ZNK20IRQNetworkController8getIAPIdERm @ 17 NONAME
+ _ZN20IRQNetworkController12openInstanceEv @ 1 NONAME
+ _ZN20IRQNetworkController13closeInstanceEv @ 2 NONAME
+ _ZN20IRQNetworkController13isOfflineModeEv @ 3 NONAME
+ _ZN20IRQNetworkController16cancelConnectingEv @ 4 NONAME
+ _ZN20IRQNetworkController17chooseAccessPointEv @ 5 NONAME
+ _ZN20IRQNetworkController21resetConnectionStatusEv @ 6 NONAME
+ _ZN20IRQNetworkController24isHandlingOverConnectionEv @ 7 NONAME
+ _ZN20IRQNetworkController28notifyActiveNetworkObserversE15IRQNetworkEvent @ 8 NONAME
+ _ZNK20IRQNetworkController15isWlanSupportedEv @ 9 NONAME
+ _ZNK20IRQNetworkController16getNetworkStatusEv @ 10 NONAME
+ _ZNK20IRQNetworkController22identifyConnectionTypeEv @ 11 NONAME
+ _ZNK20IRQNetworkController22isConnectRequestIssuedEv @ 12 NONAME
+ _ZNK20IRQNetworkController8getIAPIdERm @ 13 NONAME
--- a/qtinternetradio/eabi/irqsonghistoryu.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/eabi/irqsonghistoryu.def Thu Jul 22 16:31:41 2010 +0100
@@ -1,51 +1,57 @@
EXPORTS
- _ZN11IRQSongInfo10setAllInfoERK7QStringS2_S2_ @ 1 NONAME
+ _ZN11IRQSongInfo10setAllInfoERK7QStringS2_S2_S2_ @ 1 NONAME
_ZN11IRQSongInfo11setSongNameERK7QString @ 2 NONAME
_ZN11IRQSongInfo13setArtistNameERK7QString @ 3 NONAME
- _ZN11IRQSongInfo18setMusicshopStatusERK7QString @ 4 NONAME
- _ZN18CIRSongHistoryInfo14SetHistoryInfoER6RBuf16S1_S1_S1_iiiS1_S1_S1_ @ 5 NONAME
- _ZN18CIRSongHistoryInfo4NewLEv @ 6 NONAME
- _ZN18CIRSongHistoryInfo5NewLCEv @ 7 NONAME
- _ZN18CIRSongHistoryInfoD0Ev @ 8 NONAME
- _ZN18CIRSongHistoryInfoD1Ev @ 9 NONAME
- _ZN18CIRSongHistoryInfoD2Ev @ 10 NONAME
- _ZN18IRQSongHistoryInfoC1Ev @ 11 NONAME
- _ZN18IRQSongHistoryInfoC2Ev @ 12 NONAME
- _ZN18IRQSongHistoryInfoD1Ev @ 13 NONAME
- _ZN18IRQSongHistoryInfoD2Ev @ 14 NONAME
- _ZN20IRQSongHistoryEngine11syncHistoryEi @ 15 NONAME
- _ZN20IRQSongHistoryEngine12openInstanceEv @ 16 NONAME
- _ZN20IRQSongHistoryEngine13closeInstanceEv @ 17 NONAME
- _ZN20IRQSongHistoryEngine13getAllHistoryER5QListIP18IRQSongHistoryInfoE @ 18 NONAME
- _ZN20IRQSongHistoryEngine15clearAllHistoryEv @ 19 NONAME
- _ZN20IRQSongHistoryEngine17getAllSongHistoryER5QListIP11IRQSongInfoE @ 20 NONAME
- _ZN20IRQSongHistoryEngine19clearAllSongHistoryEv @ 21 NONAME
- _ZN20IRQSongHistoryEngine19updateSongHistoryDbEiRK7QStringS2_S2_S2_ @ 22 NONAME
- _ZN20IRQSongHistoryEngine22handleMetaDataReceivedERK11IRQMetaDataRK9IRQPreset @ 23 NONAME
- _ZN20IRQSongHistoryEngine26handleSongMetaDataReceivedERK11IRQMetaDataR7QString @ 24 NONAME
- _ZN20IRQSongHistoryEngine27handleSongMetaDataReceivedLERK11IRQMetaDataR7QString @ 25 NONAME
- _ZNK11IRQSongInfo11getSongNameEv @ 26 NONAME
- _ZNK11IRQSongInfo13getArtistNameEv @ 27 NONAME
- _ZNK11IRQSongInfo18getMusicshopStatusEv @ 28 NONAME
- _ZNK18CIRSongHistoryInfo10GetBitrateEv @ 29 NONAME
- _ZNK18CIRSongHistoryInfo11GetImageUrlEv @ 30 NONAME
- _ZNK18CIRSongHistoryInfo11GetSongInfoEv @ 31 NONAME
- _ZNK18CIRSongHistoryInfo12GetChannelIdEv @ 32 NONAME
- _ZNK18CIRSongHistoryInfo12GetStreamUrlEv @ 33 NONAME
- _ZNK18CIRSongHistoryInfo13GetArtistInfoEv @ 34 NONAME
- _ZNK18CIRSongHistoryInfo14GetChannelDescEv @ 35 NONAME
- _ZNK18CIRSongHistoryInfo14GetChannelNameEv @ 36 NONAME
- _ZNK18CIRSongHistoryInfo14GetChannelTypeEv @ 37 NONAME
- _ZNK18CIRSongHistoryInfo21GetChannelMusicStatusEv @ 38 NONAME
- _ZNK18IRQSongHistoryInfo10getBitrateEv @ 39 NONAME
- _ZNK18IRQSongHistoryInfo11getImageUrlEv @ 40 NONAME
- _ZNK18IRQSongHistoryInfo11getSongNameEv @ 41 NONAME
- _ZNK18IRQSongHistoryInfo12getChannelIdEv @ 42 NONAME
- _ZNK18IRQSongHistoryInfo12getStreamUrlEv @ 43 NONAME
- _ZNK18IRQSongHistoryInfo13getArtistNameEv @ 44 NONAME
- _ZNK18IRQSongHistoryInfo14getChannelDescEv @ 45 NONAME
- _ZNK18IRQSongHistoryInfo14getChannelNameEv @ 46 NONAME
- _ZNK18IRQSongHistoryInfo14getChannelTypeEv @ 47 NONAME
- _ZNK18IRQSongHistoryInfo19getMusicStoreStatusEv @ 48 NONAME
- _ZN20IRQSongHistoryEngine13deleteOneItemEi @ 49 NONAME
+ _ZN11IRQSongInfo14setStationNameERK7QString @ 4 NONAME
+ _ZN11IRQSongInfo18setMusicshopStatusERK7QString @ 5 NONAME
+ _ZN18CIRSongHistoryInfo14SetHistoryInfoER6RBuf16S1_S1_S1_iiiS1_S1_S1_S1_S1_S1_ @ 6 NONAME
+ _ZN18CIRSongHistoryInfo4NewLEv @ 7 NONAME
+ _ZN18CIRSongHistoryInfo5NewLCEv @ 8 NONAME
+ _ZN18CIRSongHistoryInfoD0Ev @ 9 NONAME
+ _ZN18CIRSongHistoryInfoD1Ev @ 10 NONAME
+ _ZN18CIRSongHistoryInfoD2Ev @ 11 NONAME
+ _ZN18IRQSongHistoryInfoC1Ev @ 12 NONAME
+ _ZN18IRQSongHistoryInfoC2Ev @ 13 NONAME
+ _ZN18IRQSongHistoryInfoD1Ev @ 14 NONAME
+ _ZN18IRQSongHistoryInfoD2Ev @ 15 NONAME
+ _ZN20IRQSongHistoryEngine11syncHistoryEi @ 16 NONAME
+ _ZN20IRQSongHistoryEngine12openInstanceEv @ 17 NONAME
+ _ZN20IRQSongHistoryEngine13closeInstanceEv @ 18 NONAME
+ _ZN20IRQSongHistoryEngine13deleteOneItemEi @ 19 NONAME
+ _ZN20IRQSongHistoryEngine13getAllHistoryER5QListIP18IRQSongHistoryInfoE @ 20 NONAME
+ _ZN20IRQSongHistoryEngine15clearAllHistoryEv @ 21 NONAME
+ _ZN20IRQSongHistoryEngine17getAllSongHistoryER5QListIP11IRQSongInfoE @ 22 NONAME
+ _ZN20IRQSongHistoryEngine19clearAllSongHistoryEv @ 23 NONAME
+ _ZN20IRQSongHistoryEngine19updateSongHistoryDbEiRK7QStringS2_S2_S2_S2_S2_S2_ @ 24 NONAME
+ _ZN20IRQSongHistoryEngine22handleMetaDataReceivedERK11IRQMetaDataRK9IRQPreset @ 25 NONAME
+ _ZN20IRQSongHistoryEngine24deleteOneSongHistoryItemEi @ 26 NONAME
+ _ZN20IRQSongHistoryEngine26handleSongMetaDataReceivedERK11IRQMetaDataRK9IRQPreset @ 27 NONAME
+ _ZN20IRQSongHistoryEngine27handleSongMetaDataReceivedLERK11IRQMetaDataRK9IRQPreset @ 28 NONAME
+ _ZNK11IRQSongInfo11getSongNameEv @ 29 NONAME
+ _ZNK11IRQSongInfo13getArtistNameEv @ 30 NONAME
+ _ZNK11IRQSongInfo14getStationNameEv @ 31 NONAME
+ _ZNK11IRQSongInfo18getMusicshopStatusEv @ 32 NONAME
+ _ZNK18CIRSongHistoryInfo10GetBitrateEv @ 33 NONAME
+ _ZNK18CIRSongHistoryInfo11GetImageUrlEv @ 34 NONAME
+ _ZNK18CIRSongHistoryInfo11GetSongInfoEv @ 35 NONAME
+ _ZNK18CIRSongHistoryInfo12GetChannelIdEv @ 36 NONAME
+ _ZNK18CIRSongHistoryInfo12GetStreamUrlEv @ 37 NONAME
+ _ZNK18CIRSongHistoryInfo13GetArtistInfoEv @ 38 NONAME
+ _ZNK18CIRSongHistoryInfo14GetChannelDescEv @ 39 NONAME
+ _ZNK18CIRSongHistoryInfo14GetChannelNameEv @ 40 NONAME
+ _ZNK18CIRSongHistoryInfo14GetChannelTypeEv @ 41 NONAME
+ _ZNK18CIRSongHistoryInfo21GetChannelMusicStatusEv @ 42 NONAME
+ _ZNK18IRQSongHistoryInfo10getBitrateEv @ 43 NONAME
+ _ZNK18IRQSongHistoryInfo11getImageUrlEv @ 44 NONAME
+ _ZNK18IRQSongHistoryInfo11getSongNameEv @ 45 NONAME
+ _ZNK18IRQSongHistoryInfo12getChannelIdEv @ 46 NONAME
+ _ZNK18IRQSongHistoryInfo12getGenreNameEv @ 47 NONAME
+ _ZNK18IRQSongHistoryInfo12getStreamUrlEv @ 48 NONAME
+ _ZNK18IRQSongHistoryInfo13getArtistNameEv @ 49 NONAME
+ _ZNK18IRQSongHistoryInfo14getChannelDescEv @ 50 NONAME
+ _ZNK18IRQSongHistoryInfo14getChannelNameEv @ 51 NONAME
+ _ZNK18IRQSongHistoryInfo14getChannelTypeEv @ 52 NONAME
+ _ZNK18IRQSongHistoryInfo14getCountryNameEv @ 53 NONAME
+ _ZNK18IRQSongHistoryInfo15getLanguageNameEv @ 54 NONAME
+ _ZNK18IRQSongHistoryInfo19getMusicStoreStatusEv @ 55 NONAME
--- a/qtinternetradio/eabi/irqsystemeventhandleru.def Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/eabi/irqsystemeventhandleru.def Thu Jul 22 16:31:41 2010 +0100
@@ -18,4 +18,8 @@
_ZNK21IRQSystemEventHandler17diskCriticalLevelEv @ 17 NONAME
_ZTI21IRQSystemEventHandler @ 18 NONAME
_ZTV21IRQSystemEventHandler @ 19 NONAME
+ _ZN21IRQSystemEventHandler13callActivatedEv @ 20 NONAME
+ _ZN21IRQSystemEventHandler15callDeactivatedEv @ 21 NONAME
+ _ZN21IRQSystemEventHandler16headsetConnectedEv @ 22 NONAME
+ _ZN21IRQSystemEventHandler19headsetDisconnectedEv @ 23 NONAME
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irappinspector.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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: Internet Radio App Insecptor
+*
+*/
+
+#ifndef IRAPPINSPECTOR_H_
+#define IRAPPINSPECTOR_H_
+
+// System includes
+#include <QObject>
+#include <xqsettingskey.h>
+
+// User includes
+
+// Forward declarations
+class XQSettingsManager;
+class QVariant;
+
+Q_ENUMS(IrServiceCmd::IrRunningStatus)
+
+class IrAppInspector : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit IrAppInspector(QObject *aParent = 0);
+ virtual ~IrAppInspector();
+
+ bool isIrRunning();
+
+ bool startInspectingIrRunningStatus();
+ void stopInspectingIrRunningStatus();
+
+ enum IrRunningStatus
+ {
+ StartingUp = 0,
+ Exiting = 1
+ };
+
+signals:
+ void irRunningStatusChanged(IrAppInspector::IrRunningStatus aNewStatus);
+
+private slots:
+ void handleIrExit(const XQSettingsKey &aKey);
+ void handleIrRunningStatusChanged(const XQSettingsKey &aKey, const QVariant &aValue);
+
+private:
+ XQSettingsManager *mSettingsManager; // For getting and P&S notifications
+ XQSettingsKey mIrRunningStatusKey;
+
+ Q_DISABLE_COPY(IrAppInspector)
+};
+
+#endif /* IRAPPINSPECTOR_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidget.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* 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: Internet Radio home screen widget
+*
+*/
+
+#ifndef IRHSWIDGET_H
+#define IRHSWIDGET_H
+
+// System includes
+#include <hbwidget.h>
+
+// User includes
+#include "irservicedef.h"
+
+// Forward declarations
+class QString;
+class QGraphicsLinearLayout;
+class IrHsWidgetTitleRow;
+class IrHsWidgetMetaDataRow;
+class IrServiceClient;
+
+class IrHsWidget : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ explicit IrHsWidget(QGraphicsItem *aParent = 0, Qt::WindowFlags aFlags = 0);
+ virtual ~IrHsWidget();
+
+
+public slots:
+ // from KQTI widget model framework, must be slots
+ void onInitialize();
+ void onUninitialize();
+ void onShow();
+ void onHide();
+
+private:
+ void setupUi();
+ void setupConnection();
+
+ enum IrHsWidgetState
+ {
+ EUnknown = -1,
+ EInit = 0,
+ EPlaying = 1,
+ EStopped = 2,
+ ELoading = 3
+
+ };
+ void handleHsWidgetStateChange(IrHsWidgetState aNewState);
+
+
+ void initHomeSreenWidget();
+ void resizeHomeScreenWidget();
+
+ void loadInitLayout();
+ void loadStoppedLayout();
+ void loadPlayingLayout();
+ void loadLoadingLayout();
+
+ void enableUserAction();
+ void disableUserAction();
+
+private slots:
+ // handle user press event
+ void handleCommonAreaAction();
+ void handleControlAreaAction();
+
+ void handleControlFailed();
+
+ // for service notification
+ void handleStationNameUpdated(const QString &aStationName);
+ void handleStationLogoUpdated(bool aLogoAvailable);
+ void handleMetaDataUpdated(const QString &aMetaData);
+ void handleIrStateUpdated(IrAppState::Type aNewState);
+
+private:
+ bool mUserActionEnabled;
+
+ QGraphicsLinearLayout *mRowLayout;
+ IrHsWidgetTitleRow *mTitleRow;
+ IrHsWidgetMetaDataRow *mMetaDataRow;
+
+ IrServiceClient *mServiceClient;
+
+ IrAppState::Type mIrState;
+ IrHsWidgetState mIrHsWidgetState;
+
+ Q_DISABLE_COPY(IrHsWidget)
+};
+
+#endif // IRHSWIDGET_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidgetmetadatarow.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* 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: Internet Radio home screen widget
+*
+*/
+
+
+#ifndef IRHSWIDGETMETADATAROW_H_
+#define IRHSWIDGETMETADATAROW_H_
+
+// System includes
+#include <HbWidget>
+#include <HbIcon>
+
+//FORWARD DECLARATIONS:
+class HbLabel;
+class HbMarqueeItem;
+
+class IrHsWidgetMetaDataRow : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ explicit IrHsWidgetMetaDataRow(QGraphicsItem *aParent = 0, Qt::WindowFlags aFlags = 0);
+ virtual ~IrHsWidgetMetaDataRow();
+
+ void setMetaData(const QString &aMetaData);
+
+ void startMetaDataMarquee();
+ void stopMetaDataMarquee();
+
+ void setPlayIcon();
+ void setStopIcon();
+ void setLoadingIcon();
+
+private:
+ // from QObject
+ bool eventFilter(QObject *aObject, QEvent *aEvent);
+
+private:
+ void loadUi();
+ void createLoadingIcon();
+
+signals:
+ void controlAreaClicked();
+ void metaDataAreaClicked();
+
+private:
+ HbMarqueeItem *mMetaData;
+ HbLabel *mControlLabel;
+ HbIcon mLoadingIcon;
+};
+
+#endif // IRHSWIDGETMETADATAROW_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidgetplugin.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* 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: Internet Radio home screen widget plugin
+*
+*/
+
+#ifndef IRHSWIDGETPLUGIN_H
+#define IRHSWIDGETPLUGIN_H
+
+#include <QObject>
+#include <qserviceplugininterface.h>
+
+QTM_USE_NAMESPACE
+class IrHsWidgetPlugin : public QObject, public QServicePluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QtMobility::QServicePluginInterface)
+
+public:
+ QObject *createInstance(const QServiceInterfaceDescriptor &aDescriptor,
+ QServiceContext *aContext,
+ QAbstractSecuritySession *aSession);
+};
+
+#endif // IRHSWIDGETPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidgettitlerow.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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: Internet Radio home screen widget
+*
+*/
+
+#ifndef IRHSWIDGETTITLEROW_H_
+#define IRHSWIDGETTITLEROW_H_
+
+// System includes
+#include <HbWidget>
+
+//FORWARD DECLARATIONS:
+class HbLabel;
+
+class IrHsWidgetTitleRow : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ explicit IrHsWidgetTitleRow(QGraphicsItem *aParent = 0, Qt::WindowFlags aFlags = 0);
+ virtual ~IrHsWidgetTitleRow();
+
+ void setDefaultTitle();
+ void setStationName(const QString &aStationName);
+
+ void loadStationLogo();
+ void setDefaultLogo();
+
+signals:
+ void titleRowClicked();
+
+protected:
+ // from QGraphicsItem
+ void mousePressEvent(QGraphicsSceneMouseEvent *aEvent);
+
+private:
+ void loadUi();
+
+private:
+ HbLabel *mStationLogo;
+ HbLabel *mStationName;
+};
+
+#endif // IRHSWIDGETTITLEROW_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidgetuiloader.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* 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 IRHSWIDGETUILOADER_H_
+#define IRHSWIDGETUILOADER_H_
+
+#include <hbdocumentloader.h>
+
+class IRHsWidgetUiLoader : public HbDocumentLoader
+{
+public:
+ virtual QObject *createObject(const QString& aType, const QString &aName);
+};
+
+#endif /* IRHSWIDGETUILOADER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irserviceclient.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,148 @@
+/*
+* 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: internet radio hs widget service client
+*
+*/
+
+#ifndef IRSERVICECLIENT_H_
+#define IRSERVICECLIENT_H_
+
+// System includes
+#include <QObject>
+#include <QMutex>
+#include <xqappmgr.h>
+
+// User includes
+#include "irservicedef.h"
+#include "irappinspector.h"
+
+// Forward declarations
+class XQAiwRequest;
+class IrServiceData;
+class QString;
+class QVariant;
+
+class IrServiceClient : public QObject
+{
+Q_OBJECT
+
+public:
+
+ /*!
+ * Get the instance of IrServiceClient
+ * @return IrServiceClient*
+ */
+ static IrServiceClient* openInstance();
+
+ /*!
+ * Close the instance of IrServiceClient
+ */
+ void closeInstance();
+
+private:
+ IrServiceClient();
+ virtual ~IrServiceClient();
+
+public:
+ bool startMonitoringIrState();
+
+
+ bool isStationPlayed();
+ bool loadStationName(QString &aStationName);
+ bool loadStationLogoFlag();
+
+ bool bringIrForeground();
+ bool launchIrNormally();
+ bool launchIrNowPlaying();
+
+ bool startPlaying();
+ bool stopPlaying();
+ bool cancelLoading();
+
+signals:
+ void stationNameUpdated(const QString &aStationName);
+ void stationLogoUpdated(bool aIsLogoAvailable);
+ void metaDataUpdated(const QString &aMetaData);
+ void irStateChanged(IrAppState::Type aNewState);
+
+ void controlFailed();
+
+private:
+ void notifyStationNameUpdated(const QString &aStationName);
+ void notifyStationLogoUpdated(bool aIsLogoAvailable);
+ void notifyMetaDataUpdated(const QString &aMetaData);
+ void notifyIrStateChanged(IrAppState::Type aNewState);
+
+private slots:
+ // used for return value from Monitor Service via Qt HighWay
+ void handleMonitorRequestOk(const QVariant &aRetValue);
+ void handleMonitorRequestError(int aErrCode, const QString &aErrMessage);
+
+ // used for return value from Control Service via Qt HighWay
+ void handleControlRequestOk(const QVariant &aRetValue);
+ void handleControlRequestError(int aErrCode, const QString &aErrMessage);
+
+ // used for signals from IrAppInspector
+ void handleIrRunningStatusChanged(IrAppInspector::IrRunningStatus aNewStatus);
+
+private:
+ bool createControlServiceRequest();
+ bool createMonitorServiceRequest();
+ bool createRefreshServiceRequest();
+
+ void clearMonitorServiceRequest();
+
+ enum IrAppVisibilty
+ {
+ DoNotChange,
+ ToForeground,
+ ToBackground
+ };
+
+ bool doSendMonitorRequest();
+ bool doSendRefreshRequest();
+ bool doSendControlRequest(const QVariant &aArgument, bool aIsSync, IrAppVisibilty aVisibility);
+ void prepareRequestInfo(XQAiwRequest *aRequest, IrAppVisibilty aVisibility);
+
+ void processNotificationData(const IrServiceData &aServiceData);
+
+ void initHsWidgetNoRunStopped();
+
+ void refreshAllActiveHsWidgets();
+
+private:
+ static QMutex mMutex;
+ static int mRef;
+ static bool mMonitoringStarted;
+ static IrServiceClient *mInstatnce;
+
+ QString mStationName;
+ bool mStationLogoAvailable; // true if station has its own logo
+ QString mMetaData;
+ IrAppState::Type mIrState;
+
+ IrAppInspector *mIrAppInspector;
+
+ bool mMonitorReqOngoing;
+ bool mControlReqOngoing;
+
+ XQApplicationManager mApplicationManager;
+ XQAiwRequest *mMonitorRequest;
+ XQAiwRequest *mRefreshRequest;
+ XQAiwRequest *mControlRequest;
+
+ Q_DISABLE_COPY(IrServiceClient)
+};
+
+#endif /* IRSERVICECLIENT_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/irhswidgetplugin.pro Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,78 @@
+#
+# 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:
+
+TEMPLATE = lib
+TARGET = irhswidgetplugin
+CONFIG += plugin mobility hb
+MOBILITY = serviceframework
+
+LIBS += -lxqsettingsmanager \
+ -lxqservice \
+ -lxqserviceutil \
+ -lirqlogger
+
+MOC_DIR = moc
+
+HEADERS += ./inc/*.h
+SOURCES += ./src/*.cpp
+
+INCLUDEPATH += ./inc
+INCLUDEPATH += ../irqcommon/inc
+INCLUDEPATH += ../irqlogger/inc
+
+UID = E257CD03
+RESOURCES = resources.qrc
+
+symbian: {
+
+ DESTDIR = /private/20022F35/import/widgetregistry/$${UID}
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ TARGET.UID3 = 0x$${UID}
+ TARGET.EPOCALLOWDLLDATA=1
+ TARGET.CAPABILITY = ALL -TCB
+
+ plugins.path = $${DESTDIR}
+ plugins.sources = $${TARGET}.dll
+
+ widgetResources.path = $${DESTDIR}
+ widgetResources.sources += resource/$${TARGET}.xml
+ widgetResources.sources += resource/$${TARGET}.manifest
+ widgetResources.sources += resource/$${TARGET}.png
+
+ DEPLOYMENT += plugins \
+ widgetResources
+}
+
+win32: {
+
+ CONFIG(debug, debug|release) {
+ SUBDIRPART = debug
+ } else {
+ SUBDIRPART = release
+ }
+
+ PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/$${UID}
+
+ DESTDIR = $$PWD/../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR}
+
+ manifest.path = $${DESTDIR}
+ manifest.files = ./resource/*.manifest ./resource/*.xml ./resource/*.png
+
+ INSTALLS += manifest
+
+}
+
+symbian:include(irhswidgetplugin_rom.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/irhswidgetplugin_rom.pri Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,27 @@
+#
+# 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:
+#
+
+BLD_INF_RULES.prj_exports += \
+"$${LITERAL_HASH}include <platform_paths.hrh>"
+
+#iby exports to core
+BLD_INF_RULES.prj_exports += \
+"rom/irhswidgetplugin.iby CORE_APP_LAYER_IBY_EXPORT_PATH(irhswidgetplugin.iby)"
+
+#iby exports to language
+#BLD_INF_RULES.prj_exports += \
+#"rom/irhswidgetplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(irhswidgetplugin_resources.iby)"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidgetmetadatarow.docml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+ <widget name="metadatarow_layout" type="HbWidget">
+ <widget name="hSeparatorLabel" type="HbLabel">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <icon iconName="qtg_graf_divider_h_thin" name="icon"/>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="2" type="PREFERRED"/>
+ <sizehint height="2" type="MINIMUM"/>
+ <contentsmargins bottom="0un" left="1un" right="1un" top="0un"/>
+ <sizehint height="2" type="MAXIMUM"/>
+ <enums name="aspectRatioMode" value="IgnoreAspectRatio"/>
+ </widget>
+ <widget name="lower_side_layout" type="HbWidget">
+ <widget name="vSeparatorRight" type="HbLabel">
+ <icon iconName="qtg_graf_divider_v_thin" name="icon"/>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+ <sizehint type="PREFERRED" width="2"/>
+ <sizehint type="MINIMUM" width="2"/>
+ <contentsmargins bottom="0.25un" left="0un" right="0un" top="0.25un"/>
+ <sizehint type="MAXIMUM" width="2"/>
+ <enums name="aspectRatioMode" value="IgnoreAspectRatio"/>
+ </widget>
+ <widget name="metadata_layout" type="HbWidget">
+ <widget name="metadata_label" type="HbMarqueeItem">
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
+ <sizehint height="expr(var(hb-param-text-height-secondary))" type="MINIMUM"/>
+ <sizehint height="expr(var(hb-param-text-height-secondary))" type="MAXIMUM"/>
+ <fontspec name="fontSpec" role="Secondary" textheight="expr(var(hb-param-text-height-secondary))"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="var(hb-param-margin-gene-middle-vertical)" left="expr(var(hb-param-margin-gene-middle-horizontal))" right="expr(var(hb-param-margin-gene-middle-horizontal))" top="var(hb-param-margin-gene-middle-vertical)"/>
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="metadata_label"/>
+ <stretchitem stretchfactor="1"/>
+ </layout>
+ </widget>
+ <widget name="control_layout" type="HbWidget">
+ <widget name="control_label" type="HbLabel">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <icon iconName="qtg_mono_play" name="icon"/>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="6un" type="FIXED" width="6un"/>
+ <sizehint height="6un" type="MINIMUM" width="6un"/>
+ <sizehint height="6un" type="MAXIMUM" width="6un"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="expr(var(hb-param-margin-gene-left))" right="expr(var(hb-param-margin-gene-right))" top="0un"/>
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="control_label"/>
+ <stretchitem stretchfactor="1"/>
+ </layout>
+ </widget>
+ <layout orientation="Horizontal" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="metadata_layout"/>
+ <linearitem itemname="vSeparatorRight"/>
+ <linearitem itemname="control_layout"/>
+ </layout>
+ </widget>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="expr(7.5un+var(hb-param-text-height-secondary))" type="FIXED" width="46un"/>
+ <sizehint height="expr(7.5un+var(hb-param-text-height-secondary))" type="MINIMUM" width="46un"/>
+ <sizehint height="expr(7.5un+var(hb-param-text-height-secondary))" type="MAXIMUM" width="46un"/>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="hSeparatorLabel"/>
+ <linearitem itemname="lower_side_layout"/>
+ </layout>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.manifest Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<hswidgetmanifest>
+ <uri>irhswidgetplugin</uri>
+ <title>Internet Radio HS Widget</title>
+ <description>Internet Radio HS Widget</description>
+ <icon>irhswidgetplugin.png</icon>
+ <hidden>false</hidden>
+ <servicexml>irhswidgetplugin.xml</servicexml>
+</hswidgetmanifest>
Binary file qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.xml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service>
+ <name>irhswidgetplugin</name>
+ <filepath>irhswidgetplugin</filepath>
+ <description>Internet Radio HS Widget</description>
+ <interface>
+ <name>com.nokia.symbian.IHomeScreenWidget</name>
+ <version>1.0</version>
+ <description>Internet Radio HS Widget</description>
+ <capabilities></capabilities>
+ <customproperty key="iconuri">irhswidgetplugin.png</customproperty>
+ <customproperty key="title">Internet Radio HS Widget</customproperty>
+ </interface>
+</service>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidgettitlerow.docml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+ <widget name="titlerow_layout" type="HbWidget">
+ <widget name="station_logo_layout" type="HbWidget">
+ <widget name="station_logo" type="HbLabel">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <icon iconName="qtg_large_internet_radio" name="icon"/>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="11un" type="FIXED" width="11un"/>
+ <sizehint height="11un" type="MINIMUM" width="11un"/>
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <sizehint height="11un" type="MAXIMUM" width="11un"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="expr(var(hb-param-margin-gene-middle-vertical))" left="expr(var(hb-param-margin-gene-middle-horizontal))" right="expr(var(hb-param-margin-gene-middle-horizontal))" top="expr(var(hb-param-margin-gene-middle-vertical))"/>
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="station_logo"/>
+ <stretchitem stretchfactor="1"/>
+ </layout>
+ </widget>
+ <widget name="upper_side_text_layout" type="HbWidget">
+ <widget name="station_name" type="HbLabel">
+ <enums name="alignment" value="AlignLeft|AlignVCenter|AlignLeading"/>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
+ <sizehint height="expr(var(hb-param-text-height-secondary))" type="MINIMUM"/>
+ <sizehint height="expr(var(hb-param-text-height-secondary))" type="MAXIMUM"/>
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <fontspec name="fontSpec" role="Primary" textheight="expr(var(hb-param-text-height-secondary))"/>
+ </widget>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="expr(var(hb-param-margin-gene-middle-vertical))" left="0un" right="expr(var(hb-param-margin-gene-middle-horizontal))" top="expr(var(hb-param-margin-gene-middle-vertical))"/>
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="station_name"/>
+ <stretchitem stretchfactor="1"/>
+ </layout>
+ </widget>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="expr(11un+var(hb-param-margin-gene-middle-vertical)*2)" type="FIXED" width="46un"/>
+ <sizehint height="expr(11un+var(hb-param-margin-gene-middle-vertical)*2)" type="MINIMUM" width="46un"/>
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <sizehint height="expr(11un+var(hb-param-margin-gene-middle-vertical)*2)" type="MAXIMUM" width="46un"/>
+ <layout orientation="Horizontal" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="station_logo_layout"/>
+ <linearitem itemname="upper_side_text_layout"/>
+ </layout>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resources.qrc Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource>
+ <file>resource/irhswidgetmetadatarow.docml</file>
+ <file>resource/irhswidgettitlerow.docml</file>
+ </qresource>
+</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/rom/irhswidgetplugin.iby Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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 __IRHSWIDGETPLUGIN_IBY__
+#define __IRHSWIDGETPLUGIN_IBY__
+
+file=ABI_DIR\BUILD_DIR\irhswidgetplugin.dll SHARED_LIB_DIR\irhswidgetplugin.dll
+data=ZPRIVATE\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.qtplugin private\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.qtplugin
+data=ZPRIVATE\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.manifest private\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.manifest
+data=ZPRIVATE\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.xml private\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.xml
+
+
+#endif //__IRHSWIDGETPLUGIN_IBY__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/rom/irhswidgetplugin_resources.iby Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,21 @@
+/*
+* 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 IRHSWIDGETPLUGIN_RESOURCES_IBY
+#define IRHSWIDGETPLUGIN_RESOURCES_IBY
+
+
+#endif // IRHSWIDGETPLUGIN_RESOURCES_IBY
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irappinspector.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,103 @@
+/*
+* 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: Internet Radio App Insecptor
+*
+*/
+
+// System includes
+#include <QVariant>
+#include <xqsettingsmanager.h>
+#include <xqpublishandsubscribeutils.h>
+
+// User includes
+#include "irappinspector.h"
+#include "irservicedef.h"
+
+// Constructor
+IrAppInspector::IrAppInspector(QObject *aParent) :
+ QObject(aParent),
+ mSettingsManager(new XQSettingsManager(this)),
+ mIrRunningStatusKey(XQSettingsKey::TargetPublishAndSubscribe,
+ KInternetRadioPSUid,
+ KInternetRadioStartupKey)
+{
+ QObject::connect(mSettingsManager, SIGNAL(itemDeleted(XQSettingsKey)),
+ this, SLOT(handleIrExit(XQSettingsKey)));
+ QObject::connect(mSettingsManager, SIGNAL(valueChanged(XQSettingsKey, QVariant)),
+ this, SLOT(handleIrRunningStatusChanged(XQSettingsKey, QVariant)));
+}
+
+// Destructor
+IrAppInspector::~IrAppInspector()
+{
+ stopInspectingIrRunningStatus();
+}
+
+
+/*!
+ Handling of deletion of listened P&S key.
+ \param aKey Deleted key.
+ */
+void IrAppInspector::handleIrExit(const XQSettingsKey &aKey)
+{
+ if (KInternetRadioPSUid == aKey.uid()
+ && KInternetRadioStartupKey == aKey.key())
+ {
+ emit irRunningStatusChanged(Exiting);
+
+ // since the P&S key has been deleted, should re-start the inspecting
+ startInspectingIrRunningStatus();
+ }
+}
+
+
+void IrAppInspector::handleIrRunningStatusChanged(const XQSettingsKey &aKey,
+ const QVariant &aValue)
+{
+ if (KInternetRadioPSUid == aKey.uid()
+ && KInternetRadioStartupKey == aKey.key())
+ {
+ if (aValue.isValid())
+ {
+ if (aValue.canConvert(QVariant::Int))
+ {
+ emit irRunningStatusChanged(StartingUp);
+ }
+ }
+ }
+}
+
+bool IrAppInspector::startInspectingIrRunningStatus()
+{
+ return mSettingsManager->startMonitoring(mIrRunningStatusKey);
+}
+
+void IrAppInspector::stopInspectingIrRunningStatus()
+{
+ mSettingsManager->stopMonitoring(mIrRunningStatusKey);
+}
+
+bool IrAppInspector::isIrRunning()
+{
+ QVariant value = mSettingsManager->readItemValue(mIrRunningStatusKey);
+ if (value.isValid())
+ {
+ if (value.canConvert(QVariant::Int))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidget.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,426 @@
+/*
+* 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: Internet Radio home screen widget
+*
+*/
+
+// System includes
+#include <HbFrameDrawer>
+#include <HbFrameItem>
+#include <QGraphicsLinearLayout>
+
+// User includes
+#include "irhswidget.h"
+#include "irserviceclient.h"
+#include "irhswidgettitlerow.h"
+#include "irhswidgetmetadatarow.h"
+#include "irqlogger.h"
+
+// Constants
+static const int KIrHsWidgetContentsMargin = 0;
+static const QString KIrHsWidgetBackgroundImage = "qtg_fr_hswidget_normal";
+
+// ======== MEMBER FUNCTIONS ========
+// Constructor
+IrHsWidget::IrHsWidget(QGraphicsItem* aParent, Qt::WindowFlags aFlags)
+ : HbWidget(aParent, aFlags),
+ mUserActionEnabled(false),
+ mRowLayout(NULL),
+ mTitleRow(NULL),
+ mMetaDataRow(NULL),
+ mServiceClient(NULL),
+ mIrState(IrAppState::Unknown),
+ mIrHsWidgetState(EUnknown)
+{
+ setupUi();
+ initHomeSreenWidget();
+
+ mServiceClient = IrServiceClient::openInstance();
+ setupConnection();
+}
+
+// Destructor
+IrHsWidget::~IrHsWidget()
+{
+ if (mServiceClient)
+ {
+ mServiceClient->closeInstance();
+ }
+
+ if (mRowLayout->count() == 1)
+ {
+ delete mMetaDataRow;
+ mMetaDataRow = NULL;
+ }
+}
+
+// Initializes the widget.
+// called by kqti fw when widget is added to home screen
+void IrHsWidget::onInitialize()
+{
+ mServiceClient->startMonitoringIrState();
+}
+
+// Uninitializes the widget.
+// called by kqti fw when widget is removed from home screen
+void IrHsWidget::onUninitialize()
+{
+}
+
+// Called when widget is shown in the home screen
+void IrHsWidget::onShow()
+{
+ if (mRowLayout->count() == 2)
+ {
+ mMetaDataRow->startMetaDataMarquee();
+ }
+}
+
+// Called when widget is hidden from the home screen
+void IrHsWidget::onHide()
+{
+ if (mRowLayout->count() == 2)
+ {
+ mMetaDataRow->stopMetaDataMarquee();
+ }
+}
+
+
+void IrHsWidget::setupUi()
+{
+ setContentsMargins( KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin,
+ KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin);
+
+ //Setup layout
+ mRowLayout = new QGraphicsLinearLayout(Qt::Vertical);
+
+ mRowLayout->setContentsMargins(KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin,
+ KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin);
+ mRowLayout->setSpacing(KIrHsWidgetContentsMargin);
+ setLayout(mRowLayout);
+
+ //background
+ HbFrameDrawer * backgroundFrameDrawer = new HbFrameDrawer(KIrHsWidgetBackgroundImage, HbFrameDrawer::NinePieces);
+ HbFrameItem* backgroundLayoutItem = new HbFrameItem(backgroundFrameDrawer);
+ setBackgroundItem( backgroundLayoutItem );
+}
+
+void IrHsWidget::initHomeSreenWidget()
+{
+ mTitleRow = new IrHsWidgetTitleRow();
+ mMetaDataRow = new IrHsWidgetMetaDataRow();
+
+ mRowLayout->addItem(mTitleRow);
+ resizeHomeScreenWidget();
+
+ if (mServiceClient->isStationPlayed())
+ {
+ loadStoppedLayout();
+ QString stationName;
+ if (mServiceClient->loadStationName(stationName))
+ {
+ mTitleRow->setStationName(stationName);
+ }
+
+ if (mServiceClient->loadStationLogoFlag())
+ {
+ mTitleRow->loadStationLogo();
+ }
+ }
+ else
+ {
+ loadInitLayout();
+ }
+}
+
+void IrHsWidget::resizeHomeScreenWidget()
+{
+ //resize here so homescreen will place widget correctly on screen
+ setPreferredSize( mRowLayout->preferredSize() );
+ if (parentWidget())
+ {
+ //to place widget properly after adding to homescreen
+ parentWidget()->resize(preferredSize());
+ }
+}
+
+void IrHsWidget::setupConnection()
+{
+ // signal - slot for service event
+ QObject::connect(mServiceClient, SIGNAL(stationNameUpdated(QString)),
+ this, SLOT(handleStationNameUpdated(QString)));
+ QObject::connect(mServiceClient, SIGNAL(stationLogoUpdated(bool)),
+ this, SLOT(handleStationLogoUpdated(bool)));
+ QObject::connect(mServiceClient, SIGNAL(metaDataUpdated(QString)),
+ this, SLOT(handleMetaDataUpdated(QString)));
+ QObject::connect(mServiceClient, SIGNAL(irStateChanged(IrAppState::Type)),
+ this, SLOT(handleIrStateUpdated(IrAppState::Type)));
+ QObject::connect(mServiceClient, SIGNAL(controlFailed()),
+ this, SLOT(handleControlFailed()));
+
+ enableUserAction();
+}
+
+// ================ handle user press event ===============
+void IrHsWidget::handleCommonAreaAction()
+{
+ switch (mIrState)
+ {
+ case IrAppState::NoRunInit:
+ case IrAppState::NoRunStopped:
+ disableUserAction();
+ mServiceClient->launchIrNormally();
+ break;
+
+ case IrAppState::RunningInit:
+ case IrAppState::RunningStopped:
+ case IrAppState::Playing:
+ case IrAppState::Loading:
+ mServiceClient->bringIrForeground();
+ break;
+
+ default:
+ break;
+ }
+}
+
+void IrHsWidget::handleControlAreaAction()
+{
+ LOG("IrHsWidget::handleControlAreaAction()");
+ //here, for we will control the application by homescreen,
+ //to avoid repeat actions, we disable all control event here
+ //and enable them when state changed or failed.
+ disableUserAction();
+
+ switch (mIrState)
+ {
+ case IrAppState::NoRunStopped:
+ mServiceClient->launchIrNowPlaying();
+ break;
+
+ case IrAppState::RunningStopped:
+ mServiceClient->startPlaying();
+ break;
+
+ case IrAppState::Playing:
+ mServiceClient->stopPlaying();
+ break;
+
+ case IrAppState::Loading:
+ mServiceClient->cancelLoading();
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+void IrHsWidget::handleControlFailed()
+{
+ LOG("handleControlFailed()");
+ enableUserAction();
+ switch (mIrHsWidgetState)
+ {
+ case EInit: // LAF == [logo][go to interneat radio]
+ loadInitLayout();
+ break;
+
+ case EPlaying: // LAF == [logo][StationInfo][Play]
+ loadPlayingLayout();
+ break;
+
+ case EStopped: // LAF == [logo][StationInfo][Stop]
+ loadStoppedLayout();
+ break;
+
+ case ELoading: // LAF == [logo][StationInfo][Loading]
+ loadLoadingLayout();
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+// ======== for service notification ========
+void IrHsWidget::handleStationNameUpdated(const QString &aStationName)
+{
+ mTitleRow->setStationName(aStationName);
+}
+
+void IrHsWidget::handleStationLogoUpdated(bool aLogoAvailable)
+{
+ if (aLogoAvailable)
+ {
+ mTitleRow->loadStationLogo();
+ }
+ else
+ {
+ mTitleRow->setDefaultLogo();
+ }
+}
+
+void IrHsWidget::handleMetaDataUpdated(const QString &aMetaData)
+{
+ mMetaDataRow->setMetaData(aMetaData);
+}
+
+
+void IrHsWidget::handleIrStateUpdated(IrAppState::Type aNewState)
+{
+ LOG("IrHsWidget::handleIrStateUpdated()");
+ enableUserAction();
+ if (aNewState == mIrState)
+ {
+ return;
+ }
+
+ mIrState = aNewState;
+ switch (mIrState)
+ {
+ case IrAppState::NoRunInit:
+ case IrAppState::RunningInit: // LAF == [logo][go to interneat radio]
+ handleHsWidgetStateChange(EInit);
+ break;
+
+ case IrAppState::NoRunStopped:
+ case IrAppState::RunningStopped: // LAF == [logo][StationInfo][Play]
+ handleHsWidgetStateChange(EStopped);
+ break;
+
+ case IrAppState::Playing: // LAF == [logo][StationInfo][Stop]
+ handleHsWidgetStateChange(EPlaying);
+ break;
+
+ case IrAppState::Loading: // LAF == [logo][StationInfo][Loading]
+ handleHsWidgetStateChange(ELoading);
+ break;
+
+ default:
+ break;
+ }
+}
+
+void IrHsWidget::handleHsWidgetStateChange(IrHsWidgetState aNewState)
+{
+ if (aNewState == mIrHsWidgetState)
+ {
+ return;
+ }
+
+ mIrHsWidgetState = aNewState;
+ switch (mIrHsWidgetState)
+ {
+ case EInit: // LAF == [logo][go to interneat radio]
+ loadInitLayout();
+ break;
+
+ case EPlaying: // LAF == [logo][StationInfo][Play]
+ loadPlayingLayout();
+ break;
+
+ case EStopped: // LAF == [logo][StationInfo][Stop]
+ loadStoppedLayout();
+ break;
+
+ case ELoading: // LAF == [logo][StationInfo][Loading]
+ loadLoadingLayout();
+ break;
+
+ default:
+ break;
+ }
+}
+// LAF == [logo][go to interneat radio]
+void IrHsWidget::loadInitLayout()
+{
+ if (mRowLayout->count() == 2)
+ {
+ mRowLayout->removeItem(mMetaDataRow);
+ resizeHomeScreenWidget();
+ }
+
+ mTitleRow->setDefaultTitle();
+}
+
+// LAF == [logo][StationInfo][Play]
+void IrHsWidget::loadStoppedLayout()
+{
+ if (mRowLayout->count() == 1)
+ {
+ mRowLayout->addItem(mMetaDataRow);
+ resizeHomeScreenWidget();
+ }
+
+ mMetaDataRow->setPlayIcon();
+}
+
+// LAF == [logo][StationInfo][Stop]
+void IrHsWidget::loadPlayingLayout()
+{
+ if (mRowLayout->count() == 1)
+ {
+ mRowLayout->addItem(mMetaDataRow);
+ resizeHomeScreenWidget();
+ }
+
+ mMetaDataRow->setStopIcon();
+}
+
+// LAF == [logo][StationInfo][Loading]
+void IrHsWidget::loadLoadingLayout()
+{
+ if (mRowLayout->count() == 1)
+ {
+ mRowLayout->addItem(mMetaDataRow);
+ resizeHomeScreenWidget();
+ }
+
+ mMetaDataRow->setLoadingIcon();
+}
+
+
+
+void IrHsWidget::enableUserAction()
+{
+ if (!mUserActionEnabled)
+ {
+ mUserActionEnabled = true;
+ // signal - slot for user click action
+ QObject::connect(mTitleRow, SIGNAL(titleRowClicked()),
+ this, SLOT(handleCommonAreaAction()));
+ QObject::connect(mMetaDataRow, SIGNAL(metaDataAreaClicked()),
+ this, SLOT(handleCommonAreaAction()));
+ QObject::connect(mMetaDataRow, SIGNAL(controlAreaClicked()),
+ this, SLOT(handleControlAreaAction()));
+ }
+}
+
+void IrHsWidget::disableUserAction()
+{
+ if (mUserActionEnabled)
+ {
+ mUserActionEnabled = false;
+ // signal - slot for user click action
+ QObject::disconnect(mTitleRow, SIGNAL(titleRowClicked()),
+ this, SLOT(handleCommonAreaAction()));
+ QObject::disconnect(mMetaDataRow, SIGNAL(metaDataAreaClicked()),
+ this, SLOT(handleCommonAreaAction()));
+ QObject::disconnect(mMetaDataRow, SIGNAL(controlAreaClicked()),
+ this, SLOT(handleControlAreaAction()));
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidgetmetadatarow.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,171 @@
+/*
+* 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: Internet Radio home screen widget
+*
+*/
+// System includes
+#include <QGraphicsLinearLayout>
+#include <HbLabel>
+#include <HbMarqueeItem>
+#include <HbIconAnimationManager>
+#include <HbIconAnimationDefinition>
+#include <HbColorScheme>
+#include <HbStyleLoader>
+
+// User includes
+#include "irhswidgetmetadatarow.h"
+#include "irhswidgetuiloader.h"
+
+// Constants
+static const QString KIrHsWidgetMetaDataRowDocML = ":/resource/irhswidgetmetadatarow.docml";
+static const QString KIrHsWidgetMetaDataRowContainer = "metadatarow_layout";
+static const QString KIrHsWidgetMetaDataLabel = "metadata_label";
+static const QString KNmHsWidgetControlLabel = "control_label";
+
+static const QString KPlayButtonIcon = "qtg_mono_play";
+static const QString KStopButtonIcon = "qtg_mono_stop";
+static const QString KMetaDataColor = "qtc_hs_list_item_title";
+
+static const QString KLoadingAnimationPrefix = "qtg_anim_loading_";
+static const QString KLoadingIconName = "LoadingAnimation";
+
+static const int KIrHsWidgetContentsMargin = 0;
+static const int KLoadingFramePostfixMin = 1; // loading animation frame name postfix (min value) defined in layout guide.
+static const int KLoadingFramePostfixMax = 10; // loading animation frame name postfix (max value) defined in layout guide.
+static const int KLoadingAnimationDuration = 100; // duration for frames to construct a animation, unit : ms
+
+IrHsWidgetMetaDataRow::IrHsWidgetMetaDataRow(QGraphicsItem *aParent, Qt::WindowFlags aFlags) :
+ HbWidget(aParent, aFlags),
+ mMetaData(NULL),
+ mControlLabel(NULL)
+{
+ loadUi();
+ createLoadingIcon();
+}
+
+
+IrHsWidgetMetaDataRow::~IrHsWidgetMetaDataRow()
+{
+}
+
+void IrHsWidgetMetaDataRow::loadUi()
+{
+ IRHsWidgetUiLoader loader;
+ loader.load(KIrHsWidgetMetaDataRowDocML);
+
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
+ layout->setContentsMargins(KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin,
+ KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin);
+ layout->setSpacing(KIrHsWidgetContentsMargin);
+ setLayout(layout);
+
+ QGraphicsWidget *container = loader.findWidget(KIrHsWidgetMetaDataRowContainer);
+ layout->addItem(container);
+
+ mMetaData = static_cast<HbMarqueeItem*> (loader.findWidget(KIrHsWidgetMetaDataLabel));
+ mControlLabel = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetControlLabel));
+ mMetaData->setTextColor(HbColorScheme::color(KMetaDataColor));
+ mMetaData->setLoopCount(-1);
+
+ mMetaData->installEventFilter(this);
+ mControlLabel->installEventFilter(this);
+}
+
+void IrHsWidgetMetaDataRow::setMetaData(const QString &aMetaData)
+{
+ if (mMetaData->text() != aMetaData)
+ {
+ mMetaData->setText(aMetaData);
+ if (aMetaData.isEmpty())
+ {
+ mMetaData->stopAnimation();
+ }
+ else
+ {
+ mMetaData->startAnimation();
+ }
+ }
+}
+
+void IrHsWidgetMetaDataRow::startMetaDataMarquee()
+{
+ if (!mMetaData->text().isEmpty())
+ {
+ mMetaData->startAnimation();
+ }
+}
+
+void IrHsWidgetMetaDataRow::stopMetaDataMarquee()
+{
+ mMetaData->stopAnimation();
+}
+
+void IrHsWidgetMetaDataRow::setPlayIcon()
+{
+ mControlLabel->setIcon(KPlayButtonIcon);
+}
+
+void IrHsWidgetMetaDataRow::setStopIcon()
+{
+ mControlLabel->setIcon(KStopButtonIcon);
+}
+
+void IrHsWidgetMetaDataRow::setLoadingIcon()
+{
+ mControlLabel->setIcon(mLoadingIcon);
+}
+
+bool IrHsWidgetMetaDataRow::eventFilter(QObject *aObject, QEvent *aEvent)
+{
+ QString objectName = aObject->objectName();
+
+ if (QEvent::GraphicsSceneMousePress == aEvent->type())
+ {
+
+ if (KIrHsWidgetMetaDataLabel == objectName)
+ {
+ emit metaDataAreaClicked();
+ }
+ else if (KNmHsWidgetControlLabel == objectName)
+ {
+ emit controlAreaClicked();
+ }
+ }
+
+ return false;
+}
+
+void IrHsWidgetMetaDataRow::createLoadingIcon()
+{
+ HbIconAnimationManager *animationManager = HbIconAnimationManager::global();
+ HbIconAnimationDefinition animationDefinition;
+ HbIconAnimationDefinition::AnimationFrame animationFrame;
+ QList<HbIconAnimationDefinition::AnimationFrame> animationFrameList;
+
+ QString animationFrameIconName;
+ for (int i = KLoadingFramePostfixMin; i <= KLoadingFramePostfixMax; i++)
+ {
+ animationFrame.duration = KLoadingAnimationDuration;
+ animationFrameIconName.clear();
+ animationFrameIconName.append(KLoadingAnimationPrefix);
+ animationFrameIconName.append(animationFrameIconName.number(i));
+ animationFrame.iconName = animationFrameIconName;
+ animationFrameList.append(animationFrame);
+ }
+ animationDefinition.setPlayMode(HbIconAnimationDefinition::Loop);
+ animationDefinition.setFrameList(animationFrameList);
+ animationManager->addDefinition(KLoadingIconName, animationDefinition);
+
+ mLoadingIcon.setIconName(KLoadingIconName);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidgetplugin.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* 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: Internet Radio home screen widget plugin
+*
+*/
+
+#include <qserviceinterfacedescriptor.h>
+#include <qabstractsecuritysession.h>
+#include <qservicecontext.h>
+
+#include "irhswidgetplugin.h"
+#include "irhswidget.h"
+
+
+/*!
+ Initialize plugin for Internet Radio home screen widget. Contains necessary information about
+ the internet radio widget that it can be loaded through QT Service Framework.
+*/
+QObject *IrHsWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &aDescriptor,
+ QServiceContext *aContext,
+ QAbstractSecuritySession *aSession)
+{
+ Q_UNUSED(aContext);
+ Q_UNUSED(aSession);
+
+ if (aDescriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget"))
+ {
+ return new IrHsWidget();
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+Q_EXPORT_PLUGIN2(irhswidgetplugin, IrHsWidgetPlugin)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidgettitlerow.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,116 @@
+/*
+* 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: Internet Radio home screen widget
+*
+*/
+// System includes
+#include <QGraphicsLinearLayout>
+#include <QSettings>
+#include <QPixmap>
+#include <HbLabel>
+#include <HbColorScheme>
+#include <HbStyleLoader>
+
+// User includes
+#include "irhswidgettitlerow.h"
+#include "irservicedef.h"
+#include "irhswidgetuiloader.h"
+
+// Constants
+static const QString KIrHsWidgetTitleRowDocML = ":/resource/irhswidgettitlerow.docml";
+static const QString KIrHsWidgetTitleRowContainer = "titlerow_layout";
+static const QString KIrHsWidgetStationLogo = "station_logo";
+static const QString KNmHsWidgetStationName = "station_name";
+
+static const QString KStationNameColor = "qtc_hs_list_item_title";
+static const QString KDefaultStationLogo = "qtg_large_internet_radio";
+
+static const int KIrHsWidgetContentsMargin = 0;
+static const int KIrHsWidgetLogoSize = 50; // hs widget logo size
+
+IrHsWidgetTitleRow::IrHsWidgetTitleRow(QGraphicsItem *aParent, Qt::WindowFlags aFlags) :
+ HbWidget(aParent, aFlags),
+ mStationLogo(NULL),
+ mStationName(NULL)
+{
+ loadUi();
+}
+
+IrHsWidgetTitleRow::~IrHsWidgetTitleRow()
+{
+}
+
+void IrHsWidgetTitleRow::loadUi()
+{
+ IRHsWidgetUiLoader loader;
+ loader.load(KIrHsWidgetTitleRowDocML);
+
+ //Create layout
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
+
+ layout->setContentsMargins(KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin,
+ KIrHsWidgetContentsMargin, KIrHsWidgetContentsMargin);
+ layout->setSpacing(KIrHsWidgetContentsMargin);
+ setLayout(layout);
+
+ QGraphicsWidget *container = loader.findWidget(KIrHsWidgetTitleRowContainer);
+ layout->addItem(container);
+
+ mStationLogo = static_cast<HbLabel*> (loader.findWidget(KIrHsWidgetStationLogo));
+ mStationName = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetStationName));
+ mStationName->setTextColor(HbColorScheme::color(KStationNameColor));
+}
+
+void IrHsWidgetTitleRow::setDefaultTitle()
+{
+#ifdef SUBTITLE_STR_BY_LOCID
+ mStationName->setPlainText(hbTrId("txt_irad_title_internet_radio"));
+#else
+ mStationName->setPlainText(hbTrId("Internet radio"));
+#endif
+}
+
+void IrHsWidgetTitleRow::setStationName(const QString& aStationName)
+{
+ if (mStationName->plainText() != aStationName)
+ {
+ mStationName->setPlainText(aStationName);
+ }
+}
+
+void IrHsWidgetTitleRow::loadStationLogo()
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ if (settings.value(KIrSettingStationLogo).canConvert<QPixmap>())
+ {
+ QPixmap logoPixmap = settings.value(KIrSettingStationLogo).value<QPixmap>();
+ QPixmap newLogoPixmap =
+ logoPixmap.scaled(QSize(KIrHsWidgetLogoSize,KIrHsWidgetLogoSize),Qt::KeepAspectRatio);
+ QIcon logoQIcon(newLogoPixmap);
+ HbIcon logoHbIcon(logoQIcon);
+ mStationLogo->setIcon(logoHbIcon);
+ }
+}
+
+void IrHsWidgetTitleRow::setDefaultLogo()
+{
+ mStationLogo->setIcon(KDefaultStationLogo);
+}
+
+
+void IrHsWidgetTitleRow::mousePressEvent(QGraphicsSceneMouseEvent *aEvent)
+{
+ Q_UNUSED(aEvent);
+ emit titleRowClicked();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidgetuiloader.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* 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:
+*
+*/
+#include <HbMarqueeItem>
+#include "irhswidgetuiloader.h"
+
+QObject *IRHsWidgetUiLoader::createObject(const QString& aType, const QString &aName)
+{
+ if (aType == HbMarqueeItem::staticMetaObject.className())
+ {
+ QObject *object = new HbMarqueeItem;
+ object->setObjectName(aName);
+ return object;
+ }
+
+ return HbDocumentLoader::createObject(aType, aName);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irserviceclient.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,591 @@
+/*
+* 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: internet radio hs widget service client
+*
+*/
+
+// System includes
+#include <QSettings>
+#include <QVariant>
+#include <QString>
+#include <hbicon.h>
+#include <xqserviceglobal.h>
+#include <xqservicerequest.h>
+
+
+// User includes
+#include "irserviceclient.h"
+#include "irservicedata.h"
+
+// Constants
+// For services via Qt HighWay
+static const QString KIrServiceName = "internet_radio_10_1";
+static const QString KIrServiceControlInterfaceName = "com.nokia.symbian.IInternetRadioControl";
+static const QString KIrServiceControlOperation = "handleCmd(int)";
+static const QString KIrServiceMonitorInterfaceName = "com.nokia.symbian.IInternetRadioMonitor";
+static const QString KIrServiceMonitorOperation = "registerNotifications()";
+static const QString KIrServiceRefreshOperation = "refreshAllData()";
+
+
+// Initialize the static member variable
+QMutex IrServiceClient::mMutex;
+int IrServiceClient::mRef = 0;
+bool IrServiceClient::mMonitoringStarted = false;
+IrServiceClient *IrServiceClient::mInstatnce = NULL;
+
+
+// ==================== MEMBER FUNCTIONS ======================
+// Static function to get a singleton instance of IrServiceClient
+IrServiceClient* IrServiceClient::openInstance()
+{
+ mMutex.lock();
+ if (NULL == mInstatnce)
+ {
+ mInstatnce = new IrServiceClient();
+ }
+ if (mInstatnce != NULL)
+ {
+ mRef++;
+ }
+ mMutex.unlock();
+ return mInstatnce;
+}
+
+// Close a singleton instance of IrServiceClient
+void IrServiceClient::closeInstance()
+{
+ if (mInstatnce != NULL)
+ {
+ mMutex.lock();
+ if (mRef > 0)
+ {
+ mRef--;
+ }
+
+ if (0 == mRef)
+ {
+ delete mInstatnce;
+ }
+ mMutex.unlock();
+ }
+}
+
+// Constructor
+IrServiceClient::IrServiceClient() :
+ mIrAppInspector(NULL),
+ mMonitorReqOngoing(false),
+ mControlReqOngoing(false),
+ mMonitorRequest(NULL),
+ mRefreshRequest(NULL),
+ mControlRequest(NULL)
+{
+ mIrAppInspector = new IrAppInspector(this);
+
+ QObject::connect(mIrAppInspector, SIGNAL(irRunningStatusChanged(IrAppInspector::IrRunningStatus)),
+ this, SLOT(handleIrRunningStatusChanged(IrAppInspector::IrRunningStatus)));
+}
+
+// Destructor
+IrServiceClient::~IrServiceClient()
+{
+ delete mMonitorRequest;
+ mMonitorRequest = NULL;
+
+ delete mRefreshRequest;
+ mRefreshRequest = NULL;
+
+ delete mControlRequest;
+ mControlRequest = NULL;
+}
+
+bool IrServiceClient::startMonitoringIrState()
+{
+ if (mMonitoringStarted)
+ {
+ refreshAllActiveHsWidgets();
+ return true;
+ }
+
+ // if this is the first active hs widget
+ mMonitoringStarted = true;
+ bool retVal = false;
+ if (mIrAppInspector->isIrRunning())
+ {
+ retVal = doSendRefreshRequest();
+ }
+ else
+ {
+ if (isStationPlayed())
+ {
+ initHsWidgetNoRunStopped();
+ }
+ else
+ {
+ notifyIrStateChanged(IrAppState::NoRunInit);
+ }
+ }
+
+ return mIrAppInspector->startInspectingIrRunningStatus() && retVal;
+}
+
+
+void IrServiceClient::initHsWidgetNoRunStopped()
+{
+ QString stationName;
+ if (loadStationName(stationName))
+ {
+ notifyStationNameUpdated(stationName);
+ }
+ else
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ notifyStationNameUpdated(hbTrId("txt_irad_info_unnamed_station"));
+#else
+ notifyStationNameUpdated(hbTrId("Unnamed station"));
+#endif
+ }
+
+ notifyStationLogoUpdated(loadStationLogoFlag());
+
+ notifyIrStateChanged(IrAppState::NoRunStopped);
+}
+
+void IrServiceClient::refreshAllActiveHsWidgets()
+{
+ emit stationNameUpdated(mStationName);
+ emit stationLogoUpdated(mStationLogoAvailable);
+ emit metaDataUpdated(mMetaData);
+ emit irStateChanged(mIrState);
+}
+
+/******************************************************************
+**************** Monitor Service Request **********************
+*******************************************************************/
+bool IrServiceClient::doSendMonitorRequest()
+{
+ if(mMonitorReqOngoing)
+ {
+ return false;
+ }
+
+ if (NULL == mMonitorRequest
+ &&!createMonitorServiceRequest())
+ {
+ return false;
+ }
+
+ prepareRequestInfo(mMonitorRequest, DoNotChange);
+ return mMonitorRequest->send();
+}
+
+bool IrServiceClient::createMonitorServiceRequest()
+{
+ bool retVal = false;
+
+ if (NULL == mMonitorRequest)
+ {
+ mMonitorRequest = mApplicationManager.create(KIrServiceName,
+ KIrServiceMonitorInterfaceName,
+ KIrServiceMonitorOperation,
+ false);
+
+ if (mMonitorRequest)
+ {
+ retVal = true;
+
+ connect(mMonitorRequest, SIGNAL(requestOk(const QVariant&)),
+ this, SLOT(handleMonitorRequestOk(const QVariant&)));
+ connect(mMonitorRequest, SIGNAL(requestError(int,const QString&)),
+ this, SLOT(handleMonitorRequestError(int,const QString&)));
+
+ mMonitorRequest->setEmbedded(false);
+ mMonitorRequest->setSynchronous(false);
+ }
+ }
+ else
+ {
+ retVal = true;
+ }
+
+ return retVal;
+}
+
+// ==================== Refresh Service Request ===========================
+bool IrServiceClient::doSendRefreshRequest()
+{
+ if(mMonitorReqOngoing)
+ {
+ return false;
+ }
+
+ if (NULL == mRefreshRequest
+ && !createRefreshServiceRequest())
+ {
+ return false;
+ }
+
+ prepareRequestInfo(mRefreshRequest, DoNotChange);
+ return mRefreshRequest->send();
+}
+
+bool IrServiceClient::createRefreshServiceRequest()
+{
+ bool retVal = false;
+
+ if (NULL == mRefreshRequest)
+ {
+ mRefreshRequest = mApplicationManager.create(KIrServiceName,
+ KIrServiceMonitorInterfaceName,
+ KIrServiceRefreshOperation,
+ false);
+
+ if (mRefreshRequest)
+ {
+ retVal = true;
+
+ connect(mRefreshRequest, SIGNAL(requestOk(const QVariant&)),
+ this, SLOT(handleMonitorRequestOk(const QVariant&)));
+ connect(mRefreshRequest, SIGNAL(requestError(int,const QString&)),
+ this, SLOT(handleMonitorRequestError(int,const QString&)));
+
+ mRefreshRequest->setEmbedded(false);
+ mRefreshRequest->setSynchronous(false);
+ }
+ }
+ else
+ {
+ retVal = true;
+ }
+
+ return retVal;
+}
+
+void IrServiceClient::handleMonitorRequestOk(const QVariant &aRetValue)
+{
+ mMonitorReqOngoing = false;
+
+ doSendMonitorRequest();
+
+ if (aRetValue.isValid()
+ && aRetValue.canConvert<IrServiceDataList>())
+ {
+ IrServiceDataList dataList;
+ dataList = qVariantValue<IrServiceDataList>(aRetValue);
+ foreach (const IrServiceData& data, dataList)
+ {
+ processNotificationData(data);
+ }
+ }
+}
+
+void IrServiceClient::handleMonitorRequestError(int aErrCode, const QString &aErrMessage)
+{
+ mMonitorReqOngoing = false;
+
+ Q_UNUSED(aErrCode);
+ Q_UNUSED(aErrMessage);
+}
+
+/******************************************************************
+**************** Control Service Request **********************
+*******************************************************************/
+bool IrServiceClient::bringIrForeground()
+{
+ QVariant commandArgument(QVariant::Int);
+ commandArgument.setValue((int)IrServiceCmd::Foreground);
+ return doSendControlRequest(commandArgument, true, ToForeground);
+}
+
+bool IrServiceClient::launchIrNormally()
+{
+ QVariant commandArgument(QVariant::Int);
+ commandArgument.setValue((int)IrServiceCmd::LaunchNormally);
+ return doSendControlRequest(commandArgument, true, ToForeground);
+}
+
+bool IrServiceClient::launchIrNowPlaying()
+{
+ QVariant commandArgument(QVariant::Int);
+ commandArgument.setValue((int)IrServiceCmd::LaunchNowPlayingView);
+ return doSendControlRequest(commandArgument, false, ToBackground);
+}
+
+
+bool IrServiceClient::startPlaying()
+{
+ QVariant commandArgument(QVariant::Int);
+ commandArgument.setValue((int)IrServiceCmd::Play);
+ return doSendControlRequest(commandArgument, true, DoNotChange);
+}
+
+
+bool IrServiceClient::stopPlaying()
+{
+ QVariant commandArgument(QVariant::Int);
+ commandArgument.setValue((int)IrServiceCmd::Stop);
+ return doSendControlRequest(commandArgument, true, DoNotChange);
+}
+
+bool IrServiceClient::cancelLoading()
+{
+ QVariant commandArgument(QVariant::Int);
+ commandArgument.setValue((int)IrServiceCmd::Cancel);
+ return doSendControlRequest(commandArgument, true, DoNotChange);
+}
+
+bool IrServiceClient::doSendControlRequest(const QVariant &aArgument, bool aIsSync, IrAppVisibilty aVisibility)
+{
+ if(mControlReqOngoing)
+ {
+ return false;
+ }
+
+ if (NULL == mControlRequest &&
+ !createControlServiceRequest())
+ {
+ return false;
+ }
+
+ QList<QVariant> arguments;
+ arguments.append(aArgument);
+ mControlRequest->setArguments(arguments);
+
+ prepareRequestInfo(mControlRequest, aVisibility);
+ mControlRequest->setSynchronous(aIsSync);
+ return mControlRequest->send();
+}
+
+bool IrServiceClient::createControlServiceRequest()
+{
+ bool retVal = false;
+
+ if (NULL == mControlRequest)
+ {
+ mControlRequest = mApplicationManager.create(KIrServiceName,
+ KIrServiceControlInterfaceName,
+ KIrServiceControlOperation,
+ false);
+
+ if (mControlRequest)
+ {
+ retVal = true;
+
+ connect(mControlRequest, SIGNAL(requestOk(const QVariant&)),
+ this, SLOT(handleControlRequestOk(const QVariant&)));
+ connect(mControlRequest, SIGNAL(requestError(int,const QString&)),
+ this, SLOT(handleControlRequestError(int,const QString&)));
+
+ mControlRequest->setEmbedded(false);
+ }
+ }
+ else
+ {
+ retVal = true;
+ }
+
+ return retVal;
+}
+
+void IrServiceClient::handleControlRequestOk(const QVariant &aRetValue)
+{
+ mControlReqOngoing = false;
+
+ if (aRetValue.isValid()
+ && aRetValue.canConvert(QVariant::Int))
+ {
+ if (IrServiceResult::Fail == aRetValue.toInt())
+ {
+ emit controlFailed();
+ }
+ }
+}
+
+void IrServiceClient::handleControlRequestError(int aErrCode, const QString &aErrMessage)
+{
+ mControlReqOngoing = false;
+
+ emit controlFailed();
+
+ Q_UNUSED(aErrCode);
+ Q_UNUSED(aErrMessage);
+}
+/******************************************************************
+************************* Others ******************************
+*******************************************************************/
+// slot connected to signals from IrAppInspector,
+// used to monitor the startup / exit of IR
+void IrServiceClient::handleIrRunningStatusChanged(IrAppInspector::IrRunningStatus aNewStatus)
+{
+ switch (aNewStatus)
+ {
+ case IrAppInspector::StartingUp :
+ doSendRefreshRequest();
+ break;
+
+ case IrAppInspector::Exiting :
+ {
+ clearMonitorServiceRequest();
+ QString stationName;
+ if (loadStationName(stationName))
+ {
+ notifyMetaDataUpdated(QString(""));
+ notifyStationNameUpdated(stationName);
+ notifyStationLogoUpdated(loadStationLogoFlag());
+ notifyIrStateChanged(IrAppState::NoRunStopped);
+ }
+ else
+ {
+ notifyIrStateChanged(IrAppState::NoRunInit);
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+}
+
+void IrServiceClient::clearMonitorServiceRequest()
+{
+ delete mMonitorRequest;
+ mMonitorRequest = NULL;
+
+ delete mRefreshRequest;
+ mRefreshRequest = NULL;
+}
+
+// used to process service data sent from IR app.
+void IrServiceClient::processNotificationData(const IrServiceData &aServiceData)
+{
+ QVariant data = aServiceData.mData;
+ if (!data.isValid())
+ {
+ return;
+ }
+ switch (aServiceData.mType)
+ {
+ case IrServiceNotification::StationName:
+ if (data.canConvert(QVariant::String))
+ {
+ notifyStationNameUpdated(data.toString());
+ }
+ break;
+
+ case IrServiceNotification::MetaData:
+ if (data.canConvert(QVariant::String))
+ {
+ notifyMetaDataUpdated(data.toString());
+ }
+ break;
+
+ case IrServiceNotification::StationLogo:
+ if (data.canConvert(QVariant::Bool))
+ {
+ notifyStationLogoUpdated(data.toBool());
+ }
+ break;
+
+ case IrServiceNotification::IrState:
+ if (data.canConvert(QVariant::Int))
+ {
+ notifyIrStateChanged((IrAppState::Type)data.toInt());
+ }
+ break;
+
+ default:
+ break;
+ }
+
+}
+
+// prepare the request send to IR app, including control request, refresh request, monitor request.
+void IrServiceClient::prepareRequestInfo(XQAiwRequest *aRequest, IrAppVisibilty aVisibility)
+{
+ if (NULL == aRequest)
+ {
+ return;
+ }
+
+ XQRequestInfo reqInfo;
+ switch (aVisibility)
+ {
+ case ToForeground:
+ reqInfo.setForeground(true);
+ break;
+ case ToBackground:
+ reqInfo.setBackground(true);
+ break;
+ case DoNotChange:
+ break;
+ default:
+ break;
+ }
+
+ aRequest->setInfo(reqInfo);
+}
+
+void IrServiceClient::notifyStationNameUpdated(const QString &aStationName)
+{
+ mStationName = aStationName;
+ emit stationNameUpdated(mStationName);
+}
+
+void IrServiceClient::notifyStationLogoUpdated(bool aIsLogoAvailable)
+{
+ mStationLogoAvailable = aIsLogoAvailable;
+ emit stationLogoUpdated(mStationLogoAvailable);
+}
+
+void IrServiceClient::notifyMetaDataUpdated(const QString &aMetaData)
+{
+ mMetaData = aMetaData;
+ emit metaDataUpdated(mMetaData);
+}
+
+void IrServiceClient::notifyIrStateChanged(IrAppState::Type aNewState)
+{
+ mIrState = aNewState;
+ emit irStateChanged(mIrState);
+}
+
+bool IrServiceClient::isStationPlayed()
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ QString stationName = settings.value(KIrSettingStationName,KIrDefaultStationName).toString();
+ return stationName != KIrDefaultStationName;
+}
+
+bool IrServiceClient::loadStationLogoFlag()
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ return settings.value(KIrSettingStationLogoAvailable,false).toBool();
+}
+
+bool IrServiceClient::loadStationName(QString &aStationName)
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ aStationName = settings.value(KIrSettingStationName,KIrDefaultStationName).toString();
+ if(aStationName != KIrDefaultStationName)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+Q_IMPLEMENT_USER_METATYPE(IrServiceData)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(IrServiceDataList)
+
--- a/qtinternetradio/irqcommon/inc/irqenums.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqcommon/inc/irqenums.h Thu Jul 22 16:31:41 2010 +0100
@@ -53,7 +53,9 @@
//no connection to the server
EIRQNoConnectionToServer,
//no connection to the network
- EIRQNoConnectionToNetwork
+ EIRQNoConnectionToNetwork,
+ //a call is activated
+ EIRQCallIsActivated
};
enum IRQConnectedFrom
--- a/qtinternetradio/irqcommon/inc/irqisdsdatastructure.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqcommon/inc/irqisdsdatastructure.h Thu Jul 22 16:31:41 2010 +0100
@@ -39,6 +39,8 @@
QString channelName;
QString shortDescription;
QString imageURL;
+ //added for cache search
+ int channelID;
};
class IRQChannelServerURL
@@ -101,7 +103,6 @@
int uniqID; //unique id generated for the preset saved at favourite
int type; //0 for user defined 1 for isds type.
- int index;//index in the preset table
int presetId;//isds generated preset id
QString name; //preset name
QString languageCode;//preset language code
@@ -116,7 +117,6 @@
QString shortDesc;//channel short desription
QString genreName;//channel genre name
QString genreId;//channel genre id
- int bitrate;//channel bitrate
//in our spec but not in current code
QString advertisementUrl;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqcommon/inc/irservicedata.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,62 @@
+/*
+* 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 IRSERVICEDATA_H
+#define IRSERVICEDATA_H
+
+#include <QVariant>
+#include <xqserviceipcmarshal.h>
+
+class IrServiceData
+{
+public:
+
+ IrServiceData() : mType(-1) {}
+ IrServiceData(int aType, const QVariant &aData) :
+ mType(aType),
+ mData(aData)
+ {}
+
+ virtual ~IrServiceData() {}
+
+ int mType;
+ QVariant mData;
+
+ template <typename Stream> void serialize(Stream &aStream) const;
+ template <typename Stream> void deserialize(Stream &aStream);
+};
+
+template <typename Stream> inline void IrServiceData::serialize(Stream &aStream) const
+{
+ aStream << mType;
+ aStream << mData;
+}
+
+template <typename Stream> inline void IrServiceData::deserialize(Stream &aStream)
+{
+ aStream >> mType;
+ aStream >> mData;
+}
+
+
+typedef QList<IrServiceData> IrServiceDataList;
+
+Q_DECLARE_USER_METATYPE(IrServiceData)
+Q_DECLARE_USER_METATYPE_NO_OPERATORS(IrServiceDataList)
+
+
+#endif // IRSERVICEDATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqcommon/inc/irservicedef.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* 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 IRSERVICEDEF_H
+#define IRSERVICEDEF_H
+
+#include <QString>
+
+// For settings via QSetting
+static const QString KIrSettingOrganization = "nokia.s60.mymex";
+static const QString KIrSettingApplication = "internetradio";
+static const QString KIrSettingStationName = "lastplayedinfo/station_name";
+static const QString KIrDefaultStationName = "no_station_played_yet";
+static const QString KIrSettingStationLogo = "lastplayedinfo/station_logo";
+static const QString KIrSettingStationLogoAvailable = "lastplayedinfo/station_logo_available";
+static const QString KIrSettingSplashNowplaying = "splash/is_nowplaying_view";
+
+// For P&S XQSettingsManager
+const long int KInternetRadioPSUid = 0xE28364bb; // Internet Radio's UID3
+const unsigned long int KInternetRadioStartupKey = 0x00000035; // a empty slot in internetradio2.0\include\irpubsubkeys.h
+
+
+Q_ENUMS(IrServiceCmd::Type IrServiceNotification::Type IrAppState::Type IrServiceResult::Type)
+
+namespace IrServiceCmd
+{
+ enum Type
+ {
+ Unknown = -1,
+ LaunchNormally = 0,
+ LaunchNowPlayingView = 1,
+ Play = 2,
+ Stop = 3,
+ Cancel = 4,
+ Foreground = 5
+ };
+}
+
+namespace IrServiceNotification
+{
+ enum Type
+ {
+ Unknown = -1,
+ IrState = 0,
+ StationLogo = 1,
+ StationName = 2,
+ MetaData = 3
+ };
+}
+
+
+namespace IrAppState
+{
+ enum Type
+ {
+ Unknown = -1,
+ NoRunInit = 0, // internet radio is not running, and no station has been played yet
+ NoRunStopped = 1, // internet radio is not running, with last played station
+ RunningInit = 2, // running, no station has been played yet
+ RunningStopped = 3, // running, with last played station
+ Playing = 4,
+ Loading = 5
+ };
+}
+
+namespace IrServiceResult
+{
+ enum Type
+ {
+ Success = -1,
+ Fail = 0
+ };
+}
+
+#endif // IRSERVICEDEF_H
--- a/qtinternetradio/irqcommon/inc/irviewdefinitions.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqcommon/inc/irviewdefinitions.h Thu Jul 22 16:31:41 2010 +0100
@@ -42,9 +42,6 @@
EIRViewPara_Genre,
EIRViewPara_Language,
EIRViewPara_Country,
- EIRViewPara_PopularStations,
- EIRViewPara_CategoryStations,
- EIRViewPara_SearchResults,
EIRViewPara_ViewCounts
};
@@ -76,7 +73,6 @@
EIR_UseNetwork_StartingView,
EIR_UseNetwork_OpenWebAddress,
EIR_UseNetwork_StartSearch,
- EIR_UseNetwork_DownloadLogo,
EIR_UseNetwork_LoadCategory,
EIR_UseNetwork_PlayStation
};
--- a/qtinternetradio/irqcommon/irqcommon.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqcommon/irqcommon.pro Thu Jul 22 16:31:41 2010 +0100
@@ -18,11 +18,14 @@
MOC_DIR = moc
DEPENDPATH = src
-
+defFilePath = ..
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
INCLUDEPATH += ../../internetradio2.0/datastructuresinc \
- ../../internetradio2.0/presetplugininc
+ ../../internetradio2.0/presetplugininc \
+ ../../presetserver/include \
+ ../../presetserver/clientinc \
+ ../../presetserver/serverinc
LIBS += -lirdatastructures \
-lfbscli \
@@ -30,7 +33,9 @@
-lws32 \
-lapgrfx \
-lxqsettingsmanager \
- -lapmime
+ -lapmime \
+ -lapparc \
+ -lpsclient100
symbian{
TARGET.UID3 = 0xef3c4675
@@ -41,7 +46,9 @@
#header files list
HEADERS += inc\irqisdsdatastructure.h \
- inc\irqutility.h
+ inc\irqutility.h \
+ inc\irservicedata.h \
+ inc\irservicedef.h
#source files list
--- a/qtinternetradio/irqcommon/src/irqisdsdatastructure.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqcommon/src/irqisdsdatastructure.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -29,10 +29,12 @@
aStream<<serverName<<url<<bitrate;
}
-EXPORT_C IRQPreset::IRQPreset()
+//we need to initialize all the member for sometimes, it will
+//crash by overflow if we don't do this.
+EXPORT_C IRQPreset::IRQPreset():uniqID(0),type(0),presetId(0),
+ iIsSorted(false),iChannelUrlCount(0)
{
- iIsSorted = false;
- iChannelUrlCount = 0;
+
}
EXPORT_C IRQPreset::~IRQPreset()
@@ -61,7 +63,6 @@
this->imgUrl = aOther.imgUrl;
this->advertisementInUse = aOther.advertisementInUse;
this->advertisementUrl = aOther.advertisementUrl;
- this->bitrate = aOther.bitrate;
this->genreId = aOther.genreId;
this->genreName = aOther.genreName;
this->shortDesc = aOther.shortDesc;
@@ -76,7 +77,6 @@
this->languageName = aOther.languageName;
this->name = aOther.name;
this->presetId = aOther.presetId;
- this->index = aOther.index;
this->type = aOther.type;
this->iChannelUrlCount = aOther.iChannelUrlCount;
this->uniqID = aOther.uniqID;
@@ -85,7 +85,7 @@
EXPORT_C void IRQPreset::internalize(QDataStream &aStream)
{
- aStream>>uniqID>>presetId>>index>>type>>iChannelUrlCount;
+ aStream>>uniqID>>presetId>>type>>iChannelUrlCount;
aStream>>languageCode>>languageName
>>countryCode>>countryName
@@ -106,7 +106,7 @@
EXPORT_C void IRQPreset::externalize(QDataStream &aStream) const
{
- aStream<<uniqID<<presetId<<index<<type<<iChannelUrlCount;
+ aStream<<uniqID<<presetId<<type<<iChannelUrlCount;
aStream<<languageCode<<languageName
<<countryCode<<countryName
--- a/qtinternetradio/irqcommon/src/irqutility.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqcommon/src/irqutility.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -51,9 +51,7 @@
//
EXPORT_C void IRQUtility::convertCIRIsdsPreset2IRQPrest(const CIRIsdsPreset& aCIRIsdsPreset, IRQPreset& aQIRPreset)
{
- aQIRPreset.uniqID = aCIRIsdsPreset.UniqId();
aQIRPreset.type = aCIRIsdsPreset.GetChannelType();
- aQIRPreset.index = aCIRIsdsPreset.GetIndex();
aQIRPreset.presetId = aCIRIsdsPreset.GetId();
aQIRPreset.iChannelUrlCount = aCIRIsdsPreset.GetUrlCount();
@@ -101,8 +99,6 @@
//
EXPORT_C void IRQUtility::convertIRQPreset2CIRIsdsPreset(const IRQPreset& aQIRPreset, CIRIsdsPreset& aCIRIsdsPreset)
{
- aCIRIsdsPreset.SetId(aQIRPreset.uniqID);
- aCIRIsdsPreset.SetIndex(aQIRPreset.index);
aCIRIsdsPreset.SetId(aQIRPreset.presetId);
aCIRIsdsPreset.SetUrlCount(aQIRPreset.iChannelUrlCount);
aCIRIsdsPreset.SetChannelType(aQIRPreset.type);
@@ -157,14 +153,46 @@
//
EXPORT_C void IRQUtility::convertCIRPreset2IRQPreset(const CIRPreset& aCIRPreset, IRQPreset& aIRQPreset)
{
- CIRIsdsPreset * cirIsdsPreset = NULL;
- TRAPD(err, cirIsdsPreset = CIRIsdsPreset::NewL());
- if( KErrNone != err)
- return;
-
- aCIRPreset.CopyPresetData(*cirIsdsPreset);
- convertCIRIsdsPreset2IRQPrest(*cirIsdsPreset, aIRQPreset);
- delete cirIsdsPreset;
+ aIRQPreset.uniqID = aCIRPreset.Id();
+ aIRQPreset.type = aCIRPreset.GetChannelType();
+
+ aIRQPreset.presetId = aCIRPreset.GetId();
+ aIRQPreset.iChannelUrlCount = aCIRPreset.GetUrlCount();
+ aIRQPreset.name = QString::fromUtf16((aCIRPreset.Name()).Ptr(), (aCIRPreset.Name()).Length());
+
+ aIRQPreset.languageCode = QString::fromUtf16(aCIRPreset.GetLangId().Ptr(), aCIRPreset.GetLangId().Length());
+ aIRQPreset.languageName = QString::fromUtf16(aCIRPreset.GetLangName().Ptr(), aCIRPreset.GetLangName().Length());
+
+ aIRQPreset.countryCode = QString::fromUtf16(aCIRPreset.GetCountryId().Ptr(),aCIRPreset.GetCountryId().Length());
+ aIRQPreset.countryName = QString::fromUtf16(aCIRPreset.GetCountryName().Ptr(),aCIRPreset.GetCountryName().Length());
+
+ aIRQPreset.lastModified = QString::fromUtf16(aCIRPreset.GetLastModifiedTime().Ptr(), aCIRPreset.GetLastModifiedTime().Length());
+ aIRQPreset.description = QString::fromUtf16(aCIRPreset.GetDescription().Ptr(), aCIRPreset.GetDescription().Length());
+ aIRQPreset.shortDesc = QString::fromUtf16(aCIRPreset.GetShortDescription().Ptr(), aCIRPreset.GetShortDescription().Length());
+
+ aIRQPreset.genreId = QString::fromUtf16(aCIRPreset.GetGenreId().Ptr(), aCIRPreset.GetGenreId().Length());
+ aIRQPreset.genreName = QString::fromUtf16(aCIRPreset.GetGenreName().Ptr(), aCIRPreset.GetGenreName().Length());
+
+ aIRQPreset.advertisementUrl = QString::fromUtf16(aCIRPreset.GetAdvertisementUrl().Ptr(), aCIRPreset.GetAdvertisementUrl().Length());
+ aIRQPreset.advertisementInUse = QString::fromUtf16(aCIRPreset.GetAdvertisementInUse().Ptr(),aCIRPreset.GetAdvertisementInUse().Length());
+
+ aIRQPreset.imgUrl = QString::fromUtf16(aCIRPreset.GetImgUrl().Ptr(), aCIRPreset.GetImgUrl().Length());
+
+ aIRQPreset.musicStoreStatus = QString::fromUtf16(aCIRPreset.GetMusicStoreStatus().Ptr(), aCIRPreset.GetMusicStoreStatus().Length());
+ aIRQPreset.clearChannelServerList();
+
+ IRQChannelServerURL url;
+
+ for(int i=0; i<aCIRPreset.GetUrlCount(); i++)
+ {
+ CIRChannelServerUrl& tempServerUrl = aCIRPreset.GetUrl(i);
+ url.bitrate = tempServerUrl.GetBitRate();
+ url.serverName = QString::fromUtf16(tempServerUrl.GetServerName().Ptr(), tempServerUrl.GetServerName().Length());
+ url.url = QString::fromUtf16(tempServerUrl.GetServerUrl().Ptr(), tempServerUrl.GetServerUrl().Length());
+ aIRQPreset.insertChannelServer(url);
+ }
+
+ aIRQPreset.sortURLArray();
}
//switch from the symbian error code to the IRQ error code
@@ -245,28 +273,28 @@
bool ret = false;
TUid songRecognitionAppUid = getSongRecognitionAppUid();
- TApaAppInfo appInfo;
+ TApaAppInfo *appInfo = new TApaAppInfo;
lsSession.GetAllApps();
- while( KErrNone == lsSession.GetNextApp(appInfo) )
+ while( KErrNone == lsSession.GetNextApp(*appInfo) )
{
TBool appIsHidden = EFalse;
TApaAppCapabilityBuf capability;
- if( KErrNone == lsSession.GetAppCapability(capability,appInfo.iUid) )
+ if( KErrNone == lsSession.GetAppCapability(capability,appInfo->iUid) )
{
appIsHidden = capability().iAppIsHidden;
}
if(!appIsHidden)
{
- if(songRecognitionAppUid == appInfo.iUid)
+ if(songRecognitionAppUid == appInfo->iUid)
{
ret = true;
break;
}
}
}
-
+ delete appInfo;
lsSession.Close();
return ret;
}
--- a/qtinternetradio/irqfavoritesdb/inc/irqfavoritesdb.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqfavoritesdb/inc/irqfavoritesdb.h Thu Jul 22 16:31:41 2010 +0100
@@ -123,6 +123,8 @@
*/
void increasePlayedTimes(const IRQPreset &aPreset);
+ int renamePreset(const IRQPreset &aPreset, const QString &aNewName);
+
signals:
/*
* the signal will triggered when we receive the message that preset is changed
--- a/qtinternetradio/irqfavoritesdb/inc/irqfavoritesdb_p.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqfavoritesdb/inc/irqfavoritesdb_p.h Thu Jul 22 16:31:41 2010 +0100
@@ -19,7 +19,8 @@
#define IRQFAVORITESDB_P_H
#include <QObject>
-#include <pspresetobserver.h>
+
+#include "pspresetobserver.h"
class CIRFavoritesDb;
class IRQPreset;
@@ -66,6 +67,8 @@
void increasePlayedTimes(const IRQPreset &aPreset);
+ int renamePreset(const IRQPreset &aPreset, const QString &aNewName);
+
private:
/* from MPSPresetObserver */
void HandlePresetChangedL(TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aType);
@@ -78,6 +81,8 @@
void increasePlayedTimesL(const IRQPreset &aPreset);
+ int renamePresetL(const IRQPreset &aPreset, const QString &aNewName);
+
private:
IRQFavoritesDB * const q_ptr;
CIRFavoritesDb *mIRFavoritesDb;
--- a/qtinternetradio/irqfavoritesdb/irqfavoritesdb.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqfavoritesdb/irqfavoritesdb.pro Thu Jul 22 16:31:41 2010 +0100
@@ -19,6 +19,7 @@
QT -= gui
CONFIG += dll
DEFINES += BUILD_IRQFAVORITES_DLL
+defFilePath = ..
MOC_DIR = moc
DEPENDPATH = src
@@ -26,9 +27,10 @@
INCLUDEPATH += ../../internetradio2.0/favoritesdbinc \
../../internetradio2.0/datastructuresinc \
../../internetradio2.0/presetplugininc \
- ../irqcommon/inc
-
-
+ ../irqcommon/inc \
+ ../../presetserver/include \
+ ../../presetserver/clientinc \
+ ../../presetserver/serverinc
LIBS += -lirdatastructures \
--- a/qtinternetradio/irqfavoritesdb/src/irqfavoritesdb.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqfavoritesdb/src/irqfavoritesdb.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -159,29 +159,7 @@
d_ptr->increasePlayedTimes(aPreset);
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+int IRQFavoritesDB::renamePreset(const IRQPreset &aPreset, const QString &aNewName)
+{
+ return d_ptr->renamePreset(aPreset, aNewName);
+}
--- a/qtinternetradio/irqfavoritesdb/src/irqfavoritesdb_p.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqfavoritesdb/src/irqfavoritesdb_p.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -197,6 +197,23 @@
TRAP_IGNORE(increasePlayedTimesL(aPreset));
}
+int IRQFavoritesDBPrivate::renamePreset(const IRQPreset &aPreset, const QString &aNewName)
+{
+ int returnCode = 0;
+ TRAPD(err, returnCode = renamePresetL(aPreset, aNewName));
+
+ int result = 0;
+ if (KErrNone != err)
+ {
+ IRQUtility::convertSError2QError(err, result);
+ }
+ else
+ {
+ IRQUtility::convertSError2QError(returnCode, result);
+ }
+ return result;
+}
+
/* from MPSPresetObserver */
void IRQFavoritesDBPrivate::HandlePresetChangedL(TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aType)
{
@@ -254,3 +271,14 @@
mIRFavoritesDb->IncreasePlayedTimesL(*cirPreset);
CleanupStack::PopAndDestroy(cirPreset);
}
+
+int IRQFavoritesDBPrivate::renamePresetL(const IRQPreset &aPreset, const QString &aNewName)
+{
+ CIRIsdsPreset * cirPreset = CIRIsdsPreset::NewLC();
+ IRQUtility::convertIRQPreset2CIRIsdsPreset(aPreset, *cirPreset);
+ TPtrC newName(reinterpret_cast<const TUint16*>(aNewName.utf16()), aNewName.length());
+ int ret = mIRFavoritesDb->RenamePresetL(*cirPreset, newName);
+ CleanupStack::PopAndDestroy(cirPreset);
+
+ return ret;
+}
--- a/qtinternetradio/irqisdsclient/inc/irqisdsclient.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqisdsclient/inc/irqisdsclient.h Thu Jul 22 16:31:41 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,8 +11,8 @@
*
* Contributors:
*
-* Description: a new wrapper class in QT
- *
+* Description:
+*
*/
#ifndef IRQISDSCLIENT_H
@@ -111,7 +111,11 @@
/**
*IRQIsdsClient::IsdsListenRequestL()
*issue a listen request to the isds client.
- *@param int,bool, the current index of channel, the history tag
+ *@param int,bool,
+ *if we set the aHistoryBool to false, the aCurrentIndex means the current song's index
+ *in the current list.
+ *if we set the aHistoryBool to true, the aCurrentIndex means the channel ID you expect
+ *to listen, for sometimes, the channel ID is saved in the DB so we could get it directly
**/
IMPORT_C void isdsListenRequest(int aCurrentIndex, bool aHistoryBool =
false);
--- a/qtinternetradio/irqisdsclient/irqisdsclient.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqisdsclient/irqisdsclient.pro Thu Jul 22 16:31:41 2010 +0100
@@ -17,6 +17,7 @@
TARGET = irqisdsclient
TARGET.CAPABILITY += CAP_GENERAL_DLL
+defFilePath = ..
MOC_DIR = moc
DEPENDPATH = src
@@ -27,21 +28,25 @@
INCLUDEPATH += $${OS_LAYER_PUBLIC_EXPORT_PATH(mmf/common)}
INCLUDEPATH += $${OS_LAYER_PUBLIC_EXPORT_PATH(xml)}
-INCLUDEPATH += ..\..\internetradio2.0\settingsinc \
- ..\..\internetradio2.0\datastructuresinc \
- ..\..\internetradio2.0\favoritesdbinc \
- ..\..\internetradio2.0\networkcontrollerinc \
- ..\..\internetradio2.0\isdsclientinc \
- ..\..\internetradio2.0\resources \
- ..\..\internetradio2.0\include \
- ..\..\internetradio2.0\dataproviderinc \
- ..\..\internetradio2.0\cachemgmtinc \
- ..\..\internetradio2.0\xmlparserinc \
- ..\..\internetradio2.0\sessionloginc \
- ..\..\internetradio2.0\settingsinc \
- ..\irqcommon\inc \
- ..\irqfavoritesdb\inc
-
+INCLUDEPATH += ../../internetradio2.0/settingsinc \
+ ../../internetradio2.0/datastructuresinc \
+ ../../internetradio2.0/favoritesdbinc \
+ ../../internetradio2.0/networkcontrollerinc \
+ ../../internetradio2.0/isdsclientinc \
+ ../../internetradio2.0/resources \
+ ../../internetradio2.0/include \
+ ../../internetradio2.0/dataproviderinc \
+ ../../internetradio2.0/cachemgmtinc \
+ ../../internetradio2.0/xmlparserinc \
+ ../../internetradio2.0/sessionloginc \
+ ../../internetradio2.0/settingsinc \
+ ../irqcommon/inc \
+ ../irqfavoritesdb/inc \
+ ../irqlogger/inc \
+ ../../presetserver/include \
+ ../../presetserver/clientinc \
+ ../../presetserver/serverinc
+
LIBS += -lirdatastructures \
-lirfavoritesdb \
-lirqfavorites \
@@ -50,8 +55,9 @@
-lisdsclientinterface \
-lirdataprovider \
-lflogger \
- -lirqutility
-
+ -lirqlogger \
+ -lirqutility
+
symbian{
TARGET.UID3 = 0xec6ecb67
@@ -66,7 +72,7 @@
#source files list
SOURCES += irqisdsclient.cpp \
- irqisdscientimpl.cpp
+ irqisdsclientimpl.cpp
SYMBIAN_PLATFORMS = WINSCW ARMV5
--- a/qtinternetradio/irqisdsclient/src/irqisdscientimpl.cpp Mon Jun 21 22:33:45 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,582 +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:
-*
-*/
-#ifdef USER_DEFINED_ISDSURL
-#include <QFile>
-#include <QTextStream>
-#include <QStringList>
-#endif // USER_DEFINED_ISDSURL
-#include "irqisdsclientimpl.h"
-#include "irqenums.h"
-#include "irqfavoritesdb.h"
-#include "irlogodownloadengine.h"
-#include "irdataprovider.h"
-#include "irhttpdataprovider.h"
-#include "irqutility.h"
-#include "irbrowsecatagoryitems.h"
-#include "irbrowsechannelitems.h"
-#include "isdsclientdll.h"
-#include "irqisdsdatastructure.h"
-
-#ifdef USER_DEFINED_ISDSURL
-static const char* KDefaultIsdsUrl = "http://88.114.146.238/isds";
-void getIsdsUrlFromConfiguration(QString & aUrl);
-#endif // USER_DEFINED_ISDSURL
-
-IRQIsdsClientImpl::IRQIsdsClientImpl() : iISDSClient(NULL), iFavPresets(NULL),
- iLogoDownloadEngine(NULL)
-{
-#ifdef USER_DEFINED_ISDSURL
- QString userDefinedIsdsUrl(KDefaultIsdsUrl);
- getIsdsUrlFromConfiguration(userDefinedIsdsUrl);
- TPtrC irqissbaseurl(reinterpret_cast<const TUint16*>(userDefinedIsdsUrl.utf16()));
-#else
- _LIT( irqissbaseurl, "http://idirectory.xgns.net/isds" );
-#endif
- TRAPD(error, iISDSClient = CIRIsdsClient::NewL(*this, irqissbaseurl));
- if(KErrNone != error)
- {
- return;
- }
-
- iLogoDownloadEngine
- = iISDSClient->GetDataProvider()->GetHttpDataProvider()->GetLogoDownloadEngine();
-}
-
-IRQIsdsClientImpl::~IRQIsdsClientImpl()
-{
- delete iISDSClient;
-}
-
-//used to indicate errors in retrieving data from isds server
-//@param int, the error code sent by the http receiver
-//
-void IRQIsdsClientImpl::IsdsErrorL(int aErrCode)
-{
- if (KNotFound == aErrCode)
- {
- emit operationExceptionImpl(EIRQErrorNotFound);
- }
- else if (KErrCouldNotConnect == aErrCode)
- {
- emit operationExceptionImpl(EIRQErrorCouldNotConnect);
- }
- else if (KDndTimedOut == aErrCode)
- {
- emit operationExceptionImpl(EIRQErrorTimeOut);
- }
- else if (KServiceUnavailable == aErrCode)
- {
- emit operationExceptionImpl(EIRQErrorServiceUnavailable);
- }
- else if (KErrCorrupt == aErrCode)
- {
- emit operationExceptionImpl(EIRQErrorCorrupt);
- }
- else if (KDataProviderTimeout == aErrCode)
- {
- emit operationExceptionImpl(EIRQErrorTimeOut);
- }
- else
- emit operationExceptionImpl(EIRQErrorGeneral);
-}
-
-void IRQIsdsClientImpl::isdsSearchRequestImpl(const QString& aIsdsSearchString)
-{
-
- TPtrC16 searchDes(
- reinterpret_cast<const TUint16*> (aIsdsSearchString.utf16()));
-
- TRAPD( err, iISDSClient->IRISDSSearchL(searchDes));
- if (KErrNone != err)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
-}
-
-
-
-//Send the category request by the category type
-//
-void IRQIsdsClientImpl::isdsCategoryRequestImpl(
- IRQIsdsClient::IRQIsdsClientInterfaceIDs aIDType, bool& aCache)
-{
- iCatBannerTag = false;
- TRAPD( err, aCache = !(iISDSClient->IRIsdsClientIntefaceL((CIRIsdsClient::TIRIsdsclientInterfaceIDs)aIDType)));
- if (err != KErrNone)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
-}
-
-bool IRQIsdsClientImpl::isdsIsCategoryCachedImpl(IRQIsdsClient::IRQIsdsClientInterfaceIDs aIDType)
-{
- bool cache = false;
- TRAP_IGNORE(cache = iISDSClient->IRIsdsIsCategoryCachedL((CIRIsdsClient::TIRIsdsclientInterfaceIDs)aIDType));
- return cache;
-}
-
-bool IRQIsdsClientImpl::isdsIsChannelCachedImpl(int aIndex)
-{
- bool cache = false;
- TRAP_IGNORE(cache = iISDSClient->IRIsdsIsChannelCachedL(aIndex));
- return cache;
-}
-
-//Send the channels request by the channel index in the specify category
-//
-void IRQIsdsClientImpl::isdsChannelRequestImpl(int aIndex, bool& aCache)
-{
- iChannelBannerTag = false;
- TRAPD( err, aCache = !(iISDSClient->IRIsdsClientIntefaceL(aIndex, CIRIsdsClient::ECatagory)));
- if (err != KErrNone)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
-}
-
-//issue a listen request to the isds client
-//@param int,bool, the current index of channel, the history tag
-//
-void IRQIsdsClientImpl::isdsListenRequestImpl(int aCurrentIndex,
- bool aHistoryBool)
-{
- if (aHistoryBool)
- {
- TRAPD( err, iISDSClient->IRIsdsClientIntefaceL(aCurrentIndex, CIRIsdsClient::EChannels, ETrue));
- if (err != KErrNone)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
- }
- else
- {
-
- TRAPD( err, iISDSClient->IRIsdsClientIntefaceL(aCurrentIndex, CIRIsdsClient::EChannels));
- if (err != KErrNone)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
- }
-}
-
-//to syncronize presets
-//@param int,QString, the preset id and the last modified tag for the preset
-//
-int IRQIsdsClientImpl::isdsSyncPresetImpl(int aPresetId,
- const QString& aIfModifySince, IRQFavoritesDB *aFavPresets)
-{
- iFavPresets = aFavPresets;
- TPtrC16 modifySinceDes(
- reinterpret_cast<const TUint16*> (aIfModifySince.utf16()));
- TInt result = 0;
- TRAP_IGNORE(result = iISDSClient->SyncPresetL(aPresetId,modifySinceDes));
- return result;
-}
-
-//Cacel the request sent by the UI.
-//@param None
-//
-void IRQIsdsClientImpl::isdsCancelRequestImpl()
-{
- TRAPD( err, iISDSClient->IRISDSCancelRequest());
- if (err != KErrNone)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
-}
-
-//to see wether category view has a banner.
-//@param None
-//
-bool IRQIsdsClientImpl::isdsIsCategoryBannerImpl()
-{
- return iCatBannerTag;
-}
-
-//
-//to see wether channel view has a banner.
-//@param None
-bool IRQIsdsClientImpl::isdsIsChannelBannerImpl()
-{
- return iChannelBannerTag;
-}
-
-
-//the api is called from the UI(nowplaying view) to download logo.
-//@param None
-//
-void IRQIsdsClientImpl::isdsLogoDownSendRequestImpl(IRQPreset* aPreset,
- int aNPVReq, int aXValue, int aYValue)
-{
- if (NULL == aPreset)
- return;
-
- CIRIsdsPreset *cirPreset = NULL;
- TRAP_IGNORE(cirPreset = CIRIsdsPreset::NewL());
- IRQUtility::convertIRQPreset2CIRIsdsPreset(*aPreset, *cirPreset);
-
- aXValue = aXValue % 1000;
- aYValue = aYValue % 1000;
-
- TRAPD( err, iLogoDownloadEngine->SendRequestL(cirPreset,this, aNPVReq, aXValue, aYValue));//0 0
- delete cirPreset;
- if (err != KErrNone)
- {
- emit operationExceptionImpl(EIRQErrorGeneral);
- }
-}
-
-bool IRQIsdsClientImpl::isdsIsLogoCachedImpl(IRQPreset* aPreset, int aXValue, int aYValue)
-{
- if( NULL == aPreset )
- return false;
-
- bool cached = false;
- CIRIsdsPreset *cirPreset = NULL;
- TRAP_IGNORE(cirPreset = CIRIsdsPreset::NewL());
- IRQUtility::convertIRQPreset2CIRIsdsPreset(*aPreset, *cirPreset);
- aXValue = aXValue % 1000;
- aYValue = aYValue % 1000;
-
- TRAP_IGNORE(cached = iLogoDownloadEngine->isLogoCachedL(cirPreset,aXValue, aYValue));
- delete cirPreset;
- cirPreset = NULL;
-
- return cached;
-}
-
-//
-//the api is called to cancel the current transaction
-//@param None
-//
-void IRQIsdsClientImpl::isdsLogoDownCancelTransactionImpl()
-{
- iLogoDownloadEngine->CancelTransaction();
-}
-
-//
-//To know the status of downloading logo
-bool IRQIsdsClientImpl::isdsLogoDownIsRunningImpl() const
-{
- return iLogoDownloadEngine->IsRunning();
-}
-
-//takes the url as a parameter and returns the logo data which is in cache
-//this API is called form the search results for to display logo on the view
-//@param QString: the url of the img, int: the status for getting
-//
-void IRQIsdsClientImpl::isdsLogoDownCheckCacheLogoImpl(
- const QString& aURL, int& aStatus)
-{
- TInt status = 0;
- TPtrC16 url(reinterpret_cast<const TUint16*> (aURL.utf16()));
- TRAP_IGNORE(iLogoDownloadEngine->GetCacheLogoL(url, status));
- aStatus = status;
-
-}
-
-//get the cache logo from the logodown engine. The "send" is the point from a logodown engine
-//@param None
-//
-TDesC8& IRQIsdsClientImpl::isdsLogoDownSendCacheLogoImpl()
-{
- return iLogoDownloadEngine->SendCacheLogo();
-}
-
-void IRQIsdsClientImpl::isdsPostLogImpl(const QString &aFileName)
-{
- TPtrC16 fileName(
- reinterpret_cast<const TUint16*> (aFileName.utf16()));
- TBuf<256> fileBuf = fileName;
- TRAP_IGNORE(iISDSClient->IRISDSPostL(fileBuf));
-}
-
-void IRQIsdsClientImpl::isdsGetIRIDImpl()
-{
- TRAP_IGNORE(iISDSClient->IRGetIRIDL());
-}
-
-void IRQIsdsClientImpl::isdsGetBrowseBannerImpl(QString& aBannerUrl, QString& aClickThroughUrl)
-{
- aBannerUrl = iCatBannerUrl;
- aClickThroughUrl = iCatClickThroughUrl;
-}
-
-void IRQIsdsClientImpl::isdsMultSearchImpl(QString aGenreID, QString aCountryID, QString aLanguageID, QString aSearchText)
-{
- TPtrC16 genreID(reinterpret_cast<const TUint16*> (aGenreID.utf16()));
- TPtrC16 countryID(reinterpret_cast<const TUint16*> (aCountryID.utf16()));
- TPtrC16 languageID(reinterpret_cast<const TUint16*> (aLanguageID.utf16()));
- TPtrC16 searchText(reinterpret_cast<const TUint16*> (aSearchText.utf16()));
- TRAP_IGNORE(iISDSClient->IRISDSMultiSearchL(genreID, countryID, languageID, searchText));
-}
-//when we get the category data from low layer, the function is called and
-//we will generate the data pushed to UI, the IRQIsdsClientImpl will not free the
-//memory.
-//
-void IRQIsdsClientImpl::IsdsCatogoryDataReceivedL(CArrayPtrFlat<
- CIRBrowseCatagoryItems> & aParsedStructure)
-{
- iCatBannerTag = false;
- iCatBannerUrl.clear();
- iCatClickThroughUrl.clear();
-
- /* the data is pushed to the UI and irqisds is not care when it's deleted */
- QList<IRQBrowseCategoryItem *> * pushBrowseCategoryItemList = new QList<
- IRQBrowseCategoryItem *> ;
- for (TInt i = 0; i < aParsedStructure.Count(); i++)
- {
- if (NULL != aParsedStructure[i]->iCatBannerUrl)
- {
- iCatBannerTag = true;
- if (0 != aParsedStructure[i]->iCatBannerUrl->Length())
- {
- iCatBannerUrl = QString::fromUtf16(
- aParsedStructure[i]->iCatBannerUrl->Des().Ptr(),
- aParsedStructure[i]->iCatBannerUrl->Des().Length());
- }
-
- if (NULL != aParsedStructure[i]->iCatClickThroughUrl)
- {
- if (0 != aParsedStructure[i]->iCatClickThroughUrl->Length())
- {
- iCatClickThroughUrl
- = QString::fromUtf16(
- aParsedStructure[i]->iCatClickThroughUrl->Des().Ptr(),
- aParsedStructure[i]->iCatClickThroughUrl->Des().Length());
- }
- }
- }// end if ( NULL != )
-
- if (NULL != aParsedStructure[i]->iCatName)
- {
- IRQBrowseCategoryItem * oneItem = new IRQBrowseCategoryItem();
- oneItem->catName = QString::fromUtf16(
- aParsedStructure[i]->iCatName->Des().Ptr(),
- aParsedStructure[i]->iCatName->Des().Length());
- oneItem->size = aParsedStructure[i]->iSize;
- pushBrowseCategoryItemList->append(oneItem);
- }
- }// end for
-
- /* now we get the data and we need to signal the ui to stop the
- dialog and emit and call the setdata of model*/
- emit
- categoryItemsChangedImpl(pushBrowseCategoryItemList);
-
-}
-
-//when we get the channels data from low layer, the function is called and
-//we will generate the data pushed to UI
-//
-void IRQIsdsClientImpl::IsdsChannelDataReceivedL(CArrayPtrFlat<
- CIRBrowseChannelItems> & aParsedStructure)
-{
- iChannelBannerTag = false;
- iChannelBannerUrl.clear();
- iChannelClickThroughUrl.clear();
-
- QList<IRQChannelItem *> *pushBrowseChannelItemList = new QList<
- IRQChannelItem *> ;
-
- for (int i = 0; i < aParsedStructure.Count(); i++)
- {
- if (NULL != aParsedStructure[i]->iBannerUrl)
- {
- iChannelBannerTag = true;
-
- if (0 != aParsedStructure[i]->iBannerUrl->Length())
- {
- iChannelBannerUrl = QString::fromUtf16(
- aParsedStructure[i]->iBannerUrl->Des().Ptr(),
- aParsedStructure[i]->iBannerUrl->Des().Length());
- }
-
- if (NULL != aParsedStructure[i]->iClickThroughUrl)
- {
- if (0 != aParsedStructure[i]->iClickThroughUrl->Length())
- {
- iChannelClickThroughUrl
- = QString::fromUtf16(
- aParsedStructure[i]->iClickThroughUrl->Des().Ptr(),
- aParsedStructure[i]->iClickThroughUrl->Des().Length());
- }
- }
- } //end if aParsedStructure[i]->
-
- if (NULL != aParsedStructure[i]->iChannelName)
- {
- IRQChannelItem * oneChannelItem = new IRQChannelItem();
- oneChannelItem->channelName = QString::fromUtf16(
- aParsedStructure[i]->iChannelName->Des().Ptr(),
- aParsedStructure[i]->iChannelName->Des().Length());
- oneChannelItem->shortDescription = QString::fromUtf16(
- aParsedStructure[i]->iShortDescription->Des().Ptr(),
- aParsedStructure[i]->iShortDescription->Des().Length());
-
- if (0 != aParsedStructure[i]->iImgUrl.Length())
- {
-
- oneChannelItem->imageURL = QString::fromUtf16(
- aParsedStructure[i]->iImgUrl.Ptr(),
- aParsedStructure[i]->iImgUrl.Length());;
- }
- else
- oneChannelItem->imageURL = "";
-
- pushBrowseChannelItemList->append(oneChannelItem);
- }
- }
-
- /* after we get data, we push it to the UI to show*/
- emit
- channelItemsChangedImpl(pushBrowseChannelItemList);
-
-}
-
-//when we get the presets data from low layer, the function is called and
-//we will generate the data pushed to UI.
-//
-void IRQIsdsClientImpl::IsdsPresetDataReceivedL(
- CArrayPtrFlat<CIRIsdsPreset> & aParsedStructure)
-{
- CIRIsdsPreset* preset = aParsedStructure[0];
- IRQPreset* qPreset = new IRQPreset();
- /* we need convert the CIR to QT */
- IRQUtility::convertCIRIsdsPreset2IRQPrest(*preset, *qPreset);
- qPreset->type = IRQPreset::EIsds;
- emit
- presetResponseImpl(qPreset);
-
-}
-
-//when we find that the preset to be syc is deleted from isds server, the function
-//will be called to notify the UI. DISCUSSED FURTHER
-//
-void IRQIsdsClientImpl::IsdsPresetRemovedL(TInt aId)
-{
- if(iFavPresets)
- {
- iFavPresets->makePresetUserDefined(aId, 0);
- }
- emit
- syncPresetResultImpl(EIRQIsdsSycPresetRemoved, NULL);
-}
-
-//when we find that the preset to be syc is changed from isds server, the function
-//will be called to notify the UI.
-//
-void IRQIsdsClientImpl::IsdsPresetChangedL(CIRIsdsPreset& aPreset)
-{
- IRQPreset* qPreset = new IRQPreset();
- IRQUtility::convertCIRIsdsPreset2IRQPrest(aPreset, *qPreset);
- qPreset->type = IRQPreset::EIsds;
- if(iFavPresets)
- {
- iFavPresets->replacePreset(*qPreset);
- }
- emit syncPresetResultImpl(EIRQIsdsSycPresetChanged, qPreset);
-}
-
-//when we find that the preset to be syc is changed from isds server, the function
-//will be called to notify the UI.
-//
-void IRQIsdsClientImpl::IsdsPresetNoChangeL()
-{
- emit syncPresetResultImpl(EIRQIsdsSycPresetNoChange, NULL);
-
-}
-
-//called back when a preset's logo has downloaded
-//@param CIRIsdsPreset*, preset with downloaded logo
-//
-void IRQIsdsClientImpl::PresetLogoDownloadedL(CIRIsdsPreset* aPreset)
-{
- if (NULL == aPreset)
- return;
-
- IRQPreset * irqPreset = new IRQPreset();
- IRQUtility::convertCIRIsdsPreset2IRQPrest(*aPreset, *irqPreset);
-
- emit presetLogoDownloadedImpl(irqPreset);
-}
-
-//called back when a preset's logo has not downloaded
-//@param CIRIsdsPreset*, preset with no logo data
-//
-void IRQIsdsClientImpl::PresetLogoDownloadError(CIRIsdsPreset* aPreset)
-{
- if (NULL == aPreset)
- return;
-
- emit presetLogoDownloadErrorImpl();
-}
-
-//receive the irid from isds server, not implementated
-//
-void IRQIsdsClientImpl::IsdsIRIDRecieved(const TDesC& aIRID)
-{
- //nothing now
- QString irid = QString::fromUtf16(aIRID.Ptr(),aIRID.Length());
- emit iridReceivedImpl(irid);
-}
-
-
-
-
-//
-//receive the ota info from isds server, not implementated
-//
-void IRQIsdsClientImpl::IsdsOtaInfoRecieved(CIROTAUpdate &aOtaData)
-{
- //nothing now
- Q_UNUSED(aOtaData);
-}
-
-bool IRQIsdsClientImpl::isdsIsConstructSucceed() const
-{
- return iISDSClient != NULL;
-}
-
-
-#ifdef USER_DEFINED_ISDSURL
-void getIsdsUrlFromConfiguration(QString & aUrl)
-{
- QFile file("C:\\data\\QTIRConfigure.txt");
- if (file.open(QIODevice::ReadOnly))
- {
- QTextStream stream( &file );
- QString line;
- QStringList parameter;
- while (!stream.atEnd())
- {
- line = stream.readLine();
- parameter = line.split("=");
- if (parameter.count() == 2)
- {
- if (parameter.first() == "userDefinedIsdsUrl")
- {
- aUrl = parameter.last();
- break;
- }
- }
- }
- file.close();
- }
-}
-#endif // USER_DEFINED_ISDSURL
-
--- a/qtinternetradio/irqisdsclient/src/irqisdsclient.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqisdsclient/src/irqisdsclient.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,8 +11,8 @@
*
* Contributors:
*
-* Description: a new wrapper class in QT
- *
+* Description:
+*
*/
#include "irqisdsclientimpl.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqisdsclient/src/irqisdsclientimpl.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,586 @@
+/*
+* 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:
+*
+*/
+#ifdef USER_DEFINED_ISDSURL
+#include <QFile>
+#include <QTextStream>
+#include <QStringList>
+#endif // USER_DEFINED_ISDSURL
+#include "irqisdsclientimpl.h"
+#include "irqenums.h"
+#include "irqfavoritesdb.h"
+#include "irlogodownloadengine.h"
+#include "irdataprovider.h"
+#include "irhttpdataprovider.h"
+#include "irqutility.h"
+#include "irbrowsecatagoryitems.h"
+#include "irbrowsechannelitems.h"
+#include "isdsclientdll.h"
+#include "irqisdsdatastructure.h"
+#include "irqlogger.h"
+
+#ifdef USER_DEFINED_ISDSURL
+static const char* KDefaultIsdsUrl = "http://88.114.146.238/isds";
+void getIsdsUrlFromConfiguration(QString & aUrl);
+#endif // USER_DEFINED_ISDSURL
+
+IRQIsdsClientImpl::IRQIsdsClientImpl() : iISDSClient(NULL), iFavPresets(NULL),
+ iLogoDownloadEngine(NULL)
+{
+#ifdef USER_DEFINED_ISDSURL
+ QString userDefinedIsdsUrl(KDefaultIsdsUrl);
+ getIsdsUrlFromConfiguration(userDefinedIsdsUrl);
+ TPtrC irqissbaseurl(reinterpret_cast<const TUint16*>(userDefinedIsdsUrl.utf16()));
+#else
+ _LIT( irqissbaseurl, "http://idirectory.xgns.net/isds" );
+#endif
+ TRAPD(error, iISDSClient = CIRIsdsClient::NewL(*this, irqissbaseurl));
+ if(KErrNone != error)
+ {
+ return;
+ }
+
+ iLogoDownloadEngine
+ = iISDSClient->GetDataProvider()->GetHttpDataProvider()->GetLogoDownloadEngine();
+}
+
+IRQIsdsClientImpl::~IRQIsdsClientImpl()
+{
+ delete iISDSClient;
+}
+
+//used to indicate errors in retrieving data from isds server
+//@param int, the error code sent by the http receiver
+//
+void IRQIsdsClientImpl::IsdsErrorL(int aErrCode)
+{
+ LOG_FORMAT( "This is a QString %d", aErrCode);
+ if (KNotFound == aErrCode)
+ {
+ emit operationExceptionImpl(EIRQErrorNotFound);
+ }
+ else if (KErrCouldNotConnect == aErrCode)
+ {
+ emit operationExceptionImpl(EIRQErrorCouldNotConnect);
+ }
+ else if (KDndTimedOut == aErrCode)
+ {
+ emit operationExceptionImpl(EIRQErrorTimeOut);
+ }
+ else if (KServiceUnavailable == aErrCode)
+ {
+ emit operationExceptionImpl(EIRQErrorServiceUnavailable);
+ }
+ else if (KErrCorrupt == aErrCode)
+ {
+ emit operationExceptionImpl(EIRQErrorCorrupt);
+ }
+ else if (KDataProviderTimeout == aErrCode)
+ {
+ emit operationExceptionImpl(EIRQErrorTimeOut);
+ }
+ else
+ emit operationExceptionImpl(EIRQErrorGeneral);
+}
+
+void IRQIsdsClientImpl::isdsSearchRequestImpl(const QString& aIsdsSearchString)
+{
+
+ TPtrC16 searchDes(
+ reinterpret_cast<const TUint16*> (aIsdsSearchString.utf16()));
+
+ TRAPD( err, iISDSClient->IRISDSSearchL(searchDes));
+ if (KErrNone != err)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+}
+
+
+
+//Send the category request by the category type
+//
+void IRQIsdsClientImpl::isdsCategoryRequestImpl(
+ IRQIsdsClient::IRQIsdsClientInterfaceIDs aIDType, bool& aCache)
+{
+ iCatBannerTag = false;
+ TRAPD( err, aCache = !(iISDSClient->IRIsdsClientIntefaceL((CIRIsdsClient::TIRIsdsclientInterfaceIDs)aIDType)));
+ if (err != KErrNone)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+}
+
+bool IRQIsdsClientImpl::isdsIsCategoryCachedImpl(IRQIsdsClient::IRQIsdsClientInterfaceIDs aIDType)
+{
+ bool cache = false;
+ TRAP_IGNORE(cache = iISDSClient->IRIsdsIsCategoryCachedL((CIRIsdsClient::TIRIsdsclientInterfaceIDs)aIDType));
+ return cache;
+}
+
+bool IRQIsdsClientImpl::isdsIsChannelCachedImpl(int aIndex)
+{
+ bool cache = false;
+ TRAP_IGNORE(cache = iISDSClient->IRIsdsIsChannelCachedL(aIndex));
+ return cache;
+}
+
+//Send the channels request by the channel index in the specify category
+//
+void IRQIsdsClientImpl::isdsChannelRequestImpl(int aIndex, bool& aCache)
+{
+ iChannelBannerTag = false;
+ TRAPD( err, aCache = !(iISDSClient->IRIsdsClientIntefaceL(aIndex, CIRIsdsClient::ECatagory)));
+ if (err != KErrNone)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+}
+
+//issue a listen request to the isds client
+//@param int,bool, the current index of channel, the history tag
+//
+void IRQIsdsClientImpl::isdsListenRequestImpl(int aCurrentIndex,
+ bool aHistoryBool)
+{
+ if (aHistoryBool)
+ {
+ TRAPD( err, iISDSClient->IRIsdsClientIntefaceL(aCurrentIndex, CIRIsdsClient::EChannels, ETrue));
+ if (err != KErrNone)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+ }
+ else
+ {
+
+ TRAPD( err, iISDSClient->IRIsdsClientIntefaceL(aCurrentIndex, CIRIsdsClient::EChannels));
+ if (err != KErrNone)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+ }
+}
+
+//to syncronize presets
+//@param int,QString, the preset id and the last modified tag for the preset
+//
+int IRQIsdsClientImpl::isdsSyncPresetImpl(int aPresetId,
+ const QString& aIfModifySince, IRQFavoritesDB *aFavPresets)
+{
+ iFavPresets = aFavPresets;
+ TPtrC16 modifySinceDes(
+ reinterpret_cast<const TUint16*> (aIfModifySince.utf16()));
+ TInt result = 0;
+ TRAP_IGNORE(result = iISDSClient->SyncPresetL(aPresetId,modifySinceDes));
+ return result;
+}
+
+//Cacel the request sent by the UI.
+//@param None
+//
+void IRQIsdsClientImpl::isdsCancelRequestImpl()
+{
+ TRAPD( err, iISDSClient->IRISDSCancelRequest());
+ if (err != KErrNone)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+}
+
+//to see wether category view has a banner.
+//@param None
+//
+bool IRQIsdsClientImpl::isdsIsCategoryBannerImpl()
+{
+ return iCatBannerTag;
+}
+
+//
+//to see wether channel view has a banner.
+//@param None
+bool IRQIsdsClientImpl::isdsIsChannelBannerImpl()
+{
+ return iChannelBannerTag;
+}
+
+
+//the api is called from the UI(nowplaying view) to download logo.
+//@param None
+//
+void IRQIsdsClientImpl::isdsLogoDownSendRequestImpl(IRQPreset* aPreset,
+ int aNPVReq, int aXValue, int aYValue)
+{
+ if (NULL == aPreset)
+ return;
+
+ CIRIsdsPreset *cirPreset = NULL;
+ TRAP_IGNORE(cirPreset = CIRIsdsPreset::NewL());
+ IRQUtility::convertIRQPreset2CIRIsdsPreset(*aPreset, *cirPreset);
+
+ aXValue = aXValue % 1000;
+ aYValue = aYValue % 1000;
+
+ TRAPD( err, iLogoDownloadEngine->SendRequestL(cirPreset,this, aNPVReq, aXValue, aYValue));//0 0
+ delete cirPreset;
+ if (err != KErrNone)
+ {
+ emit operationExceptionImpl(EIRQErrorGeneral);
+ }
+}
+
+bool IRQIsdsClientImpl::isdsIsLogoCachedImpl(IRQPreset* aPreset, int aXValue, int aYValue)
+{
+ if( NULL == aPreset )
+ return false;
+
+ bool cached = false;
+ CIRIsdsPreset *cirPreset = NULL;
+ TRAP_IGNORE(cirPreset = CIRIsdsPreset::NewL());
+ IRQUtility::convertIRQPreset2CIRIsdsPreset(*aPreset, *cirPreset);
+ aXValue = aXValue % 1000;
+ aYValue = aYValue % 1000;
+
+ TRAP_IGNORE(cached = iLogoDownloadEngine->isLogoCachedL(cirPreset,aXValue, aYValue));
+ delete cirPreset;
+ cirPreset = NULL;
+
+ return cached;
+}
+
+//
+//the api is called to cancel the current transaction
+//@param None
+//
+void IRQIsdsClientImpl::isdsLogoDownCancelTransactionImpl()
+{
+ iLogoDownloadEngine->CancelTransaction();
+}
+
+//
+//To know the status of downloading logo
+bool IRQIsdsClientImpl::isdsLogoDownIsRunningImpl() const
+{
+ return iLogoDownloadEngine->IsRunning();
+}
+
+//takes the url as a parameter and returns the logo data which is in cache
+//this API is called form the search results for to display logo on the view
+//@param QString: the url of the img, int: the status for getting
+//
+void IRQIsdsClientImpl::isdsLogoDownCheckCacheLogoImpl(
+ const QString& aURL, int& aStatus)
+{
+ TInt status = 0;
+ TPtrC16 url(reinterpret_cast<const TUint16*> (aURL.utf16()));
+ TRAP_IGNORE(iLogoDownloadEngine->GetCacheLogoL(url, status));
+ aStatus = status;
+
+}
+
+//get the cache logo from the logodown engine. The "send" is the point from a logodown engine
+//@param None
+//
+TDesC8& IRQIsdsClientImpl::isdsLogoDownSendCacheLogoImpl()
+{
+ return iLogoDownloadEngine->SendCacheLogo();
+}
+
+void IRQIsdsClientImpl::isdsPostLogImpl(const QString &aFileName)
+{
+ TPtrC16 fileName(
+ reinterpret_cast<const TUint16*> (aFileName.utf16()));
+ TBuf<256> fileBuf = fileName;
+ TRAP_IGNORE(iISDSClient->IRISDSPostL(fileBuf));
+}
+
+void IRQIsdsClientImpl::isdsGetIRIDImpl()
+{
+ TRAP_IGNORE(iISDSClient->IRGetIRIDL());
+}
+
+void IRQIsdsClientImpl::isdsGetBrowseBannerImpl(QString& aBannerUrl, QString& aClickThroughUrl)
+{
+ aBannerUrl = iCatBannerUrl;
+ aClickThroughUrl = iCatClickThroughUrl;
+}
+
+void IRQIsdsClientImpl::isdsMultSearchImpl(QString aGenreID, QString aCountryID, QString aLanguageID, QString aSearchText)
+{
+ TPtrC16 genreID(reinterpret_cast<const TUint16*> (aGenreID.utf16()));
+ TPtrC16 countryID(reinterpret_cast<const TUint16*> (aCountryID.utf16()));
+ TPtrC16 languageID(reinterpret_cast<const TUint16*> (aLanguageID.utf16()));
+ TPtrC16 searchText(reinterpret_cast<const TUint16*> (aSearchText.utf16()));
+ TRAP_IGNORE(iISDSClient->IRISDSMultiSearchL(genreID, countryID, languageID, searchText));
+}
+//when we get the category data from low layer, the function is called and
+//we will generate the data pushed to UI, the IRQIsdsClientImpl will not free the
+//memory.
+//
+void IRQIsdsClientImpl::IsdsCatogoryDataReceivedL(CArrayPtrFlat<
+ CIRBrowseCatagoryItems> & aParsedStructure)
+{
+ iCatBannerTag = false;
+ iCatBannerUrl.clear();
+ iCatClickThroughUrl.clear();
+
+ /* the data is pushed to the UI and irqisds is not care when it's deleted */
+ QList<IRQBrowseCategoryItem *> * pushBrowseCategoryItemList = new QList<
+ IRQBrowseCategoryItem *> ;
+ for (TInt i = 0; i < aParsedStructure.Count(); i++)
+ {
+ if (NULL != aParsedStructure[i]->iCatBannerUrl)
+ {
+ iCatBannerTag = true;
+ if (0 != aParsedStructure[i]->iCatBannerUrl->Length())
+ {
+ iCatBannerUrl = QString::fromUtf16(
+ aParsedStructure[i]->iCatBannerUrl->Des().Ptr(),
+ aParsedStructure[i]->iCatBannerUrl->Des().Length());
+ }
+
+ if (NULL != aParsedStructure[i]->iCatClickThroughUrl)
+ {
+ if (0 != aParsedStructure[i]->iCatClickThroughUrl->Length())
+ {
+ iCatClickThroughUrl
+ = QString::fromUtf16(
+ aParsedStructure[i]->iCatClickThroughUrl->Des().Ptr(),
+ aParsedStructure[i]->iCatClickThroughUrl->Des().Length());
+ }
+ }
+ }// end if ( NULL != )
+
+ if (NULL != aParsedStructure[i]->iCatName)
+ {
+ IRQBrowseCategoryItem * oneItem = new IRQBrowseCategoryItem();
+ oneItem->catName = QString::fromUtf16(
+ aParsedStructure[i]->iCatName->Des().Ptr(),
+ aParsedStructure[i]->iCatName->Des().Length());
+ oneItem->size = aParsedStructure[i]->iSize;
+ pushBrowseCategoryItemList->append(oneItem);
+ }
+ }// end for
+
+ /* now we get the data and we need to signal the ui to stop the
+ dialog and emit and call the setdata of model*/
+ emit
+ categoryItemsChangedImpl(pushBrowseCategoryItemList);
+
+}
+
+//when we get the channels data from low layer, the function is called and
+//we will generate the data pushed to UI
+//
+void IRQIsdsClientImpl::IsdsChannelDataReceivedL(CArrayPtrFlat<
+ CIRBrowseChannelItems> & aParsedStructure)
+{
+ iChannelBannerTag = false;
+ iChannelBannerUrl.clear();
+ iChannelClickThroughUrl.clear();
+
+ QList<IRQChannelItem *> *pushBrowseChannelItemList = new QList<
+ IRQChannelItem *> ;
+
+ for (int i = 0; i < aParsedStructure.Count(); i++)
+ {
+ if (NULL != aParsedStructure[i]->iBannerUrl)
+ {
+ iChannelBannerTag = true;
+
+ if (0 != aParsedStructure[i]->iBannerUrl->Length())
+ {
+ iChannelBannerUrl = QString::fromUtf16(
+ aParsedStructure[i]->iBannerUrl->Des().Ptr(),
+ aParsedStructure[i]->iBannerUrl->Des().Length());
+ }
+
+ if (NULL != aParsedStructure[i]->iClickThroughUrl)
+ {
+ if (0 != aParsedStructure[i]->iClickThroughUrl->Length())
+ {
+ iChannelClickThroughUrl
+ = QString::fromUtf16(
+ aParsedStructure[i]->iClickThroughUrl->Des().Ptr(),
+ aParsedStructure[i]->iClickThroughUrl->Des().Length());
+ }
+ }
+ } //end if aParsedStructure[i]->
+
+ if (NULL != aParsedStructure[i]->iChannelName)
+ {
+ IRQChannelItem * oneChannelItem = new IRQChannelItem();
+ oneChannelItem->channelName = QString::fromUtf16(
+ aParsedStructure[i]->iChannelName->Des().Ptr(),
+ aParsedStructure[i]->iChannelName->Des().Length());
+ oneChannelItem->shortDescription = QString::fromUtf16(
+ aParsedStructure[i]->iShortDescription->Des().Ptr(),
+ aParsedStructure[i]->iShortDescription->Des().Length());
+ //added for search result's cache
+ oneChannelItem->channelID = aParsedStructure[i]->iChannelID;
+
+ if (0 != aParsedStructure[i]->iImgUrl.Length())
+ {
+
+ oneChannelItem->imageURL = QString::fromUtf16(
+ aParsedStructure[i]->iImgUrl.Ptr(),
+ aParsedStructure[i]->iImgUrl.Length());;
+ }
+ else
+ oneChannelItem->imageURL = "";
+
+ pushBrowseChannelItemList->append(oneChannelItem);
+ }
+ }
+
+ /* after we get data, we push it to the UI to show*/
+ emit
+ channelItemsChangedImpl(pushBrowseChannelItemList);
+
+}
+
+//when we get the presets data from low layer, the function is called and
+//we will generate the data pushed to UI.
+//
+void IRQIsdsClientImpl::IsdsPresetDataReceivedL(
+ CArrayPtrFlat<CIRIsdsPreset> & aParsedStructure)
+{
+ CIRIsdsPreset* preset = aParsedStructure[0];
+ IRQPreset* qPreset = new IRQPreset();
+ /* we need convert the CIR to QT */
+ IRQUtility::convertCIRIsdsPreset2IRQPrest(*preset, *qPreset);
+ qPreset->type = IRQPreset::EIsds;
+ emit
+ presetResponseImpl(qPreset);
+
+}
+
+//when we find that the preset to be syc is deleted from isds server, the function
+//will be called to notify the UI. DISCUSSED FURTHER
+//
+void IRQIsdsClientImpl::IsdsPresetRemovedL(TInt aId)
+{
+ if(iFavPresets)
+ {
+ iFavPresets->makePresetUserDefined(aId, 0);
+ }
+ emit
+ syncPresetResultImpl(EIRQIsdsSycPresetRemoved, NULL);
+}
+
+//when we find that the preset to be syc is changed from isds server, the function
+//will be called to notify the UI.
+//
+void IRQIsdsClientImpl::IsdsPresetChangedL(CIRIsdsPreset& aPreset)
+{
+ IRQPreset* qPreset = new IRQPreset();
+ IRQUtility::convertCIRIsdsPreset2IRQPrest(aPreset, *qPreset);
+ qPreset->type = IRQPreset::EIsds;
+ if(iFavPresets)
+ {
+ iFavPresets->replacePreset(*qPreset);
+ }
+ emit syncPresetResultImpl(EIRQIsdsSycPresetChanged, qPreset);
+}
+
+//when we find that the preset to be syc is changed from isds server, the function
+//will be called to notify the UI.
+//
+void IRQIsdsClientImpl::IsdsPresetNoChangeL()
+{
+ emit syncPresetResultImpl(EIRQIsdsSycPresetNoChange, NULL);
+
+}
+
+//called back when a preset's logo has downloaded
+//@param CIRIsdsPreset*, preset with downloaded logo
+//
+void IRQIsdsClientImpl::PresetLogoDownloadedL(CIRIsdsPreset* aPreset)
+{
+ if (NULL == aPreset)
+ return;
+
+ IRQPreset * irqPreset = new IRQPreset();
+ IRQUtility::convertCIRIsdsPreset2IRQPrest(*aPreset, *irqPreset);
+
+ emit presetLogoDownloadedImpl(irqPreset);
+}
+
+//called back when a preset's logo has not downloaded
+//@param CIRIsdsPreset*, preset with no logo data
+//
+void IRQIsdsClientImpl::PresetLogoDownloadError(CIRIsdsPreset* aPreset)
+{
+ if (NULL == aPreset)
+ return;
+
+ emit presetLogoDownloadErrorImpl();
+}
+
+//receive the irid from isds server, not implementated
+//
+void IRQIsdsClientImpl::IsdsIRIDRecieved(const TDesC& aIRID)
+{
+ //nothing now
+ QString irid = QString::fromUtf16(aIRID.Ptr(),aIRID.Length());
+ emit iridReceivedImpl(irid);
+}
+
+
+
+
+//
+//receive the ota info from isds server, not implementated
+//
+void IRQIsdsClientImpl::IsdsOtaInfoRecieved(CIROTAUpdate &aOtaData)
+{
+ //nothing now
+ Q_UNUSED(aOtaData);
+}
+
+bool IRQIsdsClientImpl::isdsIsConstructSucceed() const
+{
+ return iISDSClient != NULL;
+}
+
+
+#ifdef USER_DEFINED_ISDSURL
+void getIsdsUrlFromConfiguration(QString & aUrl)
+{
+ QFile file("C:\\data\\QTIRConfigure.txt");
+ if (file.open(QIODevice::ReadOnly))
+ {
+ QTextStream stream( &file );
+ QString line;
+ QStringList parameter;
+ while (!stream.atEnd())
+ {
+ line = stream.readLine();
+ parameter = line.split("=");
+ if (parameter.count() == 2)
+ {
+ if (parameter.first() == "userDefinedIsdsUrl")
+ {
+ aUrl = parameter.last();
+ break;
+ }
+ }
+ }
+ file.close();
+ }
+}
+#endif // USER_DEFINED_ISDSURL
+
--- a/qtinternetradio/irqlogger/inc/irqlogger.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqlogger/inc/irqlogger.h Thu Jul 22 16:31:41 2010 +0100
@@ -37,7 +37,8 @@
#define INSTALL_MESSAGE_HANDLER
#else // COMBINE_WITH_ENGINE_LOGGER
- #define WRITELOG(msg) qDebug()<<KLogMarker<<msg
+ //enable 3.0 log a new line
+ #define WRITELOG(msg) qDebug()<<KLogMarker<<msg<<"\r\n"
#ifdef TRACE_TO_FILE
#define INSTALL_MESSAGE_HANDLER FileLogger __fileLogger(QString(KTraceOutputFile), FILTER_BY_LOGMARKER)
@@ -145,6 +146,11 @@
};
// ============================================================================
+// Create log dir
+// ============================================================================
+IRQLOGGER_DLL_EXPORT void installLogDir();
+
+// ============================================================================
// SIGNAL/SLOT CONNECTION CHECKER
// ============================================================================
IRQLOGGER_DLL_EXPORT bool connectAndTest( const QObject* aSender, const char* aSignal,
--- a/qtinternetradio/irqlogger/irqlogger.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqlogger/irqlogger.pro Thu Jul 22 16:31:41 2010 +0100
@@ -19,7 +19,7 @@
TARGET = irqlogger
CONFIG += dll
DEFINES += BUILD_IRQLOGGER_DLL
-
+defFilePath = ..
MOC_DIR = moc
--- a/qtinternetradio/irqlogger/src/irqlogger.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqlogger/src/irqlogger.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,10 +16,17 @@
*/
#include <QFile>
+#include <QDir>
#include <QTextStream>
#include <QDateTime>
#include "irqlogger.h"
+#if defined(TRACE_TO_FILE) || defined(IRDEBUG_TRACE_TO_FILE)
+static const char* KTraceOutputDir = "c:/logs/internetradio";
+static const char* KTraceOutputFileName = "c:/logs/internetradio/internetradiolog.txt";
+static const char* KReadableFileName = "c:/data/internetradiolog.txt";
+#endif
+
// ============================================================================
// SymbianLogger Defenition
// ============================================================================
@@ -154,6 +161,37 @@
}
}
}
+
+
+// ============================================================================
+// Create log dir
+// ============================================================================
+void installLogDir()
+{
+#if defined(TRACE_TO_FILE) || defined(IRDEBUG_TRACE_TO_FILE)
+ QDir logDir(KTraceOutputDir);
+ if(!logDir.exists())
+ {
+ logDir.mkpath(KTraceOutputDir);
+ }
+
+ QFile logFile(KTraceOutputFileName);
+ if(logFile.exists())
+ {
+ logFile.remove(KReadableFileName);
+ logFile.copy(KTraceOutputFileName , KReadableFileName);
+ }
+
+ QFile logFileIRUI("c:/logs/internetradio/iruilog.txt");
+ if (logFileIRUI.exists())
+ {
+ logFileIRUI.remove("c:/data/iruilog.txt");
+ logFileIRUI.copy("c:/logs/internetradio/iruilog.txt" , "c:/data/iruilog.txt");
+ }
+#endif
+}
+
+
// ============================================================================
// SIGNAL/SLOT CONNECTION CHECKER
// ============================================================================
@@ -182,3 +220,5 @@
return connected;
}
+
+
--- a/qtinternetradio/irqmediaplayer/irqmediaplayer.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqmediaplayer/irqmediaplayer.pro Thu Jul 22 16:31:41 2010 +0100
@@ -16,18 +16,22 @@
TARGET = irqmediaplayer
TARGET.CAPABILITY = CAP_GENERAL_DLL
+defFilePath = ..
DEFINES += MMFADAPTER
DEPENDPATH += src
LIBS += -lmediaclientvideo \
-lmmfcontrollerframework \
-lstereowideningeffect \
- -lws32
+ -lws32 \
+ -lirqlogger
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
INCLUDEPATH += inc \
- ..\irqcommon\inc
+ ..\irqcommon\inc \
+ ..\irqlogger\inc
+
MOC_DIR = moc
--- a/qtinternetradio/irqmediaplayer/src/irqmediaplayer.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqmediaplayer/src/irqmediaplayer.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -22,6 +22,8 @@
#include "irqphononadapter.h"
#endif
+#include "irqlogger.h"
+
//Constants
const int KDefaultStereoLevel = 100; // Default stereo level
@@ -135,11 +137,7 @@
return;
}
- TRAPD(error, enableStereoEffectL());
- if (KErrNone != error)
- {
- emit errorOccured(EIRQPlayerErrorSetStereoFailed);
- }
+ TRAP_IGNORE(enableStereoEffectL());
}
// ---------------------------------------------------------------------------
@@ -149,6 +147,7 @@
//
EXPORT_C void IRQMediaPlayer::disableStereoEffect()
{
+ LOG_METHOD;
if (iStereoEffect)
{
if (iStereoEffect->IsEnabled())
--- a/qtinternetradio/irqmediaplayer/src/irqmmfadapter.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqmediaplayer/src/irqmmfadapter.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -22,6 +22,7 @@
#include "irqmetadata.h"
#include "irqenums.h"
#include "irqmmfadapter.h"
+#include "irqlogger.h"
//Constants
const TUid KUidController = { 0x101F8514 }; // Helix Video controller UID
@@ -76,6 +77,7 @@
//
void IRQMMFAdapter::playStation(const QString &aUrl, int aApId)
{
+ LOG_METHOD;
TRAPD(error, playL(aUrl, aApId));
if (NULL == iQMetaData)
{
@@ -156,6 +158,7 @@
//
void IRQMMFAdapter::setVolume(int aVolume)
{
+ LOG_METHOD;
if (iVideoPlayer && iPlayState > EOpenning)
{
// aVolume is a percentage
@@ -214,6 +217,7 @@
//
void IRQMMFAdapter::MvpuoOpenComplete(TInt aError)
{
+ LOG_METHOD;
if (KErrNone == aError)
{
if (NULL == iPrepareTimer)
@@ -255,6 +259,7 @@
//
void IRQMMFAdapter::MvpuoPrepareComplete(TInt aError)
{
+ LOG_METHOD;
// Cancel the previous request if pending
if (iPrepareTimer->IsActive())
{
@@ -306,6 +311,7 @@
//
void IRQMMFAdapter::MvpuoPlayComplete(TInt aError)
{
+ LOG_METHOD;
if (KErrNone != aError)
{
emit errorOccured(EIRQPlayerErrorGeneral);
@@ -320,6 +326,8 @@
//
void IRQMMFAdapter::MvpuoEvent(TMMFEvent const & aEvent)
{
+ LOG_METHOD;
+ LOG_FORMAT( "aevent is %d", (int)aEvent);
if (KMMFEventCategoryVideoPlayerGeneralError == aEvent.iEventType)
{
switch (aEvent.iErrorCode)
@@ -375,6 +383,7 @@
//
void IRQMMFAdapter::MvloLoadingStarted()
{
+ LOG_METHOD;
// Get buffering progress and send it to application
int percentageComplete = 0;
@@ -399,6 +408,7 @@
//
void IRQMMFAdapter::MvloLoadingComplete()
{
+ LOG_METHOD;
iPlayState = EPlaying;
// Send signal to update progress, 100%
@@ -412,6 +422,7 @@
//
void IRQMMFAdapter::getRefreshedMetaDataL(TInt index)
{
+ LOG_METHOD;
if (iQMetaData)
{
CMMFMetaDataEntry* pMetadataEntry = iVideoPlayer->MetaDataEntryL(index);
@@ -506,6 +517,7 @@
//
void IRQMMFAdapter::checkPrepare()
{
+ LOG_METHOD;
if (iPrepareTimer->IsActive())
{
// Cancel the previous request if pending
--- a/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontroller.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontroller.h Thu Jul 22 16:31:41 2010 +0100
@@ -60,30 +60,6 @@
* @return int Error code
*/
IMPORT_C IRQError getIAPId(unsigned long& aIapId) const;
-
- /**
- * Returns the list of available access points
- * @return QStringList &aList specifying the access point names
- */
- IMPORT_C void getAccessPointList(QStringList &aList);
-
- /**
- * Returns the list of iap ids for available access points
- * @return QList<unsigned long> &aList specifying the iap ids
- */
- IMPORT_C void getApIdList(QList<unsigned long> &aList);
-
- /**
- * Returns the list of bearer ids for available access points
- * @return QList<unsigned long> &aList specifying the bearer ids
- */
- IMPORT_C void getBearerList(QList<unsigned long> &aList);
-
- /**
- * Returns the list of network ids for available access points
- * @return QList<unsigned long> &aList specifying the network ids
- */
- IMPORT_C void getNetworkList(QList<unsigned long> &aList);
/**
* Configure the Access Point which is used by all the components for network connectivity
--- a/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontrollerbody.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontrollerbody.h Thu Jul 22 16:31:41 2010 +0100
@@ -53,30 +53,6 @@
* @return int Error code
*/
IRQError getIAPId(unsigned long& aIapId) const;
-
- /**
- * Returns the list of available access points
- * @return QStringList &aList specifying the access point names
- */
- void getAccessPointList(QStringList &aList);
-
- /**
- * Returns the list of iap ids for available access points
- * @return QList<unsigned long> &aList specifying the iap ids
- */
- void getApIdList(QList<unsigned long> &aList);
-
- /**
- * Returns the list of bearer ids for available access points
- * @return QList<unsigned long> &aList specifying the bearer ids
- */
- void getBearerList(QList<unsigned long> &aList);
-
- /**
- * Returns the list of network ids for available access points
- * @return QList<unsigned long> &aList specifying the network ids
- */
- void getNetworkList(QList<unsigned long> &aList);
/**
* Configure the Access Point which is used by all the components for network connectivity
--- a/qtinternetradio/irqnetworkcontroller/irqnetworkcontroller.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqnetworkcontroller/irqnetworkcontroller.pro Thu Jul 22 16:31:41 2010 +0100
@@ -19,6 +19,7 @@
MOC_DIR = moc
DEPENDPATH += src
+defFilePath = ..
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
INCLUDEPATH += $${OS_LAYER_PUBLIC_EXPORT_PATH(http)}
--- a/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontroller.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontroller.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -88,50 +88,6 @@
}
// ---------------------------------------------------------------------------
-// IRQNetworkController::getAccessPointList()
-// Returns the list of available access points
-// @return QStringList &aList specifying the access point names
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getAccessPointList(QStringList &aList)
-{
- iBody->getAccessPointList(aList);
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkController::getApIdList()
-// Returns the list of iap ids for available access points
-// @return QList<unsigned long> &aList specifying the iap ids
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getApIdList(QList<unsigned long> &aList)
-{
- iBody->getApIdList(aList);
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkController::getBearerList()
-// Returns the list of bearer ids for available access points
-// @return QList<unsigned long> &aList specifying the bearer ids
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getBearerList(QList<unsigned long> &aList)
-{
- iBody->getBearerList(aList);
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkController::getNetworkList()
-// Returns the list of network ids for available access points
-// @return QList<unsigned long> &aList specifying the network ids
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getNetworkList(QList<unsigned long> &aList)
-{
- iBody->getNetworkList(aList);
-}
-
-// ---------------------------------------------------------------------------
// IRQNetworkController::chooseAccessPoint()
// Configures the Access Point which is used by all the components for network
// connectivity
--- a/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontrollerbody.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontrollerbody.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -61,68 +61,6 @@
}
// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getAccessPointList()
-// Returns the list of available access points
-// @return QStringList &aList specifying the access point names
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getAccessPointList(QStringList &aList)
-{
- const CDesCArray *apArray = iNetworkController->GetAccessPointList();
- int count = apArray->MdcaCount();
- for (int i = 0; i < count; ++i)
- {
- QString str = QString::fromUtf16(apArray->MdcaPoint(i).Ptr(), apArray->MdcaPoint(i).Length());
- aList.append(str);
- }
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getApIdList()
-// Returns the list of iap ids for available access points
-// @return QList<unsigned long> &aList specifying the iap ids
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getApIdList(QList<unsigned long> &aList)
-{
- const RArray<TUint32>& accessPointIDArray = iNetworkController->GetApList();
- for (int i = 0; i < accessPointIDArray.Count(); ++i)
- {
- aList.append(accessPointIDArray[i]);
- }
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getBearerList()
-// Returns the list of bearer ids for available access points
-// @return QList<unsigned long> &aList specifying the bearer ids
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getBearerList(QList<unsigned long> &aList)
-{
- const RArray<TUint32>& bearerIDArray = iNetworkController->GetBearerList();
- for (int i = 0; i < bearerIDArray.Count(); ++i)
- {
- aList.append(bearerIDArray[i]);
- }
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getNetworkList()
-// Returns the list of network ids for available access points
-// @return QList<unsigned long> &aList specifying the network ids
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getNetworkList(QList<unsigned long> &aList)
-{
- const RArray<TUint32>& networkIDArray = iNetworkController->GetNetworkList();
- for (int i = 0; i < networkIDArray.Count(); ++i)
- {
- aList.append(networkIDArray[i]);
- }
-}
-
-// ---------------------------------------------------------------------------
// IRQNetworkControllerBody::chooseAccessPoint()
// Configures the Access Point which is used by all the components for network
// connectivity
--- a/qtinternetradio/irqnwkinfoobserver/irqnwkinfoobserver.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqnwkinfoobserver/irqnwkinfoobserver.pro Thu Jul 22 16:31:41 2010 +0100
@@ -19,6 +19,7 @@
MOC_DIR = moc
DEPENDPATH += src
+defFilePath = ..
INCLUDEPATH += inc
--- a/qtinternetradio/irqsettings/inc/irqsettings.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsettings/inc/irqsettings.h Thu Jul 22 16:31:41 2010 +0100
@@ -101,7 +101,8 @@
/**
* Creates IRQSettings instance
*/
- static IRQSettings* createInstanceL();
+ static IRQSettings* createInstance();
+ static void doCreateInstanceL(IRQSettings * aQsettings);
void constructL();
--- a/qtinternetradio/irqsettings/irqsettings.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsettings/irqsettings.pro Thu Jul 22 16:31:41 2010 +0100
@@ -19,6 +19,7 @@
MOC_DIR = moc
DEPENDPATH += src
+defFilePath = ..
INCLUDEPATH += inc \
..\irqcommon\inc \
--- a/qtinternetradio/irqsettings/src/irqsettings.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsettings/src/irqsettings.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -31,13 +31,7 @@
if (NULL == irqsettings)
{
- TRAPD(error, irqsettings = createInstanceL());
- if (KErrNone != error)
- {
- delete irqsettings;
- irqsettings = NULL;
- Dll::SetTls(NULL);
- }
+ irqsettings = createInstance();
}
else
{
@@ -366,17 +360,37 @@
// @return IRQSettings*
// ---------------------------------------------------------------------------
//
-IRQSettings* IRQSettings::createInstanceL()
+IRQSettings* IRQSettings::createInstance()
{
- IRQSettings* irqsettings = new (ELeave) IRQSettings();
- irqsettings->constructL();
- User::LeaveIfError(Dll::SetTls(irqsettings));
- irqsettings->iSingletonInstances = 1;
-
- return irqsettings;
+ IRQSettings* irqsettings = new IRQSettings();
+
+ TRAPD(leaveCode, doCreateInstanceL(irqsettings));
+ if (KErrNone != leaveCode)
+ {
+ delete irqsettings;
+ irqsettings = NULL;
+ return NULL;
+ }
+ else
+ {
+ irqsettings->iSingletonInstances = 1;
+ return irqsettings;
+ }
}
// ---------------------------------------------------------------------------
+// IRQSettings::doCreateInstanceL()
+// Creates IRQSettings instance
+// @return IRQSettings*
+// ---------------------------------------------------------------------------
+//
+void IRQSettings::doCreateInstanceL(IRQSettings * aQsettings)
+{
+ aQsettings->constructL();
+ Dll::SetTls(aQsettings);
+
+}
+// ---------------------------------------------------------------------------
// IRQSettings::constructL()
// Two-Phase Constructor.
// ---------------------------------------------------------------------------
--- a/qtinternetradio/irqsonghistory/inc/irqsonghistoryengine.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsonghistory/inc/irqsonghistoryengine.h Thu Jul 22 16:31:41 2010 +0100
@@ -65,10 +65,10 @@
*/
IMPORT_C void updateSongHistoryDb(int aChannelId,
- const QString& aChannelName,
- const QString& aChannelUrl,
- const QString& aImageUrl,
- const QString& aMusicFlag);
+ const QString& aChannelName, const QString& aChannelUrl,
+ const QString& aImageUrl, const QString& aGenreName,
+ const QString& aCountryName, const QString& aLanguageName,
+ const QString& aMusicFlag);
/**
* Connected with play controller with the song name changed.
@@ -81,7 +81,7 @@
* @param aMetaData The meta data contains song name, artist and bitrate.
* @param aMusicshopStatus The music shop status of the song
*/
- IMPORT_C void handleSongMetaDataReceived(const IRQMetaData& aMetaData, QString& aMusicshopStatus);
+ IMPORT_C void handleSongMetaDataReceived(const IRQMetaData& aMetaData, const IRQPreset& preset);
/*
* delete one item from the station history db
@@ -89,6 +89,12 @@
*/
IMPORT_C bool deleteOneItem(int aIndex);
+ /*
+ * delete one item from the song history db
+ * @param aIndex the index of the item need deleted
+ */
+ IMPORT_C bool deleteOneSongHistoryItem(int aIndex);
+
private:
enum TSongHistoryItemChange
@@ -122,7 +128,7 @@
void handleMetaDataReceivedL(const IRQMetaData& aMetaData, const IRQPreset& aPreset);
void getAllHistoryL(QList<IRQSongHistoryInfo *>& aSongHistoryArr);
- void handleSongMetaDataReceivedL(const IRQMetaData& aMetaData, QString& aMusicshopStatus);
+ void handleSongMetaDataReceivedL(const IRQMetaData& aMetaData, const IRQPreset& aPreset);
void getAllSongHistoryL(QList<IRQSongInfo *>& aSongHistoryArr);
private:
--- a/qtinternetradio/irqsonghistory/inc/irqsonghistoryinfo.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsonghistory/inc/irqsonghistoryinfo.h Thu Jul 22 16:31:41 2010 +0100
@@ -78,6 +78,24 @@
*@return QString& instance
*/
IMPORT_C const QString& getImageUrl() const;
+ /**
+ *IRQSongHistoryInfo::getGenreName()
+ *Function to get channel genre name
+ *@return QString& instance
+ */
+ IMPORT_C const QString& getGenreName() const;
+ /**
+ *IRQSongHistoryInfo::getCountryName()
+ *Function to get channel country Name
+ *@return QString& instance
+ */
+ IMPORT_C const QString& getCountryName() const;
+ /**
+ *IRQSongHistoryInfo::getLanguageName()
+ *Function to get channel language name
+ *@return QString& instance
+ */
+ IMPORT_C const QString& getLanguageName() const;
/**
*IRQSongHistoryInfo::getMusicStoreStatus()
@@ -117,6 +135,9 @@
const QString& aChannelName,
const QString& aChannelDesc,
const QString& aImageUrl,
+ const QString& aGenreName,
+ const QString& aCountryName,
+ const QString& aLanguageName,
const QString& aMusicStoreStatus,
int aChannelType,
int aChannelId,
@@ -163,6 +184,27 @@
* @param QString aImageUrl
*/
void setImageUrl(const QString& aImageUrl);
+
+ /**
+ *IRQSongHistoryInfo::setGenreName()
+ *Function to set channel genre name
+ * @param QString aGenreName
+ */
+ void setGenreName(const QString& aGenreName);
+
+ /**
+ *IRQSongHistoryInfo::setCountryName()
+ *Function to set channel country name
+ * @param QString aCountryName
+ */
+ void setCountryName(const QString& aCountryName);
+
+ /**
+ *IRQSongHistoryInfo::setLanguageName()
+ *Function to set channel language name
+ * @param QString aLanguageName
+ */
+ void setLanguageName(const QString& aLanguageName);
/**
*IRQSongHistoryInfo::setMusicStoreStatus()
@@ -223,7 +265,9 @@
* Channel's image Url.
*/
QString iImageUrl;
-
+ QString iGenreName;
+ QString iCountryName;
+ QString iLanguageName;
/**
* Channel's MusicStoreStatus.
*/
@@ -255,16 +299,20 @@
IMPORT_C void setArtistName(const QString& aArtist);
IMPORT_C const QString& getArtistName()const;
-
+
+ IMPORT_C void setStationName(const QString& aStationName);
+ IMPORT_C const QString& getStationName()const;
+
IMPORT_C void setMusicshopStatus(const QString& aStatus);
IMPORT_C const QString& getMusicshopStatus()const;
- IMPORT_C void setAllInfo(const QString& aName, const QString& aArtist, const QString& aStatus);
+ IMPORT_C void setAllInfo(const QString& aName, const QString& aArtist, const QString& aStationName, const QString& aStatus);
private:
QString iSongName;
QString iSongArtist;
+ QString iStationName;
QString iMusicshopStatus;
};
--- a/qtinternetradio/irqsonghistory/irqsonghistory.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsonghistory/irqsonghistory.pro Thu Jul 22 16:31:41 2010 +0100
@@ -16,6 +16,8 @@
TARGET = irqsonghistory
TARGET.CAPABILITY = CAP_GENERAL_DLL
+defFilePath = ..
+
DEPENDPATH += src ..\..\internetradio2.0\songhistorysrc
LIBS += -lbafl -ledbms -lefsrv -lirsettings -lflogger
--- a/qtinternetradio/irqsonghistory/src/irqsonghistoryengine.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsonghistory/src/irqsonghistoryengine.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -129,22 +129,25 @@
}
EXPORT_C void IRQSongHistoryEngine::handleSongMetaDataReceived(const IRQMetaData& aMetaData,
- QString& aMusicshopStatus)
+ const IRQPreset& aPreset)
{
- TRAPD(error, handleSongMetaDataReceivedL(aMetaData,aMusicshopStatus));
+ TRAPD(error, handleSongMetaDataReceivedL(aMetaData,aPreset));
if (KErrNone != error)
{
}
}
EXPORT_C void IRQSongHistoryEngine::handleSongMetaDataReceivedL(const IRQMetaData& aMetaData,
- QString& aMusicshopStatus)
+ const IRQPreset& aPreset)
{
+
TPtrC songName(reinterpret_cast<const TUint16*>(aMetaData.getSongName().utf16()), aMetaData.getSongName().length());
TPtrC artistName(reinterpret_cast<const TUint16*>(aMetaData.getArtistName().utf16()), aMetaData.getArtistName().length());
- TPtrC musicFlag(reinterpret_cast<const TUint16*>(aMusicshopStatus.utf16()), aMusicshopStatus.length());
+ TPtrC channelName(reinterpret_cast<const TUint16*>(aPreset.name.utf16()), aPreset.name.length());
+ TPtrC musicFlag(reinterpret_cast<const TUint16*>(aPreset.musicStoreStatus.utf16()), aPreset.musicStoreStatus.length());
TBool bExceededMax = iSongHistoryDb->AddToSongHistoryDb2L(songName,
artistName,
+ channelName,
musicFlag);
}
@@ -162,6 +165,9 @@
TPtrC channelName(reinterpret_cast<const TUint16*>(aPreset.name.utf16()), aPreset.name.length());
TPtrC channelDesc(reinterpret_cast<const TUint16*>(aPreset.description.utf16()), aPreset.description.length());
TPtrC imageUrl(reinterpret_cast<const TUint16*>(aPreset.imgUrl.utf16()), aPreset.imgUrl.length());
+ TPtrC genreName(reinterpret_cast<const TUint16*>(aPreset.genreName.utf16()), aPreset.genreName.length());
+ TPtrC countryName(reinterpret_cast<const TUint16*>(aPreset.countryName.utf16()), aPreset.countryName.length());
+ TPtrC languageName(reinterpret_cast<const TUint16*>(aPreset.languageName.utf16()), aPreset.languageName.length());
TPtrC musicFlag(reinterpret_cast<const TUint16*>(aPreset.musicStoreStatus.utf16()), aPreset.musicStoreStatus.length());
TUint8 channelType = aPreset.type;
TUint16 channelId = aPreset.presetId;
@@ -173,7 +179,7 @@
if(ret)
{
TInt modified = iSongHistoryDb->UpdateSongHistoryDbL( channelId ,
- channelName ,channelUrl ,imageUrl ,musicFlag);
+ channelUrl ,imageUrl ,genreName, countryName, languageName, musicFlag);
// TODO notify uplayer to change layout?
}
}
@@ -183,7 +189,7 @@
channelType = 0;
}
- iSongHistoryDb->SearchAndDeleteRecordL(channelName, channelUrl, channelType);
+ iSongHistoryDb->SearchAndDeleteRecordL(channelName, channelUrl, channelType, channelId);
RBuf delSongName;
delSongName.CleanupClosePushL();
@@ -206,6 +212,9 @@
bitrate,
channelDesc,
imageUrl,
+ genreName,
+ countryName,
+ languageName,
musicFlag);
CleanupStack::PopAndDestroy(4, &delSongName);
@@ -315,6 +324,9 @@
int bitrate;
QString channelDesc;
QString imageUrl;
+ QString genreName;
+ QString countryName;
+ QString languageName;
QString musicStoreStatus;
for (int arrCount = 0 ; arrCount < songCount ; arrCount++ )
{
@@ -333,6 +345,12 @@
historyDataArr[arrCount]->GetChannelDesc().Length());
imageUrl = QString::fromUtf16(historyDataArr[arrCount]->GetImageUrl().Ptr(),
historyDataArr[arrCount]->GetImageUrl().Length());
+ genreName = QString::fromUtf16(historyDataArr[arrCount]->GetGenreName().Ptr(),
+ historyDataArr[arrCount]->GetGenreName().Length());
+ countryName = QString::fromUtf16(historyDataArr[arrCount]->GetCountryName().Ptr(),
+ historyDataArr[arrCount]->GetCountryName().Length());
+ languageName = QString::fromUtf16(historyDataArr[arrCount]->GetLanguageName().Ptr(),
+ historyDataArr[arrCount]->GetLanguageName().Length());
musicStoreStatus = QString::fromUtf16(historyDataArr[arrCount]->GetChannelMusicStatus().Ptr(),
historyDataArr[arrCount]->GetChannelMusicStatus().Length());
IRQSongHistoryInfo* irqsongHistory = new IRQSongHistoryInfo();
@@ -341,7 +359,7 @@
break;
}
irqsongHistory->setHistoryInfo(artist, songName, streamUrl, channelName, channelDesc
- , imageUrl, musicStoreStatus, channelType, channelId, bitrate);
+ , imageUrl, genreName, countryName, languageName, musicStoreStatus, channelType, channelId, bitrate);
aSongHistoryArr.append(irqsongHistory);
}
@@ -384,6 +402,7 @@
// create IRQSongHistoryInfo array and set
QString songName;
QString artist;
+ QString stationName;
QString musicStoreStatus;
for (int arrCount = 0; arrCount < songCount; arrCount++)
@@ -394,12 +413,15 @@
artist = QString::fromUtf16(
historyDataArr[arrCount]->GetArtistInfo().Ptr(),
historyDataArr[arrCount]->GetArtistInfo().Length());
+ stationName = QString::fromUtf16(
+ historyDataArr[arrCount]->GetChannelName().Ptr(),
+ historyDataArr[arrCount]->GetChannelName().Length());
musicStoreStatus = QString::fromUtf16(
historyDataArr[arrCount]->GetChannelMusicStatus().Ptr(),
historyDataArr[arrCount]->GetChannelMusicStatus().Length());
IRQSongInfo* irqsong = new IRQSongInfo();
- irqsong->setAllInfo(songName, artist, musicStoreStatus);
+ irqsong->setAllInfo(songName, artist, stationName, musicStoreStatus);
aSongHistoryArr.append(irqsong);
}
@@ -443,6 +465,9 @@
const QString& aChannelName,
const QString& aChannelUrl,
const QString& aImageUrl,
+ const QString& aGenreName,
+ const QString& aCountryName,
+ const QString& aLanguageName,
const QString& aMusicFlag)
{
TInt ret = KErrNone ;
@@ -460,11 +485,16 @@
TPtrC channelName(reinterpret_cast<const TUint16*>(aChannelName.utf16()));
TPtrC channelUrl(reinterpret_cast<const TUint16*>(aChannelUrl.utf16()));
TPtrC imageUrl(reinterpret_cast<const TUint16*>(aImageUrl.utf16()));
+ TPtrC genreName(reinterpret_cast<const TUint16*>(aGenreName.utf16()));
+ TPtrC countryName(reinterpret_cast<const TUint16*>(aCountryName.utf16()));
+ TPtrC languageName(reinterpret_cast<const TUint16*>(aLanguageName.utf16()));
TPtrC musicFlag(reinterpret_cast<const TUint16*>(aMusicFlag.utf16()));
TRAP_IGNORE(iSongHistoryDb->UpdateSongHistoryDbL( channelId ,
- channelName,
channelUrl,
imageUrl,
+ genreName,
+ countryName,
+ languageName,
musicFlag));
}
}
@@ -480,3 +510,15 @@
return true;
}
+
+EXPORT_C bool IRQSongHistoryEngine::deleteOneSongHistoryItem(int aIndex)
+{
+ int retValue = 0;
+ retValue = iSongHistoryDb->DeleteOneSongHistory(aIndex);
+ if( KErrNone != retValue )
+ {
+ return false;
+ }
+
+ return true;
+}
--- a/qtinternetradio/irqsonghistory/src/irqsonghistoryinfo.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsonghistory/src/irqsonghistoryinfo.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -99,6 +99,36 @@
}
// ---------------------------------------------------------------------------
+// IRQSongHistoryInfo::getGenreName
+// gets Channel genre name
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const QString& IRQSongHistoryInfo::getGenreName() const
+{
+ return iGenreName;
+}
+
+// ---------------------------------------------------------------------------
+// IRQSongHistoryInfo::getCountryName
+// gets Channel country name
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const QString& IRQSongHistoryInfo::getCountryName() const
+{
+ return iCountryName;
+}
+
+// ---------------------------------------------------------------------------
+// IRQSongHistoryInfo::getLanguageName
+// gets Channel language name
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const QString& IRQSongHistoryInfo::getLanguageName() const
+{
+ return iLanguageName;
+}
+
+// ---------------------------------------------------------------------------
// IRQSongHistoryInfo::getMusicStoreStatus
// gets Channel MusicStoreStatus
// ---------------------------------------------------------------------------
@@ -148,6 +178,9 @@
const QString& aChannelName,
const QString& aChannelDesc,
const QString& aImageUrl,
+ const QString& aGenreName,
+ const QString& aCountryName,
+ const QString& aLanguageName,
const QString& aMusicStoreStatus,
int aChannelType,
int aChannelId,
@@ -159,6 +192,9 @@
setChannelName(aChannelName);
setChannelDesc(aChannelDesc);
setImageUrl(aImageUrl);
+ setGenreName(aGenreName);
+ setCountryName(aCountryName);
+ setLanguageName(aLanguageName);
setMusicStoreStatus(aMusicStoreStatus);
setChannelType(aChannelType);
setChannelId(aChannelId);
@@ -225,6 +261,36 @@
}
// ---------------------------------------------------------------------------
+// IRQSongHistoryInfo::setGenreName
+// sets Channel genre name
+// ---------------------------------------------------------------------------
+//
+void IRQSongHistoryInfo::setGenreName(const QString& aGenreName)
+{
+ iGenreName = aGenreName;
+}
+
+// ---------------------------------------------------------------------------
+// IRQSongHistoryInfo::setCountryName
+// sets Channel country name
+// ---------------------------------------------------------------------------
+//
+void IRQSongHistoryInfo::setCountryName(const QString& aCountryName)
+{
+ iCountryName = aCountryName;
+}
+
+// ---------------------------------------------------------------------------
+// IRQSongHistoryInfo::setLanguageName
+// sets Channel language name
+// ---------------------------------------------------------------------------
+//
+void IRQSongHistoryInfo::setLanguageName(const QString& aLanguageName)
+{
+ iLanguageName = aLanguageName;
+}
+
+// ---------------------------------------------------------------------------
// IRQSongHistoryInfo::setMusicStoreStatus
// sets Channel's MusicStoreStatus
// ---------------------------------------------------------------------------
@@ -278,11 +344,20 @@
iSongArtist = aArtist;
}
+EXPORT_C void IRQSongInfo::setStationName(const QString& aStationName)
+{
+ iStationName = aStationName;
+}
+
EXPORT_C const QString& IRQSongInfo::getArtistName() const
{
return iSongArtist;
}
+EXPORT_C const QString& IRQSongInfo::getStationName() const
+{
+ return iStationName;
+}
EXPORT_C void IRQSongInfo::setMusicshopStatus(const QString& aStatus)
{
iMusicshopStatus = aStatus;
@@ -293,11 +368,12 @@
return iMusicshopStatus;
}
-EXPORT_C void IRQSongInfo::setAllInfo(const QString& aName, const QString& aArtist, const QString& aStatus)
+EXPORT_C void IRQSongInfo::setAllInfo(const QString& aName, const QString& aArtist, const QString& aStationName, const QString& aStatus)
{
iSongName = aName;
iSongArtist = aArtist;
- iMusicshopStatus = aStatus;
+ iStationName = aStationName;
+ iMusicshopStatus = aStatus;
}
--- a/qtinternetradio/irqstatisticsreporter/irqstatisticsreporter.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqstatisticsreporter/irqstatisticsreporter.pro Thu Jul 22 16:31:41 2010 +0100
@@ -17,6 +17,7 @@
QT -= gui
CONFIG += dll
DEFINES += BUILD_IRQSTATISTICSREPORTER_DLL
+defFilePath = ..
symbian{
TARGET.UID3 = 0xe3801560
@@ -28,7 +29,8 @@
########## Dependency Path ##############################
MOC_DIR = moc
DEPENDPATH += src
-INCLUDEPATH += inc \
+INCLUDEPATH += /epoc32/include/platform \
+ inc \
../irqcommon\inc \
../irqisdsclient/inc \
../irqnetworkcontroller/inc \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/inc/iraccessoryobserver.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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 IRACCESSORYOBSERVER_H
+#define IRACCESSORYOBSERVER_H
+
+#include <AccessoryServer.h>
+#include <AccessoryMode.h>
+#include <AccPolAccessoryMode.h>
+
+class MIRHeadsetObserverInterface;
+
+class CIRAccessoryObserver : public CActive
+{
+public:
+
+ static CIRAccessoryObserver* NewL(MIRHeadsetObserverInterface *aObserver);
+ ~CIRAccessoryObserver();
+ TBool IsHeadsetConnected() const;
+
+private:
+ CIRAccessoryObserver(MIRHeadsetObserverInterface *aObserver);
+ void ConstructL();
+ void RunL();
+ void DoCancel();
+
+private:
+ MIRHeadsetObserverInterface* iObserver;
+ RAccessoryServer iAccessoryServer;
+ RAccessoryMode iAccessoryModeSession;
+ TAccPolAccessoryMode iAccPolAccessoryMode;
+};
+
+#endif//IRACCESSORYOBSERVER_H
--- a/qtinternetradio/irqsystemeventhandler/inc/iralarmobserver.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/inc/iralarmobserver.h Thu Jul 22 16:31:41 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
--- a/qtinternetradio/irqsystemeventhandler/inc/iralarmobserverinterface.h Mon Jun 21 22:33:45 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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 IRALARMOBSERVERINTERFACE_H
-#define IRALARMOBSERVERINTERFACE_H
-
-class MIRAlarmObserverInterface
-{
-public:
- virtual void alarmStarted()= 0;
- virtual void alarmStopped() = 0;
-};
-
-#endif // IRALARMOBSERVERINTERFACE_H
--- a/qtinternetradio/irqsystemeventhandler/inc/irdiskspaceobserver.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/inc/irdiskspaceobserver.h Thu Jul 22 16:31:41 2010 +0100
@@ -1,19 +1,19 @@
/*
- * 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: Contains logic for watching certain disk's space
- *
- */
+* 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 CIRDISKSPACEOBSERVER_H
#define CIRDISKSPACEOBSERVER_H
@@ -41,6 +41,7 @@
* space drops below certain level.
*/
static CIRDiskSpaceObserver* NewL(MIRDiskSpaceObserverInterface* aObserver);
+ static CIRDiskSpaceObserver* NewLC(MIRDiskSpaceObserverInterface* aObserver);
/**
* Destructor
--- a/qtinternetradio/irqsystemeventhandler/inc/irdiskspaceobserverinterface.h Mon Jun 21 22:33:45 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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: Disk space observer, information about low disk space.
-*
-*/
-
-
-#ifndef IRDISKSPACEOBSERVERINTERFACE_H_
-#define IRDISKSPACEOBSERVERINTERFACE_H_
-
-#include <QtGlobal>
-
-/**
- * Observer of low disk space
- *
- * Observer which is interested low disk space situations.
- */
-class MIRDiskSpaceObserverInterface
-{
-public:
-
- /**
- * notifyLowDiskSpace Called when the observed disk's free disk space is
- * less than the critical level.
- */
- virtual void notifyLowDiskSpace(qint64 aCriticalLevel) = 0;
-};
-
-#endif // IRDiskSpaceObserverInterface_H_
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/inc/irpropertychangeao.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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 CIRPROPERTYCHANGEAO_H
+#define CIRPROPERTYCHANGEAO_H
+
+#include <e32base.h>
+#include <e32property.h>
+
+class MIRPropertyChangeObserverInterface;
+
+class CIRPropertyChangeAO : public CActive
+{
+
+public:
+
+ //only two-phase constructor is permit to use
+ static CIRPropertyChangeAO* NewL( MIRPropertyChangeObserverInterface* aObserver, const TUid& aCategory, const TUint aKey);
+ ~CIRPropertyChangeAO();
+ void ActivateL();
+ TBool ValueInt(TInt& aValue);
+
+private:
+
+ CIRPropertyChangeAO(MIRPropertyChangeObserverInterface* aObserver,const TUid& aCategory,const TUint aKey);
+ void ConstructL();
+
+protected:
+
+ void RunL();
+ void DoCancel();
+
+private:
+
+ TInt iValueInt;
+ RProperty iProperty;
+ MIRPropertyChangeObserverInterface* iObserver;
+ TUid iCategory;
+ TUint iKey;
+};
+#endif // CIRPROPERTYCHANGEAO_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/inc/irpropertyobserver.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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 IRPROPERTYOBSERVER_H
+#define IRPROPERTYOBSERVER_H
+
+#include <e32base.h>
+
+//This is an symbian interface.
+class MIRPropertyChangeObserverInterface
+{
+
+public:
+
+ virtual void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TInt aValue) = 0;
+ virtual void HandlePropertyChangeErrorL(const TUid& aCategory, const TUint aKey, TInt aError) = 0;
+};
+
+class MIRPropertyObserverInterface;
+class CIRPropertyChangeAO;
+
+class CIRPropertyObserver : public CBase, public MIRPropertyChangeObserverInterface
+{
+public:
+
+ //only two-phase constructor is permit to use
+ static CIRPropertyObserver* NewL(MIRPropertyObserverInterface* aObserver);
+ static CIRPropertyObserver* NewLC(MIRPropertyObserverInterface* aObserver);
+ ~CIRPropertyObserver();
+ TBool IsCallActive() const;
+
+protected:
+
+ //from base class MIRPropertyChangeObserverInterface
+ void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TInt aValue);
+ void HandlePropertyChangeErrorL(const TUid& aCategory, const TUint aKey, TInt aError);
+
+private:
+
+ void ConstructL();
+ CIRPropertyObserver(MIRPropertyObserverInterface* aObserver);
+
+private:
+
+ CIRPropertyChangeAO* iCallStatusObserver;
+ TBool iIsCallActive;
+
+ MIRPropertyObserverInterface* iPropertyObserver;
+};
+
+#endif //IRPROPERTYOBSERVER_H
+
--- a/qtinternetradio/irqsystemeventhandler/inc/irqsystemeventhandler.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/inc/irqsystemeventhandler.h Thu Jul 22 16:31:41 2010 +0100
@@ -43,6 +43,10 @@
void alarmStarted();
void alarmStopped();
void diskSpaceLowNotification(qint64 aCriticalLevel);
+ void callActivated();
+ void callDeactivated();
+ void headsetConnected();
+ void headsetDisconnected();
private:
--- a/qtinternetradio/irqsystemeventhandler/inc/irqsystemeventhandler_p.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/inc/irqsystemeventhandler_p.h Thu Jul 22 16:31:41 2010 +0100
@@ -18,14 +18,15 @@
#ifndef IRQSYSTEMEVENTHANDLER_P_H
#define IRQSYSTEMEVENTHANDLER_P_H
-#include "irdiskspaceobserverinterface.h"
-#include "iralarmobserverinterface.h"
+#include "irsystemeventobserverinterface.h"
class IRQSystemEventHandler;
class CIRAlarmObserver;
class CIRDiskSpaceObserver;
+class CIRPropertyObserver;
-class IRQSystemEventHandlerPrivate : public MIRAlarmObserverInterface, public MIRDiskSpaceObserverInterface
+class IRQSystemEventHandlerPrivate : public MIRAlarmObserverInterface, public MIRDiskSpaceObserverInterface,
+ public MIRPropertyObserverInterface, public MIRHeadsetObserverInterface
{
public:
@@ -39,6 +40,9 @@
void cancel();
void start();
+ bool isCallActive() const;
+ int getErrorCode() const;
+
private:
//to initialize all the symbian components here
void initializeL();
@@ -47,6 +51,13 @@
void alarmStopped();
//from MIRDisSpaceObserver
void notifyLowDiskSpace(qint64 aCriticalLevel);
+ //from MIRPropertyObserverInterface
+ void callIsActivated();
+ void callIsDeactivated();
+ void errorCallback(int aError);
+ //from MIRHeadsetObserverInterface
+ void headsetIsConnected();
+ void headsetIsDisconnected();
#ifdef USER_DEFINED_DISKSPACE
void getDiskSpaceCriticalLevel(qint64 & aLevel);
@@ -59,7 +70,9 @@
qint64 mDefaultLevel;
CIRAlarmObserver* mAlarmObserver;
- CIRDiskSpaceObserver* mDiskSpaceObserver;
+ CIRDiskSpaceObserver* mDiskSpaceObserver;
+ CIRPropertyObserver * mPropertyObserver;
+ int mErrorCode;
};
#endif //IRQSYSTEMEVENTHANDLER_P_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/inc/irsystemeventobserverinterface.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,61 @@
+/*
+* 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 IRSYSTEMEVENTOBSERVERINTERFACE_H
+#define IRSYSTEMEVENTOBSERVERINTERFACE_H
+
+#include <qglobal.h>
+
+class MIRAlarmObserverInterface
+{
+public:
+ virtual void alarmStarted()= 0;
+ virtual void alarmStopped() = 0;
+};
+
+
+class MIRDiskSpaceObserverInterface
+{
+public:
+
+ /**
+ * notifyLowDiskSpace Called when the observed disk's free disk space is
+ * less than the critical level.
+ */
+ virtual void notifyLowDiskSpace(qint64 aCriticalLevel) = 0;
+};
+
+class MIRPropertyObserverInterface
+{
+public:
+
+ virtual void callIsActivated() = 0;
+ virtual void callIsDeactivated() = 0;
+ //this function is a general error call back, no matter which propertyChanged,
+ //we will call this to notify the upper layer.
+ virtual void errorCallback(int aError) = 0;
+};
+
+class MIRHeadsetObserverInterface
+{
+public:
+
+ virtual void headsetIsConnected() = 0;
+ virtual void headsetIsDisconnected() = 0;
+};
+
+#endif // IRSYSTEMEVENTOBSERVERINTERFACE_H
--- a/qtinternetradio/irqsystemeventhandler/irqsystemeventhandler.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/irqsystemeventhandler.pro Thu Jul 22 16:31:41 2010 +0100
@@ -11,35 +11,45 @@
DEPENDPATH += . inc src
INCLUDEPATH += .
+defFilePath = ..
+
DEFINES += BUILD_IRQSYSTEMEVENTHANDLEREXPORTS_DLL
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE \
+ ..\irqlogger\inc
LIBS += -lalarmclient \
-lefsrv \
- -lplatformenv
-
-
+ -lirqlogger \
+ -lplatformenv \
+ -laccclient
+
# Input
-HEADERS += inc/iralarmobserverinterface.h \
+HEADERS += inc/irsystemeventobserverinterface.h \
+ inc/irpropertychangeao.h \
+ inc/iraccessoryobserver.h \
+ inc/irpropertyobserver.h \
inc/iralarmobserver.h \
- inc/irdiskspaceobserver.h \
- inc/irdiskspaceobserverinterface.h \
+ inc/irdiskspaceobserver.h \
inc/irqsystemeventhandler.h \
- inc/irqsystemeventhandlerexport.h \
+ inc/irqsystemeventhandlerexport.h \
inc/irqsystemeventhandler_p.h
SOURCES += src/iralarmobserver.cpp \
src/irdiskspaceobserver.cpp \
- src/irqsystemeventhandler.cpp \
- src/irqsystemeventhandler_p.cpp
+ src/iraccessoryobserver.cpp \
+ src/irpropertychangeao.cpp \
+ src/irpropertyobserver.cpp \
+ src/irqsystemeventhandler.cpp \
+ src/irqsystemeventhandler_p.cpp
symbian{
TARGET.UID3 = 0xEa421d0b
TARGET.EPOCALLOWDLLDATA = 1
-}
+}
+SYMBIAN_PLATFORMS = WINSCW ARMV5
QT -= gui
include(../common.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/src/iraccessoryobserver.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* 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:
+*
+*/
+
+#include <AccPolGenericID.h>
+
+#include "irsystemeventobserverinterface.h"
+#include "iraccessoryobserver.h"
+#include "irqlogger.h"
+
+CIRAccessoryObserver::CIRAccessoryObserver(MIRHeadsetObserverInterface *aObserver) :
+ CActive(CActive::EPriorityStandard),iObserver(aObserver)
+{
+
+}
+
+void CIRAccessoryObserver::ConstructL()
+{
+ User::LeaveIfError(iAccessoryServer.Connect());
+
+ User::LeaveIfError(iAccessoryModeSession.CreateSubSession(iAccessoryServer));
+ User::LeaveIfError(iAccessoryModeSession.GetAccessoryMode(
+ iAccPolAccessoryMode));
+
+ CActiveScheduler::Add(this);
+
+ iAccessoryModeSession.NotifyAccessoryModeChanged(iStatus, iAccPolAccessoryMode);
+ SetActive();
+}
+
+CIRAccessoryObserver* CIRAccessoryObserver::NewL(MIRHeadsetObserverInterface *aObserver)
+{
+ CIRAccessoryObserver* self = new (ELeave) CIRAccessoryObserver(aObserver);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+
+ return self;
+}
+
+CIRAccessoryObserver::~CIRAccessoryObserver()
+{
+ Cancel();
+ iAccessoryModeSession.CloseSubSession();
+ iAccessoryServer.Close();
+}
+
+TBool CIRAccessoryObserver::IsHeadsetConnected() const
+{
+ TBool accessoryConnected;
+
+ switch (iAccPolAccessoryMode.iAccessoryMode)
+ {
+ case EAccModeWiredHeadset:
+ case EAccModeLoopset:
+ case EAccModeHeadphones:
+ {
+ accessoryConnected = ETrue;
+ break;
+ }
+ default:
+ {
+ accessoryConnected = EFalse;
+ break;
+ }
+ }
+
+ return accessoryConnected;
+}
+
+void CIRAccessoryObserver::RunL()
+{
+
+ TRequestStatus status = iStatus;
+ iAccessoryModeSession.NotifyAccessoryModeChanged(iStatus,
+ iAccPolAccessoryMode);
+ SetActive();
+
+ if (status == KErrNone)
+ {
+ // Accessory mode may change when combined connection status changes
+ // or when audio routing status changes.
+ if (IsHeadsetConnected())
+ {
+ iObserver->headsetIsConnected();
+ }
+ else
+ {
+ iObserver->headsetIsDisconnected();
+ }
+ }
+}
+
+void CIRAccessoryObserver::DoCancel()
+{
+ iAccessoryModeSession.CancelNotifyAccessoryModeChanged();
+}
--- a/qtinternetradio/irqsystemeventhandler/src/iralarmobserver.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/src/iralarmobserver.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -1,22 +1,22 @@
/*
- * 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:
- *
- */
+* 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:
+*
+*/
#include "iralarmobserver.h"
-#include "iralarmobserverinterface.h"
+#include "irsystemeventobserverinterface.h"
CIRAlarmObserver* CIRAlarmObserver::NewL(MIRAlarmObserverInterface* aObserver)
{
--- a/qtinternetradio/irqsystemeventhandler/src/irdiskspaceobserver.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/src/irdiskspaceobserver.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -11,12 +11,12 @@
*
* Contributors:
*
-* Description: Contains logic for watching certain disk's space
+* Description:
*
*/
#include <pathinfo.h>
#include "irdiskspaceobserver.h"
-#include "irdiskspaceobserverinterface.h"
+#include "irsystemeventobserverinterface.h"
const TDriveNumber KQtIRDefaultDrive = EDriveC;
@@ -33,13 +33,17 @@
//
CIRDiskSpaceObserver* CIRDiskSpaceObserver::NewL(MIRDiskSpaceObserverInterface* aObserver)
{
+ CIRDiskSpaceObserver* self = NewLC(aObserver);
+ CleanupStack::Pop(self);
+ return self;
+}
+
+CIRDiskSpaceObserver* CIRDiskSpaceObserver::NewLC(MIRDiskSpaceObserverInterface* aObserver)
+{
CIRDiskSpaceObserver* self = new (ELeave) CIRDiskSpaceObserver(aObserver);
-
CleanupStack::PushL(self);
self->ConstructL();
- CleanupStack::Pop(self);
return self;
-
}
// ---------------------------------------------------------------------------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/src/irpropertychangeao.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* 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:
+*
+*/
+
+#include "irpropertychangeao.h"
+#include "irpropertyobserver.h"
+#include "irqlogger.h"
+
+CIRPropertyChangeAO::CIRPropertyChangeAO(MIRPropertyChangeObserverInterface* aObserver, const TUid& aCategory,
+ const TUint aKey) : CActive(CActive::EPriorityStandard), iObserver(aObserver), iCategory(aCategory), iKey(aKey)
+{
+ LOG_METHOD;
+}
+
+void CIRPropertyChangeAO::ConstructL()
+{
+ LOG_METHOD;
+ User::LeaveIfError(iProperty.Attach(iCategory, iKey));
+ CActiveScheduler::Add(this);
+}
+
+CIRPropertyChangeAO* CIRPropertyChangeAO::NewL(
+ MIRPropertyChangeObserverInterface* aObserver, const TUid& aCategory,
+ const TUint aKey)
+{
+ LOG_METHOD;
+ CIRPropertyChangeAO* self = new (ELeave) CIRPropertyChangeAO(aObserver,
+ aCategory, aKey);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+}
+
+CIRPropertyChangeAO::~CIRPropertyChangeAO()
+{
+ Cancel();
+ iProperty.Close();
+}
+
+void CIRPropertyChangeAO::ActivateL()
+{
+ if (!IsActive())
+ {
+ RunL();
+ }
+}
+
+void CIRPropertyChangeAO::RunL()
+{
+ LOG_METHOD;
+
+ if ( KErrNone == iStatus.Int() )
+ {
+ TInt err = KErrNone;
+
+ err = iProperty.Get(iValueInt);
+
+ if ( KErrNone == err )
+ {
+ iObserver->HandlePropertyChangeL(iCategory, iKey, iValueInt);
+ }
+ else
+ {
+ iObserver->HandlePropertyChangeErrorL(iCategory, iKey, err);
+ }
+ }
+
+ iProperty.Subscribe(iStatus);
+ SetActive();
+
+ //if the iStatus is error, ignore it.
+}
+
+void CIRPropertyChangeAO::DoCancel()
+{
+ iProperty.Cancel();
+}
+
+TBool CIRPropertyChangeAO::ValueInt(TInt& aValue)
+{
+ TInt tempValue = 0;
+ TInt err = iProperty.Get(tempValue);
+
+ if ( KErrNone == err )
+ {
+ iValueInt = tempValue;
+ aValue = tempValue;
+ }
+ else
+ {
+ return EFalse;
+ }
+
+ return ETrue;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/src/irpropertyobserver.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* 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:
+*
+*/
+
+//head files for symbian
+#include <e32def.h>
+#include <e32std.h>
+#include <eikdef.h>
+#include <ctsydomainpskeys.h>
+
+//private head files
+#include "irsystemeventobserverinterface.h"
+#include "irpropertyobserver.h"
+#include "irpropertychangeao.h"
+#include "irqlogger.h"
+
+
+CIRPropertyObserver::CIRPropertyObserver(MIRPropertyObserverInterface* aObserver) :
+ iCallStatusObserver(NULL),iIsCallActive(EFalse),iPropertyObserver(aObserver)
+{
+ LOG_METHOD;
+ Q_ASSERT(aObserver!=NULL);
+}
+
+void CIRPropertyObserver::ConstructL()
+{
+ LOG_METHOD;
+
+ TInt callStatus = 0 ;
+ TBool sucess = EFalse;
+
+ iCallStatusObserver = CIRPropertyChangeAO::NewL(this, KPSUidCtsyCallInformation, KCTsyCallState);
+ iCallStatusObserver->ActivateL();
+
+ sucess = iCallStatusObserver->ValueInt(callStatus);
+ if( sucess )
+ {
+ iIsCallActive = ( callStatus > EPSCTsyCallStateNone );
+ }
+ else
+ {
+ iIsCallActive = EFalse;
+ }
+}
+
+CIRPropertyObserver::~CIRPropertyObserver()
+{
+ delete iCallStatusObserver;
+ iCallStatusObserver = NULL;
+}
+
+
+CIRPropertyObserver* CIRPropertyObserver::NewL(MIRPropertyObserverInterface* aObserver)
+{
+ LOG_METHOD;
+ CIRPropertyObserver* self = NewLC(aObserver);
+ CleanupStack::Pop(self);
+ return self;
+}
+
+CIRPropertyObserver* CIRPropertyObserver::NewLC(MIRPropertyObserverInterface* aObserver)
+{
+ CIRPropertyObserver* self = new (ELeave) CIRPropertyObserver(aObserver);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ return self;
+}
+
+TBool CIRPropertyObserver::IsCallActive() const
+{
+ return iIsCallActive;
+}
+
+void CIRPropertyObserver::HandlePropertyChangeL(const TUid& aCategory,
+ const TUint aKey, const TInt aValue)
+{
+ LOG_FORMAT( "HandlePropertyChangeL_ENTRY. aKey = %d, aValue = %d", aKey, aValue);
+ if (aCategory == KPSUidCtsyCallInformation && aKey == KCTsyCallState)
+ {
+ if ((!iIsCallActive) && (aValue > EPSCTsyCallStateNone))
+ {
+ iIsCallActive = ETrue;
+ iPropertyObserver->callIsActivated();
+ }
+ else if ((iIsCallActive) && (aValue <= EPSCTsyCallStateNone))
+ {
+ iIsCallActive = EFalse;
+ iPropertyObserver->callIsDeactivated();
+ }
+ }
+}
+
+void CIRPropertyObserver::HandlePropertyChangeErrorL(const TUid& aCategory,
+ const TUint aKey, const TInt aError)
+{
+ LOG_METHOD;
+ Q_UNUSED(aCategory);
+ Q_UNUSED(aKey);
+ iPropertyObserver->errorCallback(aError);
+}
--- a/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: Contains logic for watching certain disk's space
+* Description:
*
*/
--- a/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler_p.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler_p.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: Contains logic for watching certain disk's space
+* Description:
*
*/
@@ -19,6 +19,8 @@
#include "irqsystemeventhandler_p.h"
#include "irdiskspaceobserver.h"
#include "iralarmobserver.h"
+#include "irpropertyobserver.h"
+#include "irqlogger.h"
#ifdef USER_DEFINED_DISKSPACE
#include <QFile>
@@ -26,9 +28,11 @@
#include <QStringList>
#endif
+#define DEFAULT_DISKSPACE_LOW_LEVEL (3*1024*1024)
IRQSystemEventHandlerPrivate::IRQSystemEventHandlerPrivate(IRQSystemEventHandler *aSystemEventHandler) : q_ptr(aSystemEventHandler),
- mAlarmOn(false),mDefaultLevel(3*1024*1024),mAlarmObserver(NULL), mDiskSpaceObserver(NULL)
+ mAlarmOn(false),mDefaultLevel(DEFAULT_DISKSPACE_LOW_LEVEL),mAlarmObserver(NULL), mDiskSpaceObserver(NULL),
+ mPropertyObserver(NULL),mErrorCode(0)
{
}
@@ -37,6 +41,7 @@
cancel();
delete mDiskSpaceObserver;
delete mAlarmObserver;
+ delete mPropertyObserver;
}
bool IRQSystemEventHandlerPrivate::init()
@@ -52,8 +57,9 @@
}
else
{
+ mAlarmObserver = NULL;
mDiskSpaceObserver = NULL;
- mAlarmObserver = NULL;
+ mPropertyObserver = NULL;
}
@@ -76,8 +82,10 @@
void IRQSystemEventHandlerPrivate::initializeL()
{
mAlarmObserver = CIRAlarmObserver::NewLC(this);
- mDiskSpaceObserver = CIRDiskSpaceObserver::NewL(this);
- CleanupStack::Pop(mAlarmObserver);
+ mDiskSpaceObserver = CIRDiskSpaceObserver::NewLC(this);
+ mPropertyObserver = CIRPropertyObserver::NewL(this);
+ CleanupStack::Pop(mDiskSpaceObserver);
+ CleanupStack::Pop(mAlarmObserver);
}
void IRQSystemEventHandlerPrivate::cancel()
@@ -103,9 +111,10 @@
if( mDiskSpaceObserver )
{
mDiskSpaceObserver->Start((TInt64)mDefaultLevel);
- }
+ }
}
+
bool IRQSystemEventHandlerPrivate::isBelowCriticalLevel(const qint64 aCriticalLevel)
{
if( 0 == aCriticalLevel )
@@ -116,6 +125,16 @@
return mDiskSpaceObserver->IsBelowCriticalLevel((TInt64)aCriticalLevel );
}
+bool IRQSystemEventHandlerPrivate::isCallActive() const
+{
+ return mPropertyObserver->IsCallActive();
+}
+
+int IRQSystemEventHandlerPrivate::getErrorCode() const
+{
+ return mErrorCode;
+}
+
#ifdef USER_DEFINED_DISKSPACE
void IRQSystemEventHandlerPrivate::getDiskSpaceCriticalLevel(qint64 & aLevel)
{
@@ -167,6 +186,36 @@
{
emit q_ptr->diskSpaceLowNotification(aCriticalLevel);
}
+
+void IRQSystemEventHandlerPrivate::callIsActivated()
+{
+ LOG_METHOD;
+ emit q_ptr->callActivated();
+}
+
+void IRQSystemEventHandlerPrivate::callIsDeactivated()
+{
+ LOG_METHOD;
+ emit q_ptr->callDeactivated();
+}
+
+void IRQSystemEventHandlerPrivate::errorCallback(int aError)
+{
+ mErrorCode = aError;
+}
+
+void IRQSystemEventHandlerPrivate::headsetIsConnected()
+{
+ LOG_METHOD;
+ emit q_ptr->headsetConnected();
+}
+
+void IRQSystemEventHandlerPrivate::headsetIsDisconnected()
+{
+ LOG_METHOD;
+ emit q_ptr->headsetDisconnected();
+}
+
--- a/qtinternetradio/rom/internetradio_binaries.txt Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/rom/internetradio_binaries.txt Thu Jul 22 16:31:41 2010 +0100
@@ -12,7 +12,6 @@
irsettings.dll
irsessionlog.dll
iractiveidleengine.dll
-irsonghistory.dll
irsettingsview.dll
irmediaengine.dll
irfilerecognizer.dll
--- a/qtinternetradio/rom/qtinternetradio.iby Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/rom/qtinternetradio.iby Thu Jul 22 16:31:41 2010 +0100
@@ -37,4 +37,12 @@
data=ZRESOURCE\apps\internet_radio_10_1.mif APP_RESOURCE_DIR\internet_radio_10_1.mif
data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\internet_radio_10_1_reg.rsc Private\10003a3f\import\apps\internet_radio_10_1_reg.rsc
+#the following is for splash screen
+data=ZRESOURCE\hb\splashml\internet_radio_default.splashml RESOURCE_FILES_DIR\hb\splashml\internet_radio_default.splashml
+data=ZRESOURCE\hb\splashml\internet_radio_default.docml RESOURCE_FILES_DIR\hb\splashml\internet_radio_default.docml
+data=ZRESOURCE\hb\splashml\internet_radio_normal.splashml RESOURCE_FILES_DIR\hb\splashml\internet_radio_normal.splashml
+data=ZRESOURCE\hb\splashml\internet_radio_normal.docml RESOURCE_FILES_DIR\hb\splashml\internet_radio_normal.docml
+data=ZRESOURCE\hb\splashml\internet_radio_nowplaying.splashml RESOURCE_FILES_DIR\hb\splashml\internet_radio_nowplaying.splashml
+data=ZRESOURCE\hb\splashml\internet_radio_nowplaying.docml RESOURCE_FILES_DIR\hb\splashml\internet_radio_nowplaying.docml
+
#endif
--- a/qtinternetradio/ui/inc/irabstractlistviewbase.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irabstractlistviewbase.h Thu Jul 22 16:31:41 2010 +0100
@@ -40,6 +40,8 @@
TIRViewParameter getViewParameter() const;
~IrAbstractListViewBase();
+
+ void setPlayingBannerTextColor(const QString &aColor);
protected:
IrAbstractListViewBase(IRApplication *aApplication, TIRViewId aViewId);
--- a/qtinternetradio/ui/inc/irapplication.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irapplication.h Thu Jul 22 16:31:41 2010 +0100
@@ -17,9 +17,10 @@
#ifndef IRAPPLICATION_H
#define IRAPPLICATION_H
+#include <QObject>
#include <QEvent>
#include <hbglobal.h>
-#include <xqserviceprovider.h>
+#include <qpoint.h>
#include "irqevent.h"
#include "irviewdefinitions.h"
@@ -39,14 +40,19 @@
class IRQAdvClient;
class HbProgressDialog;
class IRQSystemEventHandler;
-class XQSharableFile;
class IRPlayList;
+#ifdef HS_WIDGET_ENABLED
+class IrMonitorService;
+class IrControlService;
+#endif
+class IRFileViewService;
+class HbMessageBox;
#ifdef LOCALIZATION
class QTranslator;
#endif
-class IRApplication : public XQServiceProvider
+class IRApplication : public QObject
{
Q_OBJECT
@@ -54,12 +60,19 @@
IRApplication(IRViewManager *aViewManager, IRQSystemEventHandler* aSystemEventHandler);
~IRApplication();
-
- bool verifyNetworkConnectivity(const QString &aConnectingText = hbTrId("Connecting to server..."));
+#ifdef SUBTITLE_STR_BY_LOCID
+ bool verifyNetworkConnectivity(const QString &aConnectingText = hbTrId("txt_common_info_loading"));
+#else
+ bool verifyNetworkConnectivity(const QString &aConnectingText = hbTrId("Loading"));
+#endif
- void createConnectingDialog();
-
- void closeConnectingDialog();
+ void startLoadingAnimation(const QObject *aReceiver, const char *aFunc);
+ void stopLoadingAnimation();
+
+#ifdef HS_WIDGET_ENABLED
+ bool startPlaying();
+ void cancelPlayerLoading();
+#endif
IRViewManager* getViewManager() const;
IRQNetworkController* getNetworkController();
@@ -71,6 +84,11 @@
IRMediaKeyObserver* getMediaKeyObserver();
IRQAdvClient* getAdvClient();
IRPlayList* getPlayList() const;
+
+ void setLaunchView();
+ void launchStartingView(TIRViewId aViewId);
+
+ bool isAppFullyStarted() const;
#ifdef LOCALIZATION
/*
@@ -86,10 +104,6 @@
public:
bool iTestPreferredBitrate;
#endif
-
-public slots:
- void view(const QString &aFileName);
- void view(const XQSharableFile &aSharableFile);
signals:
void quit();
@@ -102,17 +116,18 @@
void newLocalSocketConnection();
void handleDiskSpaceLow(qint64 aCriticalLevel);
void handleTermsConsAccepted();
+ void handleCallActivated();
+ void handleCallDeactivated();
+ void handleHeadsetConnected();
+ void handleHeadsetDisconnected();
private:
void createComponents();
void destroyComponents();
void setupConnection();
- void setLaunchView();
- void launchStartingView(TIRViewId aViewId);
void startSystemEventMonitor();
void initApp();
- void setExitingView();
-
+ void setExitingView();
TIRHandleResult handleConnectionEstablished();
void startLocalServer();
@@ -155,15 +170,24 @@
QLocalServer *iLocalServer;
- HbProgressDialog *iConnectingNote;
+ HbProgressDialog *iLoadingNote;
#ifdef LOCALIZATION
QTranslator *iTranslator;
#endif
- IRQSystemEventHandler *iSystemEventHandler;
+ IRQSystemEventHandler *iSystemEventHandler;
+ TIRUseNetworkReason iUseNetworkReason;
+
+ bool iAppFullyStarted;
- IRPlayList *iPlayList;
+#ifdef HS_WIDGET_ENABLED
+ IrControlService *iControlService;
+ IrMonitorService *iMonitorService;
+#endif
+
+ IRFileViewService *iFileViewService;
+ HbMessageBox *iMessageBox;
};
#endif
--- a/qtinternetradio/ui/inc/irbaseview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irbaseview.h Thu Jul 22 16:31:41 2010 +0100
@@ -17,6 +17,7 @@
#ifndef IRBASEVIEW_H
#define IRBASEVIEW_H
+#include <QFlags>
#include <hbview.h>
#include <hbmessagebox.h>
@@ -32,13 +33,6 @@
class IRQFavoritesDB;
class IRQSettings;
-enum TViewFlag
-{
- EViewFlag_None = 0,
- EViewFlag_UnStackable = 0x01,
- EViewFlag_ClearStackWhenActivate = 0x02
-};
-
class IRBaseView : public HbView
{
public:
@@ -49,8 +43,17 @@
virtual void launchAction();
virtual void updateView();
- void setFlag(int aFlag);
- int flag() const;
+ enum TViewFlag
+ {
+ EViewFlag_UnStackable = 0x01,
+ EViewFlag_ClearStackWhenActivate = 0x02,
+ EViewFlag_StickyViewEnabled = 0x04,
+ };
+ Q_DECLARE_FLAGS(TViewFlags, TViewFlag)
+
+ void setFlag(TViewFlags aFlag);
+ void clearFlag(TViewFlag aFlag);
+ bool testFlag(TViewFlag aFlag) const;
void setUseNetworkReason(TIRUseNetworkReason aReason);
@@ -80,11 +83,13 @@
IRQSettings *iSettings;
IRDocumentLoader iLoader;
-private:
+private:
+ TViewFlags iFlags;
TIRViewId iViewId;
- int iFlag;
TIRUseNetworkReason iUseNetworkReason;
bool iInitCompleted;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(IRBaseView::TViewFlags)
+
#endif
--- a/qtinternetradio/ui/inc/ircategoryview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/ircategoryview.h Thu Jul 22 16:31:41 2010 +0100
@@ -22,7 +22,6 @@
#include "irqisdsclient.h"
class IRCategoryModel;
-class HbProgressDialog;
class IRCategoryView : public IrAbstractListViewBase
{
@@ -61,8 +60,6 @@
void storeCurrentItem();
void handleItemSelected();
- void createWaitDialog(const QString &aText);
-
void connectToIsdsClient();
void disconnectIsdsClient();
@@ -71,8 +68,10 @@
void normalInit();
+ void initToolBar();
+
+
private:
- HbProgressDialog *iWaitDialog;
int iLastSelectItem;
IRCategoryModel *iModel;
QString iLoadedSection;
--- a/qtinternetradio/ui/inc/irchannelmodel.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irchannelmodel.h Thu Jul 22 16:31:41 2010 +0100
@@ -22,6 +22,7 @@
class HbIcon;
class IRQChannelItem;
+class IRSearchResultDB;
class IrChannelModel : public QAbstractListModel
{
@@ -35,7 +36,11 @@
QVariant data(const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
QString imageUrl(int aRow);
void setLogo(HbIcon *aIcon, int aIndex);
-
+ void initWithCache();
+ void save2Cache();
+ //not take ownership
+ IRQChannelItem * getChannelItemByIndex(int aIndex);
+ void cleanupDatabase();
void clearAndDestroyLogos();
public slots:
@@ -51,6 +56,7 @@
QList<IRQChannelItem*> *iChannelList;
QMap<int, HbIcon*> iLogos;
HbIcon *iStationLogo;
+ IRSearchResultDB *iDB;
};
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/inc/ircontrolservice.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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 IRCONTROLSERVICE_H
+#define IRCONTROLSERVICE_H
+
+// System includes
+#include <QObject>
+#include <xqserviceprovider.h>
+
+// User includes
+#include "irservicedef.h"
+
+// Forward declarations
+class IRApplication;
+
+class IrControlService : public XQServiceProvider
+{
+ Q_OBJECT
+
+public:
+ explicit IrControlService(IRApplication *aIrApp, QObject *aParent = 0);
+ virtual ~IrControlService();
+
+public slots:
+ int handleCmd(int aCmdId); // service interface, called via Qt Highway
+
+private:
+ IrServiceResult::Type handleLaunchNowPlayingViewCmd();
+ IrServiceResult::Type handleLaunchNormallyCmd();
+ IrServiceResult::Type handlePlayCmd();
+ IrServiceResult::Type handleStopCmd();
+ IrServiceResult::Type handleCancelCmd();
+
+private:
+ IRApplication *mIrApp;
+
+ Q_DISABLE_COPY(IrControlService)
+
+};
+
+#endif // IRCONTROLSERVICE_H
--- a/qtinternetradio/ui/inc/irfavoritesmodel.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irfavoritesmodel.h Thu Jul 22 16:31:41 2010 +0100
@@ -39,11 +39,15 @@
int rowCount(const QModelIndex &aParent = QModelIndex()) const;
QVariant data(const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
void setLogo(HbIcon *aIcon, int aIndex);
+ bool isLogoReady(int aIndex) const;
bool checkFavoritesUpdate();
void clearFavoriteDB();
void clearAndDestroyLogos();
- bool deleteOneFavorite(int aIndex);
+ bool deleteOneFavorite(int aIndex);
+ bool deleteMultiFavorites(const QModelIndexList &aIndexList);
+
+ void updateFavoriteName(int aIndex, const QString &aNewName);
signals:
void modelChanged();
--- a/qtinternetradio/ui/inc/irfavoritesview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irfavoritesview.h Thu Jul 22 16:31:41 2010 +0100
@@ -20,7 +20,9 @@
#include "irabstractlistviewbase.h"
#include "irqevent.h"
+class HbSelectionDialog;
class IRFavoritesModel;
+class IRStationShare;
class IRQPreset;
class IRFavoritesView : public IrAbstractListViewBase
@@ -37,16 +39,22 @@
TIRHandleResult handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason);
private slots:
- void clearAllFavorites();
+ void deleteFavorites();
void networkRequestNotified(IRQNetworkEvent aEvent);
void convertAnother();
void presetLogoDownload(IRQPreset* aPreset);
void presetLogoDownloadError();
void modelChanged();
void actionClicked(HbAction *aAction);
+ void renameConfirmed(HbAction *aAction);
+ void deleteDialogClosed(HbAction *aAction);
private:
//from IrAbstractListViewBase
+#ifdef HS_WIDGET_ENABLED
+ void itemAboutToBeSelected(bool &aNeedNetwork);
+#endif
+
void setCheckedAction();
void handleItemSelected();
void prepareMenu();
@@ -55,6 +63,7 @@
void deleteContextAction();
void renameContextAction();
void detailsContextAction();
+ void updateIconIndexArray();
//from base view
void listViewLongPressed(HbAbstractViewItem *aItem, const QPointF& aCoords);
@@ -67,8 +76,10 @@
private:
+ IRStationShare *iStationShare;
IRFavoritesModel *iModel;
- HbAction *iClearFavoriteAction;
+ HbSelectionDialog *iMultiDeleteDialog;
+ HbAction *iMultiDeleteAction;
//the following are used to support the img
QList<int> iIconIndexArray;
IRQPreset *iLogoPreset;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/inc/irfileviewservice.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* 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 IRFILEVIEWSERVICE_H_
+#define IRFILEVIEWSERVICE_H_
+
+#include <xqserviceprovider.h>
+
+class XQSharableFile;
+class IRPlayList;
+class IRApplication;
+
+class IRFileViewService : public XQServiceProvider
+{
+ Q_OBJECT
+
+public:
+ IRFileViewService(IRApplication *aApplication);
+ ~IRFileViewService();
+ IRPlayList* getPlayList() const;
+
+public slots:
+ void view(const QString &aFileName);
+ void view(const XQSharableFile &aSharableFile);
+
+private:
+ IRApplication *iApplication;
+ IRPlayList *iPlayList;
+
+ Q_DISABLE_COPY(IRFileViewService)
+};
+
+#endif /* IRFILEVIEWSERVICE_H_ */
--- a/qtinternetradio/ui/inc/irhistoryview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irhistoryview.h Thu Jul 22 16:31:41 2010 +0100
@@ -38,20 +38,16 @@
TIRHandleResult handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason);
private slots:
- void clearAllList();
- void presetResponse(IRQPreset *aPreset);
- void operationException(IRQError aError);
+ void clearAllList(HbAction *aAction);
void networkRequestNotified(IRQNetworkEvent aEvent);
- void cancelRequest();
//to start the convertion asynchronously
void convertAnother();
void presetLogoDownload(IRQPreset* aPreset);
void presetLogoDownloadError();
void modelChanged();
- void gotoSongHistory();
void actionClicked(HbAction *aAction);
-
+ void popupClearHistoryConfirmMessageBox();
private:
void showHistory();
void handleItemSelected();
@@ -59,11 +55,14 @@
//from IrAbstractListViewBase
void prepareMenu();
+#ifdef HS_WIDGET_ENABLED
+ void itemAboutToBeSelected(bool &aNeedNetwork);
+#endif
void startConvert(int aIndex);
void convertStationHistory2Preset(const IRQSongHistoryInfo& aHistoryInfo, IRQPreset& aPreset);
void addContextAction();
void deleteContextAction();
- void detailContextAction();
+ void detailsContextAction();
private:
IRHistoryModel *iModel;
--- a/qtinternetradio/ui/inc/irmainview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irmainview.h Thu Jul 22 16:31:41 2010 +0100
@@ -40,6 +40,9 @@
void networkRequestNotified(IRQNetworkEvent aEvent);
private:
+ //from base class IRBaseView
+ TIRHandleResult handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason);
+
//from base class IrAbstractListViewBase
void handleItemSelected();
@@ -52,6 +55,10 @@
void lazyInit();
+ void normalInit();
+
+ void initToolBar();
+
private:
IRMainModel *iMainModel;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/inc/irmonitorservice.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,92 @@
+/*
+* 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 IRMONITORSERVICE_H
+#define IRMONITORSERVICE_H
+
+// System includes
+#include <QObject>
+#include <QList>
+#include <xqserviceprovider.h>
+
+// User includes
+#include "irservicedef.h"
+#include "irservicedata.h"
+
+// Forward declarations
+class IRApplication;
+class IRPlayController;
+class IRQMetaData;
+
+class IrMonitorService : public XQServiceProvider
+{
+ Q_OBJECT
+
+public:
+ explicit IrMonitorService(IRApplication *aIrApp, QObject *aParent = 0);
+ virtual ~IrMonitorService();
+
+public slots:
+ void registerNotifications(); // service interface, called via Qt Highway
+ void refreshAllData(); // service interface, called via Qt Highway
+
+private slots:
+ // slots for station logo update
+ void handleStationLogoUpdated(bool aLogoAvailable);
+
+ // slots for play controller
+ void handleLoadingStarted(const QString &aStationName);
+ void handleLoadingCancelled(const QString &aStationName);
+ void handlePlayStarted();
+ void handlePlayStopped();
+ void updateMetaData(IRQMetaData* aMetaData);
+
+public:
+ enum ReadyItem
+ {
+ StationName = 0x01,
+ StationLogo = 0x02,
+ MetaData = 0x04,
+ IrState = 0x08
+ };
+ Q_DECLARE_FLAGS(ReadyItems, ReadyItem)
+
+private:
+ void setupConnection();
+
+ void notifyAll();
+ bool notifyList(const IrServiceDataList &aDataList);
+
+private:
+ ReadyItems mReadyItems;
+ QString mStationName;
+ bool mStationLogoAvailable; // true if station has its own logo
+ QString mMetaData;
+ IrAppState::Type mIrState;
+
+ IRApplication *mIrApp;
+ IRPlayController *mPlayController;
+
+ QList<int> mRequestList; // used to maintain the async request
+
+ Q_DISABLE_COPY(IrMonitorService)
+
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(IrMonitorService::ReadyItems)
+
+#endif // IRMONITORSERVICE_H
--- a/qtinternetradio/ui/inc/irnowplayingview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irnowplayingview.h Thu Jul 22 16:31:41 2010 +0100
@@ -23,8 +23,8 @@
class HbAction;
class IRQPreset;
class IRQStatisticsReporter;
-class IRQNetworkController;
class IRQMetaData;
+class IRStationShare;
class HbLabel;
/**
@@ -94,8 +94,9 @@
void updateMusicStoreStatus();
void updateForLauchAction();
- void updateStationLogo();
-
+ void updateStationLogo();
+ void loadStationLogo();
+
void lazyInit();
void normalInit();
@@ -106,7 +107,7 @@
private:
IRQStatisticsReporter *iStatisticsReporter;
- IRQNetworkController *iNetworkController;
+ IRStationShare *iStationShare;
// tool bar actions
HbAction *iPlayStopAction;
--- a/qtinternetradio/ui/inc/irplaycontroller.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irplaycontroller.h Thu Jul 22 16:31:41 2010 +0100
@@ -22,14 +22,13 @@
#include "irqenums.h"
-class HbProgressDialog;
class IRApplication;
class IRQMediaPlayer;
class IRQPreset;
class IRQMetaData;
class IRQSongHistoryEngine;
class IRQStatisticsReporter;
-
+class HbMessageBox;
/**
* This class is a wrapper for IRQMediaPlayer.
*/
@@ -38,33 +37,65 @@
{
Q_OBJECT
+
+public slots:
+ // slots connected with own functions
+ void cancelBuffering();
+
public:
explicit IRPlayController(IRApplication* aApplication);
~IRPlayController();
+#ifdef HS_WIDGET_ENABLED
+ // MUST be called before prepare the network for playback
+ // i.e., called before IRApplication::verifyNetworkConnectivity
+ void setConnectingStationName(const QString &aStationName, bool aForceConnecting = false);
+ QString getConnectingStationName() const;
+
+ // used when nowplaying view is the starting view, to reload preset to the player
+ // because by default, the player will load the last played station preset into it
+ // But when nowplaying view as starting view due to open pls with only one url,
+ // should reload the preset from pls file
+ void reloadNowplayingPreset(IRQPreset *aPreset, bool aIsLogoAvailable, IRQConnectedFrom aConnectedFrom);
+#endif
// Play a station
void connectToChannel(IRQPreset *aPreset, IRQConnectedFrom aConnectedFrom);
- // Create a buffering dialog
- void createBufferingDialog(const QObject *aReceiver, const char *aFunc);
-
- // Close the buffering dialog
- void closeBufferingDialog();
-
+ void emitStationLogoUpdated(bool aIsLogoAvailable);
+ bool isStationLogoAvailable() const;
+
// Play control methods
void resume();
void stop(IRQTerminatedType aStopReason);
int getVolume() const;
void setVolume(int aVolume);
- void enableStereo();
- void disableStereo();
+ enum EPlayState
+ {
+ //initial state, never ever played station
+ EIdle = 0,
+ //a station has been stopped
+ EStopped,
+#ifdef HS_WIDGET_ENABLED
+ //connecting network
+ EConnecting,
+#endif
+ //stream buffering
+ EBuffering,
+ //playing
+ EPlaying
+ };
+ EPlayState state() const;
+
// Check the playing status
bool isPlaying() const;
- // Check the playing status
+ // Check the stopped status
bool isStopped() const;
+ // Check the idle status
+ bool isIdle() const;
+
// Get the preset of now playing
IRQPreset * getNowPlayingPreset() const;
@@ -90,8 +121,21 @@
// emitted when playing stopped
void playingStopped();
- // emitted when logo needs to update
- void initializeLogo();
+#ifdef HS_WIDGET_ENABLED
+ // emitted when loading(connecting) started
+ void connectingStarted(const QString &aStationName);
+
+ // emitted when buffering started
+ void bufferingStarted(const QString &aStationName);
+
+ // emitted when connecting is cancelled
+ void connectingCancelled(const QString &aStationName);
+
+ // emitted when buffering is cancelled
+ void bufferingCancelled(const QString &aStationName);
+
+ void stationLogoUpdated(bool aIsDefaultLogo);
+#endif
private slots:
// slots connected with IRQMediaPlayer
@@ -101,13 +145,18 @@
void fetchVolume(int &aVolume);
void handleMetaDataReceived(IRQMetaData& aIRmetaData);
- // slots connected with own functions
- void cancelBuffering();
+ // slots connected with own functions
void handleError();
private:
- void createNote(const QString &aNote = hbTrId("txt_irad_info_failed_to_connect"));
+#ifdef SUBTITLE_STR_BY_LOCID
+ void popupNote(const QString &aNote = hbTrId("txt_irad_info_failed_to_connect"));
+#else
+ void popupNote(const QString &aNote = hbTrId("Connecting failed"));
+#endif
void connectSignalSlot();
+
+ QString getFirstTryUrl(IRQPreset *aPreset);
// Play next URL if the previous failed to connect.
bool playNextUrl();
@@ -122,29 +171,32 @@
IRQMediaPlayer *iMediaPlayer;
IRQStatisticsReporter *iStatisticsReporter;
- IRQConnectedFrom iConnectedFrom;
bool iGetServerResult;
+
+#ifdef HS_WIDGET_ENABLED
+ QString iConnectingStationName; // used for home screen widget
+#endif
+
+ IRQPreset *iNowPlayingPreset;
+ IRQPreset *iNowPlayingPresetBackup;
- HbProgressDialog *iBufferingDialog;
- IRQPreset *iNowPlayingPreset;
- // reference of IRQMediaPlayer meta data
+ QString iLastPlayedUrl;
+ QString iLastPlayedUrlBackup;
+
+ IRQConnectedFrom iConnectedFrom;
+ IRQConnectedFrom iConnectedFromBackup;
+
+ bool iStationLogoAvailable;
+ bool iStationLogoAvailableBackup;
+
+ // reference of IRQMediaPlayer meta data
IRQMetaData *iMetaData;
IRQSongHistoryEngine *iSongHistoryEngine;
- enum EPlayState
- {
- //initial state
- EIdle = 0,
- //a station has been stopped
- EStopped,
- //connecting station and buffering
- EBuffering,
- //playing
- EPlaying
- };
-
EPlayState iPlayState;
- // If resuming the last played url fails, connect to all the preset.
+
+ // If resuming the last played url fails, reset the player to init state
+ // i.e., call connectToChannel() once again.
bool iResuming;
// variants for play next URL
@@ -157,17 +209,15 @@
// the URLs of a specific bitrate
QList<QString> *iUrlArray;
-#ifdef Q_CC_NOKIAX86
- QString iLastPlayedChannelName;
-#endif
-
// the bitrate from real station feedback.
int iRealBitrate;
- QString iLastPlayedUrl;
+
// To handle error async
IRQError iLastError;
IRQTerminatedType iStopReason;
+
+ HbMessageBox *iErrorNote;
};
#endif //IRPLAYCONTROLLER_H
--- a/qtinternetradio/ui/inc/irplsview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irplsview.h Thu Jul 22 16:31:41 2010 +0100
@@ -39,6 +39,9 @@
private:
//from base class IrAbstractListViewBase
+#ifdef HS_WIDGET_ENABLED
+ void itemAboutToBeSelected(bool &aNeedNetwork);
+#endif
void handleItemSelected();
void listViewLongPressed(HbAbstractViewItem *aItem, const QPointF &aCoords);
void launchAction();
--- a/qtinternetradio/ui/inc/irsearchchannelsview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irsearchchannelsview.h Thu Jul 22 16:31:41 2010 +0100
@@ -20,13 +20,11 @@
#include "irqevent.h"
#include "irbaseview.h"
#include "irqenums.h"
-
-
+
class HbListView;
class HbSearchPanel;
class HbAction;
-class IrChannelModel;
-class HbProgressDialog;
+class IrChannelModel;
class IRQPreset;
class QTimer;
@@ -50,15 +48,10 @@
void connectIsdsClient();
void disconnectIsdsClient();
- void switch2SearchingState();
- void switch2InitState();
- void switch2SearchedState();
- void startSearchingAnimation();
- void stopSearchingAnimation();
- void loadLayout();
- void handleItemSelected();
- void createSearchingDialog();
- void closeSearchingDialog();
+ void switch2LoadingState();
+ void switch2InitState();
+ void loadLayout();
+ void handleItemSelected();
void normalInit();
void initMenu();
void lazyInit();
@@ -79,16 +72,17 @@
void convertAnother();
void presetLogoDownload(IRQPreset* aPreset);
void presetLogoDownloadError();
-
+public slots:
+ //this slot is used to back to previouse view or minimize the search widget
+ void minimizeSearchPanel();
private: // members
enum IRQSearchState
{
ESearch_init = 0,
- ESearch_Searching,
- ESearch_Searched
+ ESearch_Loading //loading means searching or buffering.
};
HbListView *iListView;
@@ -98,7 +92,6 @@
HbSearchPanel *iSearchPanelWidget;
IRQSearchState iSearchState;
IrChannelModel *iChannelModel;
- HbProgressDialog *iSearchingDialog;
//the object is created by IsdsClient, but application is responsible for free
IRQPreset *iPreset;
IRQPreset *iLogoPreset;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/inc/irsearchresultdb.h Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,45 @@
+/*
+* 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 IRSEARCHRESULTDB_H
+#define IRSEARCHRESULTDB_H
+
+#include "irqenums.h"
+
+class QSqlDatabase;
+class IRQChannelItem;
+
+class IRSearchResultDB
+{
+public:
+
+ IRSearchResultDB();
+ ~IRSearchResultDB();
+
+ //not take ownership
+ IRQError cacheChannelList(QList<IRQChannelItem*> *aChannelList);
+ //caller needs to release the memory
+ QList<IRQChannelItem*> * getCahcedChannelList();
+ IRQError clearCache();
+
+private:
+ void createDBConnection();
+
+private:
+ QSqlDatabase *iDB;
+};
+#endif//IRSEARCHRESULTDB_H
--- a/qtinternetradio/ui/inc/irsettingsview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irsettingsview.h Thu Jul 22 16:31:41 2010 +0100
@@ -35,17 +35,15 @@
IRSettingsView(IRApplication *aApplication, TIRViewId aViewId);
private slots:
- void preferredQualitySelected(int aIndex);
+ void toggleChange(QModelIndex aStartIn, QModelIndex aEndIn);
private:
void initView();
- void setNetworkChooseList();
void setPreferredQuality();
private:
HbDataForm *iForm;
HbDataFormModel *iModel;
- QStringList iPreferredQuality;
friend class IRViewManager;
};
--- a/qtinternetradio/ui/inc/irsonghistorymodel.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irsonghistorymodel.h Thu Jul 22 16:31:41 2010 +0100
@@ -35,10 +35,10 @@
QVariant data(const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
IRQSongInfo* getSongHistoryInfo(int aIndex);
- void clearAllList();
+ void clearList();
bool checkSongHistoryUpdate();
- void clearHisotrySongDB();
void setOrientation(Qt::Orientation aOrientation);
+ bool deleteOneItem(int aIndex);
signals:
void modelChanged();
--- a/qtinternetradio/ui/inc/irsonghistoryview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irsonghistoryview.h Thu Jul 22 16:31:41 2010 +0100
@@ -43,10 +43,12 @@
private slots:
void modelChanged();
void newMetadataAdded(IRQMetaData * aMetadata);
- void clearHisotrySongDB();
+ void popupClearHistoryConfirmMessageBox();
+ void clearList(HbAction *aAction);
void showPrompt();
void gotoStationHistory();
void handleOrientationChanged(Qt::Orientation aOrientation);
+ void actionClicked(HbAction *aAction);
private:
void showSongHistory();
@@ -54,6 +56,9 @@
//from IrAbstractListViewBase
void prepareMenu();
void itemAboutToBeSelected(bool& needNetwork);
+ void listViewLongPressed(HbAbstractViewItem *aItem, const QPointF& aCoords);
+ void searchInMusicStoreContextAction();
+ void deleteContextAction();
private:
IRSongHistoryModel *iModel;
--- a/qtinternetradio/ui/inc/irstationdetailsview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irstationdetailsview.h Thu Jul 22 16:31:41 2010 +0100
@@ -34,7 +34,7 @@
public:
~IRStationDetailsView();
void setDetails();
- void setDetails(IRQSongHistoryInfo *aCurChannelInfo);
+ void setDetails(IRQPreset * aPreset);
protected:
IRStationDetailsView(IRApplication* aApplication, TIRViewId aViewId);
--- a/qtinternetradio/ui/inc/irstationshare.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irstationshare.h Thu Jul 22 16:31:41 2010 +0100
@@ -21,6 +21,7 @@
#include <QString>
#include <QList>
+class ShareUi;
class IRQPreset;
class IRStationShare
@@ -41,7 +42,8 @@
bool constructPlsFile(const IRQPreset &aPreset);
private:
- QString iPlsFilePath;
+ QString iPlsFilePath;
+ ShareUi *iShareDialog;
};
#endif // IRSTATIONSHARE_H_
--- a/qtinternetradio/ui/inc/irstationsview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irstationsview.h Thu Jul 22 16:31:41 2010 +0100
@@ -24,7 +24,6 @@
class IRQPreset;
class IrChannelModel;
class QTimer;
-class HbProgressDialog;
class IRStationsView : public IrAbstractListViewBase
{
@@ -35,18 +34,15 @@
void loadCategoryStations(int aIndex, const QString &aHeadingText);
- void loadPopularStations(bool aShowWaitDialog);
-
- void loadSearchResult(const QString &aStr);
-
protected:
IRStationsView(IRApplication* aApplication, TIRViewId aViewId);
//from base class IRBaseView
TIRHandleResult handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason);
-
- //from base class IRBaseView
- void launchAction();
+#ifdef HS_WIDGET_ENABLED
+ //from IrAbstractListViewBase
+ void itemAboutToBeSelected(bool &aNeedNetwork);
+#endif
private slots:
void presetResponse(IRQPreset *aPreset);
@@ -82,14 +78,10 @@
void disconnectIsdsClient();
- void createWaitDialog(const QString &aStr);
-
private:
IRQPreset *iLogoPreset;
IRQPreset *iPreset; //the object is created by IsdsClient, but application is responsible for free
- HbProgressDialog *iWaitDialog;
int iLastSelectitem;
- int iLastPopularItem;
//the following are used to support the img
QList<int> iIconIndexArray;
--- a/qtinternetradio/ui/inc/irtermsconsview.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irtermsconsview.h Thu Jul 22 16:31:41 2010 +0100
@@ -22,13 +22,17 @@
class IRTermsConsView : public IRBaseView
{
-
+ Q_OBJECT
+
public:
~IRTermsConsView();
private:
IRTermsConsView(IRApplication* aApplication, TIRViewId aViewId);
+private slots:
+ void handleOrientationChanged( Qt::Orientation aOrientation );
+
private:
void initViewContents();
--- a/qtinternetradio/ui/inc/iruidefines.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/iruidefines.h Thu Jul 22 16:31:41 2010 +0100
@@ -33,6 +33,11 @@
static const char* SETTINGS_ACTION = "setting_act";
static const char* GO_TO_STATION_ACTION = "go2station_act";
static const char* OBJECT_TOOLBAR = "toolbar";
+static const char* VIEW_CONTAINER = "container";
+
+// Common Sections
+static const char* PORTRAIT_SEC = "prt_section";
+static const char* LANDSCAPE_SEC = "lsc_section";
// IrAbstractListViewBase -- Object Name
@@ -62,11 +67,10 @@
static const char* OPEN_WEB_ADDRESS_VIEW_OBJECT_PLAY_BUTTON = "playButton";
// SearchView -- Object Name
-static const char* SEARCH_CHANNELS_VIEW_OBJECT_VIEW = "ext-IRSearchChannelsView";
-static const char* SEARCH_CHANNELS_VIEW_NO_LISTVIEW_SECTION = "section_without_listview";
-static const char* SEARCH_CHANNELS_VIEW_LISTVIEW_SECTION = "section_with_listview";
+static const char* SEARCH_CHANNELS_VIEW_OBJECT_VIEW = "ext-IRSearchChannelsView";
static const char* SEARCH_CHANNELS_VIEW_SEARCHPANEL_WIDGET = "search_panel";
static const char* SEARCH_CHANNELS_VIEW_SEARCHLISTVIEW_WIDGET = "search_listview";
+
// IRNowplayingView -- Object Name
static const char* NOW_PLAYING_VIEW_OBJECT_NAME = "ext-nowplayingview";
@@ -85,8 +89,6 @@
static const char* NOW_PLAYING_VIEW_OBJECT_ADVERTISEMENT_IMAGE = "advertisementImage";
#endif
// IRNowplayingView -- section
-static const char* NOW_PLAYING_VIEW_PRT_SEC = "prt_section";
-static const char* NOW_PLAYING_VIEW_LSC_SEC = "lsc_section";
static const char* NOW_PLAYING_VIEW_SONG_RECOG_YES_SEC = "song_recog_yes_section";
static const char* NOW_PLAYING_VIEW_SONG_RECOG_NO_SEC = "song_recog_no_section";
@@ -106,7 +108,10 @@
// IRTermsConsView -- Object Name
static const char* TERMS_CONS_VIEW_BASE_OBJECT_VIEW = "ext-IRTermsConsView";
// IRTermsConsView -- widget
-static const char* TERMS_CONS_VIEW_ACCEPT_BTN = "accept_btn";
-static const char* TERMS_CONS_VIEW_DENY_BTN = "deny_btn";
+static const char* TERMS_CONS_VIEW_ACCEPT_BTN = "accept_btn";
+static const char* TERMS_CONS_VIEW_DECLINE_BTN = "decline_btn";
+static const char* TERMS_CONS_VIEW_TEXT_EDIT = "text_edit";
+
+#define LOADING_ANIMATION_ICON_SIZE 50
#endif /* IRUIDEFINES_H_ */
--- a/qtinternetradio/ui/inc/irviewmanager.h Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/inc/irviewmanager.h Thu Jul 22 16:31:41 2010 +0100
@@ -26,6 +26,14 @@
class IRBaseView;
class QTimer;
+class ActivityInformation
+{
+public:
+ QPixmap screenShot;
+ QString activityId;
+ TIRViewId viewId;
+};
+
class IRViewManager : public HbMainWindow
{
Q_OBJECT
@@ -35,6 +43,7 @@
void setApplication(IRApplication *aApplication);
IRBaseView* getView(TIRViewId aViewId, bool aCreateIfNotExist = false);
+ TIRViewId getExitingView();
bool isViewInStack(TIRViewId aViewId) const;
@@ -48,6 +57,12 @@
bool isExiting() const;
+ void saveScreenShot();
+
+ void saveActivity();
+
+ void removeActivity();
+
public slots:
void backToPreviousView();
@@ -62,7 +77,8 @@
void handleCurrentViewChanged(HbView *aView);
void crossLineReset();
void exitTimeout();
-
+ void handleSaveScreenShot();
+
private:
void backToView(TIRViewId aViewId);
IRBaseView* createView(IRApplication* aApplication, TIRViewId aViewId);
@@ -72,7 +88,8 @@
bool readyToQuit();
void switchToNextView(IRBaseView *aView);
-
+ void backupActivity();
+
private:
IRApplication* iApplication;
QStack<IRBaseView*> iViewStack;
@@ -92,6 +109,8 @@
QTimer *iExitTimer;
bool iExiting;
+ QMap<TIRViewId, QPixmap> iScreenShots;
+ ActivityInformation iActivityBackup;
};
#endif
--- a/qtinternetradio/ui/resources/layout/abstractlistviewbase.docml Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/resources/layout/abstractlistviewbase.docml Thu Jul 22 16:31:41 2010 +0100
@@ -4,7 +4,7 @@
<string locid="txt_irad_opt_go_to_station" name="text"/>
</object>
<object name="setting_act" type="HbAction">
- <string locid="txt_irad_opt_network_setting" name="text"/>
+ <string locid="txt_common_opt_settings" name="text"/>
</object>
<object name="exit_act" type="HbAction">
<string locid="txt_common_opt_exit" name="text"/>
@@ -93,9 +93,6 @@
</widget>
</section>
<section name="section_no_toolbar_with_heading">
- <widget name="ext-IrAbstractListViewBase" type="HbView">
- <widget name="viewToolbar_empty" role="HbView:toolBar" type="HbToolBar"/>
- </widget>
<widget name="headingText" type="HbGroupBox">
<sizehint height="expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical))" type="PREFERRED"/>
<sizehint height="expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical))" type="MINIMUM"/>
@@ -104,21 +101,12 @@
</widget>
</section>
<section name="section_with_toolbar_no_heading">
- <widget name="ext-IrAbstractListViewBase" type="HbView">
- <widget name="toolbar" role="HbView:toolBar" type="HbToolBar">
- <enums name="orientation" value="Horizontal"/>
- <ref object="genres" role="HbToolBar:addAction"/>
- <ref object="collections" role="HbToolBar:addAction"/>
- <ref object="favorites" role="HbToolBar:addAction"/>
- <ref object="search" role="HbToolBar:addAction"/>
- </widget>
- </widget>
<widget name="headingText" type="HbGroupBox">
<sizehint height="0un" type="PREFERRED"/>
<sizehint height="0un" type="MAXIMUM"/>
<bool name="visible" value="FALSE"/>
</widget>
- </section>
+ </section>
<metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="with_playingbanner" sections="#common section_with_playingbanner"/>
--- a/qtinternetradio/ui/resources/layout/nowplayingview.docml Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/resources/layout/nowplayingview.docml Thu Jul 22 16:31:41 2010 +0100
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
<object name="go2station_act" type="HbAction">
<string locid="txt_irad_opt_go_to_station" name="text"/>
</object>
<object name="share_station_act" type="HbAction">
- <string locid="txt_irad_opt_share_station" name="text"/>
+ <string locid="txt_irad_opt_share" name="text"/>
</object>
<object name="songrecg_act" type="HbAction">
<string locid="txt_irad_opt_identify_song" name="text"/>
@@ -61,33 +61,27 @@
<linearitem itemname="station_name"/>
</layout>
</widget>
- <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
- <enums name="orientation" value="Horizontal"/>
- <ref object="musicstore_act" role="HbToolBar:addAction"/>
- <ref object="play_stop_act" role="HbToolBar:addAction"/>
- <ref object="add_2_fav_act" role="HbToolBar:addAction"/>
- <ref object="detail_act" role="HbToolBar:addAction"/>
- </widget>
+ <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar"/>
<string locid="txt_irad_title_internet_radio" name="title"/>
</widget>
<section name="song_recog_yes_section">
<widget name="ext-nowplayingview" type="HbView">
<widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <ref object="songrecg_act" role="HbMenu:addAction"/>
- <ref object="go2station_act" role="HbMenu:addAction"/>
- <ref object="share_station_act" role="HbMenu:addAction"/>
- <ref object="setting_act" role="HbMenu:addAction"/>
- <ref object="exit_act" role="HbMenu:addAction"/>
+ <ref object="songrecg_act" role="HbWidget:addAction"/>
+ <ref object="go2station_act" role="HbWidget:addAction"/>
+ <ref object="share_station_act" role="HbWidget:addAction"/>
+ <ref object="setting_act" role="HbWidget:addAction"/>
+ <ref object="exit_act" role="HbWidget:addAction"/>
</widget>
</widget>
</section>
<section name="song_recog_no_section">
<widget name="ext-nowplayingview" type="HbView">
<widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <ref object="go2station_act" role="HbMenu:addAction"/>
- <ref object="share_station_act" role="HbMenu:addAction"/>
- <ref object="setting_act" role="HbMenu:addAction"/>
- <ref object="exit_act" role="HbMenu:addAction"/>
+ <ref object="go2station_act" role="HbWidget:addAction"/>
+ <ref object="share_station_act" role="HbWidget:addAction"/>
+ <ref object="setting_act" role="HbWidget:addAction"/>
+ <ref object="exit_act" role="HbWidget:addAction"/>
</widget>
</widget>
</section>
@@ -96,7 +90,9 @@
<widget name="station_logo" type="HbLabel">
<enums name="alignment" value="AlignVCenter|AlignHCenter"/>
<sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
- <sizehint height="30un" type="FIXED" width="30un"/>
+ <sizehint height="38un" type="FIXED" width="38un"/>
+ <sizehint height="38un" type="MAXIMUM" width="38un"/>
+ <sizehint height="38un" type="MINIMUM" width="38un"/>
</widget>
<contentsmargins bottom="var(hb-param-margin-gene-screen)" left="var(hb-param-margin-gene-screen)" right="var(hb-param-margin-gene-screen)" top="var(hb-param-margin-gene-screen)"/>
<layout type="anchor">
@@ -106,10 +102,10 @@
<anchoritem dst="song_name" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="song_name" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-horizontal)" src="artist_name" srcEdge="BOTTOM"/>
<anchoritem dst="song_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="station_logo" dstEdge="TOP" spacing="12un" src="" srcEdge="TOP"/>
+ <anchoritem dst="station_logo" dstEdge="TOP" spacing="5un" src="" srcEdge="TOP"/>
<anchoritem dst="station_logo" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
<anchoritem dst="artist_name" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="artist_name" dstEdge="TOP" spacing="8un" src="station_logo" srcEdge="BOTTOM"/>
+ <anchoritem dst="artist_name" dstEdge="TOP" spacing="4un" src="station_logo" srcEdge="BOTTOM"/>
<anchoritem dst="artist_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
</layout>
</widget>
@@ -118,26 +114,28 @@
<widget name="container" role="HbView:widget" type="HbWidget">
<widget name="station_logo" type="HbLabel">
<enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
- <sizehint height="20un" type="PREFERRED" width="20un"/>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="20un" type="FIXED" width="20un"/>
+ <sizehint height="20un" type="MINIMUM" width="20un"/>
+ <sizehint height="20un" type="MAXIMUM" width="20un"/>
</widget>
<contentsmargins bottom="var(hb-param-margin-gene-screen)" left="var(hb-param-margin-gene-screen)" right="var(hb-param-margin-gene-screen)" top="var(hb-param-margin-gene-screen)"/>
<layout type="anchor">
- <anchoritem dst="artist_name" dstEdge="LEFT" spacing="6un" src="station_logo" srcEdge="RIGHT"/>
- <anchoritem dst="artist_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="artist_name" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="TOP"/>
- <anchoritem dst="song_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="song_name" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
- <anchoritem dst="song_name" dstEdge="LEFT" spacing="6un" src="station_logo" srcEdge="RIGHT"/>
- <anchoritem dst="station_name" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="BOTTOM"/>
- <anchoritem dst="station_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="station_name" dstEdge="LEFT" spacing="6un" src="station_logo" srcEdge="RIGHT"/>
<anchoritem dst="station_logo" dstEdge="LEFT" spacing="5un" src="" srcEdge="LEFT"/>
<anchoritem dst="station_logo" dstEdge="TOP" spacing="5un" src="" srcEdge="TOP"/>
+ <anchoritem dst="song_name" dstEdge="LEFT" spacing="5un" src="station_logo" srcEdge="RIGHT"/>
+ <anchoritem dst="song_name" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="song_name" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
+ <anchoritem dst="artist_name" dstEdge="LEFT" spacing="5un" src="station_logo" srcEdge="RIGHT"/>
+ <anchoritem dst="artist_name" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="artist_name" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="TOP"/>
+ <anchoritem dst="station_name" dstEdge="LEFT" spacing="5un" src="station_logo" srcEdge="RIGHT"/>
+ <anchoritem dst="station_name" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="BOTTOM"/>
+ <anchoritem dst="station_name" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
</layout>
</widget>
</section>
- <metadata activeUIState="prt_ui" display="NHD portrait" unit="un">
+ <metadata activeUIState="prt_ui" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="prt_ui" sections="#common prt_section"/>
<uistate name="lsc_ui" sections="#common lsc_section"/>
--- a/qtinternetradio/ui/resources/layout/openwebaddressview.docml Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/resources/layout/openwebaddressview.docml Thu Jul 22 16:31:41 2010 +0100
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<hbdocument context="IROpenWebAddressView" version="0.9">
<object name="setting_act" type="HbAction">
- <string locid="txt_irad_opt_network_setting" name="text"/>
+ <string locid="txt_common_opt_settings" name="text"/>
</object>
<object name="exit_act" type="HbAction">
<string locid="txt_common_opt_exit" name="text"/>
--- a/qtinternetradio/ui/resources/layout/searchchannelsview.docml Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/resources/layout/searchchannelsview.docml Thu Jul 22 16:31:41 2010 +0100
@@ -1,46 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<hbdocument version="1.0">
+ <object name="exit_act" type="HbAction">
+ <string locid="txt_common_opt_exit" name="text"/>
+ </object>
<widget name="ext-IRSearchChannelsView" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
<widget name="search_listview" type="HbListView">
</widget>
+
<widget name="search_panel" type="HbSearchPanel">
<bool name="progressive" value="FALSE"/>
</widget>
+
<real name="z" value="0"/>
<layout orientation="Vertical" type="linear">
- <linearitem itemname="search_listview"/>
- <stretchitem stretchfactor="1"/>
- <linearitem itemname="search_panel"/>
- </layout>
- </widget>
- <string locid="txt_irad_title_internet_radio" name="title"/>
- </widget>
- <section name="section_without_listview">
- <widget name="search_listview" type="HbListView">
- <bool name="visible" value="FALSE"/>
- </widget>
- <widget name="content" role="HbView:widget" type="HbWidget">
- <layout orientation="Vertical" type="linear">
- <stretchitem stretchfactor="1"/>
- <linearitem itemname="search_panel"/>
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="search_listview" spacing="0un"/>
+ <linearitem itemname="search_panel" spacing="0un"/>
</layout>
</widget>
- </section>
- <section name="section_with_listview">
- <widget name="search_listview" type="HbListView">
- <bool name="visible" value="TRUE"/>
+ <widget name="view_menu" role="HbView:menu" type="HbMenu">
+ <ref object="exit_act" role="HbMenu:addAction"/>
</widget>
- <widget name="content" role="HbView:widget" type="HbWidget">
- <layout orientation="Vertical" type="linear">
- <linearitem itemname="search_listview"/>
- <stretchitem stretchfactor="1"/>
- <linearitem itemname="search_panel"/>
- </layout>
- </widget>
- </section>
+ <string locid="txt_irad_title_internet_radio" name="title"/>
+ </widget>
+
<metadata activeUIState="ui_state_listview" display="NHD portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
- <uistate name="ui_state_listview" sections="#common section_without_listview section_with_listview"/>
</metadata>
</hbdocument>
--- a/qtinternetradio/ui/resources/layout/termsconsview.docml Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/resources/layout/termsconsview.docml Thu Jul 22 16:31:41 2010 +0100
@@ -1,23 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
<widget name="ext-IRTermsConsView" type="HbView">
- <widget name="content" role="HbView:widget" type="HbWidget">
- <widget name="accept_btn" type="HbPushButton">
- <string name="text" value="Accept"/>
+ <widget name="container" role="HbView:widget" type="HbWidget">
+ <widget name="heading_text" type="HbGroupBox">
+ <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="expr((var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical)))" type="PREFERRED"/>
+ <bool name="collapsable" value="FALSE"/>
+ <string locid="txt_irad_terms_and_conditions" name="heading"/>
+ <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
</widget>
- <widget name="deny_btn" type="HbPushButton">
- <string name="text" value="Deny"/>
+ <widget name="text_edit" type="HbTextEdit">
+ <enums name="cursorVisibility" value="TextCursorHidden"/>
+ <string locid="txt_irad_terms_content" name="plainText"/>
+ <bool name="readOnly" value="TRUE"/>
+ <enums name="contextMenuFlags" value="ShowTextContextMenuOnSelectionClicked"/>
+ <fontspec name="fontSpec" role="Secondary" textheight="expr(var(hb-param-text-height-secondary) )"/>
+ </widget>
+ <widget name="accept_btn" type="HbPushButton">
+ <string locid="txt_irad_accept" name="text"/>
</widget>
- <layout orientation="Vertical" type="linear">
- <stretchitem stretchfactor="1"/>
+ <widget name="decline_btn" type="HbPushButton">
+ <string locid="txt_irad_decline" name="text"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="heading_text"/>
+ <linearitem itemname="text_edit"/>
<linearitem itemname="accept_btn"/>
- <linearitem itemname="deny_btn"/>
- <stretchitem stretchfactor="1"/>
+ <linearitem itemname="decline_btn"/>
</layout>
</widget>
<string locid="txt_irad_title_internet_radio" name="title"/>
</widget>
- <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <section name="prt_section">
+ <widget name="container" role="HbView:widget" type="HbWidget">
+ <widget name="prt_content_container" type="HbWidget">
+ <widget name="text_edit" type="HbTextEdit"/>
+ <widget name="accept_btn" type="HbPushButton"/>
+ <widget name="decline_btn" type="HbPushButton"/>
+ <contentsmargins bottom="expr(var(hb-param-margin-gene-screen) )" left="expr(var(hb-param-margin-gene-screen) )" right="expr(var(hb-param-margin-gene-screen) )" top="expr(var(hb-param-margin-gene-screen) )"/>
+ <layout type="anchor">
+ <anchoritem dst="accept_btn" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="accept_btn" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="text_edit" srcEdge="BOTTOM"/>
+ <anchoritem dst="accept_btn" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="text_edit" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="text_edit" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
+ <anchoritem dst="text_edit" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="decline_btn" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="decline_btn" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="accept_btn" srcEdge="BOTTOM"/>
+ <anchoritem dst="decline_btn" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="decline_btn" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ </layout>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="heading_text"/>
+ <linearitem itemname="prt_content_container"/>
+ </layout>
+ </widget>
+ </section>
+ <section name="lsc_section">
+ <widget name="container" role="HbView:widget" type="HbWidget">
+ <widget name="lsc_content_container" type="HbWidget">
+ <widget name="text_edit" type="HbTextEdit"/>
+ <widget name="lsc_btn_container" type="HbWidget">
+ <widget name="accept_btn" type="HbPushButton"/>
+ <widget name="decline_btn" type="HbPushButton"/>
+ <layout orientation="Horizontal" spacing="expr(var(hb-param-margin-gene-screen) )" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="accept_btn"/>
+ <linearitem itemname="decline_btn"/>
+ </layout>
+ </widget>
+ <contentsmargins bottom="expr(var(hb-param-margin-gene-screen) )" left="expr(var(hb-param-margin-gene-screen) )" right="expr(var(hb-param-margin-gene-screen) )" top="expr(var(hb-param-margin-gene-screen) )"/>
+ <layout type="anchor">
+ <anchoritem dst="text_edit" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="text_edit" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
+ <anchoritem dst="text_edit" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="lsc_btn_container" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="lsc_btn_container" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="text_edit" srcEdge="BOTTOM"/>
+ <anchoritem dst="lsc_btn_container" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="lsc_btn_container" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ </layout>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="heading_text"/>
+ <linearitem itemname="lsc_content_container"/>
+ </layout>
+ </widget>
+ </section>
+ <metadata activeUIState="lsc_state" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
+ <uistate name="prt_state" sections="#common prt_section"/>
+ <uistate name="lsc_state" sections="#common lsc_section"/>
</metadata>
</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/resources/splashscreen/internet_radio_default.docml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+ <object name="genres" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_genres" name="icon"/>
+ </object>
+ <object name="collections" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_radio_collections" name="icon"/>
+ </object>
+ <object name="favorites" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_favourites" name="icon"/>
+ </object>
+ <object name="search" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_search" name="icon"/>
+ </object>
+ <widget name="internet_radio_defaultview" type="HbView">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <widget name="toolBar" type="HbToolBar">
+ <ref object="genres" role="HbToolBar:addAction"/>
+ <ref object="collections" role="HbToolBar:addAction"/>
+ <ref object="favorites" role="HbToolBar:addAction"/>
+ <ref object="search" role="HbToolBar:addAction"/>
+ </widget>
+ <layout orientation="Vertical" type="linear">
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="toolBar"/>
+ </layout>
+ </widget>
+ <string locid="txt_irad_title_internet_radio" name="title"/>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ <dummydata objectName="listView" section="#common" value="6"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/resources/splashscreen/internet_radio_default.splashml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,6 @@
+<hbsplash version="1">
+ <docml>internet_radio_default.docml</docml>
+ <widget>internet_radio_defaultview</widget>
+ <appuid>0xe28364bb</appuid>
+ <tsappname>internet_radio_10_1</tsappname>
+</hbsplash>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/resources/splashscreen/internet_radio_normal.docml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+ <object name="genres" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_genres" name="icon"/>
+ </object>
+ <object name="collections" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_radio_collections" name="icon"/>
+ </object>
+ <object name="favorites" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_favourites" name="icon"/>
+ </object>
+ <object name="search" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <icon iconName="qtg_mono_search" name="icon"/>
+ </object>
+ <widget name="internet_radio_normalview" type="HbView">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <widget name="toolBar" type="HbToolBar">
+ <ref object="genres" role="HbToolBar:addAction"/>
+ <ref object="collections" role="HbToolBar:addAction"/>
+ <ref object="favorites" role="HbToolBar:addAction"/>
+ <ref object="search" role="HbToolBar:addAction"/>
+ </widget>
+ <layout orientation="Vertical" type="linear">
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="toolBar"/>
+ </layout>
+ </widget>
+ <string locid="txt_irad_title_internet_radio" name="title"/>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ <dummydata objectName="listView" section="#common" value="6"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/resources/splashscreen/internet_radio_normal.splashml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,7 @@
+<hbsplash version="1">
+ <docml>internet_radio_normal.docml</docml>
+ <widget>internet_radio_normalview</widget>
+ <appuid>0xe28364bb</appuid>
+ <tsappname>internet_radio_10_1</tsappname>
+ <screenid>normal_screen</screenid>
+</hbsplash>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/resources/splashscreen/internet_radio_nowplaying.docml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+ <object name="musicstore_act" type="HbAction">
+ <bool name="autoRepeat" value="FALSE"/>
+ <icon iconName="qtg_mono_store" name="icon"/>
+ </object>
+ <object name="play_stop_act" type="HbAction">
+ <bool name="autoRepeat" value="FALSE"/>
+ <icon iconName="qtg_mono_play" name="icon"/>
+ </object>
+ <object name="add_2_fav_act" type="HbAction">
+ <bool name="autoRepeat" value="FALSE"/>
+ <icon iconName="qtg_mono_favourites" name="icon"/>
+ </object>
+ <object name="detail_act" type="HbAction">
+ <bool name="autoRepeat" value="FALSE"/>
+ <icon iconName="qtg_mono_details" name="icon"/>
+ </object>
+ <widget name="internet_radio_nowplayingview" type="HbView">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <widget name="toolBar" type="HbToolBar">
+ <ref object="musicstore_act" role="HbToolBar:addAction"/>
+ <ref object="play_stop_act" role="HbToolBar:addAction"/>
+ <ref object="add_2_fav_act" role="HbToolBar:addAction"/>
+ <ref object="detail_act" role="HbToolBar:addAction"/>
+ </widget>
+ <layout orientation="Vertical" type="linear">
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="toolBar"/>
+ </layout>
+ </widget>
+ <string locid="txt_irad_title_internet_radio" name="title"/>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ <dummydata objectName="listView" section="#common" value="6"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/resources/splashscreen/internet_radio_nowplaying.splashml Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,7 @@
+<hbsplash version="1">
+ <docml>internet_radio_nowplaying.docml</docml>
+ <widget>internet_radio_nowplayingview</widget>
+ <appuid>0xe28364bb</appuid>
+ <tsappname>internet_radio_10_1</tsappname>
+ <screenid>nowplaying_screen</screenid>
+</hbsplash>
--- a/qtinternetradio/ui/service_conf.xml Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/service_conf.xml Thu Jul 22 16:31:41 2010 +0100
@@ -1,11 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<service>
- <name>internet_radio_10_1</name>
- <filepath>No path</filepath>
- <description>InternetRadio can play .pls file and .m3u file</description>
- <interface>
- <name>com.nokia.symbian.IFileView</name>
- <version>1.0</version>
- <description>Interface for viewing and playing .pls file and .m3u file</description>
- </interface>
+ <name>internet_radio_10_1</name>
+ <filepath>No path</filepath>
+ <description>InternetRadio Services</description>
+ <interface>
+ <name>com.nokia.symbian.IFileView</name>
+ <version>1.0</version>
+ <description>Interface for viewing .pls file and .m3u file</description>
+ </interface>
+ <interface>
+ <name>com.nokia.symbian.IInternetRadioControl</name>
+ <version>1.0</version>
+ <description>Interface to control internet radio playback</description>
+ </interface>
+ <interface>
+ <name>com.nokia.symbian.IInternetRadioMonitor</name>
+ <version>1.0</version>
+ <description>Interface to monitor internet radio status changes</description>
+ </interface>
</service>
--- a/qtinternetradio/ui/src/irabstractlistviewbase.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irabstractlistviewbase.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -19,11 +19,13 @@
#include <hbtoolbar.h>
#include <hbaction.h>
#include <hblistview.h>
-#include <hbabstractviewitem.h>
+#include <hblistviewitem.h>
#include <hbscrollbar.h>
#include <HbGroupBox>
#include <HbMarqueeItem>
#include <HbLabel>
+#include <hbframedrawer.h>
+#include <hbframeitem.h>
#include "irviewmanager.h"
#include "irabstractlistviewbase.h"
@@ -36,6 +38,7 @@
#include "iruidefines.h"
const int KAnimationLoopTimes = 2; // Animation loop times
+#define NOW_PLAYING_BANNER_FRAME "qtg_fr_multimedia_trans"
IrAbstractListViewBase::IrAbstractListViewBase(IRApplication *aApplication, TIRViewId aViewId)
: IRBaseView(aApplication, aViewId),
@@ -117,6 +120,18 @@
iArtistSongName->setLoopCount(KAnimationLoopTimes);
iListView = qobject_cast<HbListView *>(iLoader.findObject(ABSTRACT_LIST_VIEW_BASE_OBJECT_LISTVIEW));
+ iListView->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);
+
+ // draw background for now playing banner
+ HbFrameDrawer* drawer = new HbFrameDrawer(NOW_PLAYING_BANNER_FRAME, HbFrameDrawer::NinePieces);
+ HbFrameItem* backgroundItem = new HbFrameItem(drawer, iPlayingBanner);
+ if (backgroundItem)
+ {
+ // set item to fill the whole widget
+ backgroundItem->setGeometry(QRectF(QPointF(0, 0), iPlayingBanner->size()));
+ backgroundItem->setZValue(0);
+ iPlayingBanner->setBackgroundItem(backgroundItem);
+ }
}
void IrAbstractListViewBase::initScrollBar()
@@ -138,6 +153,13 @@
return iViewParameter;
}
+void IrAbstractListViewBase::setPlayingBannerTextColor(const QString &aColor)
+{
+ QColor color(aColor);
+ iStationName->setTextColor(color);
+ iArtistSongName->setTextColor(color);
+}
+
void IrAbstractListViewBase::setCheckedAction()
{
//default implementation
--- a/qtinternetradio/ui/src/irapplication.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irapplication.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,6 +16,7 @@
*/
#include <hbaction.h>
+#include <hbapplication.h>
#include <qcoreapplication.h>
#include <hbdevicemessagebox.h>
#include <hbprogressdialog.h>
@@ -24,8 +25,18 @@
#include <QFile>
#include <QTextStream>
#include <QDir>
-#include <xqsharablefile.h>
+#include <hbmessagebox.h>
+
#include <xqserviceutil.h>
+#include <hbiconitem.h>
+#include <hbiconanimator.h>
+#include <hbiconanimationmanager.h>
+#ifdef HS_WIDGET_ENABLED
+#include <XQSettingsManager>
+#include <XQPublishAndSubscribeSettingsKey>
+#include <XQPublishAndSubscribeUtils>
+#include <QDateTime>
+#endif
#ifdef LOCALIZATION
#include <QTranslator>
@@ -43,20 +54,24 @@
#include "irqsettings.h"
#include "irmediakeyobserver.h"
#include "ircategoryview.h"
-#include "irstationsview.h"
#include "irqlogger.h"
#include "iruidefines.h"
#include "irqsystemeventhandler.h"
-#include "irplaylist.h"
-
-#define INTERNETRADIO_SERVICE_NAME "internet_radio_10_1.com.nokia.symbian.IFileView"
+#include "irabstractlistviewbase.h"
+#include "irfileviewservice.h"
+#ifdef HS_WIDGET_ENABLED
+#include "irmonitorservice.h"
+#include "ircontrolservice.h"
+#include "irservicedef.h"
+#include "irqisdsdatastructure.h"
+#include "irsearchchannelsview.h"
+#endif
/*
* Description : constructor, initialize all data members
* Parameters : aViewManager : pointer to the view manager object
* Return : None
*/
IRApplication::IRApplication(IRViewManager* aViewManager, IRQSystemEventHandler* aSystemEventHandler):
- XQServiceProvider(INTERNETRADIO_SERVICE_NAME),
#ifdef _DEBUG
iTestPreferredBitrate(false),
#endif
@@ -74,20 +89,22 @@
iDisconnected(false),
iConnectingCanceled(false),
iLocalServer(NULL),
- iConnectingNote(NULL),
+ iLoadingNote(NULL),
#ifdef LOCALIZATION
iTranslator(NULL),
#endif
- iSystemEventHandler(aSystemEventHandler),
- iPlayList(NULL)
+ iSystemEventHandler(aSystemEventHandler),
+ iUseNetworkReason(EIR_UseNetwork_NoReason),
+ iAppFullyStarted(false),
+ #ifdef HS_WIDGET_ENABLED
+ iControlService(NULL),
+ iMonitorService(NULL),
+ #endif
+ iFileViewService(NULL),
+ iMessageBox(NULL)
{
LOG_METHOD;
- if (XQServiceUtil::isService())
- {
- //Publishes all public slots on this object
- publishAll();
- }
iViewManager->setApplication(this);
iInitEvent = static_cast<QEvent::Type>(QEvent::registerEventType());
@@ -100,7 +117,19 @@
// get advertisement setting
iSettings->getGlobalAdvFlag(iEnableGlobalAdv);
setupConnection();
- setLaunchView();
+
+ if (!XQServiceUtil::isService())
+ {
+ setLaunchView();
+ }
+
+ QString name = XQServiceUtil::interfaceName();
+ if (name == QString("com.nokia.symbian.IFileView"))
+ {
+ iFileViewService = new IRFileViewService(this);
+ }
+
+ iMessageBox = new HbMessageBox(hbTrId("No network connection!"),HbMessageBox::MessageTypeWarning,NULL);
}
/*
@@ -112,6 +141,8 @@
{
LOG_METHOD;
setExitingView();
+ iViewManager->saveActivity();
+
destroyComponents();
if (iLocalServer)
@@ -122,13 +153,14 @@
delete iLastPlayedStationInfo;
iLastPlayedStationInfo = NULL;
- delete iConnectingNote;
- iConnectingNote = NULL;
+ delete iLoadingNote;
+ iLoadingNote = NULL;
+
+ delete iMessageBox;
+ iMessageBox = NULL;
delete iSystemEventHandler;
- delete iPlayList;
-
#ifdef LOCALIZATION
if( iTranslator )
{
@@ -137,6 +169,16 @@
iTranslator = NULL;
}
#endif
+
+ delete iFileViewService;
+ iFileViewService = NULL;
+
+#ifdef HS_WIDGET_ENABLED
+ XQSettingsManager settingsManager;
+ XQPublishAndSubscribeUtils psUtils(settingsManager);
+ XQPublishAndSubscribeSettingsKey irStartupKey(KInternetRadioPSUid, KInternetRadioStartupKey);
+ psUtils.deleteProperty(irStartupKey);
+#endif
}
@@ -148,13 +190,33 @@
*/
void IRApplication::setLaunchView()
{
- if (!XQServiceUtil::isService())
+ //get starting view id according to activate reason
+ TIRViewId viewId = EIRView_CategoryView;
+ HbApplication *hbApp = qobject_cast<HbApplication*>(qApp);
+
+ if (hbApp->activateReason() == Hb::ActivationReasonActivity)
{
- //normal launch, launch starting view
- TIRViewId viewId = EIRView_CategoryView;
+ QVariant data = hbApp->activateData();
+ QByteArray serializedModel = data.toByteArray();
+ QDataStream stream(&serializedModel, QIODevice::ReadOnly);
+ int id = 0;
+ stream>>id;
+ viewId = TIRViewId(id);
+ }
+ else
+ {
iSettings->getStartingViewId(viewId);
- launchStartingView(viewId);
+ if (EIRView_PlayingView == viewId)
+ {
+ //handle error case
+ if (NULL == getLastPlayedStationInfo()->getLastPlayedStation())
+ {
+ viewId = EIRView_CategoryView;
+ }
+ }
}
+
+ launchStartingView(viewId);
}
/*
@@ -171,43 +233,92 @@
if (!iNetworkController->getNetworkStatus())
{
+ LOG( "IRApplication::verifyNetworkConnectivity--1");
ret = false;
if (!iNetworkController->isConnectRequestIssued())
{
+ LOG( "IRApplication::verifyNetworkConnectivity--2");
iConnectingText = aConnectingText;
iNetworkController->chooseAccessPoint();
}
}
return ret;
-}
+}
-void IRApplication::createConnectingDialog()
+void IRApplication::startLoadingAnimation(const QObject *aReceiver, const char *aFunc)
{
LOG_METHOD_ENTER;
- if (NULL == iConnectingNote)
+
+ //for downloading logos in stations view, favorites view and history view, network connection
+ //is initiated by low layer, we don't show any dialog
+ if (!iNetworkController->getNetworkStatus())
{
- iConnectingNote = new HbProgressDialog(HbProgressDialog::WaitDialog);
- iConnectingNote->setModal(true);
- iConnectingNote->setTimeout(HbPopup::NoTimeout);
- QAction *action = iConnectingNote->actions().at(0);
+ if (EIR_UseNetwork_NoReason == iUseNetworkReason) // network is not used by the Application
+ {
+ IRBaseView *currentView = static_cast<IRBaseView*>(iViewManager->currentView());
+ if (currentView && EIR_UseNetwork_NoReason == currentView->getUseNetworkReason())
+ {
+ return;
+ }
+ }
+ }
+
+ if (NULL == iLoadingNote)
+ {
+ iLoadingNote = new HbProgressDialog(HbProgressDialog::WaitDialog);
+ iLoadingNote->setModal(true);
+ iLoadingNote->setTimeout(HbPopup::NoTimeout);
+ QAction *action = iLoadingNote->actions().at(0);
+#ifdef SUBTITLE_STR_BY_LOCID
action->setText(hbTrId("txt_common_button_cancel"));
- connect(action, SIGNAL(triggered()), this, SLOT(cancelConnect()));
+#else
+ action->setText(hbTrId("Cancel"));
+#endif
}
- iConnectingNote->setText(iConnectingText);
- iConnectingNote->show();
+ iLoadingNote->disconnect(SIGNAL(cancelled()));
+ connect(iLoadingNote, SIGNAL(cancelled()), aReceiver, aFunc);
+
+ if (iLoadingNote->isVisible())
+ {
+ return;
+ }
+
+ //if iConnectingText == "", network connection is initiated by lower layer (eg. downloading logos)
+ if ("" != iConnectingText)
+ {
+ iLoadingNote->setText(iConnectingText);
+ iConnectingText = "";
+ }
+ else
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ iLoadingNote->setText(hbTrId("txt_common_info_loading"));
+#else
+ iLoadingNote->setText(hbTrId("Loading"));
+#endif
+ }
+
+ iLoadingNote->show();
}
-void IRApplication::closeConnectingDialog()
+void IRApplication::stopLoadingAnimation()
{
LOG_METHOD_ENTER;
- if (iConnectingNote)
+
+ // this function is the endpoint of cancel loading actions for all views
+ // so we can do cleanup action here, including player stop action.
+ // No need to stop the player in each views in the slot connected to the cancel signal of the loading note
+ if (!getPlayController()->isPlaying())
{
- iConnectingNote->close();
- delete iConnectingNote;
- iConnectingNote = NULL;
+ getPlayController()->stop(EIRQUnknownTermination);
}
+
+ if (iLoadingNote)
+ {
+ iLoadingNote->close();
+ }
}
/*
@@ -230,6 +341,8 @@
if(NULL == iNetworkController)
{
iNetworkController = IRQNetworkController::openInstance();
+ connect(iNetworkController, SIGNAL(networkEventNotified(IRQNetworkEvent)),
+ this, SLOT(networkEventNotified(IRQNetworkEvent)));
}
return iNetworkController;
}
@@ -311,7 +424,12 @@
IRPlayList* IRApplication::getPlayList() const
{
- return iPlayList;
+ if (NULL == iFileViewService)
+ {
+ return NULL;
+ }
+
+ return iFileViewService->getPlayList();
}
#ifdef LOCALIZATION
@@ -324,37 +442,6 @@
}
#endif
-void IRApplication::view(const QString &aFileName)
-{
- if (NULL == iPlayList)
- {
- iPlayList = new IRPlayList;
- }
-
- iPlayList->parseFile(aFileName);
-
- if (1 == iPlayList->getNumberOfEntries())
- {
- launchStartingView(EIRView_PlayingView);
- }
- else if (iPlayList->getNumberOfEntries() > 1)
- {
- launchStartingView(EIRView_PlsView);
- }
- else
- {
- //normal launch, launch starting view
- TIRViewId viewId = EIRView_CategoryView;
- iSettings->getStartingViewId(viewId);
- launchStartingView(viewId);
- }
-}
-
-void IRApplication::view(const XQSharableFile &/*aSharableFile*/)
-{
-
-}
-
/*
* Description : create all the application level components, including network controller,
* favorites db, isds client, play controller, etc
@@ -364,6 +451,10 @@
void IRApplication::createComponents()
{
getSettings();
+#ifdef HS_WIDGET_ENABLED
+ iControlService = new IrControlService(this);
+ iMonitorService = new IrMonitorService(this);
+#endif
}
/*
@@ -402,6 +493,14 @@
delete iMediaKeyObserver;
iMediaKeyObserver = NULL;
+
+#ifdef HS_WIDGET_ENABLED
+ delete iControlService;
+ iControlService = NULL;
+
+ delete iMonitorService;
+ iMonitorService = NULL;
+#endif
}
void IRApplication::setupConnection()
@@ -416,6 +515,7 @@
return;
}
+ stopLoadingAnimation();
iConnectingCanceled = true;
if (iNetworkController->getNetworkStatus())
{
@@ -437,7 +537,7 @@
switch (aEvent)
{
case EIRQNetworkConnectionConnecting :
- createConnectingDialog();
+ startLoadingAnimation(this, SLOT(cancelConnect()));
iConnectingCanceled = false;
break;
@@ -456,7 +556,6 @@
break;
case EIRQAccessPointSelectionCancelled :
- closeConnectingDialog();
cancelConnect();
break;
@@ -471,8 +570,14 @@
case EIRQDisplayNetworkMessageNoConnectivity:
{
- closeConnectingDialog();
- HbMessageBox::warning(hbTrId("txt_irad_info_no_network_connectiion"), (QObject*)NULL, NULL);
+ stopLoadingAnimation();
+ LOG("IRApplication::networkEventNotified::no network connection");
+ if( !iMessageBox->isVisible() )
+ {
+ LOG("IRApplication::networkEventNotified::no network connection -- show dialog");
+ iMessageBox->show();
+ }
+
if (!iDisconnected)
{
/* the handling is up to each view */
@@ -494,14 +599,12 @@
if (!hasCache)
{
- IRBaseView *currView = static_cast<IRBaseView*>(iViewManager->currentView());
- Q_ASSERT(currView);
- currView->setUseNetworkReason(EIR_UseNetwork_LoadCategory);
+ iUseNetworkReason = EIR_UseNetwork_LoadCategory;
if (false == verifyNetworkConnectivity())
{
return;
}
- currView->setUseNetworkReason(EIR_UseNetwork_NoReason);
+ iUseNetworkReason = EIR_UseNetwork_NoReason;
}
IRCategoryView *categoryView = static_cast<IRCategoryView*>(getViewManager()->getView(EIRView_CategoryView, true));
@@ -518,13 +621,11 @@
delete socket;
iViewManager->raise();
-}
+}
void IRApplication::initApp()
{
- getNetworkController();
- connect(iNetworkController, SIGNAL(networkEventNotified(IRQNetworkEvent)),
- this, SLOT(networkEventNotified(IRQNetworkEvent)));
+ getNetworkController();
IRBaseView *view = static_cast<IRBaseView*> (iViewManager->currentView());
if (view)
@@ -535,6 +636,19 @@
getMediaKeyObserver();
startSystemEventMonitor();
startLocalServer();
+ //when IR is running, remove activity. Otherwise user can see two items in task switcher
+ iViewManager->removeActivity();
+
+#ifdef HS_WIDGET_ENABLED
+ // Write the startup timestamp to P&S key for the homescreen widget
+ XQSettingsManager settingsManager;
+ XQPublishAndSubscribeUtils psUtils(settingsManager);
+ XQPublishAndSubscribeSettingsKey irStartupKey(KInternetRadioPSUid, KInternetRadioStartupKey);
+ if (psUtils.defineProperty(irStartupKey, XQSettingsManager::TypeInt))
+ {
+ settingsManager.writeItemValue(irStartupKey, (int)QDateTime::currentDateTime().toTime_t());
+ }
+#endif
}
bool IRApplication::event(QEvent* e)
@@ -550,19 +664,29 @@
TIRHandleResult IRApplication::handleConnectionEstablished()
{
- IRBaseView *currView = static_cast<IRBaseView*>(iViewManager->currentView());
- Q_ASSERT(currView);
-
- if (EIR_UseNetwork_LoadCategory == currView->getUseNetworkReason())
+ TIRHandleResult retVal = EIR_DoDefault;
+ switch (iUseNetworkReason)
{
- closeConnectingDialog();
- IRCategoryView *categoryView = static_cast<IRCategoryView*>(getViewManager()->getView(EIRView_CategoryView, true));
- categoryView->loadCategory(IRQIsdsClient::EGenre);
- currView->setUseNetworkReason(EIR_UseNetwork_NoReason);
- return EIR_NoDefault;
+ case EIR_UseNetwork_LoadCategory:
+ {
+ IRCategoryView *categoryView = static_cast<IRCategoryView*>(getViewManager()->getView(EIRView_CategoryView, true));
+ categoryView->loadCategory(IRQIsdsClient::EGenre);
+ retVal = EIR_NoDefault;
+ break;
+ }
+
+#ifdef HS_WIDGET_ENABLED
+ case EIR_UseNetwork_PlayStation: // play last station when player is in Idle state while there is no connection.
+ getPlayController()->resume();
+ retVal = EIR_NoDefault;
+ break;
+#endif
+ default:
+ break;
}
- return EIR_DoDefault;
+ iUseNetworkReason = EIR_UseNetwork_NoReason;
+ return retVal;
}
void IRApplication::handleTermsConsAccepted()
@@ -580,42 +704,86 @@
void IRApplication::launchStartingView(TIRViewId aViewId)
{
- bool isFirstTimeUsage = false;
+ iStartingViewId = aViewId;
+ /* bool isFirstTimeUsage = false;
iSettings->isFlagTermsAndConditions(isFirstTimeUsage);
- iStartingViewId = aViewId;
+
if(isFirstTimeUsage)
{
iViewManager->activateView(EIRView_TermsConsView);
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
- else
+ else*/
{
iViewManager->activateView(iStartingViewId);
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
QEvent* initEvent = new QEvent(iInitEvent);
QCoreApplication::postEvent(this, initEvent, Qt::HighEventPriority);
- }
+ }
+
+ iAppFullyStarted = true;
+}
+
+bool IRApplication::isAppFullyStarted() const
+{
+ return iAppFullyStarted;
}
void IRApplication::setExitingView()
-{
- IRQSettings *settings = getSettings();
- TIRViewId viewId = iViewManager->currentViewId();
-
- switch (viewId)
- {
- case EIRView_MainView:
- case EIRView_FavoritesView:
- case EIRView_PlayingView:
- settings->setStartingViewId(viewId);
- break;
-
- default:
- settings->setStartingViewId(EIRView_CategoryView);
- break;
+{
+ TIRViewId viewId = iViewManager->getExitingView();
+ if(EIRView_InvalidId != viewId)
+ {
+ getSettings()->setStartingViewId(viewId);
}
}
+
+#ifdef HS_WIDGET_ENABLED
+bool IRApplication::startPlaying()
+{
+ // if any loading is in progress, disallow to play
+ if (iLoadingNote && iLoadingNote->isVisible())
+ {
+ LOG( "IRApplication::startPlaying() in the return false1");
+ return false;
+ }
+
+ if (getPlayController()->isStopped())
+ {
+ LOG_FORMAT( "IRApplication::startPlaying(), the station name is %s",
+ STRING2CHAR(getPlayController()->getNowPlayingPreset()->name));
+ iUseNetworkReason = EIR_UseNetwork_PlayStation;
+ getPlayController()->setConnectingStationName(getPlayController()->getNowPlayingPreset()->name);
+ if (verifyNetworkConnectivity())
+ {
+ iUseNetworkReason = EIR_UseNetwork_NoReason;
+ getPlayController()->resume();
+ }
+ return true;
+ }
+ else
+ {
+ LOG( "IRApplication::startPlaying() in the return false2");
+ return false;
+ }
+}
+
+void IRApplication::cancelPlayerLoading()
+{
+ if (IRPlayController::EConnecting == getPlayController()->state()
+ || IRPlayController::EBuffering == getPlayController()->state())
+ {
+ if (iLoadingNote && iLoadingNote->isVisible())
+ {
+ iLoadingNote->cancel();
+ }
+ }
+}
+
+#endif
+
+
void IRApplication::startLocalServer()
{
QString serverName = QCoreApplication::applicationName();
@@ -648,12 +816,34 @@
{
bool eventWasConsumed = false;
- if (object->objectName() == ABSTRACT_LIST_VIEW_BASE_OBJECT_PLAYINGBANNER
- && event->type() == QEvent::GraphicsSceneMousePress)
+ if (object->objectName() == ABSTRACT_LIST_VIEW_BASE_OBJECT_PLAYINGBANNER)
{
- eventWasConsumed = true;
- Q_ASSERT(iPlayController->isPlaying());
- iViewManager->activateView(EIRView_PlayingView);
+ if (NULL == iViewManager->currentView())
+ {
+ return false;
+ }
+
+ if( (EIRView_PlayingView == static_cast<IRBaseView*>(iViewManager->currentView())->id()) \
+ ||(EIRView_SearchView == static_cast<IRBaseView*>(iViewManager->currentView())->id()) )
+ {
+ return false;
+ }
+
+ if (event->type() == QEvent::GraphicsSceneMousePress)
+ {
+ eventWasConsumed = true;
+ Q_ASSERT(iPlayController->isPlaying());
+ IrAbstractListViewBase* listview = static_cast<IrAbstractListViewBase*>(iViewManager->currentView());
+ listview->setPlayingBannerTextColor("qtc_multimedia_trans_pressed");
+ }
+ else if(event->type() == QEvent::GraphicsSceneMouseRelease)
+ {
+ eventWasConsumed = true;
+ Q_ASSERT(iPlayController->isPlaying());
+ IrAbstractListViewBase* listview = static_cast<IrAbstractListViewBase*>(iViewManager->currentView());
+ listview->setPlayingBannerTextColor("qtc_multimedia_trans_normal");
+ iViewManager->activateView(EIRView_PlayingView);
+ }
}
return eventWasConsumed;
}
@@ -662,19 +852,60 @@
{
connect(iSystemEventHandler, SIGNAL(diskSpaceLowNotification(qint64)),
this, SLOT(handleDiskSpaceLow(qint64)));
+ connect(iSystemEventHandler, SIGNAL(callActivated()), this, SLOT(handleCallActivated()));
+ connect(iSystemEventHandler, SIGNAL(callDeactivated()), this, SLOT(handleCallDeactivated()));
iSystemEventHandler->start();
}
void IRApplication::handleDiskSpaceLow(qint64 aCriticalLevel)
{
Q_UNUSED(aCriticalLevel);
- HbDeviceMessageBox messageBox(hbTrId("txt_irad_info_no_space_on_c_drive_internet_radio_closed"),
+#ifdef SUBTITLE_STR_BY_LOCID
+ HbDeviceMessageBox messageBox(hbTrId("txt_irad_info_insufficient_disk_space"),
HbMessageBox::MessageTypeWarning);
+#else
+ HbDeviceMessageBox messageBox(hbTrId("Insufficient disk space"),
+ HbMessageBox::MessageTypeWarning);
+#endif
messageBox.setTimeout(HbPopup::NoTimeout);
messageBox.exec();
qApp->quit();
}
+void IRApplication::handleCallActivated()
+{
+ LOG_METHOD;
+ //for the buffering state needs more attention, we firstly
+ //don't handle it, improve in future.
+ if( iPlayController->isPlaying() /*|| iPlayController->isBuffering()*/)
+ {
+ iPlayController->stop(EIRQCallIsActivated);
+ stopLoadingAnimation();
+ }
+
+ //for we don't cancel the loading when call is activated,
+ //so, here , we don't add the handling for it.
+}
+
+void IRApplication::handleCallDeactivated()
+{
+ LOG_METHOD;
+ if( iPlayController->getStopReason() == EIRQCallIsActivated )
+ {
+ iPlayController->resume();
+ }
+}
+
+void IRApplication::handleHeadsetConnected()
+{
+ LOG_METHOD;
+}
+
+void IRApplication::handleHeadsetDisconnected()
+{
+ LOG_METHOD;
+}
+
#ifdef _DEBUG
void IRApplication::readConfiguration()
{
--- a/qtinternetradio/ui/src/irbaseview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irbaseview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -25,8 +25,7 @@
* Return : None
*/
IRBaseView::IRBaseView(IRApplication* aApplication, TIRViewId aViewId) : iApplication(aApplication),
- iViewId(aViewId),
- iFlag(0),
+ iViewId(aViewId),
iUseNetworkReason(EIR_UseNetwork_NoReason),
iInitCompleted(false)
{
@@ -82,14 +81,21 @@
{
}
-void IRBaseView::setFlag(int aFlag)
+void IRBaseView::setFlag(TViewFlags aFlag)
{
- iFlag = aFlag;
+ iFlags |= aFlag;
}
-int IRBaseView::flag() const
+void IRBaseView::clearFlag(TViewFlag aFlag)
{
- return iFlag;
+ if(iFlags.testFlag(aFlag))
+ {
+ iFlags ^= aFlag;
+ }
+}
+bool IRBaseView::testFlag(TViewFlag aFlag) const
+{
+ return iFlags.testFlag(aFlag);
}
void IRBaseView::setUseNetworkReason(TIRUseNetworkReason aReason)
--- a/qtinternetradio/ui/src/ircategorymodel.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/ircategorymodel.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -53,13 +53,20 @@
if (aRole == Qt::DisplayRole)
{
int row = aIndex.row();
+ QVariantList list;
- QString catNum;
- catNum.sprintf(" (%d)", iItems->at(row)->size);
- QString category = iItems->at(row)->catName + catNum;
+ QString category = iItems->at(row)->catName;
+ if (category.contains('(') && category.contains('-') && category.contains(')'))
+ {
+ list.append(category);
+ }
+ else
+ {
+ QString catNum;
+ catNum.sprintf(" (%d)", iItems->at(row)->size);
+ list.append(category + catNum);
+ }
- QVariantList list;
- list.append(category);
return list;
}
--- a/qtinternetradio/ui/src/ircategoryview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/ircategoryview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -15,9 +15,9 @@
*
*/
+#include <hbtoolbar.h>
#include <hbaction.h>
#include <hblistview.h>
-#include <hbprogressdialog.h>
#include "irapplication.h"
#include "irviewmanager.h"
@@ -34,11 +34,10 @@
*/
IRCategoryView::IRCategoryView(IRApplication* aApplication, TIRViewId aViewId)
: IrAbstractListViewBase(aApplication, aViewId),
- iWaitDialog(NULL),
iLastSelectItem(0)
{
setViewParameter(EIRViewPara_Genre);
- setFlag(EViewFlag_ClearStackWhenActivate);
+ setFlag(EViewFlag_ClearStackWhenActivate|EViewFlag_StickyViewEnabled);
//if this view is not starting view, finish all initialization in constructor
if (getViewManager()->views().count() > 0)
@@ -52,8 +51,6 @@
*/
IRCategoryView::~IRCategoryView()
{
- delete iWaitDialog;
- iWaitDialog = NULL;
}
/*
@@ -82,6 +79,7 @@
{
iLoader.load(ABSTRACT_LIST_VIEW_BASE_LAYOUT_FILENAME, ABSTRACT_LIST_VIEW_BASE_WITH_TOOLBAR_SECTION);
iLoadedSection = ABSTRACT_LIST_VIEW_BASE_WITH_TOOLBAR_SECTION;
+ initToolBar();
}
}
else
@@ -90,19 +88,16 @@
{
iLoader.load(ABSTRACT_LIST_VIEW_BASE_LAYOUT_FILENAME, ABSTRACT_LIST_VIEW_BASE_NO_TOOLBAR_SECTION);
iLoadedSection = ABSTRACT_LIST_VIEW_BASE_NO_TOOLBAR_SECTION;
+ setToolBar(NULL);
}
}
}
break;
-
+
case EIR_ViewCommand_ACTIVATED:
- break;
-
- case EIR_ViewCommand_DEACTIVATE:
- if (iWaitDialog)
+ if (EIRViewPara_Genre == getViewParameter())
{
- iWaitDialog->close();
- ret = EIR_NoDefault;
+ getViewManager()->saveScreenShot();
}
break;
@@ -115,23 +110,9 @@
void IRCategoryView::launchAction()
{
- bool ret = false;
- switch(iViewParameter)
- {
- case EIRViewPara_Genre:
- ret = iIsdsClient->isdsIsCategoryCached(IRQIsdsClient::EGenre);
- break;
- case EIRViewPara_Language:
- ret = iIsdsClient->isdsIsCategoryCached(IRQIsdsClient::ELanguages);
- break;
- case EIRViewPara_Country:
- ret = iIsdsClient->isdsIsCategoryCached(IRQIsdsClient::ECountries);
- break;
+ Q_ASSERT(EIRViewPara_Genre == iViewParameter);
+ bool ret = iIsdsClient->isdsIsCategoryCached(IRQIsdsClient::EGenre);
- default:
- break;
- }
-
if ( !ret )
{
setUseNetworkReason(EIR_UseNetwork_StartingView);
@@ -180,31 +161,41 @@
resetCurrentItem();
}
setViewParameter(EIRViewPara_Genre);
- setFlag(EViewFlag_ClearStackWhenActivate);
+ setFlag(EViewFlag_ClearStackWhenActivate|EViewFlag_StickyViewEnabled);
iIsdsClient->isdsCategoryRequest(IRQIsdsClient::EGenre, cache);
break;
case IRQIsdsClient::ELanguages :
+#ifdef SUBTITLE_STR_BY_LOCID
setHeadingText(hbTrId("txt_irad_list_stations_by_language"));
+#else
+ setHeadingText(hbTrId("Stations by language"));
+#endif
if (EIRViewPara_Language != getViewParameter())
{
//the view is used for other categories other than Language
resetCurrentItem();
}
setViewParameter(EIRViewPara_Language);
- setFlag(EViewFlag_None);
+ clearFlag(EViewFlag_ClearStackWhenActivate);
+ clearFlag(EViewFlag_StickyViewEnabled);
iIsdsClient->isdsCategoryRequest(IRQIsdsClient::ELanguages, cache);
break;
case IRQIsdsClient::ECountries :
+#ifdef SUBTITLE_STR_BY_LOCID
setHeadingText(hbTrId("txt_irad_list_stations_by_country_region"));
+#else
+ setHeadingText(hbTrId("Stations by country/region"));
+#endif
if (EIRViewPara_Country != getViewParameter())
{
//the view is used for other categories other than Country
resetCurrentItem();
}
setViewParameter(EIRViewPara_Country);
- setFlag(EViewFlag_None);
+ clearFlag(EViewFlag_ClearStackWhenActivate);
+ clearFlag(EViewFlag_StickyViewEnabled);
iIsdsClient->isdsCategoryRequest(IRQIsdsClient::ECountries, cache);
break;
@@ -215,7 +206,7 @@
if (!cache)
{
- createWaitDialog(hbTrId("txt_common_info_loading"));
+ iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
}
}
@@ -275,15 +266,14 @@
connectToIsdsClient();
bool cache = false;
iIsdsClient->isdsCategoryRequest(request, cache);
+ iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
}
//for there may be some cache, and when we click, we need to handle here
else if ( EIR_UseNetwork_SelectItem == getUseNetworkReason())
{
- iApplication->closeConnectingDialog();
handleItemSelected();
}
- setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
case EIRQConnectingCancelled:
@@ -303,6 +293,8 @@
setCheckedAction();
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
@@ -362,17 +354,12 @@
void IRCategoryView::dataChanged()
{
disconnectIsdsClient();
- iApplication->closeConnectingDialog();
+ iApplication->stopLoadingAnimation();
iListView->reset();
iListView->setCurrentIndex(iModel->index(iLastSelectItem));
iListView->scrollTo(iModel->index(iLastSelectItem));
getViewManager()->activateView(this);
-
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
}
/*
@@ -383,6 +370,14 @@
{
iIsdsClient->isdsCancelRequest();
disconnectIsdsClient();
+ iApplication->stopLoadingAnimation();
+
+ //if this function is called and this view is current view, it indicates that this view is starting view and
+ //data has not been loaded yet, so we need to back to collections view
+ if (getViewManager()->currentView() == this)
+ {
+ getViewManager()->activateView(EIRView_MainView);
+ }
}
/*
@@ -392,16 +387,15 @@
void IRCategoryView::operationException(IRQError aError)
{
Q_UNUSED(aError);
- iApplication->closeConnectingDialog();
-
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
-
+ iApplication->stopLoadingAnimation();
+
disconnectIsdsClient();
+#ifdef SUBTITLE_STR_BY_LOCID
popupNote(hbTrId("txt_irad_info_failed_to_connect"), HbMessageBox::MessageTypeWarning);
+#else
+ popupNote(hbTrId("Connecting failed"), HbMessageBox::MessageTypeWarning);
+#endif
//if category view is starting view and failed to get data from ISDS server, back to main view
if (getViewManager()->currentView() == this &&
@@ -413,27 +407,6 @@
// private functions
-/*
- * Description : Show a wait dialog to inform user that data is being loaded. If wait dialog doesn't
- * exist yet, create first
- */
-void IRCategoryView::createWaitDialog(const QString &aText)
-{
- if (!iWaitDialog)
- {
- iWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
- iWaitDialog->setTimeout(HbPopup::NoTimeout);
- iWaitDialog->setModal(true);
- iWaitDialog->setDismissPolicy(HbPopup::NoDismiss);
- QAction *action = iWaitDialog->actions().at(0);
- action->setText(hbTrId("txt_common_button_cancel"));
- connect(action, SIGNAL(triggered()), this, SLOT(cancelRequest()));
- }
-
- iWaitDialog->setText(aText);
- iWaitDialog->open();
-}
-
void IRCategoryView::connectToIsdsClient()
{
connect(iIsdsClient, SIGNAL(categoryItemsChanged(QList<IRQBrowseCategoryItem *> *)),
@@ -499,3 +472,15 @@
setInitCompleted(true);
}
}
+
+void IRCategoryView::initToolBar()
+{
+ //add HbActions to the toolbar, the HbActions have been created in IrAbstractListViewBase
+ HbToolBar *viewToolBar = toolBar();
+ viewToolBar->clearActions();
+ viewToolBar->addAction(iGenresAction);
+ viewToolBar->addAction(iCollectionsAction);
+ viewToolBar->addAction(iFavoritesAction);
+ viewToolBar->addAction(iSearchAction);
+ viewToolBar->setVisible(true);
+}
--- a/qtinternetradio/ui/src/irchannelmodel.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irchannelmodel.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -19,9 +19,10 @@
#include "irchannelmodel.h"
#include "irqisdsdatastructure.h"
+#include "irsearchresultdb.h"
IrChannelModel::IrChannelModel(QObject *aParent): QAbstractListModel(aParent)
- , iChannelList(NULL)
+ , iChannelList(NULL),iDB(NULL)
{
iStationLogo = new HbIcon("qtg_large_internet_radio");
}
@@ -34,6 +35,12 @@
iStationLogo = NULL;
clearAndDestroyLogos();
+
+ if( iDB )
+ {
+ delete iDB;
+ iDB = NULL;
+ }
}
int IrChannelModel::rowCount(const QModelIndex &aParent) const
@@ -125,6 +132,56 @@
emit dataAvailable();
}
+void IrChannelModel::initWithCache()
+{
+ if( NULL == iDB )
+ {
+ iDB = new IRSearchResultDB();
+ }
+
+ QList<IRQChannelItem*> *channelList = iDB->getCahcedChannelList();
+
+ if( NULL == channelList )
+ {
+ //some error happens
+ return;
+ }
+
+ clearAndDestroyItems();
+ clearAndDestroyLogos();
+ iChannelList = channelList;
+}
+
+void IrChannelModel::save2Cache()
+{
+ if( NULL == iChannelList )
+ {
+ return;
+ }
+
+ //ignore the return value
+ iDB->cacheChannelList(iChannelList);
+}
+
+IRQChannelItem * IrChannelModel::getChannelItemByIndex(int aIndex)
+{
+ if( aIndex < 0 || aIndex >= iChannelList->count() )
+ {
+ return NULL;
+ }
+
+ return iChannelList->at(aIndex);
+}
+
+void IrChannelModel::cleanupDatabase()
+{
+ clearAndDestroyItems();
+ clearAndDestroyLogos();
+ iDB->clearCache();
+
+ emit dataAvailable();
+}
+
void IrChannelModel::clearAndDestroyLogos()
{
for (QMap<int, HbIcon*>::iterator it = iLogos.begin(); it != iLogos.end(); ++it)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/src/ircontrolservice.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,136 @@
+/*
+* 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:
+*
+*/
+
+// System includes
+#include <xqserviceutil.h>
+
+// User includes
+#include "ircontrolservice.h"
+#include "irapplication.h"
+#include "irplaycontroller.h"
+#include "irqlogger.h"
+
+// Contants
+static const QString IR_CONTROL_SERVICE_NAME = "internet_radio_10_1.com.nokia.symbian.IInternetRadioControl";
+
+// Constructor
+IrControlService::IrControlService(IRApplication *aIrApp, QObject *aParent) :
+ XQServiceProvider(IR_CONTROL_SERVICE_NAME, aParent),
+ mIrApp(aIrApp)
+{
+ publishAll();
+}
+
+// Destructor
+IrControlService::~IrControlService()
+{
+}
+
+// service interface, called via Qt Highway
+int IrControlService::handleCmd(int aCmdId)
+{
+ LOG_FORMAT( "IrControlService::handleCmd, the command is %d", aCmdId);
+ IrServiceResult::Type result = IrServiceResult::Fail;
+
+ switch (aCmdId)
+ {
+ case IrServiceCmd::LaunchNormally:
+ result = handleLaunchNormallyCmd();
+ break;
+
+ case IrServiceCmd::LaunchNowPlayingView:
+ result = handleLaunchNowPlayingViewCmd();
+ break;
+
+ case IrServiceCmd::Play:
+ result = handlePlayCmd();
+ break;
+
+ case IrServiceCmd::Stop:
+ result = handleStopCmd();
+ break;
+
+ case IrServiceCmd::Cancel:
+ result = handleCancelCmd();
+ break;
+
+ case IrServiceCmd::Foreground:
+ XQServiceUtil::toBackground(false);
+ result = IrServiceResult::Success;
+ break;
+
+ default:
+ break;
+ }
+
+ if (!requestInfo().isSynchronous())
+ {
+ // NOTE ! we consider the Async to be success as long as the request can be sent here
+ completeRequest(setCurrentRequestAsync(), (int)result);
+ }
+
+ return (int)result;
+}
+
+IrServiceResult::Type IrControlService::handleLaunchNowPlayingViewCmd()
+{
+ if (!mIrApp->isAppFullyStarted())
+ {
+ mIrApp->launchStartingView(EIRView_PlayingView);
+ }
+ return IrServiceResult::Success;
+}
+
+IrServiceResult::Type IrControlService::handleLaunchNormallyCmd()
+{
+ if (!mIrApp->isAppFullyStarted())
+ {
+ mIrApp->setLaunchView();
+ }
+ return IrServiceResult::Success;
+}
+
+IrServiceResult::Type IrControlService::handlePlayCmd()
+{
+#ifdef HS_WIDGET_ENABLED
+ LOG( "IrControlService::handlePlayCmd");
+ bool ret = mIrApp->startPlaying();
+ LOG_FORMAT( "IrControlService::handlePlayCmd, the ret is:%d",(int)ret);
+ return ret?IrServiceResult::Success : IrServiceResult::Fail;
+#else
+ return IrServiceResult::Fail;
+#endif
+
+}
+
+IrServiceResult::Type IrControlService::handleStopCmd()
+{
+ if (mIrApp->getPlayController()->isPlaying())
+ {
+ mIrApp->getPlayController()->stop(EIRQUserTerminated);
+ }
+ return IrServiceResult::Success;
+}
+
+IrServiceResult::Type IrControlService::handleCancelCmd()
+{
+#ifdef HS_WIDGET_ENABLED
+ mIrApp->cancelPlayerLoading();
+#endif
+ return IrServiceResult::Success;
+}
+
--- a/qtinternetradio/ui/src/irfavoritesmodel.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irfavoritesmodel.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -14,6 +14,7 @@
* Description:
*
*/
+#include <QtAlgorithms>
#include <hbicon.h>
#include "irqfavoritesdb.h"
@@ -82,6 +83,20 @@
emit dataChanged(index(aIndex), index(aIndex));
}
+bool IRFavoritesModel::isLogoReady(int aIndex) const
+{
+ int logoListCount = iLogos.count();
+ if (aIndex >= 0
+ && aIndex < logoListCount)
+ {
+ return iLogos[aIndex] != NULL;
+ }
+ else
+ {
+ return false;
+ }
+}
+
QVariant IRFavoritesModel::data(const QModelIndex &aIndex, int aRole) const
{
if (!aIndex.isValid())
@@ -166,14 +181,29 @@
}
int presetSize = iPresetsList->count();
+
+ if(!presetSize)
+ {
+ return;
+ }
+
int uniqId = 0;
-
- for (int i = 0; i < presetSize; ++i)
+
+ while(presetSize--)
{
- uniqId = iFavoritesDb->getUniqId(i);
+ uniqId = iFavoritesDb->getUniqId(presetSize);
+
+ //There is the probability that the return value<0, so I added this judgment.
+ if(uniqId < 0 )
+ {
+ //if here, the Id, which is mapped to preset's item, can't be found.
+ //jump out from while
+ break;
+ }
iFavoritesDb->deletePreset(uniqId);
- }
-
+
+ }
+
clearPresetList();
clearAndDestroyLogos();
emit modelChanged();
@@ -209,6 +239,7 @@
}
beginRemoveRows(QModelIndex(), aIndex, aIndex);
+ delete preset;
iPresetsList->removeAt(aIndex);
if (aIndex<iLogos.size())
@@ -218,7 +249,67 @@
}
iLogos.removeAt(aIndex);
endRemoveRows();
- emit modelChanged();
return true;
}
+bool IRFavoritesModel::deleteMultiFavorites(const QModelIndexList &aIndexList)
+{
+ if (aIndexList.empty())
+ {
+ return true;
+ }
+
+ int index = 0;
+ bool retVal = true;
+ QList<int> indexToBeDelete;
+
+ // delete from DB
+ for (int i = 0; i < aIndexList.count(); i++)
+ {
+ index = aIndexList.at(i).row();
+
+ if (index < 0 || index >= iPresetsList->size())
+ {
+ continue;
+ }
+
+ if (0 != iFavoritesDb->deletePreset(iPresetsList->at(index)->uniqID))
+ {
+ retVal = false;
+ continue;
+ }
+ indexToBeDelete.append(index);
+ }
+
+ qSort(indexToBeDelete);
+
+
+ // delete from model
+ for (int i = indexToBeDelete.count() - 1; i >= 0; i--)
+ {
+ index = indexToBeDelete.at(i);
+
+ beginRemoveRows(QModelIndex(), index, index);
+ IRQPreset *preset = iPresetsList->at(index);
+ delete preset;
+ iPresetsList->removeAt(index);
+ if (index<iLogos.size())
+ {
+ delete iLogos[index];
+ iLogos[index] = NULL;
+ }
+ iLogos.removeAt(index);
+ endRemoveRows();
+ }
+
+ return retVal;
+}
+
+void IRFavoritesModel::updateFavoriteName(int aIndex, const QString &aNewName)
+{
+ if (aIndex >= 0 && aIndex < iPresetsList->count())
+ {
+ iPresetsList->at(aIndex)->name = aNewName;
+ emit dataChanged(index(aIndex), index(aIndex));
+ }
+}
--- a/qtinternetradio/ui/src/irfavoritesview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irfavoritesview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -18,8 +18,11 @@
#include <hbtoolbar.h>
#include <hbaction.h>
#include <hbmenu.h>
+#include <hbgroupbox.h>
+#include <hbselectiondialog.h>
#include <QPixmap>
#include <QTimer>
+#include <HbInputDialog>
#include "irviewmanager.h"
#include "irfavoritesview.h"
@@ -33,7 +36,8 @@
#include "irqisdsdatastructure.h"
#include "irqutility.h"
#include "iruidefines.h"
-
+#include "irstationshare.h"
+#include "irstationdetailsview.h"
const int KBitmapSize = 59;
const QString KActionShareName("Share");
@@ -41,6 +45,7 @@
const QString KActionRenameName("Rename");
const QString KActionDetailsName("Details");
+
// public functions
/*
@@ -48,9 +53,12 @@
*/
IRFavoritesView::IRFavoritesView(IRApplication *aApplication, TIRViewId aViewId)
: IrAbstractListViewBase(aApplication, aViewId),
- iClearFavoriteAction(NULL),iLogoPreset(NULL)
+ iStationShare(NULL),
+ iMultiDeleteDialog(NULL),
+ iMultiDeleteAction(NULL),
+ iLogoPreset(NULL)
{
- setFlag(EViewFlag_ClearStackWhenActivate);
+ setFlag(EViewFlag_ClearStackWhenActivate|EViewFlag_StickyViewEnabled);
//if this view is not starting view, finish all initialization in constructor
if (getViewManager()->views().count() > 0)
@@ -66,6 +74,12 @@
{
delete iLogoPreset;
iLogoPreset = NULL;
+
+ delete iMultiDeleteDialog;
+ iMultiDeleteDialog = NULL;
+
+ delete iStationShare;
+ iStationShare = NULL;
}
TIRHandleResult IRFavoritesView::handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason)
@@ -82,19 +96,24 @@
switch (aCommand)
{
+ case EIR_ViewCommand_TOBEACTIVATED:
+ iModel->checkFavoritesUpdate();
+ ret = EIR_NoDefault;
+ break;
+
case EIR_ViewCommand_ACTIVATED:
connect(iIsdsClient, SIGNAL(presetLogoDownloaded(IRQPreset* )),
this, SLOT(presetLogoDownload(IRQPreset* )));
connect(iIsdsClient, SIGNAL(presetLogoDownloadError()),
this, SLOT(presetLogoDownloadError()));
- iModel->checkFavoritesUpdate();
-
leftCount = iIconIndexArray.count();
if( leftCount > 0 )
{
iConvertTimer->start();
}
+
+ getViewManager()->saveScreenShot();
ret = EIR_NoDefault;
break;
@@ -156,6 +175,16 @@
}
}
+#ifdef HS_WIDGET_ENABLED
+void IRFavoritesView::itemAboutToBeSelected(bool &aNeedNetwork)
+{
+ aNeedNetwork = true;
+
+ int currentIndex = iListView->currentIndex().row();
+ iPlayController->setConnectingStationName(iModel->getPreset(currentIndex)->name);
+}
+#endif
+
void IRFavoritesView::handleItemSelected()
{
int currentIndex = iListView->currentIndex().row();
@@ -175,14 +204,42 @@
}
// ---------------------------------------------------------------------------
-// IRFavoritesView::clearAllList()
+// IRFavoritesView::deleteFavorites()
//---------------------------------------------------------------------------
-void IRFavoritesView::clearAllFavorites()
+void IRFavoritesView::deleteFavorites()
{
- iIconIndexArray.clear();
- iModel->clearFavoriteDB();
- iIsdsClient->isdsLogoDownCancelTransaction();
- iConvertTimer->stop();
+ if (NULL == iMultiDeleteDialog)
+ {
+ iMultiDeleteDialog = new HbSelectionDialog;
+ iMultiDeleteDialog->setSelectionMode(HbAbstractItemView::MultiSelection);
+
+ HbGroupBox * header = new HbGroupBox;
+#ifdef SUBTITLE_STR_BY_LOCID
+ header->setHeading(hbTrId("txt_irad_subtitle_select_items_to_delete"));
+#else
+ header->setHeading(hbTrId("Select items to delete"));
+#endif
+ iMultiDeleteDialog->setHeadingWidget(header);
+
+
+ QList<QAction *> oriActions = iMultiDeleteDialog->actions();
+ for(int i = 0; i< oriActions.count(); i++)
+ {
+ iMultiDeleteDialog->removeAction(oriActions.at(i));
+ delete oriActions.at(i);
+ }
+
+#ifdef SUBTITLE_STR_BY_LOCID
+ iMultiDeleteDialog->addAction(new HbAction(hbTrId("txt_common_button_delete")));
+ iMultiDeleteDialog->addAction(new HbAction(hbTrId("txt_common_button_cancel")));
+#else
+ iMultiDeleteDialog->addAction(new HbAction(hbTrId("Delete")));
+ iMultiDeleteDialog->addAction(new HbAction(hbTrId("Cancel")));
+#endif
+ }
+
+ iMultiDeleteDialog->setModel(iModel);
+ iMultiDeleteDialog->open(this,SLOT(deleteDialogClosed(HbAction*)));
}
void IRFavoritesView::networkRequestNotified(IRQNetworkEvent aEvent)
@@ -195,38 +252,41 @@
switch (aEvent)
{
case EIRQNetworkConnectionEstablished:
- iApplication->closeConnectingDialog();
if (EIR_UseNetwork_SelectItem == getUseNetworkReason())
{
handleItemSelected();
- }
-
- setUseNetworkReason(EIR_UseNetwork_NoReason);
+ }
break;
default:
setCheckedAction();
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
void IRFavoritesView::prepareMenu()
{
- if (NULL == iClearFavoriteAction)
+ if (NULL == iMultiDeleteAction)
{
- iClearFavoriteAction = new HbAction(hbTrId("txt_irad_opt_clear_favorites"), menu());
- connect(iClearFavoriteAction, SIGNAL(triggered()), this, SLOT(clearAllFavorites()));
+#ifdef SUBTITLE_STR_BY_LOCID
+ iMultiDeleteAction = new HbAction(hbTrId("txt_irad_opt_delete_stations"), menu());
+#else
+ iMultiDeleteAction = new HbAction(hbTrId("Delete stations"), menu());
+#endif
+ connect(iMultiDeleteAction, SIGNAL(triggered()), this, SLOT(deleteFavorites()));
}
-
+
HbMenu *viewMenu = menu();
-
- viewMenu->removeAction(iClearFavoriteAction);
+
+ viewMenu->removeAction(iMultiDeleteAction);
HbAction * settingAction = qobject_cast<HbAction *>(iLoader.findObject(SETTINGS_ACTION));
-
+
if (iModel->rowCount() > 0)
{
- viewMenu->insertAction(settingAction, iClearFavoriteAction);
+ viewMenu->insertAction(settingAction, iMultiDeleteAction);
}
}
@@ -302,22 +362,57 @@
void IRFavoritesView::modelChanged()
{
- QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
+#ifdef SUBTITLE_STR_BY_LOCID
+ QString headingStr = hbTrId("txt_irad_subtitle_favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+ QString headingStr = hbTrId("Favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
setHeadingText(headingStr);
- iIconIndexArray.clear();
-
- for (int i = 0; i < iModel->rowCount(); ++i)
- {
- if (iModel->getImgUrl(i) != "")
- {
- iIconIndexArray.append(i);
- }
- }
+ updateIconIndexArray();
iListView->reset();
iListView->setCurrentIndex(iModel->index(0));
}
+void IRFavoritesView::deleteDialogClosed(HbAction *aAction)
+{
+ if (iMultiDeleteDialog->actions().at(0) == aAction)
+ {
+ QModelIndexList selectedIndexes = iMultiDeleteDialog->selectedModelIndexes();
+ if (!selectedIndexes.empty())
+ {
+ if (!iIconIndexArray.empty())
+ {
+ iIsdsClient->isdsLogoDownCancelTransaction();
+ iConvertTimer->stop();
+ }
+
+ if(!iModel->deleteMultiFavorites(selectedIndexes))
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+#else
+ popupNote(hbTrId("Operation failed"), HbMessageBox::MessageTypeWarning);
+#endif
+ }
+
+ updateIconIndexArray();
+#ifdef SUBTITLE_STR_BY_LOCID
+ QString headingStr = hbTrId("txt_irad_subtitle_favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+ QString headingStr = hbTrId("Favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
+ setHeadingText(headingStr);
+
+ if (!iIconIndexArray.empty())
+ {
+ iConvertTimer->start();
+ }
+ }
+ }
+ iMultiDeleteDialog->setModel(NULL);
+}
+
void IRFavoritesView::actionClicked(HbAction *aAction)
{
if ( aAction )
@@ -362,13 +457,29 @@
contextMenu->setAttribute(Qt::WA_DeleteOnClose);
connect(contextMenu, SIGNAL(triggered(HbAction*)), this, SLOT(actionClicked(HbAction*)));
- action = contextMenu->addAction(hbTrId("txt_irad_opt_share_station"));
+#ifdef SUBTITLE_STR_BY_LOCID
+ action = contextMenu->addAction(hbTrId("txt_irad_opt_share"));
+#else
+ action = contextMenu->addAction(hbTrId("Share"));
+#endif
action->setObjectName(KActionShareName);
+#ifdef SUBTITLE_STR_BY_LOCID
action = contextMenu->addAction(hbTrId("txt_common_menu_delete"));
+#else
+ action = contextMenu->addAction(hbTrId("Delete"));
+#endif
action->setObjectName(KActionDeleteName);
+#ifdef SUBTITLE_STR_BY_LOCID
action = contextMenu->addAction(hbTrId("txt_common_menu_rename_item"));
+#else
+ action = contextMenu->addAction(hbTrId("Rename"));
+#endif
action->setObjectName(KActionRenameName);
+#ifdef SUBTITLE_STR_BY_LOCID
action = contextMenu->addAction(hbTrId("txt_common_menu_details"));
+#else
+ action = contextMenu->addAction(hbTrId("Details"));
+#endif
action->setObjectName(KActionDetailsName);
contextMenu->open();
@@ -376,27 +487,130 @@
void IRFavoritesView::shareContextAction()
{
+ int current = iListView->currentIndex().row();
+
+ if (NULL == iStationShare)
+ {
+ iStationShare = new IRStationShare();
+ }
+ iStationShare->shareStations(*iModel->getPreset(current));
+}
+
+void IRFavoritesView::updateIconIndexArray()
+{
+ iIconIndexArray.clear();
+ for (int i = 0; i < iModel->rowCount(); ++i)
+ {
+ if (iModel->getImgUrl(i) != ""
+ && !iModel->isLogoReady(i))
+ {
+ iIconIndexArray.append(i);
+ }
+ }
}
void IRFavoritesView::renameContextAction()
{
-
+ int current = iListView->currentIndex().row();
+ IRQPreset *preset = iModel->getPreset(current);
+#ifdef SUBTITLE_STR_BY_LOCID
+ HbInputDialog::getText(hbTrId("txt_common_menu_rename_item"), this, SLOT(renameConfirmed(HbAction*)), preset->name);
+#else
+ HbInputDialog::getText(hbTrId("Rename"), this, SLOT(renameConfirmed(HbAction*)), preset->name);
+#endif
}
void IRFavoritesView::detailsContextAction()
-{
+{
+ int selectedItemIndex = iListView->currentIndex().row();
+ IRQPreset *channelPreset = iModel->getPreset(selectedItemIndex);
+ IRStationDetailsView *stationDetailsView = static_cast<IRStationDetailsView*>(getViewManager()->getView(EIRView_StationDetailsView, true));
+ stationDetailsView->setDetails(channelPreset);
+
+ getViewManager()->activateView(EIRView_StationDetailsView);
}
void IRFavoritesView::deleteContextAction()
{
- int current = iListView->currentIndex().row();
- bool ret = iModel->deleteOneFavorite(current);
- if ( !ret )
- {
- popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
- }
+ if (!iIconIndexArray.empty())
+ {
+ iIsdsClient->isdsLogoDownCancelTransaction();
+ iConvertTimer->stop();
+ }
+
+ int current = iListView->currentIndex().row();
+ if (iModel->deleteOneFavorite(current))
+ {
+ updateIconIndexArray();
+#ifdef SUBTITLE_STR_BY_LOCID
+ QString headingStr = hbTrId("txt_irad_subtitle_favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+ QString headingStr = hbTrId("Favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
+ setHeadingText(headingStr);
+ }
+ else
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+#else
+ popupNote(hbTrId("Operation failed"), HbMessageBox::MessageTypeWarning);
+#endif
+ }
+
+ if (!iIconIndexArray.empty())
+ {
+ iConvertTimer->start();
+ }
+}
+
+void IRFavoritesView::renameConfirmed(HbAction *aAction)
+{
+ HbInputDialog *dialog = static_cast<HbInputDialog*>(sender());
+ if (dialog)
+ {
+ if (aAction == dialog->actions().at(0))
+ {
+ int current = iListView->currentIndex().row();
+ IRQPreset *preset = iModel->getPreset(current);
+
+ QString newName = dialog->value().toString().trimmed();
+ if (newName.isEmpty())
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ newName = hbTrId("txt_irad_info_unnamed_station");
+#else
+ newName = hbTrId("Unnamed station");
+#endif
+ }
+
+ if (newName == preset->name)
+ {
+ return;
+ }
+
+ int ret = iFavorites->renamePreset(*preset, newName);
+ switch (ret)
+ {
+ case EIRQErrorNotFound:
+ //popup note : not found
+ break;
+
+ case EIRQErrorAlreadyExist:
+ //popup note : already exists
+ break;
+
+ case EIRQErrorNone:
+ iModel->updateFavoriteName(current, newName);
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
}
void IRFavoritesView::initToolBar()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/src/irfileviewservice.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,75 @@
+/*
+* 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:
+*
+*/
+#include <xqserviceutil.h>
+
+#include "irfileviewservice.h"
+#include "irplaylist.h"
+#include "irapplication.h"
+#include "irqsettings.h"
+
+#define INTERNETRADIO_SERVICE_NAME "internet_radio_10_1.com.nokia.symbian.IFileView"
+
+IRFileViewService::IRFileViewService(IRApplication *aApplication) : XQServiceProvider(INTERNETRADIO_SERVICE_NAME),
+iApplication(aApplication), iPlayList(NULL)
+{
+ if (XQServiceUtil::isService())
+ {
+ //Publishes all public slots on this object
+ publishAll();
+ }
+}
+
+IRFileViewService::~IRFileViewService()
+{
+ delete iPlayList;
+}
+
+IRPlayList* IRFileViewService::getPlayList() const
+{
+ return iPlayList;
+}
+
+void IRFileViewService::view(const QString &aFileName)
+{
+ if (NULL == iPlayList)
+ {
+ iPlayList = new IRPlayList;
+ }
+
+ iPlayList->parseFile(aFileName);
+
+ if (1 == iPlayList->getNumberOfEntries())
+ {
+ iApplication->launchStartingView(EIRView_PlayingView);
+ }
+ else if (iPlayList->getNumberOfEntries() > 1)
+ {
+ iApplication->launchStartingView(EIRView_PlsView);
+ }
+ else
+ {
+ //normal launch, launch starting view
+ TIRViewId viewId = EIRView_CategoryView;
+ iApplication->getSettings()->getStartingViewId(viewId);
+ iApplication->launchStartingView(viewId);
+ }
+}
+
+void IRFileViewService::view(const XQSharableFile &/*aSharableFile*/)
+{
+
+}
--- a/qtinternetradio/ui/src/irhistoryview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irhistoryview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -17,6 +17,7 @@
#include <hblistview.h>
#include <hbmenu.h>
#include <hbaction.h>
+#include <hbnotificationdialog.h>
#include <QPixmap>
#include <QTimer>
@@ -58,24 +59,29 @@
iListView->setModel(iModel);
iListView->setCurrentIndex(iModel->index(0));
- iClearHistoryAction = new HbAction(hbTrId("txt_irad_opt_clear_station_history"), menu());
-
+#ifdef SUBTITLE_STR_BY_LOCID
+ iClearHistoryAction = new HbAction(hbTrId("txt_irad_opt_clear_list"), menu());
+#else
+ iClearHistoryAction = new HbAction(hbTrId("Clear list"), menu());
+#endif
iConvertTimer = new QTimer(this);
iConvertTimer->setInterval(10);
- connect(iClearHistoryAction, SIGNAL(triggered()), this, SLOT(clearAllList()));
+ connect(iClearHistoryAction, SIGNAL(triggered()), this, SLOT(popupClearHistoryConfirmMessageBox()));
connect(iNetworkController, SIGNAL(networkRequestNotified(IRQNetworkEvent)),
this, SLOT(networkRequestNotified(IRQNetworkEvent)));
connect(iModel, SIGNAL(modelChanged()), this, SLOT(modelChanged()));
connect(iConvertTimer, SIGNAL(timeout()), this, SLOT(convertAnother()));
}
-
-void IRHistoryView::gotoSongHistory()
+void IRHistoryView::popupClearHistoryConfirmMessageBox()
{
- getViewManager()->activateView(EIRView_SongHistoryView);
+#ifdef SUBTITLE_STR_BY_LOCID
+ HbMessageBox::question(hbTrId("txt_irad_info_clear_station_list"), this, SLOT(clearAllList(HbAction*)), hbTrId("txt_common_button_ok"), hbTrId("txt_common_button_cancel"));
+#else
+ HbMessageBox::question(hbTrId("Clear station list?"), this, SLOT(clearAllList(HbAction*)), hbTrId("Ok"), hbTrId("Cancel"));
+#endif
}
-
/*
* Description : destructor
*/
@@ -100,17 +106,18 @@
switch (aCommand)
{
+
+ case EIR_ViewCommand_TOBEACTIVATED:
+ showHistory();
+ ret = EIR_NoDefault;
+ break;
+
case EIR_ViewCommand_ACTIVATED:
- connect(iIsdsClient, SIGNAL(presetResponse(IRQPreset *)),
- this, SLOT(presetResponse(IRQPreset *)));
- connect(iIsdsClient, SIGNAL(operationException(IRQError)),
- this, SLOT(operationException(IRQError)));
connect(iIsdsClient, SIGNAL(presetLogoDownloaded(IRQPreset* )),
this, SLOT(presetLogoDownload(IRQPreset* )));
connect(iIsdsClient, SIGNAL(presetLogoDownloadError()),
this, SLOT(presetLogoDownloadError()));
- showHistory();
leftCount = iIconIndexArray.count();
if( leftCount > 0 )
{
@@ -128,11 +135,7 @@
//iIconIndexArray must be cleared, because timer call back convertAnother() might be
//called after view is deactivated. In that case, iModel->getImgURL(aIndex); will crash
iIconIndexArray.clear();
-
- disconnect(iIsdsClient, SIGNAL(presetResponse(IRQPreset *)),
- this, SLOT(presetResponse(IRQPreset *)));
- disconnect(iIsdsClient, SIGNAL(operationException(IRQError)),
- this, SLOT(operationException(IRQError)));
+
disconnect(iIsdsClient, SIGNAL(presetLogoDownloaded(IRQPreset*)),
this, SLOT(presetLogoDownload(IRQPreset* )));
disconnect(iIsdsClient, SIGNAL(presetLogoDownloadError()),
@@ -163,48 +166,30 @@
return;
}
+ IRQPreset preset;
+ convertStationHistory2Preset(*hisInfo, preset);
+
if (hisInfo->getChannelType())
{
- // channel from isds server, get this preset
- iPlayController->createBufferingDialog(this, SLOT(cancelRequest()));
- iIsdsClient->isdsListenRequest(hisInfo->getChannelId(), true);
+ // channel from isds server
+ iPlayController->connectToChannel(&preset, EIRQHistoryIsds);
}
else
{
// user defined channel
- IRQChannelServerURL server;
- server.bitrate = hisInfo->getBitrate();
- server.url = hisInfo->getStreamUrl();
- server.serverName = hisInfo->getChannelName();
- IRQPreset preset;
- preset.insertChannelServer(server);
- preset.name = hisInfo->getChannelName();
- preset.description = hisInfo->getChannelDesc();
- preset.shortDesc = hisInfo->getChannelDesc();
- preset.type = 0;
- preset.uniqID = 0;
- preset.presetId = 0;
-
iPlayController->connectToChannel(&preset,EIRQHistoryAdhoc);
}
}
-// ---------------------------------------------------------------------------
-// IRHistoryView::presetResponse()
-// gets the preset from isds client and play
-//---------------------------------------------------------------------------
-void IRHistoryView::presetResponse(IRQPreset *aPreset)
+#ifdef HS_WIDGET_ENABLED
+void IRHistoryView::itemAboutToBeSelected(bool &aNeedNetwork)
{
- iPlayController->connectToChannel(aPreset,EIRQHistoryIsds);
+ aNeedNetwork = true;
+
+ int index = iListView->currentIndex().row();
+ iPlayController->setConnectingStationName(iModel->getHistoryInfo(index)->getChannelName());
}
-
-void IRHistoryView::operationException(IRQError aError)
-{
- Q_UNUSED(aError);
- iPlayController->closeBufferingDialog();
-
- popupNote(hbTrId("txt_irad_info_failed_to_connect"), HbMessageBox::MessageTypeWarning);
-}
+#endif
void IRHistoryView::networkRequestNotified(IRQNetworkEvent aEvent)
{
@@ -216,25 +201,18 @@
switch (aEvent)
{
case EIRQNetworkConnectionEstablished:
- iApplication->closeConnectingDialog();
-
if (EIR_UseNetwork_SelectItem == getUseNetworkReason())
{
handleItemSelected();
}
-
- setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
default:
setCheckedAction();
break;
}
-}
-
-void IRHistoryView::cancelRequest()
-{
- iIsdsClient->isdsCancelRequest();
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
// ---------------------------------------------------------------------------
@@ -266,13 +244,20 @@
// IRHistoryView::clearAllList()
// gets the List which was stored earlier
//---------------------------------------------------------------------------
-void IRHistoryView::clearAllList()
+void IRHistoryView::clearAllList(HbAction *aAction)
{
- iIconIndexArray.clear();
- iModel->clearAllList();
- iConvertTimer->stop();
- iIsdsClient->isdsLogoDownCancelTransaction();
- iListView->reset();
+ HbMessageBox *dialog = static_cast<HbMessageBox*>(sender());
+ if (dialog)
+ {
+ if (aAction == dialog->actions().at(0))
+ {
+ iIconIndexArray.clear();
+ iModel->clearAllList();
+ iConvertTimer->stop();
+ iIsdsClient->isdsLogoDownCancelTransaction();
+ iListView->reset();
+ }
+ }
}
void IRHistoryView::prepareMenu()
@@ -364,7 +349,12 @@
void IRHistoryView::modelChanged()
{
- QString headingStr = hbTrId("Station History") + " (" + QString::number(iModel->rowCount()) + ")";
+#ifdef SUBTITLE_STR_BY_LOCID
+ QString headingStr = hbTrId("txt_irad_subtitle_recently_played_stations") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+ QString headingStr = hbTrId("Recently played stations") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
+
setHeadingText(headingStr);
}
@@ -383,7 +373,7 @@
}
else if( objectName == KActionDetailsName)
{
- detailContextAction();
+ detailsContextAction();
}
}
}
@@ -396,23 +386,45 @@
convertStationHistory2Preset(*currentInfo, preset);
int retValue = iFavorites->addPreset(preset);
+ HbNotificationDialog *add2FavNote = new HbNotificationDialog();
+ add2FavNote->setModal(true);
+ add2FavNote->setAttribute(Qt::WA_DeleteOnClose);
+
switch (retValue)
{
case EIRQErrorNone:
- popupNote(hbTrId("txt_irad_menu_add_to_favorite"), HbMessageBox::MessageTypeInformation);
-
+#ifdef SUBTITLE_STR_BY_LOCID
+ add2FavNote->setTitle(hbTrId("txt_irad_info_added_to_favorites"));
+#else
+ add2FavNote->setTitle(hbTrId("Added to Favorites"));
+#endif
+ //add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
+ add2FavNote->show();
break;
case EIRQErrorOutOfMemory:
- popupNote(hbTrId("txt_irad_info_can_not_add_more"), HbMessageBox::MessageTypeInformation);
- break;
+#ifdef SUBTITLE_STR_BY_LOCID
+ add2FavNote->setTitle(hbTrId("txt_irad_info_can_not_add_more"));
+#else
+ add2FavNote->setTitle(hbTrId("Can't add more"));
+#endif
+ //add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
+ add2FavNote->show();
+ break;
case EIRQErrorAlreadyExist:
- popupNote(hbTrId("txt_irad_info_favorite_updated"), HbMessageBox::MessageTypeInformation);
- break;
+#ifdef SUBTITLE_STR_BY_LOCID
+ add2FavNote->setTitle(hbTrId("txt_irad_info_favorite_updated"));
+#else
+ add2FavNote->setTitle(hbTrId("Favorite updated"));
+#endif
+ //add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
+ add2FavNote->show();
+ break;
- default:
- break;
+ default:
+ Q_ASSERT(false);
+ break;
}
}
@@ -422,16 +434,25 @@
bool ret = iModel->deleteOneItem(current);
if( !ret )
{
+#ifdef SUBTITLE_STR_BY_LOCID
popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+#else
+ popupNote(hbTrId("Operation failed"), HbMessageBox::MessageTypeWarning);
+#endif
}
}
-void IRHistoryView::detailContextAction()
-{
- getViewManager()->activateView(EIRView_StationDetailsView);
- IRStationDetailsView *channelHistoryView = static_cast<IRStationDetailsView*>(getViewManager()->getView(EIRView_StationDetailsView));
+void IRHistoryView::detailsContextAction()
+{
int selectedItemIndex = iListView->currentIndex().row();
IRQSongHistoryInfo *channelDetailInfo = iModel->getHistoryInfo(selectedItemIndex);
- channelHistoryView->setDetails(channelDetailInfo);
+
+ IRQPreset channelPreset;
+ convertStationHistory2Preset(*channelDetailInfo, channelPreset);
+
+ IRStationDetailsView *stationDetailsView = static_cast<IRStationDetailsView*>(getViewManager()->getView(EIRView_StationDetailsView, true));
+ stationDetailsView->setDetails(&channelPreset);
+
+ getViewManager()->activateView(EIRView_StationDetailsView);
}
void IRHistoryView::listViewLongPressed(HbAbstractViewItem *aItem, const QPointF& aCoords)
@@ -444,11 +465,23 @@
contextMenu->setAttribute(Qt::WA_DeleteOnClose);
connect(contextMenu, SIGNAL(triggered(HbAction*)), this, SLOT(actionClicked(HbAction*)));
+#ifdef SUBTITLE_STR_BY_LOCID
action = contextMenu->addAction(hbTrId("txt_irad_menu_add_to_favorite"));
+#else
+ action = contextMenu->addAction(hbTrId("Add to favorites"));
+#endif
action->setObjectName(KActionAddName);
+#ifdef SUBTITLE_STR_BY_LOCID
action = contextMenu->addAction(hbTrId("txt_common_menu_delete"));
+#else
+ action = contextMenu->addAction(hbTrId("Delete"));
+#endif
action->setObjectName(KActionDeleteName);
+#ifdef SUBTITLE_STR_BY_LOCID
action = contextMenu->addAction(hbTrId("txt_common_menu_details"));
+#else
+ action = contextMenu->addAction(hbTrId("Details"));
+#endif
action->setObjectName(KActionDetailsName);
contextMenu->open();
@@ -457,6 +490,7 @@
void IRHistoryView::convertStationHistory2Preset(const IRQSongHistoryInfo& aHistoryInfo, IRQPreset& aPreset)
{
IRQChannelServerURL url;
+ url.serverName = aHistoryInfo.getChannelName();
url.url = aHistoryInfo.getStreamUrl();
url.bitrate = aHistoryInfo.getBitrate();
aPreset.name = aHistoryInfo.getChannelName();
@@ -465,6 +499,9 @@
aPreset.presetId = aHistoryInfo.getChannelId();
aPreset.shortDesc = aHistoryInfo.getChannelDesc();
aPreset.imgUrl = aHistoryInfo.getImageUrl();
+ aPreset.genreName = aHistoryInfo.getGenreName();
+ aPreset.countryName = aHistoryInfo.getCountryName();
+ aPreset.languageName = aHistoryInfo.getLanguageName();
aPreset.description = aHistoryInfo.getChannelDesc();
aPreset.musicStoreStatus = aHistoryInfo.getMusicStoreStatus();
}
--- a/qtinternetradio/ui/src/irlastplayedstationinfo.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irlastplayedstationinfo.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,6 +16,10 @@
*/
#include <QDataStream>
#include <QFile>
+#ifdef HS_WIDGET_ENABLED
+#include <QSettings>
+#include "irservicedef.h"
+#endif
#include "irqisdsdatastructure.h"
#include "irlastplayedstationinfo.h"
@@ -57,6 +61,11 @@
return;
}
+#ifdef HS_WIDGET_ENABLED
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ settings.setValue(KIrSettingStationName,iLastPlayedStation->name);
+#endif
+
QFile file(KFileName);
bool ret = file.open(QIODevice::Truncate | QIODevice::WriteOnly);
if (!ret)
--- a/qtinternetradio/ui/src/irmainmodel.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irmainmodel.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -51,10 +51,17 @@
void IRMainModel::initModel()
{
+#ifdef SUBTITLE_STR_BY_LOCID
iPrimaryTexts << hbTrId("txt_irad_list_stations_by_country_region")
<< hbTrId("txt_irad_list_stations_by_language")
- << hbTrId("txt_irad_list_recently_played_stations")
- << hbTrId("txt_irad_list_recently_played_songs");
+ << hbTrId("txt_irad_list_stations_recently_played")
+ << hbTrId("txt_irad_list_songs_recently_played");
+#else
+ iPrimaryTexts << hbTrId("Stations by country/region")
+ << hbTrId("Stations by language")
+ << hbTrId("Stations recently played")
+ << hbTrId("Songs recently played");
+#endif
}
void IRMainModel::checkUpdate()
@@ -64,7 +71,12 @@
return;
}
+#ifdef SUBTITLE_STR_BY_LOCID
QString primary = hbTrId("txt_irad_subtitle_stations_from_play_list");
+#else
+ QString primary = hbTrId("Stations from play list");
+#endif
+
if (iPlayList->getNumberOfEntries() > 0)
{
//if pls item is not in collections view, add
--- a/qtinternetradio/ui/src/irmainview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irmainview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -14,6 +14,7 @@
* Description:
*
*/
+#include <hbtoolbar.h>
#include <hbaction.h>
#include <hblistview.h>
@@ -36,13 +37,13 @@
IrAbstractListViewBase(aApplication, aViewId),
iMainModel(NULL)
{
- setFlag(EViewFlag_ClearStackWhenActivate);
+ setFlag(EViewFlag_ClearStackWhenActivate|EViewFlag_StickyViewEnabled);
iLoader.load(ABSTRACT_LIST_VIEW_BASE_LAYOUT_FILENAME, ABSTRACT_LIST_VIEW_BASE_WITH_TOOLBAR_SECTION);
//if this view is not starting view, finish all initialization in constructor
if (getViewManager()->views().count() > 0)
{
- lazyInit();
+ normalInit();
}
}
@@ -116,20 +117,18 @@
switch (aEvent)
{
case EIRQNetworkConnectionEstablished:
- iApplication->closeConnectingDialog();
-
if (EIR_UseNetwork_SelectItem == getUseNetworkReason())
{
handleItemSelected();
}
- setUseNetworkReason(EIR_UseNetwork_NoReason);
-
break;
default:
setCheckedAction();
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
/*
@@ -173,12 +172,47 @@
iMainModel->checkUpdate();
}
+//from base class IRBaseView
+TIRHandleResult IRMainView::handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason)
+{
+ if (!initCompleted())
+ {
+ return EIR_DoDefault;
+ }
+
+ Q_UNUSED(aReason);
+ TIRHandleResult ret = IrAbstractListViewBase::handleCommand(aCommand, aReason);
+
+ switch (aCommand)
+ {
+ case EIR_ViewCommand_ACTIVATED:
+ getViewManager()->saveScreenShot();
+ break;
+
+ default:
+ break;
+ }
+
+ return ret;
+}
+
void IRMainView::lazyInit()
{
if (!initCompleted())
{
+ normalInit();
+
+ //initialization from handleCommand()
+ handleCommand(EIR_ViewCommand_ACTIVATED, EIR_ViewCommandReason_Show);
+ }
+}
+
+void IRMainView::normalInit()
+{
+ if (!initCompleted())
+ {
IrAbstractListViewBase::lazyInit();
-
+ initToolBar();
setCheckedAction();
connect(iNetworkController, SIGNAL(networkRequestNotified(IRQNetworkEvent)),
@@ -191,3 +225,12 @@
setInitCompleted(true);
}
}
+
+void IRMainView::initToolBar()
+{
+ HbToolBar *viewToolBar = toolBar();
+ viewToolBar->addAction(iGenresAction);
+ viewToolBar->addAction(iCollectionsAction);
+ viewToolBar->addAction(iFavoritesAction);
+ viewToolBar->addAction(iSearchAction);
+}
--- a/qtinternetradio/ui/src/irmemorycollector.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irmemorycollector.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -16,10 +16,12 @@
*/
#include <QCoreApplication>
+#include <QSettings>
#include "irmemorycollector.h"
#include "irapplication.h"
#include "irviewmanager.h"
+#include "irservicedef.h"
IRMemoryCollector::IRMemoryCollector(IRApplication* aApplication) : iApplication(aApplication)
{
@@ -29,6 +31,15 @@
void IRMemoryCollector::aboutToQuit()
{
IRViewManager *viewManager = iApplication->getViewManager();
+
+ //we need to save the status for splash view, need to extend in future
+ TIRViewId exitingID = viewManager->getExitingView();
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ QVariant data(QVariant::Bool);
+ bool isNowplaying = (EIRView_PlayingView == exitingID)? true:false;
+ data.setValue(isNowplaying);
+ settings.setValue(KIrSettingSplashNowplaying,data);
+
delete iApplication;
iApplication = NULL;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/src/irmonitorservice.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,299 @@
+/*
+* 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:
+*
+*/
+
+// System includes
+#include <QSettings>
+
+// User includes
+#include "irmonitorservice.h"
+#include "irapplication.h"
+#include "irplaycontroller.h"
+#include "irlastplayedstationinfo.h"
+#include "irqisdsdatastructure.h"
+#include "irqmetadata.h"
+#include "irplaylist.h"
+#include "irviewmanager.h"
+#include "irqlogger.h"
+
+// Contants
+static const QString IR_MONITOR_SERVICE = "internet_radio_10_1.com.nokia.symbian.IInternetRadioMonitor";
+
+#define IS_READY(itemFlag) mReadyItems.testFlag(itemFlag)
+#define SET_FLAG(itemFlag) mReadyItems |= itemFlag
+#define CLEAR_FLAG(itemFlag) mReadyItems &= ~itemFlag
+#define CLEAR_ALL_FLAGS() mReadyItems &= !mReadyItems
+#define ANY_READY() \
+ mReadyItems.testFlag(StationName) || \
+ mReadyItems.testFlag(StationLogo) || \
+ mReadyItems.testFlag(MetaData) || \
+ mReadyItems.testFlag(IrState)
+
+// Constructor
+IrMonitorService::IrMonitorService(IRApplication *aIrApp, QObject *aParent) :
+ XQServiceProvider(IR_MONITOR_SERVICE, aParent),
+ mStationLogoAvailable(false),
+ mIrState(IrAppState::Unknown),
+ mIrApp(aIrApp),
+ mPlayController(NULL)
+{
+ publishAll();
+ mPlayController = mIrApp->getPlayController();
+ setupConnection();
+}
+
+// Destructor
+IrMonitorService::~IrMonitorService()
+{
+}
+
+void IrMonitorService::setupConnection()
+{
+ // meta data update
+ connect(mPlayController, SIGNAL(metaDataAvailable(IRQMetaData*)),
+ this, SLOT(updateMetaData(IRQMetaData*)));
+ // station logo update
+ connect(mPlayController, SIGNAL(stationLogoUpdated(bool)),
+ this, SLOT(handleStationLogoUpdated(bool)));
+ // connecting started
+ connect(mPlayController, SIGNAL(connectingStarted(QString)),
+ this, SLOT(handleLoadingStarted(QString)));
+ // buffering started
+ connect(mPlayController, SIGNAL(bufferingStarted(QString)),
+ this, SLOT(handleLoadingStarted(QString)));
+ // playing started
+ connect(mPlayController, SIGNAL(playingStarted()),
+ this, SLOT(handlePlayStarted()));
+ // playing stopped
+ connect(mPlayController, SIGNAL(playingStopped()),
+ this, SLOT(handlePlayStopped()));
+ // connecting cancelled
+ connect(mPlayController, SIGNAL(connectingCancelled(QString)),
+ this, SLOT(handleLoadingCancelled(QString)));
+ // buffering cancelled
+ connect(mPlayController, SIGNAL(bufferingCancelled(QString)),
+ this, SLOT(handleLoadingCancelled(QString)));
+}
+
+// service interface, called via Qt Highway
+void IrMonitorService::registerNotifications()
+{
+ mRequestList.append(setCurrentRequestAsync());
+
+ if (ANY_READY())
+ {
+ notifyAll();
+ }
+}
+
+// service interface, called via Qt Highway
+void IrMonitorService::refreshAllData()
+{
+ IrServiceDataList notificationList;
+
+ IRQPreset * currentPreset = mPlayController->getNowPlayingPreset();
+
+ switch (mPlayController->state())
+ {
+ case IRPlayController::EIdle:
+ notificationList.append(IrServiceData((int)IrServiceNotification::IrState, (int)IrAppState::RunningInit));
+ break;
+
+ case IRPlayController::EStopped:
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationName, currentPreset->name));
+#ifdef HS_WIDGET_ENABLED
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationLogo, mPlayController->isStationLogoAvailable()));
+#endif
+ notificationList.append(IrServiceData((int)IrServiceNotification::MetaData, QString("")));
+ notificationList.append(IrServiceData((int)IrServiceNotification::IrState, (int)IrAppState::RunningStopped));
+ break;
+
+#ifdef HS_WIDGET_ENABLED
+ case IRPlayController::EConnecting:
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationName, mPlayController->getConnectingStationName()));
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationLogo, mPlayController->isStationLogoAvailable()));
+ notificationList.append(IrServiceData((int)IrServiceNotification::MetaData, QString("")));
+ notificationList.append(IrServiceData((int)IrServiceNotification::IrState, (int)IrAppState::Loading));
+ break;
+#endif
+
+ case IRPlayController::EBuffering:
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationName, currentPreset->name));
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationLogo, mPlayController->isStationLogoAvailable()));
+ notificationList.append(IrServiceData((int)IrServiceNotification::MetaData, QString("")));
+ notificationList.append(IrServiceData((int)IrServiceNotification::IrState, (int)IrAppState::Loading));
+ break;
+
+ case IRPlayController::EPlaying:
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationName, currentPreset->name));
+#ifdef HS_WIDGET_ENABLED
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationLogo, mPlayController->isStationLogoAvailable()));
+#endif
+ notificationList.append(IrServiceData((int)IrServiceNotification::MetaData, mMetaData));
+ notificationList.append(IrServiceData((int)IrServiceNotification::IrState, (int)IrAppState::Playing));
+ break;
+
+ default:
+ break;
+ }
+
+ completeRequest(setCurrentRequestAsync(), qVariantFromValue(notificationList));
+}
+
+/********************************************************************************************************
+ * SLOT for Play Controller
+ *******************************************************************************************************
+ */
+
+void IrMonitorService::updateMetaData(IRQMetaData* aMetaData)
+{
+ if (aMetaData)
+ {
+ SET_FLAG(MetaData);
+ mMetaData = aMetaData->getArtistSongName();
+
+ notifyAll();
+ }
+}
+
+void IrMonitorService::handleStationLogoUpdated(bool aLogoAvailable)
+{
+ mStationLogoAvailable = aLogoAvailable;
+ SET_FLAG(StationLogo);
+
+ notifyAll();
+}
+
+void IrMonitorService::handleLoadingStarted(const QString &aStationName)
+{
+ mMetaData.clear();
+ SET_FLAG(MetaData);
+
+ mStationName = aStationName;
+ SET_FLAG(StationName);
+
+ mIrState = IrAppState::Loading;
+ SET_FLAG(IrState);
+
+ notifyAll();
+}
+
+void IrMonitorService::handleLoadingCancelled(const QString &aStationName)
+{
+ mMetaData.clear();
+ SET_FLAG(MetaData);
+
+ mStationName = aStationName;
+ SET_FLAG(StationName);
+
+ if (mPlayController->isStopped())
+ {
+ mIrState = IrAppState::RunningStopped;
+ }
+ else
+ {
+ mIrState = IrAppState::RunningInit;
+ }
+ SET_FLAG(IrState);
+
+ notifyAll();
+}
+
+void IrMonitorService::handlePlayStarted()
+{
+ mMetaData.clear();
+ SET_FLAG(MetaData);
+
+ IRQPreset * currentPreset = mPlayController->getNowPlayingPreset();
+ mStationName = currentPreset->name;
+ SET_FLAG(StationName);
+
+ mIrState = IrAppState::Playing;
+ SET_FLAG(IrState);
+
+ notifyAll();
+}
+
+void IrMonitorService::handlePlayStopped()
+{
+ mMetaData.clear();
+ SET_FLAG(MetaData);
+
+ mIrState = IrAppState::RunningStopped;
+ SET_FLAG(IrState);
+
+ notifyAll();
+}
+
+
+/********************************************************************************************************
+ * Others
+ *******************************************************************************************************
+ */
+void IrMonitorService::notifyAll()
+{
+ IrServiceDataList notificationList;
+
+ if(IS_READY(StationName))
+ {
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationName, mStationName));
+ }
+
+ if(IS_READY(StationLogo))
+ {
+ notificationList.append(IrServiceData((int)IrServiceNotification::StationLogo, mStationLogoAvailable));
+ }
+
+ if(IS_READY(MetaData))
+ {
+ notificationList.append(IrServiceData((int)IrServiceNotification::MetaData, mMetaData));
+ }
+
+ if(IS_READY(IrState))
+ {
+ notificationList.append(IrServiceData((int)IrServiceNotification::IrState, (int)mIrState));
+ }
+
+ if(notifyList(notificationList))
+ {
+ CLEAR_ALL_FLAGS();
+ }
+}
+
+bool IrMonitorService::notifyList(const IrServiceDataList &aDataList)
+{
+ bool retVal = true;
+
+ if (mRequestList.count() > 0
+ && aDataList.count() > 0)
+ {
+ foreach (int requestId, mRequestList)
+ {
+ retVal &= completeRequest(requestId, qVariantFromValue(aDataList));
+ }
+ mRequestList.clear();
+ }
+ else
+ {
+ return false;
+ }
+
+ return retVal;
+}
+
+Q_IMPLEMENT_USER_METATYPE(IrServiceData)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(IrServiceDataList)
+
--- a/qtinternetradio/ui/src/irnowplayingview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irnowplayingview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -14,10 +14,18 @@
* Description:
*
*/
+#include <hbtoolbar.h>
#include <QPixmap>
#include <hbaction.h>
#include <hblabel.h>
#include <hbnotificationdialog.h>
+#include <QSettings>
+
+#ifdef NOWPLAYING_VIEW_OPTION_B
+#include <hbframedrawer.h>
+#include <hbframeitem.h>
+#endif
+
#include "irviewmanager.h"
#include "irapplication.h"
@@ -38,6 +46,7 @@
#include "irqlogger.h"
#include "irplaylist.h"
#include "irstationdetailsview.h"
+#include "irservicedef.h"
#ifdef ADV_ENABLED
#include <QTimer>
@@ -50,13 +59,20 @@
static const QString KPlayButtonIcon("qtg_mono_play");
static const QString KStopButtonIcon("qtg_mono_stop");
+#ifdef NOWPLAYING_VIEW_OPTION_B
+static const QString KLcdGraphics("qtg_fr_lcd");
+#endif
+
+
+static void saveStationLogo(const QPixmap &aStationLogo);
+
/*
* Description : constructor
*/
IRNowPlayingView::IRNowPlayingView(IRApplication* aApplication, TIRViewId aViewId) :
IRBaseView(aApplication, aViewId),
iStatisticsReporter(NULL),
- iNetworkController(NULL),
+ iStationShare(NULL),
iPlayStopAction(NULL),
iLaunchActionNeeded(false),
iLogoDownloadState(EIdle),
@@ -80,6 +96,8 @@
{
normalInit();
}
+
+ setFlag(EViewFlag_StickyViewEnabled);
}
/*
@@ -87,15 +105,12 @@
*/
IRNowPlayingView::~IRNowPlayingView()
{
- if(iNetworkController)
- {
- iNetworkController->closeInstance();
- }
-
if (iStatisticsReporter)
{
iStatisticsReporter->closeInstance();
}
+
+ delete iStationShare;
}
@@ -164,6 +179,13 @@
connect(iPlayStopAction, SIGNAL(triggered()), this, SLOT(handlePlayStopAction()));
connect(add2FavAction, SIGNAL(triggered()), this, SLOT(handleAddToFavAction()));
connect(flipAction, SIGNAL(triggered()), this, SLOT(handleDetailInfoAction()));
+
+ //could be removed after toolbar issue is ok
+ HbToolBar *viewToolBar = toolBar();
+ viewToolBar->addAction(musicStoreAction);
+ viewToolBar->addAction(iPlayStopAction);
+ viewToolBar->addAction(add2FavAction);
+ viewToolBar->addAction(flipAction);
}
void IRNowPlayingView::initWidget()
@@ -176,6 +198,17 @@
iStationName->setPlainText("");
iSongName->setPlainText("");
iArtistName->setPlainText("");
+
+#ifdef NOWPLAYING_VIEW_OPTION_B
+ HbWidget * viewContainer = qobject_cast<HbWidget *> (iLoader.findObject(VIEW_CONTAINER));
+ HbFrameDrawer* drawer = new HbFrameDrawer(KLcdGraphics, HbFrameDrawer::NinePieces);
+ HbFrameItem* backgroundItem = new HbFrameItem(drawer, viewContainer);
+ if (backgroundItem)
+ {
+ viewContainer->setBackgroundItem(backgroundItem);
+ }
+#endif
+
#ifdef ADV_ENABLED
iAdvImage = qobject_cast<HbLabel *> (iLoader.findObject( NOW_PLAYING_VIEW_OBJECT_ADVERTISEMENT_IMAGE));
iAdvImage->setIcon(HbIcon(KDefaultStationLogo));
@@ -187,10 +220,16 @@
*/
void IRNowPlayingView::updateWidgets()
{
+ if (iLaunchActionNeeded) // if lunch as starting view, leave the update action to launchAction()
+ {
+ return;
+ }
+
if(iPlayController->getNowPlayingPreset())
{
iStationName->setPlainText(iPlayController->getNowPlayingPreset()->name);
}
+ loadStationLogo();
}
void IRNowPlayingView::updateMusicStoreStatus()
@@ -303,6 +342,7 @@
connect(iIsdsClient, SIGNAL(presetLogoDownloaded(IRQPreset* )),
this, SLOT(handleLogoDownloaded(IRQPreset* )));
updateStationLogo();
+ getViewManager()->saveScreenShot();
break;
case EIR_ViewCommand_DEACTIVATE:
@@ -327,14 +367,19 @@
void IRNowPlayingView::launchAction()
{
setUseNetworkReason(EIR_UseNetwork_StartingView);
+ updateForLauchAction();
+#ifdef HS_WIDGET_ENABLED
+ iPlayController->setConnectingStationName(iStationName->plainText());
+#endif
iApplication->verifyNetworkConnectivity();
getViewManager()->pushViewById(EIRView_MainView);
- iLaunchActionNeeded = true;
- updateForLauchAction();
+ iLaunchActionNeeded = false;
}
void IRNowPlayingView::lazyInit()
{
+ iLaunchActionNeeded = true;
+
if (!initCompleted())
{
normalInit();
@@ -352,7 +397,6 @@
IRBaseView::lazyInit();
iStatisticsReporter = IRQStatisticsReporter::openInstance();
- iNetworkController = IRQNetworkController::openInstance();
connect(iPlayController, SIGNAL(metaDataAvailable(IRQMetaData*)), this, SLOT(updateMetaData(IRQMetaData*)));
connect(iPlayController, SIGNAL(playingStarted()), this, SLOT(handlePlayStarted()));
@@ -381,22 +425,33 @@
IRQPreset *preset = playList->getPresetForEntry(0);
iStationName->setPlainText(preset->name);
iFindinNmsAllowed = (0 == preset->musicStoreStatus.compare("yes",Qt::CaseInsensitive));
+#ifdef HS_WIDGET_ENABLED
+ iPlayController->reloadNowplayingPreset(preset,false,EIRQAdhocExternal);
+#endif
+ iStationLogo->setIcon(HbIcon(KDefaultStationLogo));
+ iLogoNeedUpdate = true;
+#ifdef ADV_ENABLED
+ iAdvUrl = KDefaultAdvLink;
+ iAdvImage->setIcon(logoHbIcon);
+ iAdvImageNeedUpdate = true;
+#endif
delete preset;
}
else
{
IRLastPlayedStationInfo *lastPlayedStationInfo = iApplication->getLastPlayedStationInfo();
IRQPreset *lastPreset = lastPlayedStationInfo->getLastPlayedStation();
-
if (lastPreset)
{
iStationName->setPlainText(lastPreset->name);
- iFindinNmsAllowed = (0 == lastPreset->musicStoreStatus.compare("yes",Qt::CaseInsensitive));
+ iFindinNmsAllowed = (0 == lastPreset->musicStoreStatus.compare("yes",Qt::CaseInsensitive));
}
else
{
+ iStationName->setPlainText(QString(""));
iFindinNmsAllowed = false;
}
+ loadStationLogo();
}
}
@@ -437,13 +492,16 @@
if( logoPixmap.loadFromData(logoRawData, aPreset->logoData.Length()) )
{
if( EDownloadLogo == iLogoDownloadState )
- {
+ {
+ saveStationLogo(logoPixmap);
QPixmap newLogoPixmap =
- logoPixmap.scaled(QSize(KNowPlayingLogoSize,KNowPlayingLogoSize),Qt::KeepAspectRatio);
+ logoPixmap.scaled(QSize(KNowPlayingLogoSize,KNowPlayingLogoSize),Qt::KeepAspectRatio);
QIcon logoQIcon(newLogoPixmap);
HbIcon logoHbIcon(logoQIcon);
- iStationLogo->setIcon(logoHbIcon);
+ iStationLogo->setIcon(logoHbIcon);
+ iPlayController->emitStationLogoUpdated(true);
iLogoNeedUpdate = false;
+ getViewManager()->saveScreenShot();
#ifdef ADV_ENABLED
QTimer::singleShot(1, this, SLOT(updateAdvImage()));
#endif
@@ -499,7 +557,6 @@
{
case EIRQNetworkConnectionEstablished:
{
- iApplication->closeConnectingDialog();
if( EIR_UseNetwork_StartingView == getUseNetworkReason() )
{
IRPlayList *playList = iApplication->getPlayList();
@@ -521,26 +578,15 @@
}
else if( EIR_UseNetwork_PlayStation == getUseNetworkReason() )
{
- handlePlayStopAction();
+ iPlayController->resume();
}
- setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
}
-
- case EIRQConnectingCancelled:
- case EIRQDisplayNetworkMessageNoConnectivity:
- {
- IRQPreset *preset = iPlayController->getNowPlayingPreset();
- if( NULL == preset || preset->name == "" )
- {
- getViewManager()->activateView(EIRView_MainView);
- }
- }
- break;
-
default:
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
/********************************************************************************************************
@@ -552,11 +598,11 @@
{
if (aOrientation == Qt::Vertical)
{
- iLoader.load(NOW_PLAYING_VIEW_LAYOUT_FILENAME, NOW_PLAYING_VIEW_PRT_SEC);
+ iLoader.load(NOW_PLAYING_VIEW_LAYOUT_FILENAME, PORTRAIT_SEC);
}
else
{
- iLoader.load(NOW_PLAYING_VIEW_LAYOUT_FILENAME, NOW_PLAYING_VIEW_LSC_SEC);
+ iLoader.load(NOW_PLAYING_VIEW_LAYOUT_FILENAME, LANDSCAPE_SEC);
}
}
@@ -566,11 +612,6 @@
*/
void IRNowPlayingView::handlePlayStarted()
{
- if(iLaunchActionNeeded)
- {
- iLaunchActionNeeded = false;
- updateStationLogo();
- }
iPlayStopAction->setIcon(HbIcon(KStopButtonIcon));
}
@@ -580,17 +621,6 @@
iSongName->setPlainText("");
iArtistName->setPlainText("");
iSongNameAvailable = false;
-
- if( this != getViewManager()->currentView() )
- {
- iStationLogo->setIcon(HbIcon(KDefaultStationLogo));
- iLogoNeedUpdate = true;
-#ifdef ADV_ENABLED
- iAdvUrl = KDefaultAdvLink;
- iAdvImage->setIcon(HbIcon(KDefaultStationLogo));
- iAdvImageNeedUpdate = true;
-#endif
- }
}
void IRNowPlayingView::updateMetaData(IRQMetaData* aMetaData)
@@ -635,7 +665,11 @@
{
if(!iFindinNmsAllowed)
{
- popupNote(hbTrId("txt_irad_info_disallowed_by_this_station"), HbMessageBox::MessageTypeInformation);
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_not_allowed_by_this_station"), HbMessageBox::MessageTypeInformation);
+#else
+ popupNote(hbTrId("Not allowed by this station"), HbMessageBox::MessageTypeInformation);
+#endif
return;
}
@@ -645,8 +679,12 @@
return;
}
- // Need to log the find song in NMS event, iStatisticsReporter->logNmsEvent(IRQStatisticsReporter::EIRFind,channelId);
+ // Need to log the find song in NMS event, iStatisticsReporter->logNmsEvent(IRQStatisticsReporter::EIRFind,channelId);
+#ifdef SUBTITLE_STR_BY_LOCID
popupNote(hbTrId("txt_irad_info_music_store_not_available"), HbMessageBox::MessageTypeInformation);
+#else
+ popupNote(hbTrId("Music store not available"), HbMessageBox::MessageTypeInformation);
+#endif
}
void IRNowPlayingView::handleIdentifySongAction()
@@ -660,19 +698,28 @@
void IRNowPlayingView::handlePlayStopAction()
{
- setUseNetworkReason(EIR_UseNetwork_PlayStation);
- if (false == iApplication->verifyNetworkConnectivity())
+ switch (iPlayController->state())
{
- return;
+ case IRPlayController::EPlaying:
+ iPlayController->stop(EIRQUserTerminated);
+ return;
+
+ case IRPlayController::EStopped:
+ setUseNetworkReason(EIR_UseNetwork_PlayStation);
+ break;
+
+ default:
+ return;
}
- setUseNetworkReason(EIR_UseNetwork_NoReason);
- if (iPlayController->isPlaying())
+
+#ifdef HS_WIDGET_ENABLED
+ iPlayController->setConnectingStationName(iStationName->plainText());
+#endif
+
+ if (iApplication->verifyNetworkConnectivity())
{
- iPlayController->stop(EIRQUserTerminated);
- }
- else
- {
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
iPlayController->resume();
}
}
@@ -687,19 +734,31 @@
switch (retValue)
{
case EIRQErrorNone:
+#ifdef SUBTITLE_STR_BY_LOCID
add2FavNote->setTitle(hbTrId("txt_irad_info_added_to_favorites"));
+#else
+ add2FavNote->setTitle(hbTrId("Added to Favorites"));
+#endif
//add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
add2FavNote->show();
break;
case EIRQErrorOutOfMemory:
+#ifdef SUBTITLE_STR_BY_LOCID
add2FavNote->setTitle(hbTrId("txt_irad_info_can_not_add_more"));
+#else
+ add2FavNote->setTitle(hbTrId("Can't add more"));
+#endif
//add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
add2FavNote->show();
break;
case EIRQErrorAlreadyExist:
+#ifdef SUBTITLE_STR_BY_LOCID
add2FavNote->setTitle(hbTrId("txt_irad_info_favorite_updated"));
+#else
+ add2FavNote->setTitle(hbTrId("Favorite updated"));
+#endif
//add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
add2FavNote->show();
break;
@@ -729,8 +788,11 @@
void IRNowPlayingView::handleShareStationAction()
{
- IRStationShare stationShare;
- stationShare.shareStations(*iPlayController->getNowPlayingPreset());
+ if (NULL == iStationShare)
+ {
+ iStationShare = new IRStationShare();
+ }
+ iStationShare->shareStations(*iPlayController->getNowPlayingPreset());
}
void IRNowPlayingView::handleSettingAction()
@@ -756,3 +818,42 @@
}
#endif
+void IRNowPlayingView::loadStationLogo()
+{
+ if (iPlayController->isStationLogoAvailable())
+ {
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ if (settings.value(KIrSettingStationLogo).canConvert<QPixmap>())
+ {
+ QPixmap logoPixmap = settings.value(KIrSettingStationLogo).value<QPixmap>();
+ QPixmap newLogoPixmap =
+ logoPixmap.scaled(QSize(KNowPlayingLogoSize,KNowPlayingLogoSize),Qt::KeepAspectRatio);
+ QIcon logoQIcon(newLogoPixmap);
+ HbIcon logoHbIcon(logoQIcon);
+ iStationLogo->setIcon(logoHbIcon);
+ iLogoNeedUpdate = false;
+#ifdef ADV_ENABLED
+ iAdvUrl = iPlayController->getNowPlayingPreset()->advertisementUrl;
+ iAdvImage->setIcon(logoHbIcon);
+ iAdvImageNeedUpdate = false;
+#endif
+ return;
+ }
+ }
+
+ iStationLogo->setIcon(HbIcon(KDefaultStationLogo));
+ iLogoNeedUpdate = true;
+#ifdef ADV_ENABLED
+ iAdvUrl = KDefaultAdvLink;
+ iAdvImage->setIcon(logoHbIcon);
+ iAdvImageNeedUpdate = true;
+#endif
+}
+
+void saveStationLogo(const QPixmap &aStationLogo)
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ QVariant logoData(QVariant::Pixmap);
+ logoData.setValue(aStationLogo);
+ settings.setValue(KIrSettingStationLogo,logoData);
+}
--- a/qtinternetradio/ui/src/iropenwebaddressview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/iropenwebaddressview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -34,6 +34,7 @@
#include "irqenums.h"
#include "iruidefines.h"
#include "irqsettings.h"
+static const int MAX_URL_CHARACTOR_NUMBER = 255;
IROpenWebAddressView::IROpenWebAddressView(IRApplication* aApplication, TIRViewId aViewId) :
IRBaseView(aApplication, aViewId),
@@ -91,9 +92,6 @@
HbStyleLoader::registerFilePath(OPEN_WEB_ADDRESS_VIEW_PUSH_BUTTON_CSS);
HbStyleLoader::registerFilePath(OPEN_WEB_ADDRESS_VIEW_PUSH_BUTTON_WIDGETML);
- // This view need not to be stacked.
- setFlag(EViewFlag_UnStackable);
-
connect(iNetworkController, SIGNAL(networkRequestNotified(IRQNetworkEvent)),
this, SLOT(networkRequestNotified(IRQNetworkEvent)));
@@ -103,9 +101,12 @@
IROpenWebAddressView::~IROpenWebAddressView()
{
- iSettings->setManuallyInputtedStationUrl(iUrl->contentWidgetData(QString("text")).toString());
- iSettings->setManuallyInputtedStationName(iName->contentWidgetData(QString("text")).toString());
- iSettings->closeInstance();
+ if (iSettings)
+ {
+ iSettings->setManuallyInputtedStationUrl(iUrl->contentWidgetData(QString("text")).toString());
+ iSettings->setManuallyInputtedStationName(iName->contentWidgetData(QString("text")).toString());
+ iSettings->closeInstance();
+ }
}
/*
@@ -166,7 +167,11 @@
if (0 == stationName.size())
{
- iName->setContentWidgetData(QString("text"), hbTrId("txt_irad_info_unnamed"));
+#ifdef SUBTITLE_STR_BY_LOCID
+ iName->setContentWidgetData(QString("text"), hbTrId("txt_irad_info_unnamed_station"));
+#else
+ iName->setContentWidgetData(QString("text"), hbTrId("Unnamed station"));
+#endif
}
else
{
@@ -188,7 +193,11 @@
temp = iName->contentWidgetData(QString("text")).toString();
if (0 == temp.size())
{
- iName->setContentWidgetData(QString("text"), hbTrId("txt_irad_info_unnamed"));
+#ifdef SUBTITLE_STR_BY_LOCID
+ iName->setContentWidgetData(QString("text"), hbTrId("txt_irad_info_unnamed_station"));
+#else
+ iName->setContentWidgetData(QString("text"), hbTrId("Unnamed station"));
+#endif
}
}
@@ -197,12 +206,22 @@
*/
void IROpenWebAddressView::initDataForm()
{
- iUrl = new HbDataFormModelItem(
- HbDataFormModelItem::TextItem, hbTrId("txt_irad_formlabel_station_url"));
+#ifdef SUBTITLE_STR_BY_LOCID
+ iUrl = new HbDataFormModelItem(HbDataFormModelItem::TextItem, hbTrId("txt_irad_formlabel_station_address"));
+#else
+ iUrl = new HbDataFormModelItem(HbDataFormModelItem::TextItem, hbTrId("Station address"));
+#endif
+ iUrl->setContentWidgetData("maxLength",MAX_URL_CHARACTOR_NUMBER);
iModel->appendDataFormItem(iUrl);
+#ifdef SUBTITLE_STR_BY_LOCID
iName = new HbDataFormModelItem(
HbDataFormModelItem::TextItem, hbTrId("txt_irad_formlabel_station_name"));
+#else
+ iName = new HbDataFormModelItem(
+ HbDataFormModelItem::TextItem, hbTrId("Station name"));
+#endif
+ iName->setContentWidgetData("maxLength", MAX_URL_CHARACTOR_NUMBER);
iModel->appendDataFormItem(iName);
iForm->addConnection(iUrl, SIGNAL(textChanged(const QString&)),
@@ -223,7 +242,9 @@
}
setUseNetworkReason(EIR_UseNetwork_OpenWebAddress);
-
+#ifdef HS_WIDGET_ENABLED
+ iPlayController->setConnectingStationName(preset.name);
+#endif
// Verify the connectivity
if (false == iApplication->verifyNetworkConnectivity())
{
@@ -249,19 +270,17 @@
switch (aEvent)
{
case EIRQNetworkConnectionEstablished:
- iApplication->closeConnectingDialog();
-
if (EIR_UseNetwork_OpenWebAddress == getUseNetworkReason())
{
play();
}
-
- setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
default:
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
/*
@@ -278,7 +297,11 @@
// check the URL
if (!IRQUtility::isValidUrl(server.url))
{
- popupNote(hbTrId("txt_irad_info_invalid_link_please_change_it"), HbMessageBox::MessageTypeInformation);
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_invalid_station_address"), HbMessageBox::MessageTypeInformation);
+#else
+ popupNote(hbTrId("Invalid station address"), HbMessageBox::MessageTypeInformation);
+#endif
return false;
}
@@ -287,7 +310,11 @@
server.serverName = iName->contentWidgetData(QString("text")).toString();
if (0 == server.serverName.size())
{
- server.serverName = hbTrId("txt_irad_info_unnamed");
+#ifdef SUBTITLE_STR_BY_LOCID
+ server.serverName = hbTrId("txt_irad_info_unnamed_station");
+#else
+ server.serverName = hbTrId("Unnamed station");
+#endif
}
aPreset.insertChannelServer(server);
@@ -341,7 +368,11 @@
if( object == iNameEditorPtr
&& event->type() == QEvent::FocusIn )
{
- if(hbTrId("txt_irad_info_unnamed") == iName->contentWidgetData(QString("text")).toString())
+#ifdef SUBTITLE_STR_BY_LOCID
+ if(hbTrId("txt_irad_info_unnamed_station") == iName->contentWidgetData(QString("text")).toString())
+#else
+ if(hbTrId("Unnamed station") == iName->contentWidgetData(QString("text")).toString())
+#endif
{
iName->setContentWidgetData(QString("text"), QString(""));
}
--- a/qtinternetradio/ui/src/irplaycontroller.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irplaycontroller.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -1,26 +1,28 @@
/*
-* 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:
-*
-*/
-#include <hbprogressdialog.h>
+ * 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:
+ *
+ */
#include <hbmessagebox.h>
#include <QTimer>
#ifdef Q_CC_NOKIAX86
#include <QFile>
#include <QTextStream>
#endif
+#ifdef HS_WIDGET_ENABLED
+#include <QSettings>
+#endif
#include "irplaycontroller.h"
#include "irapplication.h"
@@ -34,7 +36,11 @@
#include "irqsettings.h"
#include "irqfavoritesdb.h"
#include "irqstatisticsreporter.h"
-#include "irenummapper.h"
+#include "irenummapper.h"
+#include "irqlogger.h"
+#ifdef HS_WIDGET_ENABLED
+#include "irservicedef.h"
+#endif
#ifdef Q_CC_NOKIAX86
void getRadioServerAddress(QString & aUrl);
@@ -77,6 +83,10 @@
IRQStatisticsReporter::IRConnectedFrom, \
ui_enum, KConnectedFromMap )
+
+static bool loadStationLogoFlag();
+static void saveStationLogoFlag(bool aIsStationLogoAvailable);
+
// public functions
/*
@@ -86,10 +96,13 @@
iApplication(aApplication),
iMediaPlayer(new IRQMediaPlayer()),
iStatisticsReporter(NULL),
+ iGetServerResult(false),
+ iNowPlayingPreset(new IRQPreset()),
+ iNowPlayingPresetBackup(new IRQPreset()),
iConnectedFrom(EIRQIsds),
- iGetServerResult(false),
- iBufferingDialog(NULL),
- iNowPlayingPreset(new IRQPreset()),
+ iConnectedFromBackup(EIRQIsds),
+ iStationLogoAvailable(false),
+ iStationLogoAvailableBackup(false),
iMetaData(NULL),
iSongHistoryEngine(IRQSongHistoryEngine::openInstance()),
iPlayState(EIdle),
@@ -98,8 +111,29 @@
iUrlArray(0),
iRealBitrate(0),
iLastError(EIRQErrorNone),
- iStopReason(EIRQUnknownTermination)
+ iStopReason(EIRQUnknownTermination),
+ iErrorNote(NULL)
{
+ // use the last played station to initiliaze the backup value.
+ // can regard the player is bootup, and initilize its LCD screen with last played station info if available.
+ IRQPreset *lastPlayedPreset = iApplication->getLastPlayedStationInfo()->getLastPlayedStation();
+ if (lastPlayedPreset)
+ {
+ *iNowPlayingPreset = *lastPlayedPreset;
+ iLastPlayedUrl = getFirstTryUrl(lastPlayedPreset);
+ iConnectedFrom = iApplication->getLastPlayedStationInfo()->connectedFrom();
+ iStationLogoAvailable = loadStationLogoFlag();
+ }
+
+ if (iNowPlayingPreset->getChannelURLCount())
+ {
+ iPlayState = EStopped;
+ }
+ else
+ {
+ iPlayState = EIdle;
+ }
+
connectSignalSlot();
iStatisticsReporter = IRQStatisticsReporter::openInstance();
}
@@ -109,19 +143,23 @@
*/
IRPlayController::~IRPlayController()
{
- delete iBufferingDialog;
- iBufferingDialog = NULL;
-
stop(EIRQUserTerminated);
delete iMediaPlayer;
iMediaPlayer = NULL;
delete iNowPlayingPreset;
iNowPlayingPreset = NULL;
+ delete iNowPlayingPresetBackup;
+ iNowPlayingPresetBackup = NULL;
delete iUrlArray;
iUrlArray = NULL;
+
+ delete iErrorNote;
+ iErrorNote = NULL;
+ saveStationLogoFlag(iStationLogoAvailable);
+
if (iSongHistoryEngine)
{
iSongHistoryEngine->closeInstance();
@@ -140,66 +178,74 @@
*/
void IRPlayController::connectToChannel(IRQPreset *aPreset, IRQConnectedFrom aConnectedFrom)
{
- iConnectedFrom = aConnectedFrom;
if (!aPreset)
{
return;
}
if (iMediaPlayer)
- {
- // sort the URL by ascending order and get all available rates.
- // iAvailableBitrate is cleared in getAvailableBitrates().
- aPreset->sortURLArray();
- aPreset->getAvailableBitrates(iAvailableBitrate);
- if (iAvailableBitrate.count() == 0)
+ {
+ QString firstTryUrl = getFirstTryUrl(aPreset);
+ if (firstTryUrl.isEmpty())
{
return;
}
- int selectedBitRate = 0;
- IRQPreferredQuality preferredQuality = iApplication->getSettings()->getPreferredQuality();
- switch(preferredQuality)
- {
- case EIRQStandardQuality:
- selectedBitRate = iAvailableBitrate.first();
- break;
- case EIRQHighQuality:
- selectedBitRate = iAvailableBitrate.last();
- break;
- default:
- selectedBitRate = iAvailableBitrate.first();
- break;
- }
+ *iNowPlayingPresetBackup = *iNowPlayingPreset;
+ iLastPlayedUrlBackup = iLastPlayedUrl;
+ iConnectedFromBackup = iConnectedFrom;
+
+ *iNowPlayingPreset = *aPreset;
+ iLastPlayedUrl = firstTryUrl;
+ iConnectedFrom = aConnectedFrom;
+ iResuming = false;
+ doPlay(iLastPlayedUrl);
+ }
+}
- // get URL to play
- iTryingBitrate = selectedBitRate;
- *iNowPlayingPreset = *aPreset;
- delete iUrlArray;
- iUrlArray = NULL;
- iUrlArray = iNowPlayingPreset->getURLsForBitrate(selectedBitRate);
- if (iUrlArray)
- {
- QString url = iUrlArray->at(0);
+QString IRPlayController::getFirstTryUrl(IRQPreset *aPreset)
+{
+ QString firstTryUrl;
+ // sort the URL by ascending order and get all available rates.
+ // iAvailableBitrate is cleared in getAvailableBitrates().
+ aPreset->sortURLArray();
+ aPreset->getAvailableBitrates(iAvailableBitrate);
+ if (iAvailableBitrate.count() == 0)
+ {
+ return firstTryUrl;
+ }
+
+ int selectedBitRate = 0;
+ IRQPreferredQuality preferredQuality = iApplication->getSettings()->getPreferredQuality();
+ switch(preferredQuality)
+ {
+ case EIRQStandardQuality:
+ selectedBitRate = iAvailableBitrate.first();
+ break;
+ case EIRQHighQuality:
+ selectedBitRate = iAvailableBitrate.last();
+ break;
+ default:
+ selectedBitRate = iAvailableBitrate.first();
+ break;
+ }
+
+ // get URL to play
+ iTryingBitrate = selectedBitRate;
+
+ delete iUrlArray;
+ iUrlArray = NULL;
+ iUrlArray = aPreset->getURLsForBitrate(selectedBitRate);
+ if (iUrlArray)
+ {
+ firstTryUrl = iUrlArray->at(0);
#ifdef Q_CC_NOKIAX86
- if (iLastPlayedChannelName != aPreset->name)
- {
- emit initializeLogo();
- }
- url = "http://172.28.205.171:8000";
- getRadioServerAddress(url);
- iLastPlayedChannelName = aPreset->name;
-#else
- if (iLastPlayedUrl != iUrlArray->at(0))
- {
- emit initializeLogo();
- }
+ firstTryUrl = "http://172.28.182.59:8000";
+ getRadioServerAddress(firstTryUrl);
#endif
- iLastPlayedUrl = url;
- iResuming = false;
- doPlay(url);
- }
}
+
+ return firstTryUrl;
}
/*
@@ -227,23 +273,98 @@
*/
void IRPlayController::stop(IRQTerminatedType aStopReason)
{
- qDebug("IRPlayController::stop, Entering, aStopReason=%d", aStopReason);
- if (iMediaPlayer)
- {
- iMediaPlayer->disableStereoEffect();
-
- iMediaPlayer->stop();
-
- if (EPlaying == iPlayState)
- {
+ qDebug("IRPlayController::stop, Entering, aStopReason=%d", aStopReason);
+
+ switch (iPlayState)
+ {
+ case EPlaying:
+ iPlayState = EStopped;
iStopReason = aStopReason;
+ if (iMediaPlayer)
+ {
+ iMediaPlayer->disableStereoEffect();
+ iMediaPlayer->stop();
+ }
// playingStarted is emitted while iPlaying is set to true,
// so when stop() is called and iPlaying is true, playingStopped
// should be emitted.
- qDebug("IRPlayController::stop, emit playingStopped()");
- emit playingStopped();
- }
- iPlayState = EStopped;
+ qDebug("IRPlayController::stop, emit playingStopped()");
+ emit playingStopped();
+ break;
+
+#ifdef HS_WIDGET_ENABLED
+ case EConnecting:
+ // No need to restore because when connecting occurs, because the connectToChannel() has NOT been invoked yet.
+ // Only need to reset the player state
+ if (iNowPlayingPreset->getChannelURLCount())
+ {
+ iPlayState = EStopped;
+ }
+ else
+ {
+ iPlayState = EIdle;
+ }
+
+ iStopReason = aStopReason;
+
+ // Only need to restore the station logo flag since we may force it to be false when connecting started.
+ // force logo to be default when current view is NOT nowplaying view && is not resuming (start playing a different station.)
+ if (EIRView_PlayingView != iApplication->getViewManager()->currentViewId()
+ && iConnectingStationName != iNowPlayingPreset->name)
+ {
+ iStationLogoAvailable = iStationLogoAvailableBackup;
+ emit stationLogoUpdated(iStationLogoAvailable);
+ }
+ emit connectingCancelled(iNowPlayingPreset->name);
+ break;
+#endif
+
+ case EBuffering:
+ if (iMediaPlayer)
+ {
+ iMediaPlayer->disableStereoEffect();
+ iMediaPlayer->stop();
+ }
+ // when player is forced to stop in bufferring state, we have to revert to backup preset.
+ // only with exception when current view is nowplaying view.
+ // in IR case, user can only stay in nowplaying view when buffering:
+ // 1. starging view is now playing view; 2. open a pls file with only one url
+ if (EIRView_PlayingView != iApplication->getViewManager()->currentViewId())
+ {
+ iLastPlayedUrl = iLastPlayedUrlBackup;
+ *iNowPlayingPreset = *iNowPlayingPresetBackup;
+ iConnectedFrom = iConnectedFromBackup;
+ }
+
+ if (iNowPlayingPreset->getChannelURLCount())
+ {
+ iPlayState = EStopped;
+ }
+ else
+ {
+ iPlayState = EIdle;
+ }
+
+ iStopReason = aStopReason;
+
+#ifdef HS_WIDGET_ENABLED
+ // Need to restore the station logo flag since we may force it to be false when buffering started.
+ // force logo to be default when current view is NOT nowplaying view && is not resuming (start playing a different station.)
+ if (EIRView_PlayingView != iApplication->getViewManager()->currentViewId()
+ && !iResuming)
+ {
+ iStationLogoAvailable = iStationLogoAvailableBackup;
+ emit stationLogoUpdated(iStationLogoAvailable);
+ }
+ emit bufferingCancelled(iNowPlayingPreset->name);
+#endif
+ break;
+
+
+ case EIdle:
+ case EStopped:
+ default:
+ break;
}
endSession(aStopReason);
qDebug("IRPlayController::stop, Exiting");
@@ -294,32 +415,80 @@
iApplication->getSettings()->setVolumeSetting(aVolume);
}
-/*
- * Description : enable stereo effect
- */
-void IRPlayController::enableStereo()
+#ifdef HS_WIDGET_ENABLED
+void IRPlayController::setConnectingStationName(const QString &aStationName, bool aForceConnecting)
{
- if (iMediaPlayer)
+ iConnectingStationName = aStationName;
+ if (aForceConnecting
+ || !iApplication->getNetworkController()->getNetworkStatus())
{
- iMediaPlayer->enableStereoEffect();
+ LOG_FORMAT("IRPlayController::setConnectingStationName, the station name is %s", STRING2CHAR(aStationName));
+ iPlayState = EConnecting;
+
+ // force logo to be default when current view is NOT nowplaying view && is not resuming (start playing a different station.)
+ if (EIRView_PlayingView != iApplication->getViewManager()->currentViewId()
+ && iConnectingStationName != iNowPlayingPreset->name)
+ {
+ emitStationLogoUpdated(false);
+ }
+ emit connectingStarted(aStationName);
}
}
-/*
- * Description : disable stereo effect
- */
-void IRPlayController::disableStereo()
+QString IRPlayController::getConnectingStationName() const
+{
+ return iConnectingStationName;
+}
+
+void IRPlayController::reloadNowplayingPreset(IRQPreset *aPreset, bool aIsLogoAvailable, IRQConnectedFrom aConnectedFrom)
{
- if (iMediaPlayer)
+ if (aPreset)
+ {
+ *iNowPlayingPreset = *aPreset;
+ iLastPlayedUrl = getFirstTryUrl(aPreset);
+ iConnectedFrom = aConnectedFrom;
+ iStationLogoAvailable = aIsLogoAvailable;
+ }
+
+ if (iNowPlayingPreset->getChannelURLCount())
+ {
+ iPlayState = EStopped;
+ }
+ else
{
- iMediaPlayer->disableStereoEffect();
- }
+ iPlayState = EIdle;
+ }
+}
+
+bool IRPlayController::isStationLogoAvailable() const
+{
+ return iStationLogoAvailable;
+}
+
+void IRPlayController::emitStationLogoUpdated(bool aIsLogoAvailable)
+{
+ iStationLogoAvailableBackup = iStationLogoAvailable;
+ iStationLogoAvailable = aIsLogoAvailable;
+ emit stationLogoUpdated(iStationLogoAvailable);
+}
+
+bool loadStationLogoFlag()
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ return settings.value(KIrSettingStationLogoAvailable,false).toBool();
+}
+
+#endif
+
+IRPlayController::EPlayState IRPlayController::state() const
+{
+ return iPlayState;
}
/*
* Description : return the flag of playing state
* Return : true : playing is ongoing
- * false : playing is stopped
+ * false : playing is not ongoing
*/
bool IRPlayController::isPlaying() const
{
@@ -329,7 +498,7 @@
/*
* Description : return the flag of stopped state
* Return : true : playing is stopped
- * false : playing is ongoing
+ * false : playing is not stopped
*/
bool IRPlayController::isStopped() const
{
@@ -337,6 +506,16 @@
}
/*
+ * Description : return the flag of idle state
+ * Return : true : playing is idle
+ * false : playing is not idle
+ */
+bool IRPlayController::isIdle() const
+{
+ return (EIdle == iPlayState);
+}
+
+/*
* Description : return the now playing preset
* Return : pointer to the now playing preset
*/
@@ -369,42 +548,6 @@
return iStopReason;
}
-/*
- * Description : show a buffering dialog to inform user the buffering stage.
- * If the dialog is not created yet, create first.
- */
-void IRPlayController::createBufferingDialog(const QObject *aReceiver, const char *aFunc)
-{
- if (NULL == iBufferingDialog)
- {
- iBufferingDialog = new HbProgressDialog(HbProgressDialog::ProgressDialog);
- iBufferingDialog->setMinimum(0);
- iBufferingDialog->setMaximum(100);
- iBufferingDialog->setModal(true);
- }
-
- //disconnect everything connected to signal cancelled()
- iBufferingDialog->disconnect(SIGNAL(cancelled()));
-
- connect(iBufferingDialog, SIGNAL(cancelled()), aReceiver, aFunc);
- iBufferingDialog->setProgressValue(0);
- iBufferingDialog->setText("0%");
- iBufferingDialog->show();
-}
-
-/*
- * Description : close the buffering dialog
- */
-void IRPlayController::closeBufferingDialog()
-{
- if (iBufferingDialog)
- {
- iBufferingDialog->close();
- delete iBufferingDialog;
- iBufferingDialog = NULL;
- }
-}
-
// slot functions
/*
@@ -442,6 +585,8 @@
*/
void IRPlayController::errorOccured(IRQError aError)
{
+ LOG_METHOD;
+ LOG_FORMAT("the error is occured %d",aError);
iLastError = aError;
QTimer::singleShot(1, this, SLOT(handleError()));
@@ -452,6 +597,8 @@
*/
void IRPlayController::handleError()
{
+ LOG_METHOD;
+ LOG_FORMAT("the last error is %d", iLastError);
qDebug("IRPlayController::handleError(), Entering, iLastError - %d", iLastError);
switch (iLastError)
{
@@ -494,17 +641,21 @@
qDebug("IRPlayController::handleError, connection lost");
stop(EIRQNoConnectionToServer);
break;
-
+
+ case EIRQPlayerErrorAudioDeviceLost:
+ //this is a temporary way to handle the plug-out event
+ iApplication->stopLoadingAnimation();
+ stop(EIRQCallIsActivated);
+ return;
+
case EIRQPlayerErrorGeneral:
- case EIRQPlayerErrorAudioDeviceLost:
default:
stop(EIRQUnknownTermination);
break;
}
- closeBufferingDialog();
-
- createNote();
+ iApplication->stopLoadingAnimation();
+ popupNote();
qDebug("IRPlayController::handleError(), Exiting");
}
@@ -516,47 +667,41 @@
*/
void IRPlayController::updateProgress(int aProgress)
{
- /* we added this condition for sometimes, the function will be called
- * when the state is playing. reference cr_9010
- */
- if( iBufferingDialog && EBuffering == iPlayState )
- {
- iBufferingDialog->setProgressValue(aProgress);
- iBufferingDialog->setText(QString("%1%").arg(aProgress));
- }
-
if (100 == aProgress)
{
- closeBufferingDialog();
-
//updateProgress(100) sometimes can be called more than one time, to improve performance,
- //we only need to do the following work once.
- if (EBuffering == iPlayState)
+ //we only need to do the following work once.
+ if (EPlaying == iPlayState)
{
- iApplication->getViewManager()->activateView(EIRView_PlayingView);
- iPlayState = EPlaying;
+ iApplication->stopLoadingAnimation();
+ return;
+ }
+
+ iPlayState = EPlaying;
+ iApplication->stopLoadingAnimation();
- //update last played station
- IRLastPlayedStationInfo *lastPlayedStationInfo = iApplication->getLastPlayedStationInfo();
- lastPlayedStationInfo->updateLastPlayedStation(iNowPlayingPreset,iConnectedFrom);
- lastPlayedStationInfo->commitLastPlayedStation();
+ iApplication->getViewManager()->activateView(EIRView_PlayingView);
- //increase the played times of current preset
- iApplication->getFavoritesDB()->increasePlayedTimes(*iNowPlayingPreset);
+ //update last played station
+ IRLastPlayedStationInfo *lastPlayedStationInfo = iApplication->getLastPlayedStationInfo();
+ lastPlayedStationInfo->updateLastPlayedStation(iNowPlayingPreset,iConnectedFrom);
+ lastPlayedStationInfo->commitLastPlayedStation();
- emit playingStarted();
+ //increase the played times of current preset
+ iApplication->getFavoritesDB()->increasePlayedTimes(*iNowPlayingPreset);
- // if the metadata is available, show it.
- emit metaDataAvailable(iMetaData);
+ emit playingStarted();
- // Save the station information to database
- IRQMetaData tmpMetaData;
- tmpMetaData.setBitrate(iRealBitrate);
- tmpMetaData.setStreamUrl(iLastPlayedUrl);
- iSongHistoryEngine->handleMetaDataReceived(tmpMetaData, *iNowPlayingPreset);
- // open stereo defaultly
- iMediaPlayer->enableStereoEffect();
- }
+ // if the metadata is available, show it.
+ emit metaDataAvailable(iMetaData);
+
+ // Save the station information to database
+ IRQMetaData tmpMetaData;
+ tmpMetaData.setBitrate(iRealBitrate);
+ tmpMetaData.setStreamUrl(iLastPlayedUrl);
+ iSongHistoryEngine->handleMetaDataReceived(tmpMetaData, *iNowPlayingPreset);
+ // open stereo defaultly
+ iMediaPlayer->enableStereoEffect();
}
}
@@ -576,8 +721,6 @@
*/
void IRPlayController::handleMetaDataReceived(IRQMetaData& aIRmetaData)
{
-
-
iMetaData = &aIRmetaData;
//TO DO: there maybe a potential bug when the user cancel the play,
if ((aIRmetaData.getSongName().trimmed() != "")
@@ -586,7 +729,7 @@
//when we are play the musicplayer and get the metadata from lower layer, we save the
//song's metadata into the db. After we save it to db, we emit the next signal to notify the UI
iSongHistoryEngine->handleSongMetaDataReceived(*iMetaData,
- iNowPlayingPreset->musicStoreStatus);
+ *iNowPlayingPreset);
}
if (EPlaying == iPlayState)
@@ -603,10 +746,7 @@
void IRPlayController::cancelBuffering()
{
stop(EIRQUserTerminated);
- if (!iResuming && EIRView_PlayingView == iApplication->getViewManager()->currentViewId())
- {
- iApplication->getViewManager()->backToPreviousView();
- }
+ iApplication->stopLoadingAnimation();
}
// private functions
@@ -615,9 +755,21 @@
* Description : show a note to user to inform that error occured.
*
*/
-void IRPlayController::createNote(const QString &aNote)
+void IRPlayController::popupNote(const QString &aNote)
{
- HbMessageBox::warning(aNote, (QObject*)NULL, NULL);
+ if (NULL == iErrorNote)
+ {
+ iErrorNote = new HbMessageBox(HbMessageBox::MessageTypeWarning);
+ iErrorNote->setModal(true);
+ iErrorNote->setTimeout(HbPopup::StandardTimeout);
+ }
+
+ iErrorNote->setText(aNote);
+ // if there is already on error note showing, only change the text
+ if (!iErrorNote->isVisible())
+ {
+ iErrorNote->show();
+ }
}
/*
@@ -714,8 +866,17 @@
qDebug("IRPlayController::doPlay, access point : %d", apId);
iMediaPlayer->playStation(aUrl, apId);
iPlayState = EBuffering;
+#ifdef HS_WIDGET_ENABLED
+ // force logo to be default when current view is NOT nowplaying view && is not resuming (start playing a different station.)
+ if (EIRView_PlayingView != iApplication->getViewManager()->currentViewId()
+ && !iResuming)
+ {
+ emitStationLogoUpdated(false);
+ }
+ emit bufferingStarted(iNowPlayingPreset->name);
+#endif
startSession();
- createBufferingDialog(this, SLOT(cancelBuffering()));
+ iApplication->startLoadingAnimation(this, SLOT(cancelBuffering()));
}
/*
@@ -744,6 +905,14 @@
}
#endif
+void saveStationLogoFlag(bool aIsStationLogoAvailable)
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ QVariant data(QVariant::Bool);
+ data.setValue(aIsStationLogoAvailable);
+ settings.setValue(KIrSettingStationLogoAvailable,data);
+}
+
//get IP address configuration of test radio server
#ifdef Q_CC_NOKIAX86
void getRadioServerAddress(QString & aUrl)
--- a/qtinternetradio/ui/src/irplaylist.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irplaylist.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -242,7 +242,11 @@
else
{
//no station name is available
- item = new IRPlayListItem(currentLine, hbTrId("txt_irad_info_unnamed"), -1);
+#ifdef SUBTITLE_STR_BY_LOCID
+ item = new IRPlayListItem(currentLine, hbTrId("txt_irad_info_unnamed_station"), -1);
+#else
+ item = new IRPlayListItem(currentLine, hbTrId("Unnamed station"), -1);
+#endif
}
iItemList.append(item);
}
--- a/qtinternetradio/ui/src/irplsview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irplsview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -61,22 +61,30 @@
switch (aEvent)
{
- case EIRQNetworkConnectionEstablished:
- iApplication->closeConnectingDialog();
-
+ case EIRQNetworkConnectionEstablished:
if (EIR_UseNetwork_SelectItem == getUseNetworkReason())
{
handleItemSelected();
- }
- setUseNetworkReason(EIR_UseNetwork_NoReason);
-
+ }
break;
default:
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
+#ifdef HS_WIDGET_ENABLED
+void IRPlsView::itemAboutToBeSelected(bool &aNeedNetwork)
+{
+ aNeedNetwork = true;
+
+ int currentRow = iListView->currentIndex().row();
+ iPlayController->setConnectingStationName(iPlsModel->getTitle(currentRow));
+}
+#endif
+
void IRPlsView::handleItemSelected()
{
int currentRow = iListView->currentIndex().row();
@@ -103,7 +111,11 @@
HbMenu *contextMenu = new HbMenu;
contextMenu->setAttribute(Qt::WA_DeleteOnClose);
+#ifdef SUBTITLE_STR_BY_LOCID
HbAction *action = contextMenu->addAction(hbTrId("txt_common_menu_delete"));
+#else
+ HbAction *action = contextMenu->addAction(hbTrId("Delete"));
+#endif
action->setObjectName(KActionDeleteName);
contextMenu->open();
connect(contextMenu, SIGNAL(triggered(HbAction*)), this, SLOT(actionClicked(HbAction*)));
--- a/qtinternetradio/ui/src/irsearchchannelsview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irsearchchannelsview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -20,6 +20,12 @@
#include <hbsearchpanel.h>
#include <hbaction.h>
#include <hbprogressdialog.h>
+#include <hbscrollbar.h>
+#include <hbiconitem.h>
+#include <hbiconanimator.h>
+#include <hblabel.h>
+#include <hbiconanimationmanager.h>
+#include <HbGroupBox>
#include "irsearchchannelsview.h"
#include "iruidefines.h"
@@ -31,13 +37,13 @@
#include "irqisdsdatastructure.h"
#include "irplaycontroller.h"
-const uint KBitmapSize = 59;
+const uint KBitmapSize = 59;
IRSearchChannelsView::IRSearchChannelsView(IRApplication* aApplication,
TIRViewId aViewId): IRBaseView(aApplication, aViewId),
- iListView(NULL),iSearchPanelWidget(NULL),
- iSearchState(ESearch_init),iChannelModel(NULL),iSearchingDialog(NULL),
- iPreset(NULL),iLogoPreset(NULL),iConvertTimer(NULL)
+ iListView(NULL),iSearchPanelWidget(NULL),iSearchState(ESearch_init),
+ iChannelModel(NULL),iPreset(NULL),iLogoPreset(NULL),
+ iConvertTimer(NULL)
{
//if this view is not starting view, finish all initialization in constructor
if (getViewManager()->views().count() > 0)
@@ -73,7 +79,9 @@
void IRSearchChannelsView::initMenu()
{
-
+ HbMenu *viewMenu = menu();
+ QObject *exitAction = iLoader.findObject(EXIT_ACTION);
+ connect(exitAction, SIGNAL(triggered()), iApplication, SIGNAL(quit()));
}
void IRSearchChannelsView::initTimer()
@@ -84,15 +92,10 @@
connect(iConvertTimer, SIGNAL(timeout()), this, SLOT(convertAnother()));
}
+
+
IRSearchChannelsView::~IRSearchChannelsView()
-{
- if( iSearchingDialog != NULL )
- {
- iSearchingDialog->close();
- delete iSearchingDialog;
- iSearchingDialog = NULL;
- }
-
+{
if( iPreset != NULL )
{
delete iPreset;
@@ -104,22 +107,37 @@
delete iLogoPreset;
iLogoPreset = NULL;
}
+
+ if( NULL != iChannelModel )
+ {
+ iChannelModel->save2Cache();
+ }
+
}
void IRSearchChannelsView::loadLayout()
{
// Create widget hierarchy
setObjectName( SEARCH_CHANNELS_VIEW_OBJECT_VIEW );
- iChannelModel = new IrChannelModel(this);
// List existing root elements - this allows us to refer to objects in the XML
// which are created outside the document.
QObjectList roots;
roots.append( this );
iLoader.setObjectTree( roots );
- iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME);
+ iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME);
+
iSearchPanelWidget = qobject_cast<HbSearchPanel *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHPANEL_WIDGET));
- iListView = qobject_cast<HbListView *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHLISTVIEW_WIDGET));
- iListView->setModel(iChannelModel);
+
+ iListView = qobject_cast<HbListView *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHLISTVIEW_WIDGET));
+ iListView->setFlag(ItemIsFocusable);
+ HbScrollBar *scrollbar = iListView->verticalScrollBar();
+ scrollbar->setVisible(true);
+ scrollbar->setInteractive(true);
+ iListView->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAsNeeded);
+
+ iChannelModel = new IrChannelModel(this);
+ iChannelModel->initWithCache();
+ iListView->setModel(iChannelModel);
}
void IRSearchChannelsView::connectWidget()
@@ -128,6 +146,7 @@
connect(iChannelModel, SIGNAL(dataAvailable()), this, SLOT(dataChanged()));
connect(iNetworkController, SIGNAL(networkRequestNotified(IRQNetworkEvent)), this, SLOT(networkRequestNotified(IRQNetworkEvent)));
connect(iSearchPanelWidget,SIGNAL(criteriaChanged(const QString&)),this,SLOT(searchTextAlready(const QString&)));
+ connect(iSearchPanelWidget, SIGNAL(exitClicked()), this, SLOT(minimizeSearchPanel()));
}
void IRSearchChannelsView::connectIsdsClient()
@@ -160,95 +179,38 @@
this, SLOT(presetLogoDownloadError()));
}
-
void IRSearchChannelsView::switch2InitState()
-{
- iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME,SEARCH_CHANNELS_VIEW_NO_LISTVIEW_SECTION);
+{
iSearchState = ESearch_init;
-}
+ iApplication->stopLoadingAnimation();
+}
-void IRSearchChannelsView::switch2SearchedState()
-{
- iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME,SEARCH_CHANNELS_VIEW_LISTVIEW_SECTION);
- iSearchState = ESearch_Searched;
-}
-void IRSearchChannelsView::switch2SearchingState()
-{
- iSearchState = ESearch_Searching;
- startSearchingAnimation();
+void IRSearchChannelsView::switch2LoadingState()
+{
+ iSearchPanelWidget->clearFocus();
+ iListView->setFocus();
+ iSearchState = ESearch_Loading;
+ iApplication->startLoadingAnimation(this, SLOT(minimizeSearchPanel()));
}
-
-void IRSearchChannelsView::createSearchingDialog()
-{
- if ( NULL == iSearchingDialog)
- {
- //needs to add this , otherwise memory leak
- iSearchingDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
- iSearchingDialog->setModal(true);
- iSearchingDialog->setTimeout(HbPopup::NoTimeout);
- QAction *cancelAction = iSearchingDialog->actions().at(0);
- cancelAction->setText(hbTrId("txt_common_button_cancel"));
- connect(cancelAction, SIGNAL(triggered()), this, SLOT(cancelRequest()));
- }
-
- iSearchingDialog->setText(hbTrId("txt_common_info_searching"));
- iSearchingDialog->show();
-}
-
-void IRSearchChannelsView::closeSearchingDialog()
-{
- if( iSearchingDialog )
- {
- iSearchingDialog->close();
- iSearchingDialog->deleteLater();
- iSearchingDialog = NULL;
- }
-}
-
-void IRSearchChannelsView::startSearchingAnimation()
-{
-
-}
-
-void IRSearchChannelsView::stopSearchingAnimation()
-{
-
-}
-
void IRSearchChannelsView::handleItemSelected()
{
if (iListView)
{
int index = iListView->currentIndex().row();
- if (index != -1)
+ IRQChannelItem* aItem = iChannelModel->getChannelItemByIndex(index);
+ if( NULL != aItem )
{
- if (iIsdsClient)
- {
- //once an item is selected, we show a dialog to prevent user from clicking the
- //item again
- iPlayController->createBufferingDialog(this, SLOT(cancelRequest()));
-
- if (iIsdsClient->isdsIsChannelBanner())
- {
- iIsdsClient->isdsListenRequest(index + 1);
- }
- else
- {
- iIsdsClient->isdsListenRequest(index);
- }
- }
- }
+ iIsdsClient->isdsListenRequest(aItem->channelID,true);
+ }
}
+
}
void IRSearchChannelsView::cancelRequest()
-{
- iSearchState = ESearch_init;
+{
iIsdsClient->isdsCancelRequest();
- stopSearchingAnimation();
- //the following will remove into the stopSearchingAnimation() function
- closeSearchingDialog();
+ switch2InitState();
}
void IRSearchChannelsView::networkRequestNotified(IRQNetworkEvent aEvent)
@@ -265,7 +227,7 @@
if(EIR_UseNetwork_StartSearch == getUseNetworkReason())
{
Q_ASSERT( !iKeyText.isEmpty() );
- iIsdsClient->isdsSearchRequest(iKeyText);
+ iIsdsClient->isdsSearchRequest(iKeyText);
}
else if( EIR_UseNetwork_SelectItem == getUseNetworkReason() )
{
@@ -275,11 +237,8 @@
break;
default:
- stopSearchingAnimation();
- //the following will remove into the stopSearchingAnimation() function
- closeSearchingDialog();
- setUseNetworkReason(EIR_UseNetwork_NoReason);
- iSearchState = ESearch_init;
+ switch2InitState();
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
}
}
@@ -294,51 +253,70 @@
return;
}
- setUseNetworkReason(EIR_UseNetwork_StartSearch);
- if (false == iApplication->verifyNetworkConnectivity(hbTrId("txt_common_info_searching")))
+ setUseNetworkReason(EIR_UseNetwork_StartSearch);
+ if (false == iApplication->verifyNetworkConnectivity())
{
- switch2SearchingState();
+ switch2LoadingState();
return;
}
+ //if previouse request is in progress, cancel it
+ if( ESearch_Loading == iSearchState )
+ {
+ iIsdsClient->isdsCancelRequest();
+ iConvertTimer->stop();
+ iIsdsClient->isdsLogoDownCancelTransaction();
+ }
+
+
setUseNetworkReason(EIR_UseNetwork_NoReason);
- switch2SearchingState();
- iIsdsClient->isdsSearchRequest(iKeyText);
- createSearchingDialog();
+ switch2LoadingState();
+ iIsdsClient->isdsSearchRequest(iKeyText);
}
-
-
void IRSearchChannelsView::operationException(IRQError aError)
-{
- iApplication->closeConnectingDialog();
- iPlayController->closeBufferingDialog();
- closeSearchingDialog();
- stopSearchingAnimation();
- iSearchState = ESearch_init;
+{
+ switch2InitState();
- QString errStr;
-
+ QString errStr;
switch(aError)
{
case EIRQErrorNotFound:
- errStr = hbTrId("txt_irad_info_no_matching_stations_found");
+#ifdef SUBTITLE_STR_BY_LOCID
+ errStr = hbTrId("txt_irad_info_no_matching_station_found");
+#else
+ errStr = hbTrId("No matching station found");
+#endif
break;
default:
+#ifdef SUBTITLE_STR_BY_LOCID
errStr = hbTrId("txt_irad_info_failed_to_connect");
+#else
+ errStr = hbTrId("Connecting failed");
+#endif
break;
}
+
popupNote(errStr, HbMessageBox::MessageTypeWarning);
+ iChannelModel->cleanupDatabase();
}
void IRSearchChannelsView::clickItem(const QModelIndex&)
{
setUseNetworkReason(EIR_UseNetwork_SelectItem);
+#ifdef HS_WIDGET_ENABLED
+ int index = iListView->currentIndex().row();
+ IRQChannelItem* currentItem = iChannelModel->getChannelItemByIndex(index);
+ iPlayController->setConnectingStationName(currentItem->channelName,true);
+#endif
if (false == iApplication->verifyNetworkConnectivity())
{
+ switch2LoadingState();
return;
}
setUseNetworkReason(EIR_UseNetwork_NoReason);
+
+ switch2LoadingState();
handleItemSelected();
}
@@ -364,27 +342,21 @@
startConvert(iIconIndexArray[0]);
}
}
-
+
void IRSearchChannelsView::dataChanged()
{
- iApplication->closeConnectingDialog();
- stopSearchingAnimation();
-
- //the following will remove into the stopSearchingAnimation() function
- closeSearchingDialog();
- switch2SearchedState();
+ switch2InitState();
iListView->reset();
- iListView->setCurrentIndex(iChannelModel->index(0));
- iListView->scrollTo(iChannelModel->index(0));
- GraphicsItemFlags flags = iListView->flags();
- bool focusEnable = flags & QGraphicsItem::ItemIsFocusable;
- if( focusEnable )
+ if( iChannelModel->rowCount() )
{
- //we move the focus to the listview and the search panel will
- //hide the virtual keyboard at the same time
- iListView->setFocus(Qt::OtherFocusReason);
+ iListView->setCurrentIndex(iChannelModel->index(0));
+ iListView->scrollTo(iChannelModel->index(0));
}
+ //we move the focus to the listview and the search panel will
+ //hide the virtual keyboard at the same time
+ iListView->setFocus();
+
iIconIndexArray.clear();
//initialize the iconindices
for (int i = 0; i < iChannelModel->rowCount(); ++i)
@@ -398,7 +370,7 @@
if( iIconIndexArray.count() > 0 )
{
iConvertTimer->start();
- }
+ }
}
void IRSearchChannelsView::startConvert(int aIndex)
@@ -475,23 +447,52 @@
}
}
-TIRHandleResult IRSearchChannelsView::handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason)
+void IRSearchChannelsView::minimizeSearchPanel()
+{
+ if( ESearch_Loading == iSearchState )
+ {
+ iPlayController->cancelBuffering();
+ iIsdsClient->isdsCancelRequest();
+ iConvertTimer->stop();
+ iIsdsClient->isdsLogoDownCancelTransaction();
+ switch2InitState();
+ }
+
+ int count = iChannelModel->rowCount();
+ if (0 == count)
+ {
+ iSearchPanelWidget->clearFocus();
+ iListView->setFocus();
+ getViewManager()->backToPreviousView();
+ }
+ else
+ {
+ iSearchPanelWidget->clearFocus();
+ iListView->setFocus();
+ }
+}
+
+
+TIRHandleResult IRSearchChannelsView::handleCommand(TIRViewCommand aCommand,
+ TIRViewCommandReason aReason)
{
TIRHandleResult ret = IRBaseView::handleCommand(aCommand, aReason);
switch (aCommand)
{
- case EIR_ViewCommand_ACTIVATED:
- //wether to start logo downloading when activated needs more discussing and testing, future.
- iIconIndexArray.clear();
- connectIsdsClient();
+ case EIR_ViewCommand_ACTIVATED:
+ iIconIndexArray.clear();
+ iListView->clearFocus();
+ iSearchPanelWidget->setFocus();
+ connectIsdsClient();
break;
case EIR_ViewCommand_DEACTIVATE:
disconnectIsdsClient();
iIsdsClient->isdsCancelRequest();
iConvertTimer->stop();
- iIsdsClient->isdsLogoDownCancelTransaction();
+ iIsdsClient->isdsLogoDownCancelTransaction();
+ switch2InitState();
break;
default:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/src/irsearchresultdb.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -0,0 +1,180 @@
+/*
+* 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:
+*
+*/
+
+#include <QFile>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QSqlDatabase>
+#include <QVariant>
+
+
+#include "irsearchresultdb.h"
+#include "irqisdsdatastructure.h"
+
+
+IRSearchResultDB::IRSearchResultDB()
+{
+ createDBConnection();
+}
+
+IRSearchResultDB::~IRSearchResultDB()
+{
+ if (iDB->isOpen())
+ {
+ iDB->close();
+ }
+
+ delete iDB;
+ iDB = NULL;
+}
+
+
+IRQError IRSearchResultDB::cacheChannelList(QList<IRQChannelItem*> *aChannelList)
+{
+ IRQError ret = EIRQErrorNone;
+
+ if( NULL == aChannelList )
+ {
+ return EIRQErrorBadParameter;
+ }
+
+ if( iDB->isOpen() )
+ {
+ clearCache();
+
+ for(int i=0; i<aChannelList->count(); i++)
+ {
+ IRQChannelItem* insertItem = aChannelList->at(i);
+ QString name = insertItem->channelName;
+ int channelID = insertItem->channelID;
+ QString imageURL = insertItem->imageURL;
+ QString description = insertItem->shortDescription;
+
+ //if some data overflows, we just skip it.note that
+ //the VARCHAR is word-based, so here we use the real size
+ if( name.size()>= 256 || imageURL.size() >= 256 || description.size() >= 256 )
+ {
+ continue;
+ }
+
+ QSqlQuery query;
+ bool result;
+
+ result = query.prepare("INSERT INTO searchresult (name, channelID, imageURL, description) "
+ "VALUES (:name, :channelID, :imageURL, :description)");
+ query.bindValue(":name", name);
+ query.bindValue(":channelID",channelID);
+ query.bindValue(":imageURL", imageURL);
+ query.bindValue(":description", description);
+
+ result = query.exec();
+ if( !result )
+ {
+ ret = EIRQErrorServiceUnavailable;
+ break;
+ }
+ }
+ }
+ else
+ {
+ ret = EIRQErrorGeneral;
+ }
+
+ return ret;
+}
+
+QList<IRQChannelItem*> *IRSearchResultDB::getCahcedChannelList()
+{
+ if( !iDB->isOpen() )
+ {
+ return NULL;
+ }
+
+ QList<IRQChannelItem*> *channelList = new QList<IRQChannelItem*>();
+ QSqlQuery query("SELECT * FROM searchresult");
+ QSqlRecord rec = query.record();
+ int nameCol = rec.indexOf("name");
+ int channelIDCol = rec.indexOf("channelID");
+ int imageURLCol = rec.indexOf("imageURL");
+ int descriptionCol = rec.indexOf("description");
+
+ while(query.next())
+ {
+ IRQChannelItem *oneItem = new IRQChannelItem();
+ oneItem->channelName = query.value(nameCol).toString();
+ oneItem->channelID = query.value(channelIDCol).toInt();
+ oneItem->imageURL = query.value(imageURLCol).toString();
+ oneItem->shortDescription = query.value(descriptionCol).toString();
+ channelList->append(oneItem);
+ }
+
+ return channelList;
+}
+
+IRQError IRSearchResultDB::clearCache()
+{
+ IRQError ret = EIRQErrorNone;
+ if( !iDB->open())
+ {
+ ret = EIRQErrorServiceUnavailable;
+ }
+ else
+ {
+ QSqlQuery query("DELETE FROM searchresult");
+ bool ret = query.exec();
+ if( !ret )
+ {
+ ret = EIRQErrorServiceUnavailable;
+ }
+ }
+
+ return ret;
+}
+
+void IRSearchResultDB::createDBConnection()
+{
+ bool created = QFile::exists("searchresult.dat");
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
+ iDB = new QSqlDatabase(db);
+
+ iDB->setDatabaseName("searchresult.dat");
+
+ if (!iDB->open())
+ {
+ return;
+ }
+
+
+ if (!created)
+ {
+ bool dbResult = false;
+ QSqlQuery query;
+ //note: the VARCHAR is word-based but not byte-based. and 255
+ //means 255 unicode words.
+ dbResult = query.exec("CREATE TABLE searchresult ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT, "
+ "name VARCHAR(255) NOT NULL, "
+ "channelID INTEGER, "
+ "imageURL VARCHAR(255), "
+ "description VARCHAR(255) NOT NULL)");
+
+ if (!dbResult)
+ {
+ return;
+ }
+ }
+}
--- a/qtinternetradio/ui/src/irsettingsview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irsettingsview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -24,6 +24,7 @@
#include "irsettingsview.h"
#include "irqsettings.h"
#include "irqenums.h"
+#include <hbmenu.h>
IRSettingsView::IRSettingsView(IRApplication *aApplication, TIRViewId aViewId) :
IRBaseView(aApplication, aViewId), iForm(NULL),iModel(NULL)
@@ -32,7 +33,8 @@
IRBaseView::lazyInit();
setInitCompleted(true);
- iPreferredQuality<<hbTrId("txt_irad_setlabel_download_quality_val_standard")<<hbTrId("txt_irad_setlabel_download_quality_val_high");
+ setFlag(EViewFlag_UnStackable);
+
initView();
}
@@ -40,25 +42,17 @@
{
}
-void IRSettingsView::preferredQualitySelected(int aIndex)
-{
- if (0 == aIndex)
- {
- iSettings->setPreferredQuality(EIRQStandardQuality);
- }
- else
- {
- iSettings->setPreferredQuality(EIRQHighQuality);
- }
-}
-
void IRSettingsView::initView()
{
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, this);
setLayout(layout);
HbGroupBox * titleText = new HbGroupBox();
- titleText->setHeading( hbTrId("txt_irad_subtitle_network_setting") );
+#ifdef SUBTITLE_STR_BY_LOCID
+ titleText->setHeading( hbTrId("txt_common_opt_settings") );
+#else
+ titleText->setHeading( hbTrId("Settings") );
+#endif
layout->addItem(titleText);
iForm = new HbDataForm();
@@ -70,18 +64,87 @@
//set the preferred quality
setPreferredQuality();
iForm->setModel(iModel);
+
+ HbMenu *viewMenu = menu();
+#ifdef SUBTITLE_STR_BY_LOCID
+ viewMenu->addAction(hbTrId("txt_common_opt_exit"),iApplication, SIGNAL(quit()));
+#else
+ viewMenu->addAction(hbTrId("Exit"),iApplication, SIGNAL(quit()));
+#endif
}
void IRSettingsView::setPreferredQuality()
{
+#ifdef SUBTITLE_STR_BY_LOCID
HbDataFormModelItem *preferredQualityItem = new HbDataFormModelItem(
- HbDataFormModelItem::RadioButtonListItem, hbTrId("txt_irad_setlabel_download_quality"));
+ HbDataFormModelItem::ToggleValueItem, hbTrId("txt_irad_setlabel_download_quality"));
+#else
+ HbDataFormModelItem *preferredQualityItem = new HbDataFormModelItem(
+ HbDataFormModelItem::ToggleValueItem, hbTrId("Download quality"));
+#endif
iModel->appendDataFormItem(preferredQualityItem);
-
- preferredQualityItem->setContentWidgetData(QString("items"), iPreferredQuality);
+
IRQPreferredQuality settingValue = iSettings->getPreferredQuality();
- preferredQualityItem->setContentWidgetData(QString("selected"), settingValue);
-
- iForm->addConnection(preferredQualityItem,SIGNAL(itemSelected(int)),this,SLOT(preferredQualitySelected(int)));
+ if(EIRQStandardQuality == settingValue)
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ preferredQualityItem->setContentWidgetData("text", hbTrId("txt_irad_setlabel_download_quality_val_standard"));
+ preferredQualityItem->setContentWidgetData("additionalText", hbTrId("txt_irad_setlabel_download_quality_val_high"));
+#else
+ preferredQualityItem->setContentWidgetData("text", hbTrId("Standard"));
+ preferredQualityItem->setContentWidgetData("additionalText", hbTrId("High"));
+#endif
+ }
+ else if(EIRQHighQuality == settingValue)
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ preferredQualityItem->setContentWidgetData("text", hbTrId("txt_irad_setlabel_download_quality_val_high"));
+ preferredQualityItem->setContentWidgetData("additionalText", hbTrId("txt_irad_setlabel_download_quality_val_standard"));
+#else
+ preferredQualityItem->setContentWidgetData("text", hbTrId("High"));
+ preferredQualityItem->setContentWidgetData("additionalText", hbTrId("Standard"));
+#endif
+ }
+
+ connect(iModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
+ this, SLOT(toggleChange(QModelIndex, QModelIndex)));
}
+void IRSettingsView::toggleChange(QModelIndex aStartIn, QModelIndex aEndIn)
+{
+ Q_UNUSED(aEndIn);
+
+ HbDataFormModelItem *item = iModel->itemFromIndex(aStartIn);
+
+ if(item->type() == HbDataFormModelItem::ToggleValueItem)
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ if(item->data(HbDataFormModelItem::LabelRole).toString() == hbTrId("txt_irad_setlabel_download_quality"))
+#else
+ if(item->data(HbDataFormModelItem::LabelRole).toString() == hbTrId("Download quality"))
+#endif
+ {
+ QVariant data = item->contentWidgetData("text");
+ QString value = data.toString();
+
+#ifdef SUBTITLE_STR_BY_LOCID
+ if(value == (hbTrId("txt_irad_setlabel_download_quality_val_standard")))
+#else
+ if(value == (hbTrId("Standard")))
+#endif
+ {
+ // User has made it Standard.
+ iSettings->setPreferredQuality(EIRQStandardQuality);
+ }
+#ifdef SUBTITLE_STR_BY_LOCID
+ else if(value == (hbTrId("txt_irad_setlabel_download_quality_val_high")))
+#else
+ else if(value == (hbTrId("High")))
+#endif
+ {
+ // User has made it High.
+ iSettings->setPreferredQuality(EIRQHighQuality);
+ }
+ }
+ }
+}
--- a/qtinternetradio/ui/src/irsonghistorymodel.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irsonghistorymodel.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -68,24 +68,33 @@
QString artistName = mSongHistoryList.at(row)->getArtistName().trimmed();
if( "" == artistName )
{
- artistName = hbTrId("txt_irad_list_unknown_artist");
+#ifdef SUBTITLE_STR_BY_LOCID
+ artistName = hbTrId("txt_irad_list_unknown_artist_p");
+#else
+ artistName = hbTrId("Unknown artist");
+#endif
}
QString songName = mSongHistoryList.at(row)->getSongName().trimmed();
if( "" == songName )
{
- songName = hbTrId("txt_irad_list_unknown_song");
+#ifdef SUBTITLE_STR_BY_LOCID
+ songName = hbTrId("txt_irad_list_unknown_song_p");
+#else
+ songName = hbTrId("Unknown song");
+#endif
}
+ QString stationName = mSongHistoryList.at(row)->getStationName().trimmed();
if (Qt::Vertical == mOrientation)
{
- list.append("<" + artistName + ">");
- list.append("<" + songName + ">");
+ list.append(artistName);
+ list.append(songName);
}
else
{
- list.append("<" + artistName +"> - <" + songName + ">");
- list.append("<Not ready>");
+ list.append(artistName + " - " + songName);
+ list.append(stationName);
}
return list;
}
@@ -103,14 +112,16 @@
return NULL;
}
-void IRSongHistoryModel::clearAllList()
+void IRSongHistoryModel::clearList()
{
while (!mSongHistoryList.isEmpty())
{
IRQSongInfo *firstItem = mSongHistoryList.takeFirst();
delete firstItem;
}
-
+
+ mHistoryEngine->clearAllSongHistory();
+
emit modelChanged();
}
@@ -126,20 +137,26 @@
mHistoryEngine->getAllSongHistory(mSongHistoryList);
emit modelChanged();
-}
-
-void IRSongHistoryModel::clearHisotrySongDB()
-{
- while (!mSongHistoryList.isEmpty())
- {
- IRQSongInfo *firstItem = mSongHistoryList.takeFirst();
- delete firstItem;
- }
- mHistoryEngine->clearAllSongHistory();
- emit modelChanged();
}
void IRSongHistoryModel::setOrientation(Qt::Orientation aOrientation)
{
mOrientation = aOrientation;
}
+
+bool IRSongHistoryModel::deleteOneItem(int aIndex)
+{
+ bool ret = mHistoryEngine->deleteOneSongHistoryItem(aIndex);
+
+ if( !ret )
+ {
+ return false;
+ }
+
+ beginRemoveRows(QModelIndex(), aIndex, aIndex);
+ mSongHistoryList.removeAt(aIndex);
+ endRemoveRows();
+
+ emit modelChanged();
+ return true;
+}
--- a/qtinternetradio/ui/src/irsonghistoryview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irsonghistoryview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -31,7 +31,8 @@
#include "irqsettings.h"
#include "iruidefines.h"
-
+const QString KActionSearchInMusicStoreName("SearchInMusicStore");
+const QString KActionDeleteName("Delete");
// public functions
@@ -51,17 +52,20 @@
iListView->setModel(iModel);
iListView->setCurrentIndex(iModel->index(0));
- iClearSongHistoryAction = new HbAction(hbTrId("txt_irad_opt_clear_song_history"), this);
+#ifdef SUBTITLE_STR_BY_LOCID
+ iClearSongHistoryAction = new HbAction(hbTrId("txt_irad_opt_clear_list"), this);
+#else
+ iClearSongHistoryAction = new HbAction(hbTrId("Clear list"), this);
+#endif
iStatisticsReporter = IRQStatisticsReporter::openInstance();
-
-
+
iShowPrompt = iSettings->getSongHistoryShow();
if( iShowPrompt )
{
iSettings->setSongHistoryShow(0);
}
- connect(iClearSongHistoryAction, SIGNAL(triggered()), this, SLOT(clearHisotrySongDB()));
+ connect(iClearSongHistoryAction, SIGNAL(triggered()), this, SLOT(popupClearHistoryConfirmMessageBox()));
connect(iModel, SIGNAL(modelChanged()), this, SLOT(modelChanged()));
}
@@ -91,10 +95,13 @@
switch (aCommand)
{
+ case EIR_ViewCommand_TOBEACTIVATED:
+ showSongHistory();
+ ret = EIR_NoDefault;
+ break;
+
case EIR_ViewCommand_ACTIVATED:
connect(iPlayController, SIGNAL(metaDataAvailable(IRQMetaData*)), this, SLOT(newMetadataAdded(IRQMetaData*)));
- showSongHistory();
-
if( iShowPrompt )
{
QTimer::singleShot(5, this, SLOT(showPrompt()));
@@ -139,7 +146,11 @@
// TODO : Add the report in future. Add the channel id in the song info db
// iStatisticsReporter->logNmsEvents(EIRQFind,channelId);
- popupNote(hbTrId("txt_irad_info_music_store_not_available"), HbMessageBox::MessageTypeInformation);
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_music_store_not_available"), HbMessageBox::MessageTypeInformation);
+#else
+ popupNote(hbTrId("Music store not available"), HbMessageBox::MessageTypeInformation);
+#endif
}
@@ -173,7 +184,13 @@
void IRSongHistoryView::modelChanged()
{
iListView->reset();
- QString headingStr = hbTrId("txt_irad_list_recently_played_songs") + " (" + QString::number(iModel->rowCount()) + ")";
+
+#ifdef SUBTITLE_STR_BY_LOCID
+ QString headingStr = hbTrId("txt_irad_subtitle_recently_played_songs") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+ QString headingStr = hbTrId("Recently played songs") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
+
setHeadingText(headingStr);
}
@@ -184,14 +201,33 @@
}
-void IRSongHistoryView::clearHisotrySongDB()
+void IRSongHistoryView::popupClearHistoryConfirmMessageBox()
{
- iModel->clearHisotrySongDB();
+#ifdef SUBTITLE_STR_BY_LOCID
+ HbMessageBox::question(hbTrId("txt_irad_info_clear_song_list"), this, SLOT(clearList(HbAction*)), hbTrId("txt_common_button_ok"), hbTrId("txt_common_button_cancel"));
+#else
+ HbMessageBox::question(hbTrId("Clear song list?"), this, SLOT(clearList(HbAction*)), hbTrId("Ok"), hbTrId("Cancel"));
+#endif
+}
+void IRSongHistoryView::clearList(HbAction *aAction)
+{
+ HbMessageBox *dialog = static_cast<HbMessageBox*>(sender());
+ if (dialog)
+ {
+ if (aAction == dialog->actions().at(0))
+ {
+ iModel->clearList();
+ }
+ }
}
void IRSongHistoryView::showPrompt()
{
+#ifdef SUBTITLE_STR_BY_LOCID
QString str = hbTrId("txt_irad_info_click_the_song_and_find_it_in_nokia_music_store");
+#else
+ QString str = hbTrId("Click the song and find it in nokia music store");
+#endif
popupNote(str, HbMessageBox::MessageTypeInformation);
}
@@ -200,7 +236,56 @@
/* for in song history view, the data will retrived from the web browser*/
needNetwork = false;
}
-
+
+void IRSongHistoryView::listViewLongPressed(HbAbstractViewItem *aItem, const QPointF& aCoords)
+{
+ Q_UNUSED(aItem);
+ Q_UNUSED(aCoords);
+
+ HbAction *action = NULL;
+ HbMenu *contextMenu = new HbMenu;
+ contextMenu->setAttribute(Qt::WA_DeleteOnClose);
+ connect(contextMenu, SIGNAL(triggered(HbAction*)), this, SLOT(actionClicked(HbAction*)));
+
+#ifdef SUBTITLE_STR_BY_LOCID
+ action = contextMenu->addAction(hbTrId("txt_irad_menu_search_in_music_store"));
+#else
+ action = contextMenu->addAction(hbTrId("Search in music store"));
+#endif
+ action->setObjectName(KActionSearchInMusicStoreName);
+#ifdef SUBTITLE_STR_BY_LOCID
+ action = contextMenu->addAction(hbTrId("txt_common_menu_delete"));
+#else
+ action = contextMenu->addAction(hbTrId("Delete"));
+#endif
+ action->setObjectName(KActionDeleteName);
+
+ contextMenu->open();
+}
+
+void IRSongHistoryView::searchInMusicStoreContextAction()
+{
+ // Need to log the find song in NMS event, iStatisticsReporter->logNmsEvent(IRQStatisticsReporter::EIRFind,channelId);
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_music_store_not_available"), HbMessageBox::MessageTypeInformation);
+#else
+ popupNote(hbTrId("Music store not available"), HbMessageBox::MessageTypeInformation);
+#endif
+}
+void IRSongHistoryView::deleteContextAction()
+{
+ int current = iListView->currentIndex().row();
+ bool ret = iModel->deleteOneItem(current);
+ if( !ret )
+ {
+#ifdef SUBTITLE_STR_BY_LOCID
+ popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+#else
+ popupNote(hbTrId("Operation failed"), HbMessageBox::MessageTypeWarning);
+#endif
+ }
+}
+
void IRSongHistoryView::gotoStationHistory()
{
getViewManager()->activateView(EIRView_HistoryView);
@@ -212,3 +297,19 @@
iModel->setOrientation(aOrientation);
iListView->reset();
}
+
+void IRSongHistoryView::actionClicked(HbAction *aAction)
+{
+ if ( aAction )
+ {
+ QString objectName = aAction->objectName();
+ if ( objectName == KActionSearchInMusicStoreName )
+ {
+ searchInMusicStoreContextAction();
+ }
+ else if( objectName == KActionDeleteName)
+ {
+ deleteContextAction();
+ }
+ }
+}
--- a/qtinternetradio/ui/src/irstationdetailsview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irstationdetailsview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -26,6 +26,11 @@
#include "irplaycontroller.h"
#include "irviewmanager.h"
#include "irqsonghistoryinfo.h"
+
+
+const unsigned int KChannelBitrateIndex = 0;
+const int KChannelURLIndex = 0;
+
IRStationDetailsView::IRStationDetailsView(IRApplication* aApplication, TIRViewId aViewId) : IRBaseView(aApplication, aViewId),
iScrollArea(NULL),iContainer(NULL),
iStationName(NULL),iDescription(NULL),
@@ -50,15 +55,25 @@
/*
* Description : update the station information.
*/
-void IRStationDetailsView::setDetails(IRQSongHistoryInfo *aCurChannelInfo)
+void IRStationDetailsView::setDetails(IRQPreset * aPreset)
{
- iStationName->setPlainText(aCurChannelInfo->getChannelName());
- iGenres->setPlainText(QString(""));
- iLanguage->setPlainText(QString(""));
- iCountry->setPlainText(QString(""));
- iBitRate->setPlainText(hbTrId("txt_irad_setlabel_bit_rate") + QString(" : ") + QString::number(0) + QString("kbps"));
- iDescription->setPlainText(aCurChannelInfo->getChannelDesc());
- iNowPlayingUrl->setPlainText(aCurChannelInfo->getStreamUrl());
+ iStationName->setPlainText(aPreset->name);
+ iGenres->setPlainText(aPreset->genreName);
+ iLanguage->setPlainText(aPreset->languageName);
+ iCountry->setPlainText(aPreset->countryName);
+
+ unsigned int bitrate = 0;
+ aPreset->getChannelBitrate(KChannelBitrateIndex, bitrate);
+ iBitRate->setPlainText(QString::number(bitrate) + QString("kbps"));
+
+ iDescription->setPlainText(aPreset->description);
+
+ QList<QString> *urlList = aPreset->getURLsForBitrate(bitrate);
+ if (urlList != NULL)
+ {
+ iNowPlayingUrl->setPlainText(urlList->at(KChannelURLIndex));
+ }
+ delete urlList;
}
/*
@@ -71,7 +86,7 @@
iGenres->setPlainText(nowPlayingPreset->genreName);
iLanguage->setPlainText(nowPlayingPreset->languageName);
iCountry->setPlainText(nowPlayingPreset->countryName);
- iBitRate->setPlainText(hbTrId("txt_irad_setlabel_bit_rate") + QString(" : ") + QString::number(iPlayController->getNowPlayingBitRate()) + QString("kbps"));
+ iBitRate->setPlainText(QString::number(iPlayController->getNowPlayingBitRate()) + QString("kbps"));
iDescription->setPlainText(nowPlayingPreset->description);
iNowPlayingUrl->setPlainText(iPlayController->getNowPlayingUrl());
}
--- a/qtinternetradio/ui/src/irstationshare.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irstationshare.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -42,7 +42,8 @@
// ---------------------------------------------------------------------------
//
IRStationShare::IRStationShare()
- : iPlsFilePath(KPlsFilePath)
+ : iPlsFilePath(KPlsFilePath),
+ iShareDialog(NULL)
{
}
// ---------------------------------------------------------------------------
@@ -51,6 +52,7 @@
//
IRStationShare::~IRStationShare()
{
+ delete iShareDialog;
}
// ---------------------------------------------------------------------------
@@ -65,10 +67,14 @@
return false;
}
- ShareUi shareDialog;
+
QStringList fileList;
fileList.append(iPlsFilePath);
- return shareDialog.send(fileList,true);
+ if (NULL == iShareDialog)
+ {
+ iShareDialog = new ShareUi();
+ }
+ return iShareDialog->send(fileList,true);
}
bool IRStationShare::shareStations(const IRQPreset &aPreset)
@@ -78,10 +84,13 @@
return false;
}
- ShareUi shareDialog;
QStringList fileList;
fileList.append(iPlsFilePath);
- return shareDialog.send(fileList,true);
+ if (NULL == iShareDialog)
+ {
+ iShareDialog = new ShareUi();
+ }
+ return iShareDialog->send(fileList,true);
}
// ---------------------------------------------------------------------------
--- a/qtinternetradio/ui/src/irstationsview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irstationsview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -18,7 +18,6 @@
#include <hblistview.h>
#include <hbaction.h>
#include <QTimer>
-#include <hbprogressdialog.h>
#include "irviewmanager.h"
#include "irstationsview.h"
@@ -42,9 +41,7 @@
IRStationsView::IRStationsView(IRApplication* aApplication, TIRViewId aViewId)
: IrAbstractListViewBase(aApplication, aViewId),
iLogoPreset(NULL), iPreset(NULL),
- iWaitDialog(NULL),
- iLastSelectitem(0),
- iLastPopularItem(0)
+ iLastSelectitem(0)
{
//this view won't be starting view, don't need lazy init
IrAbstractListViewBase::lazyInit();
@@ -78,71 +75,25 @@
delete iLogoPreset;
iLogoPreset = NULL;
-
- delete iWaitDialog;
- iWaitDialog = NULL;
-
-
-
}
void IRStationsView::loadCategoryStations(int aIndex, const QString &aHeadingText)
{
connectToIsdsClient();
setHeadingText(aHeadingText);
- setViewParameter(EIRViewPara_CategoryStations);
bool cache = false;
iIsdsClient->isdsChannelRequest(aIndex, cache);
if (!cache)
{
- createWaitDialog(hbTrId("txt_common_info_loading"));
- }
-}
-
-void IRStationsView::loadPopularStations(bool aShowWaitDialog)
-{
- connectToIsdsClient();
- setViewParameter(EIRViewPara_PopularStations);
- setHeadingText(tr("Popular stations"));
- bool cache = false;
- iIsdsClient->isdsCategoryRequest(IRQIsdsClient::Ehotpicks, cache);
-
- if (!cache && aShowWaitDialog)
- {
- createWaitDialog(hbTrId("txt_common_info_loading"));
+ iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
}
}
-void IRStationsView::loadSearchResult(const QString &aStr)
-{
- connectToIsdsClient();
- setViewParameter(EIRViewPara_SearchResults);
- setHeadingText(hbTrId("txt_irad_subtitle_search_result"));
- iIsdsClient->isdsSearchRequest(aStr);
- if( iConnectTimer->isActive() )
- {
- iConnectTimer->stop();
- }
-
- iConnectTimer->start();
- createWaitDialog(hbTrId("txt_common_info_searching"));
-}
-
void IRStationsView::storeCurrentItem()
{
- switch (getViewParameter())
- {
- case EIRViewPara_PopularStations:
- iLastPopularItem = iListView->currentIndex().row();
- break;
- case EIRViewPara_CategoryStations:
- iLastSelectitem = iListView->currentIndex().row();
- break;
- default:
- break;
- }
+ iLastSelectitem = iListView->currentIndex().row();
}
void IRStationsView::resetCurrentItem()
@@ -206,11 +157,15 @@
return ret;
}
-void IRStationsView::launchAction()
+#ifdef HS_WIDGET_ENABLED
+void IRStationsView::itemAboutToBeSelected(bool &aNeedNetwork)
{
- setUseNetworkReason(EIR_UseNetwork_StartingView);
- iApplication->verifyNetworkConnectivity();
+ aNeedNetwork = true;
+
+ int index = iListView->currentIndex().row();
+ iPlayController->setConnectingStationName(iChannelModel->getChannelItemByIndex(index)->channelName);
}
+#endif
// slots functions
@@ -233,7 +188,7 @@
//once an item is selected, we show a dialog to prevent user from clicking the
//item again
- iPlayController->createBufferingDialog(this, SLOT(cancelRequest()));
+ iApplication->startLoadingAnimation(this, SLOT(cancelRequest()));
if (iIsdsClient->isdsIsChannelBanner())
{
@@ -254,32 +209,14 @@
*/
void IRStationsView::dataChanged()
{
-
- int currentItem = 0;
- iApplication->closeConnectingDialog();
iConnectTimer->stop();
disconnectIsdsClient();
cleanupResource();
-
-
- switch (getViewParameter())
- {
- case EIRViewPara_SearchResults:
- currentItem = 0;
- break;
- case EIRViewPara_PopularStations:
- currentItem = iLastPopularItem;
- break;
- case EIRViewPara_CategoryStations:
- currentItem = iLastSelectitem;
- break;
- default:
- break;
- }
+
iListView->reset();
- iListView->setCurrentIndex(iChannelModel->index(currentItem));
- iListView->scrollTo(iChannelModel->index(currentItem));
+ iListView->setCurrentIndex(iChannelModel->index(iLastSelectitem));
+ iListView->scrollTo(iChannelModel->index(iLastSelectitem));
//initialize the iconindices
for (int i = 0; i < iChannelModel->rowCount(); ++i)
@@ -291,10 +228,7 @@
}
getViewManager()->activateView(this);
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
+ iApplication->stopLoadingAnimation();
}
/*
@@ -324,21 +258,23 @@
*/
void IRStationsView::operationException(IRQError aError)
{
- iApplication->closeConnectingDialog();
- iPlayController->closeBufferingDialog();
-
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
-
+ iApplication->stopLoadingAnimation();
+
disconnectIsdsClient();
+#ifdef SUBTITLE_STR_BY_LOCID
QString errorString = hbTrId("txt_irad_info_failed_to_connect");
+#else
+ QString errorString = hbTrId("Connecting failed");
+#endif
switch (aError)
{
case EIRQErrorNotFound:
- errorString = hbTrId("txt_irad_info_no_matching_stations_found");
+#ifdef SUBTITLE_STR_BY_LOCID
+ errorString = hbTrId("txt_irad_info_no_matching_station_found");
+#else
+ errorString = hbTrId("No matching station found");
+#endif
if (iConnectTimer->isActive())
{
iConnectTimer->stop();
@@ -353,17 +289,13 @@
void IRStationsView::cancelRequest()
{
- if( iWaitDialog )
- {
- iWaitDialog->close();
- }
-
if( iConnectTimer->isActive())
{
iConnectTimer->stop();
}
iIsdsClient->isdsCancelRequest();
disconnectIsdsClient();
+ iApplication->stopLoadingAnimation();
}
void IRStationsView::startConvert(int aIndex)
@@ -374,23 +306,6 @@
tempPreset.imgUrl = url;
tempPreset.type = IRQPreset::EIsds;
- bool cached = iIsdsClient->isdsIsLogoCached(&tempPreset, KBitmapSize, KBitmapSize);
-
- if( !cached )
- {
- bool network = iApplication->verifyNetworkConnectivity(hbTrId("txt_irad_info_downloading_logos"));
- if( !network )
- {
- //if user has clicked an item and the connection is being setup, we don't change the reason
- if (EIR_UseNetwork_NoReason == getUseNetworkReason())
- {
- setUseNetworkReason(EIR_UseNetwork_DownloadLogo);
- }
- iConvertTimer->stop();
- return;
- }
- }
-
iIsdsClient->isdsLogoDownSendRequest(&tempPreset, 0, KBitmapSize, KBitmapSize);
}
@@ -463,23 +378,8 @@
switch (aEvent)
{
case EIRQNetworkConnectionEstablished:
- if (EIR_UseNetwork_StartingView == getUseNetworkReason())
- {
- //when stations view is starting view(used to show popular stations), don't show wait dialog
- loadPopularStations(false);
- }
- else if(EIR_UseNetwork_DownloadLogo == getUseNetworkReason())
+ if (EIR_UseNetwork_SelectItem == getUseNetworkReason())
{
- iApplication->closeConnectingDialog();
- int leftCount = iIconIndexArray.count();
- if(0 != leftCount)
- {
- iConvertTimer->start();
- }
- }
- else if (EIR_UseNetwork_SelectItem == getUseNetworkReason())
- {
- iApplication->closeConnectingDialog();
handleItemSelected();
int leftCount = iIconIndexArray.count();
if(0 != leftCount)
@@ -487,28 +387,15 @@
iConvertTimer->start();
}
}
- setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
- case EIRQConnectingCancelled:
- case EIRQDisplayNetworkMessageNoConnectivity:
- if (iListView->model()->rowCount() == 0)
- {
- getViewManager()->activateView(EIRView_MainView);
- }
- else
- {
- setCheckedAction();
- }
- setUseNetworkReason(EIR_UseNetwork_NoReason);
- break;
-
default:
- setCheckedAction();
- setUseNetworkReason(EIR_UseNetwork_NoReason);
+ setCheckedAction();
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
void IRStationsView::connectToIsdsClient()
@@ -529,24 +416,6 @@
this, SLOT(operationException(IRQError)));
}
-void IRStationsView::createWaitDialog(const QString &aStr)
-{
- if (!iWaitDialog)
- {
- iWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
- iWaitDialog->setTimeout(HbPopup::NoTimeout);
- iWaitDialog->setModal(true);
- iWaitDialog->setDismissPolicy(HbPopup::NoDismiss);
- QList<QAction*> actionsList = iWaitDialog->actions();
- QAction *action = actionsList.at(0);
- action->setText(hbTrId("txt_common_button_cancel"));
- connect(action, SIGNAL(triggered()), this, SLOT(cancelRequest()));
- }
-
- iWaitDialog->setText(aStr);
- iWaitDialog->open();
-}
-
void IRStationsView::convertAnother()
{
iConvertTimer->stop();
@@ -562,5 +431,9 @@
{
iConnectTimer->stop();
cancelRequest();
+#ifdef SUBTITLE_STR_BY_LOCID
popupNote(hbTrId("txt_irad_info_connecting_timout"), HbMessageBox::MessageTypeWarning);
+#else
+ popupNote(hbTrId("Connecting timeout"), HbMessageBox::MessageTypeWarning);
+#endif
}
--- a/qtinternetradio/ui/src/irtermsconsview.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irtermsconsview.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -20,6 +20,7 @@
#include "irtermsconsview.h"
#include "irapplication.h"
#include "iruidefines.h"
+#include "irviewmanager.h"
IRTermsConsView::IRTermsConsView(IRApplication* aApplication, TIRViewId aViewId)
: IRBaseView(aApplication, aViewId)
@@ -43,13 +44,28 @@
iLoader.setObjectTree(roots);
iLoader.load(TERMS_CONS_VIEW_LAYOUT_FILENAME);
- HbPushButton *acceptButton = qobject_cast<HbPushButton *>(iLoader.findObject("accept_btn"));
- HbPushButton *denyButton = qobject_cast<HbPushButton *>(iLoader.findObject("deny_btn"));
+ // load correct orientation
+ connect( getViewManager(), SIGNAL( orientationChanged(Qt::Orientation) ),
+ this, SLOT( handleOrientationChanged(Qt::Orientation) ) );
+ handleOrientationChanged(getViewManager()->orientation());
+
+ HbPushButton *acceptButton = qobject_cast<HbPushButton *>(iLoader.findObject(TERMS_CONS_VIEW_ACCEPT_BTN));
+ HbPushButton *declineButton = qobject_cast<HbPushButton *>(iLoader.findObject(TERMS_CONS_VIEW_DECLINE_BTN));
connect( acceptButton, SIGNAL(released()),
iApplication, SLOT(handleTermsConsAccepted()) );
- connect( denyButton, SIGNAL(released()),
+ connect( declineButton, SIGNAL(released()),
iApplication, SIGNAL(quit()) );
}
-
+void IRTermsConsView::handleOrientationChanged(Qt::Orientation aOrientation)
+{
+ if (aOrientation == Qt::Vertical)
+ {
+ iLoader.load(TERMS_CONS_VIEW_LAYOUT_FILENAME, PORTRAIT_SEC);
+ }
+ else
+ {
+ iLoader.load(TERMS_CONS_VIEW_LAYOUT_FILENAME, LANDSCAPE_SEC);
+ }
+}
--- a/qtinternetradio/ui/src/irviewmanager.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irviewmanager.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -17,6 +17,10 @@
#include <hbaction.h>
#include <QApplication>
#include <QTimer>
+#include <HbApplication>
+#include <HbActivityManager>
+#include <xqserviceutil.h>
+
#include "irviewmanager.h"
#include "irapplication.h"
@@ -46,6 +50,9 @@
static bool crossLineReady(const QLineF &aLine);
static bool crossLineIntersected(const QLineF &aLineA, const QLineF &aLineB);
+static const QString KActivityMainView("InternetRadioMainView");
+static const QString KActivityPlayingView("InternetRadioNowPlayingView");
+
enum CrossLineAngleType
{
EPositiveAngle = 0, // Line within 1,3 quadrant
@@ -124,6 +131,38 @@
return NULL;
}
+TIRViewId IRViewManager::getExitingView()
+{
+ if(0 == views().count())
+ {
+ return EIRView_InvalidId;
+ }
+ else
+ {
+ IRBaseView* lastView = static_cast<IRBaseView*>(currentView());
+ if(lastView->testFlag(IRBaseView::EViewFlag_StickyViewEnabled))
+ {
+ return lastView->id();
+ }
+
+ if(iViewStack.empty())
+ {
+ return EIRView_InvalidId;
+ }
+
+ for(int i = iViewStack.size()-1; i >= 0 ; i--)
+ {
+ IRBaseView* lastView = iViewStack.at(i);
+ if(lastView->testFlag(IRBaseView::EViewFlag_StickyViewEnabled))
+ {
+ return lastView->id();
+ }
+ }
+
+ return EIRView_InvalidId;
+ }
+}
+
/*
* Description : Judge if a view is in the view stack.
* Parameters : aViewId : the view's id
@@ -176,14 +215,14 @@
if (view)
{
- if (EViewFlag_ClearStackWhenActivate == view->flag())
+ if (view->testFlag(IRBaseView::EViewFlag_ClearStackWhenActivate))
{
clearStack();
}
else
{ if (aPushCurrentView)
{
- if (baseView && EViewFlag_UnStackable != baseView->flag())
+ if (baseView && !baseView->testFlag(IRBaseView::EViewFlag_UnStackable))
{
iViewStack.push(baseView);
}
@@ -317,7 +356,96 @@
Q_ASSERT(curView);
iViewStack.push(curView);
}
-
+
+void IRViewManager::saveScreenShot()
+{
+ //if capture screen shot immediately for first view, can't get correct result
+ //use timer as a temp solution, will raise error to Orbit
+ QTimer::singleShot(200, this, SLOT(handleSaveScreenShot()));
+}
+
+void IRViewManager::saveActivity()
+{
+ HbActivityManager *activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
+
+ //for embedded applications, don't publish activity. If backup activity is available, need to restore
+ if (XQServiceUtil::isEmbedded())
+ {
+ if (!iActivityBackup.activityId.isEmpty())
+ {
+ QVariantHash metadata;
+ metadata.insert("screenshot", iActivityBackup.screenShot);
+
+ QByteArray serializedActivity;
+ QDataStream stream(&serializedActivity, QIODevice::WriteOnly | QIODevice::Append);
+ stream<<iActivityBackup.viewId;
+ activityManager->addActivity(iActivityBackup.activityId, serializedActivity, metadata);
+ }
+ return;
+ }
+
+ removeActivity();
+
+
+ QVariantHash metadata;
+
+ QByteArray serializedActivity;
+ QDataStream stream(&serializedActivity, QIODevice::WriteOnly | QIODevice::Append);
+
+ TIRViewId viewId = getExitingView();
+ switch (viewId)
+ {
+ case EIRView_MainView:
+ case EIRView_FavoritesView:
+ case EIRView_CategoryView:
+ stream<<viewId;
+ metadata.insert("screenshot", iScreenShots[viewId]);
+ activityManager->addActivity(KActivityMainView, serializedActivity, metadata);
+ break;
+
+ case EIRView_PlayingView:
+ stream<<viewId;
+ metadata.insert("screenshot", iScreenShots[viewId]);
+ activityManager->addActivity(KActivityPlayingView, serializedActivity, metadata);
+ break;
+
+ default:
+ break;
+ }
+}
+
+void IRViewManager::removeActivity()
+{
+ if (XQServiceUtil::isEmbedded())
+ {
+ backupActivity();
+ }
+
+ HbActivityManager *activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
+ activityManager->removeActivity(KActivityMainView);
+ activityManager->removeActivity(KActivityPlayingView);
+}
+
+void IRViewManager::backupActivity()
+{
+ HbApplication *hbApp = qobject_cast<HbApplication*>(qApp);
+ HbActivityManager *activityManager = hbApp->activityManager();
+ QList<QVariantHash> params = activityManager->activities();
+ TInt count = params.count();
+ if (count > 0)
+ {
+ QVariantHash activity = params[0];
+ QString path = activity.value(activity.keys().at(2)).toString();
+ iActivityBackup.screenShot = QPixmap(path);
+ iActivityBackup.activityId = activity.value(activity.keys().at(1)).toString();
+
+ QByteArray serializedModel = activityManager->activityData(iActivityBackup.activityId).toByteArray();
+ QDataStream stream(&serializedModel, QIODevice::ReadOnly);
+ int id = 0;
+ stream>>id;
+ iActivityBackup.viewId = TIRViewId(id);
+ }
+}
// slot functions
@@ -448,7 +576,7 @@
IRBaseView *topView = static_cast<IRBaseView*>(currentView());
if (topView)
{
- if (EViewFlag_ClearStackWhenActivate == topView->flag())
+ if (topView->testFlag(IRBaseView::EViewFlag_ClearStackWhenActivate))
{
topView->setNavigationAction(iExitAction);
}
@@ -459,6 +587,15 @@
}
}
+void IRViewManager::handleSaveScreenShot()
+{
+ if (!XQServiceUtil::isEmbedded())
+ {
+ TIRViewId id = currentViewId();
+ iScreenShots[id] = QPixmap::grabWidget(this, rect());
+ }
+}
+
void IRViewManager::mousePressEvent(QMouseEvent *aEvent)
{
if(iCrossLineEnable)
@@ -559,7 +696,11 @@
{
crossLineReset();
viewport()->repaint();
+#ifdef SUBTITLE_STR_BY_LOCID
HbMessageBox::information(hbTrId("txt_common_info_exiting"), (QObject*)NULL, NULL);
+#else
+ HbMessageBox::information(hbTrId("Exiting..."), (QObject*)NULL, NULL);
+#endif
qApp->quit();
iExiting = true;
}
--- a/qtinternetradio/ui/src/main.cpp Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/main.cpp Thu Jul 22 16:31:41 2010 +0100
@@ -18,12 +18,16 @@
#include <hbapplication.h>
#include <hbdevicemessagebox.h>
#include <QLocalSocket>
+#include <hbsplashscreen.h>
+#include <QSettings>
#include "irviewmanager.h"
#include "irapplication.h"
#include "irmemorycollector.h"
#include "irqlogger.h"
#include "irqsystemeventhandler.h"
+#include "irqsettings.h"
+#include "irservicedef.h"
#ifdef LOCALIZATION
#include <QTranslator>
@@ -32,10 +36,18 @@
bool isDiskSpaceLow(IRQSystemEventHandler* aEventHandler);
bool isSecondInstance();
+void setSplashScreen();
+bool isSplashNowplaying();
int main(int argc, char* argv[])
{
+ installLogDir();
+
INSTALL_MESSAGE_HANDLER;
+ //the following is for splash screen, this must be placed
+ //before the creating of HbApplication
+ setSplashScreen();
+
HbApplication app(argc, argv);
#ifdef LOCALIZATION
@@ -44,7 +56,11 @@
Q_ASSERT( NULL != translator );
#endif
+#ifdef SUBTITLE_STR_BY_LOCID
QCoreApplication::setApplicationName(hbTrId("txt_irad_title_internet_radio"));
+#else
+ QCoreApplication::setApplicationName(hbTrId("Internet radio"));
+#endif
if (isSecondInstance())
{
return 0;
@@ -87,8 +103,13 @@
bool ret = aEventHandler->isBelowCriticalLevel();
if(ret)
{
- HbDeviceMessageBox messageBox(hbTrId("txt_irad_info_no_space_on_c_drive_internet_radio_closed"),
+#ifdef SUBTITLE_STR_BY_LOCID
+ HbDeviceMessageBox messageBox(hbTrId("txt_irad_info_insufficient_disk_space"),
HbMessageBox::MessageTypeWarning);
+#else
+ HbDeviceMessageBox messageBox(hbTrId("Insufficient disk space"),
+ HbMessageBox::MessageTypeWarning);
+#endif
messageBox.setTimeout(HbPopup::NoTimeout);
messageBox.exec();
}
@@ -121,3 +142,22 @@
return false;
}
}
+
+void setSplashScreen()
+{
+ if( isSplashNowplaying() )
+ {
+ HbSplashScreen::setScreenId("nowplaying_screen");
+ }
+ else
+ {
+ HbSplashScreen::setScreenId("normal_screen");
+ }
+}
+
+bool isSplashNowplaying()
+{
+ QSettings settings(KIrSettingOrganization, KIrSettingApplication);
+ return settings.value(KIrSettingSplashNowplaying,false).toBool();
+}
+
--- a/qtinternetradio/ui/ui.pro Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/ui.pro Thu Jul 22 16:31:41 2010 +0100
@@ -26,6 +26,33 @@
INCLUDEPATH += $${OS_LAYER_PUBLIC_EXPORT_PATH(http)}
INCLUDEPATH += $${MW_LAYER_PUBLIC_EXPORT_PATH(http)}
+#the following is for splash screen in phone
+BLD_INF_RULES.prj_exports += "resources/splashscreen/internet_radio_default.splashml /epoc32/data/z/resource/hb/splashml/internet_radio_default.splashml" \
+ "resources/splashscreen/internet_radio_default.docml /epoc32/data/z/resource/hb/splashml/internet_radio_default.docml" \
+ "resources/splashscreen/internet_radio_normal.splashml /epoc32/data/z/resource/hb/splashml/internet_radio_normal.splashml" \
+ "resources/splashscreen/internet_radio_normal.docml /epoc32/data/z/resource/hb/splashml/internet_radio_normal.docml" \
+ "resources/splashscreen/internet_radio_nowplaying.splashml /epoc32/data/z/resource/hb/splashml/internet_radio_nowplaying.splashml" \
+ "resources/splashscreen/internet_radio_nowplaying.docml /epoc32/data/z/resource/hb/splashml/internet_radio_nowplaying.docml"
+
+#the following is for splash screen in winscw_udeb
+BLD_INF_RULES.prj_exports += "resources/splashscreen/internet_radio_default.splashml /epoc32/release/winscw/udeb/z/resource/hb/splashml/internet_radio_default.splashml" \
+ "resources/splashscreen/internet_radio_default.docml /epoc32/release/winscw/udeb/z/resource/hb/splashml/internet_radio_default.docml" \
+ "resources/splashscreen/internet_radio_normal.splashml /epoc32/release/winscw/udeb/z/resource/hb/splashml/internet_radio_normal.splashml" \
+ "resources/splashscreen/internet_radio_normal.docml /epoc32/release/winscw/udeb/z/resource/hb/splashml/internet_radio_normal.docml" \
+ "resources/splashscreen/internet_radio_nowplaying.splashml /epoc32/release/winscw/udeb/z/resource/hb/splashml/internet_radio_nowplaying.splashml" \
+ "resources/splashscreen/internet_radio_nowplaying.docml /epoc32/release/winscw/udeb/z/resource/hb/splashml/internet_radio_nowplaying.docml"
+
+
+#the following is for splash screen in winscw_urel
+BLD_INF_RULES.prj_exports += "resources/splashscreen/internet_radio_default.splashml /epoc32/release/winscw/urel/z/resource/hb/splashml/internet_radio_default.splashml" \
+ "resources/splashscreen/internet_radio_default.docml /epoc32/release/winscw/urel/z/resource/hb/splashml/internet_radio_default.docml" \
+ "resources/splashscreen/internet_radio_normal.splashml /epoc32/release/winscw/urel/z/resource/hb/splashml/internet_radio_normal.splashml" \
+ "resources/splashscreen/internet_radio_normal.docml /epoc32/release/winscw/urel/z/resource/hb/splashml/internet_radio_normal.docml" \
+ "resources/splashscreen/internet_radio_nowplaying.splashml /epoc32/release/winscw/urel/z/resource/hb/splashml/internet_radio_nowplaying.splashml" \
+ "resources/splashscreen/internet_radio_nowplaying.docml /epoc32/release/winscw/urel/z/resource/hb/splashml/internet_radio_nowplaying.docml"
+
+
+
INCLUDEPATH += inc \
..\irqisdsclient\inc \
..\irqmediaplayer\inc \
@@ -63,17 +90,16 @@
-lirqlogger \
-lshareui \
-lirqsystemeventhandler \
- -lxqservice \
+ -lxqsettingsmanager \
+ -lxqservice \
-lxqserviceutil
symbian{
TARGET.UID3 = 0xE28364bb
TARGET.EPOCHEAPSIZE = 0x020000 0x2000000
TARGET.VID = VID_DEFAULT
- ICON = resources/qtg_large_internet_radio.svg
- datatype_list = "datatype_list={DATATYPE{priority=EDataTypePriorityHigh;type=\"audio/x-scpls\";}," \
- "DATATYPE{priority=EDataTypePriorityHigh;type=\"audio/x-mpegurl\";}" \
- "};"
+ SKINICON = qtg_large_internet_radio
+ datatype_list = "datatype_list={DATATYPE{priority=EDataTypePriorityHigh;type=\"audio/x-scpls\";}};"
RSS_RULES += datatype_list
}
@@ -109,7 +135,11 @@
inc\irstationshare.h \
inc\irstationdetailsview.h \
inc\irtermsconsview.h \
- inc\irplaylist.h
+ inc\ircontrolservice.h \
+ inc\irmonitorservice.h \
+ inc\irplaylist.h \
+ inc\irsearchresultdb.h \
+ inc\irfileviewservice.h
#source files list
SOURCES += main.cpp \
@@ -143,7 +173,11 @@
irstationshare.cpp \
irstationdetailsview.cpp \
irtermsconsview.cpp \
- irplaylist.cpp
+ ircontrolservice.cpp \
+ irmonitorservice.cpp \
+ irplaylist.cpp \
+ irsearchresultdb.cpp \
+ irfileviewservice.cpp
#resource
RESOURCES += resources/irui.qrc