--- a/internetradio2.0/datastructuressrc/irchannelserverurl.cpp Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/datastructuressrc/irchannelserverurl.cpp Thu May 27 12:46:34 2010 +0300
@@ -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;
}
--- a/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp Thu May 27 12:46:34 2010 +0300
@@ -238,6 +238,8 @@
{
if( aId == iFavPresetList[i]->Id())
{
+ //before Remove, the memory should be freed ahead.
+ delete iFavPresetList[i];
iFavPresetList.Remove(i);
break;
}
--- a/internetradio2.0/group/bld.inf Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/group/bld.inf Thu May 27 12:46:34 2010 +0300
@@ -52,7 +52,6 @@
irdataprovider.mmp
irsessionlog.mmp
isdsclient.mmp
-irsonghistory.mmp
irrecognizer.mmp
--- a/internetradio2.0/install/ir_package.pkg Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/install/ir_package.pkg Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/install/ir_package_deb.pkg Thu May 27 12:46:34 2010 +0300
@@ -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/networkcontrollersrc/irnetworkcontroller.cpp Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp Thu May 27 12:46:34 2010 +0300
@@ -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>
@@ -50,6 +49,31 @@
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," ");
--- a/internetradio2.0/presetpluginsrc/irchannelserverurlimpl.cpp Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/presetpluginsrc/irchannelserverurlimpl.cpp Thu May 27 12:46:34 2010 +0300
@@ -98,7 +98,7 @@
{
if( NULL == iServerName )
{
- iServerName = HBufC::NewL(0);
+ iServerName = HBufC::New(0);
}
return *iServerName;
@@ -113,7 +113,7 @@
{
if( NULL == iURL )
{
- iURL = HBufC::NewL(0);
+ iURL = HBufC::New(0);
}
return *iURL;
}
--- a/internetradio2.0/rom/internetradio.iby Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/rom/internetradio.iby Thu May 27 12:46:34 2010 +0300
@@ -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/songhistoryinc/irsonghistorydb.h Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/songhistoryinc/irsonghistorydb.h Thu May 27 12:46:34 2010 +0300
@@ -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
@@ -183,6 +186,9 @@
const TDesC& aChannelName,
const TDesC& aChannelUrl,
const TDesC& aImageUrl,
+ const TDesC& aGenreName,
+ const TDesC& aCountryName,
+ const TDesC& aLanguageName,
const TDesC& aMusicFlag);
/*
@@ -192,10 +198,14 @@
TInt aChannelType);
/*
- * 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();
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/songhistoryinc/irsonghistoryinfo.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/songhistorysrc/irsonghistorydb.cpp Thu May 27 12:46:34 2010 +0300
@@ -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,7 +268,7 @@
// 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& aMusicFlag)
@@ -378,6 +390,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 +414,9 @@
TInt bitrate;
RBuf channelDesc;
RBuf imageUrl;
+ RBuf genreName;
+ RBuf countryName;
+ RBuf languageName;
RBuf channelMusicStatus;
songName.CreateL(iSongHistoryTable.ColDes( songColumn ));
@@ -425,16 +443,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);
@@ -586,6 +614,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 +743,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 +763,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 );
@@ -942,6 +1021,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 +1035,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 +1056,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();
@@ -1034,7 +1128,10 @@
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" );
@@ -1042,7 +1139,7 @@
TBool channelChanged = EFalse ;
TInt compFlagName ;
TInt compFlagUrl ;
- TInt compFlagImageUrl ;
+ TInt compFlagImageUrl, compFlagGenreName, compFlagCountryName, compFlagLanguageName;
TInt compFlagMusic ;
TInt compUrlChange ;
@@ -1058,6 +1155,9 @@
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;
@@ -1071,7 +1171,7 @@
// 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 ));
@@ -1082,6 +1182,12 @@
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 );
@@ -1092,7 +1198,10 @@
{
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)
{
@@ -1110,13 +1219,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,6 +1257,9 @@
}
CleanupStack::PopAndDestroy(&channelMusicStatus);
+ CleanupStack::PopAndDestroy(&languageName);
+ CleanupStack::PopAndDestroy(&countryName);
+ CleanupStack::PopAndDestroy(&genreName);
CleanupStack::PopAndDestroy(&imageUrl);
CleanupStack::PopAndDestroy(&channelUrl);
CleanupStack::PopAndDestroy(&channelName);
--- a/internetradio2.0/songhistorysrc/irsonghistoryinfo.cpp Fri May 14 15:43:29 2010 +0300
+++ b/internetradio2.0/songhistorysrc/irsonghistoryinfo.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/layers.sysdef.xml Thu May 27 12:46:34 2010 +0300
@@ -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/rom/presetserver.iby Fri May 14 15:43:29 2010 +0300
+++ b/presetserver/rom/presetserver.iby Thu May 27 12:46:34 2010 +0300
@@ -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/qtinternetradio/bwins/irqloggeru.def Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/bwins/irqloggeru.def Thu May 27 12:46:34 2010 +0300
@@ -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/irqsonghistoryu.def Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/bwins/irqsonghistoryu.def Thu May 27 12:46:34 2010 +0300
@@ -1,47 +1,54 @@
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
- ?deleteOneItem@IRQSongHistoryEngine@@QAE_NH@Z @ 45 NONAME ; bool IRQSongHistoryEngine::deleteOneItem(int)
+ ?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
+ ?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
+ ?getChannelType@IRQSongHistoryInfo@@QBEHXZ @ 5 NONAME ; int IRQSongHistoryInfo::getChannelType(void) const
+ ?GetChannelId@CIRSongHistoryInfo@@QBEHXZ @ 6 NONAME ; int CIRSongHistoryInfo::GetChannelId(void) const
+ ??1IRQSongHistoryInfo@@QAE@XZ @ 7 NONAME ; IRQSongHistoryInfo::~IRQSongHistoryInfo(void)
+ ?handleMetaDataReceived@IRQSongHistoryEngine@@QAEXABVIRQMetaData@@ABVIRQPreset@@@Z @ 8 NONAME ; void IRQSongHistoryEngine::handleMetaDataReceived(class IRQMetaData const &, class IRQPreset const &)
+ ?getCountryName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 9 NONAME ; class QString const & IRQSongHistoryInfo::getCountryName(void) const
+ ?getAllSongHistory@IRQSongHistoryEngine@@QAEXAAV?$QList@PAVIRQSongInfo@@@@@Z @ 10 NONAME ; void IRQSongHistoryEngine::getAllSongHistory(class QList<class IRQSongInfo *> &)
+ ??0IRQSongHistoryInfo@@QAE@XZ @ 11 NONAME ; IRQSongHistoryInfo::IRQSongHistoryInfo(void)
+ ?GetChannelDesc@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 12 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetChannelDesc(void) const
+ ?getChannelId@IRQSongHistoryInfo@@QBEHXZ @ 13 NONAME ; int IRQSongHistoryInfo::getChannelId(void) const
+ ?GetStreamUrl@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 14 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetStreamUrl(void) const
+ ?closeInstance@IRQSongHistoryEngine@@QAEXXZ @ 15 NONAME ; void IRQSongHistoryEngine::closeInstance(void)
+ ?setMusicshopStatus@IRQSongInfo@@QAEXABVQString@@@Z @ 16 NONAME ; void IRQSongInfo::setMusicshopStatus(class QString const &)
+ ?GetSongInfo@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 17 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetSongInfo(void) const
+ ?setAllInfo@IRQSongInfo@@QAEXABVQString@@00@Z @ 18 NONAME ; void IRQSongInfo::setAllInfo(class QString const &, class QString const &, class QString 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 *> &)
+ ?NewLC@CIRSongHistoryInfo@@SAPAV1@XZ @ 23 NONAME ; class CIRSongHistoryInfo * CIRSongHistoryInfo::NewLC(void)
+ ?handleSongMetaDataReceived@IRQSongHistoryEngine@@QAEXABVIRQMetaData@@AAVQString@@@Z @ 24 NONAME ; void IRQSongHistoryEngine::handleSongMetaDataReceived(class IRQMetaData const &, class QString &)
+ ?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
+ ?deleteOneSongHistoryItem@IRQSongHistoryEngine@@QAE_NH@Z @ 40 NONAME ; bool IRQSongHistoryEngine::deleteOneSongHistoryItem(int)
+ ?setArtistName@IRQSongInfo@@QAEXABVQString@@@Z @ 41 NONAME ; void IRQSongInfo::setArtistName(class QString const &)
+ ?openInstance@IRQSongHistoryEngine@@SAPAV1@XZ @ 42 NONAME ; class IRQSongHistoryEngine * IRQSongHistoryEngine::openInstance(void)
+ ?clearAllHistory@IRQSongHistoryEngine@@QAEHXZ @ 43 NONAME ; int IRQSongHistoryEngine::clearAllHistory(void)
+ ?deleteOneItem@IRQSongHistoryEngine@@QAE_NH@Z @ 44 NONAME ; bool IRQSongHistoryEngine::deleteOneItem(int)
+ ?clearAllSongHistory@IRQSongHistoryEngine@@QAEHXZ @ 45 NONAME ; int IRQSongHistoryEngine::clearAllSongHistory(void)
+ ?getSongName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 46 NONAME ; class QString const & IRQSongHistoryInfo::getSongName(void) const
+ ?getChannelName@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 47 NONAME ; class QString const & IRQSongHistoryInfo::getChannelName(void) const
+ ??1CIRSongHistoryInfo@@UAE@XZ @ 48 NONAME ; CIRSongHistoryInfo::~CIRSongHistoryInfo(void)
+ ?GetImageUrl@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 49 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetImageUrl(void) const
+ ?getStreamUrl@IRQSongHistoryInfo@@QBEABVQString@@XZ @ 50 NONAME ; class QString const & IRQSongHistoryInfo::getStreamUrl(void) const
+ ?GetArtistInfo@CIRSongHistoryInfo@@QBEABVRBuf16@@XZ @ 51 NONAME ; class RBuf16 const & CIRSongHistoryInfo::GetArtistInfo(void) const
+ ?GetChannelType@CIRSongHistoryInfo@@QBEHXZ @ 52 NONAME ; int CIRSongHistoryInfo::GetChannelType(void) const
--- a/qtinternetradio/bwins/irqsystemeventhandleru.def Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/bwins/irqsystemeventhandleru.def Thu May 27 12:46:34 2010 +0300
@@ -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/eabi/irqloggeru.def Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/eabi/irqloggeru.def Thu May 27 12:46:34 2010 +0300
@@ -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/irqsonghistoryu.def Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/eabi/irqsonghistoryu.def Thu May 27 12:46:34 2010 +0300
@@ -3,7 +3,7 @@
_ZN11IRQSongInfo11setSongNameERK7QString @ 2 NONAME
_ZN11IRQSongInfo13setArtistNameERK7QString @ 3 NONAME
_ZN11IRQSongInfo18setMusicshopStatusERK7QString @ 4 NONAME
- _ZN18CIRSongHistoryInfo14SetHistoryInfoER6RBuf16S1_S1_S1_iiiS1_S1_S1_ @ 5 NONAME
+ _ZN18CIRSongHistoryInfo14SetHistoryInfoER6RBuf16S1_S1_S1_iiiS1_S1_S1_S1_S1_S1_ @ 5 NONAME
_ZN18CIRSongHistoryInfo4NewLEv @ 6 NONAME
_ZN18CIRSongHistoryInfo5NewLCEv @ 7 NONAME
_ZN18CIRSongHistoryInfoD0Ev @ 8 NONAME
@@ -16,36 +16,40 @@
_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
+ _ZN20IRQSongHistoryEngine13deleteOneItemEi @ 18 NONAME
+ _ZN20IRQSongHistoryEngine13getAllHistoryER5QListIP18IRQSongHistoryInfoE @ 19 NONAME
+ _ZN20IRQSongHistoryEngine15clearAllHistoryEv @ 20 NONAME
+ _ZN20IRQSongHistoryEngine17getAllSongHistoryER5QListIP11IRQSongInfoE @ 21 NONAME
+ _ZN20IRQSongHistoryEngine19clearAllSongHistoryEv @ 22 NONAME
+ _ZN20IRQSongHistoryEngine19updateSongHistoryDbEiRK7QStringS2_S2_S2_S2_S2_S2_ @ 23 NONAME
+ _ZN20IRQSongHistoryEngine22handleMetaDataReceivedERK11IRQMetaDataRK9IRQPreset @ 24 NONAME
+ _ZN20IRQSongHistoryEngine24deleteOneSongHistoryItemEi @ 25 NONAME
+ _ZN20IRQSongHistoryEngine26handleSongMetaDataReceivedERK11IRQMetaDataR7QString @ 26 NONAME
+ _ZN20IRQSongHistoryEngine27handleSongMetaDataReceivedLERK11IRQMetaDataR7QString @ 27 NONAME
+ _ZNK11IRQSongInfo11getSongNameEv @ 28 NONAME
+ _ZNK11IRQSongInfo13getArtistNameEv @ 29 NONAME
+ _ZNK11IRQSongInfo18getMusicshopStatusEv @ 30 NONAME
+ _ZNK18CIRSongHistoryInfo10GetBitrateEv @ 31 NONAME
+ _ZNK18CIRSongHistoryInfo11GetImageUrlEv @ 32 NONAME
+ _ZNK18CIRSongHistoryInfo11GetSongInfoEv @ 33 NONAME
+ _ZNK18CIRSongHistoryInfo12GetChannelIdEv @ 34 NONAME
+ _ZNK18CIRSongHistoryInfo12GetStreamUrlEv @ 35 NONAME
+ _ZNK18CIRSongHistoryInfo13GetArtistInfoEv @ 36 NONAME
+ _ZNK18CIRSongHistoryInfo14GetChannelDescEv @ 37 NONAME
+ _ZNK18CIRSongHistoryInfo14GetChannelNameEv @ 38 NONAME
+ _ZNK18CIRSongHistoryInfo14GetChannelTypeEv @ 39 NONAME
+ _ZNK18CIRSongHistoryInfo21GetChannelMusicStatusEv @ 40 NONAME
+ _ZNK18IRQSongHistoryInfo10getBitrateEv @ 41 NONAME
+ _ZNK18IRQSongHistoryInfo11getImageUrlEv @ 42 NONAME
+ _ZNK18IRQSongHistoryInfo11getSongNameEv @ 43 NONAME
+ _ZNK18IRQSongHistoryInfo12getChannelIdEv @ 44 NONAME
+ _ZNK18IRQSongHistoryInfo12getGenreNameEv @ 45 NONAME
+ _ZNK18IRQSongHistoryInfo12getStreamUrlEv @ 46 NONAME
+ _ZNK18IRQSongHistoryInfo13getArtistNameEv @ 47 NONAME
+ _ZNK18IRQSongHistoryInfo14getChannelDescEv @ 48 NONAME
+ _ZNK18IRQSongHistoryInfo14getChannelNameEv @ 49 NONAME
+ _ZNK18IRQSongHistoryInfo14getChannelTypeEv @ 50 NONAME
+ _ZNK18IRQSongHistoryInfo14getCountryNameEv @ 51 NONAME
+ _ZNK18IRQSongHistoryInfo15getLanguageNameEv @ 52 NONAME
+ _ZNK18IRQSongHistoryInfo19getMusicStoreStatusEv @ 53 NONAME
--- a/qtinternetradio/eabi/irqsystemeventhandleru.def Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/eabi/irqsystemeventhandleru.def Thu May 27 12:46:34 2010 +0300
@@ -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
--- a/qtinternetradio/irqcommon/inc/irqenums.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqcommon/inc/irqenums.h Thu May 27 12:46:34 2010 +0300
@@ -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/irviewdefinitions.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqcommon/inc/irviewdefinitions.h Thu May 27 12:46:34 2010 +0300
@@ -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/irqisdsclient/inc/irqisdsclient.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqisdsclient/inc/irqisdsclient.h Thu May 27 12:46:34 2010 +0300
@@ -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
--- a/qtinternetradio/irqisdsclient/irqisdsclient.pro Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqisdsclient/irqisdsclient.pro Thu May 27 12:46:34 2010 +0300
@@ -40,7 +40,8 @@
..\..\internetradio2.0\sessionloginc \
..\..\internetradio2.0\settingsinc \
..\irqcommon\inc \
- ..\irqfavoritesdb\inc
+ ..\irqfavoritesdb\inc \
+ ..\irqlogger\inc
LIBS += -lirdatastructures \
-lirfavoritesdb \
@@ -50,8 +51,9 @@
-lisdsclientinterface \
-lirdataprovider \
-lflogger \
- -lirqutility
-
+ -lirqlogger \
+ -lirqutility
+
symbian{
TARGET.UID3 = 0xec6ecb67
@@ -66,7 +68,7 @@
#source files list
SOURCES += irqisdsclient.cpp \
- irqisdscientimpl.cpp
+ irqisdsclientimpl.cpp
SYMBIAN_PLATFORMS = WINSCW ARMV5
--- a/qtinternetradio/irqisdsclient/src/irqisdscientimpl.cpp Fri May 14 15:43:29 2010 +0300
+++ /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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqisdsclient/src/irqisdsclient.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 May 27 12:46:34 2010 +0300
@@ -0,0 +1,584 @@
+/*
+* 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());
+
+ 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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqlogger/inc/irqlogger.h Thu May 27 12:46:34 2010 +0300
@@ -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/src/irqlogger.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqlogger/src/irqlogger.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqmediaplayer/irqmediaplayer.pro Thu May 27 12:46:34 2010 +0300
@@ -22,12 +22,15 @@
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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqmediaplayer/src/irqmediaplayer.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqmediaplayer/src/irqmmfadapter.cpp Thu May 27 12:46:34 2010 +0300
@@ -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/irqsonghistory/inc/irqsonghistoryengine.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsonghistory/inc/irqsonghistoryengine.h Thu May 27 12:46:34 2010 +0300
@@ -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.
@@ -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
--- a/qtinternetradio/irqsonghistory/inc/irqsonghistoryinfo.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsonghistory/inc/irqsonghistoryinfo.h Thu May 27 12:46:34 2010 +0300
@@ -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.
*/
--- a/qtinternetradio/irqsonghistory/src/irqsonghistoryengine.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsonghistory/src/irqsonghistoryengine.cpp Thu May 27 12:46:34 2010 +0300
@@ -162,6 +162,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 +176,7 @@
if(ret)
{
TInt modified = iSongHistoryDb->UpdateSongHistoryDbL( channelId ,
- channelName ,channelUrl ,imageUrl ,musicFlag);
+ channelName ,channelUrl ,imageUrl ,genreName, countryName, languageName, musicFlag);
// TODO notify uplayer to change layout?
}
}
@@ -206,6 +209,9 @@
bitrate,
channelDesc,
imageUrl,
+ genreName,
+ countryName,
+ languageName,
musicFlag);
CleanupStack::PopAndDestroy(4, &delSongName);
@@ -315,6 +321,9 @@
int bitrate;
QString channelDesc;
QString imageUrl;
+ QString genreName;
+ QString countryName;
+ QString languageName;
QString musicStoreStatus;
for (int arrCount = 0 ; arrCount < songCount ; arrCount++ )
{
@@ -333,6 +342,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 +356,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);
}
@@ -443,6 +458,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 +478,17 @@
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 +504,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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsonghistory/src/irqsonghistoryinfo.cpp Thu May 27 12:46:34 2010 +0300
@@ -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
// ---------------------------------------------------------------------------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqsystemeventhandler/inc/iraccessoryobserver.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/inc/iralarmobserver.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ /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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/inc/irdiskspaceobserver.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ /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 May 27 12:46:34 2010 +0300
@@ -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 May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/inc/irqsystemeventhandler.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/inc/irqsystemeventhandler_p.h Thu May 27 12:46:34 2010 +0300
@@ -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 May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/irqsystemeventhandler.pro Thu May 27 12:46:34 2010 +0300
@@ -13,33 +13,41 @@
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 May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/src/iralarmobserver.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/src/irdiskspaceobserver.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 May 27 12:46:34 2010 +0300
@@ -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 May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler.cpp Thu May 27 12:46:34 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: Contains logic for watching certain disk's space
+* Description:
*
*/
--- a/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler_p.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/src/irqsystemeventhandler_p.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/rom/internetradio_binaries.txt Thu May 27 12:46:34 2010 +0300
@@ -12,7 +12,6 @@
irsettings.dll
irsessionlog.dll
iractiveidleengine.dll
-irsonghistory.dll
irsettingsview.dll
irmediaengine.dll
irfilerecognizer.dll
--- a/qtinternetradio/ui/inc/irabstractlistviewbase.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irabstractlistviewbase.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irapplication.h Thu May 27 12:46:34 2010 +0300
@@ -55,11 +55,11 @@
~IRApplication();
- bool verifyNetworkConnectivity(const QString &aConnectingText = hbTrId("Connecting to server..."));
+ bool verifyNetworkConnectivity(const QString &aConnectingText = hbTrId("txt_common_info_loading"));
- void createConnectingDialog();
+ void createLoadingDialog(const QObject *aReceiver, const char *aFunc);
- void closeConnectingDialog();
+ void closeLoadingDialog();
IRViewManager* getViewManager() const;
IRQNetworkController* getNetworkController();
@@ -102,6 +102,10 @@
void newLocalSocketConnection();
void handleDiskSpaceLow(qint64 aCriticalLevel);
void handleTermsConsAccepted();
+ void handleCallActivated();
+ void handleCallDeactivated();
+ void handleHeadsetConnected();
+ void handleHeadsetDisconnected();
private:
void createComponents();
@@ -155,7 +159,7 @@
QLocalServer *iLocalServer;
- HbProgressDialog *iConnectingNote;
+ HbProgressDialog *iLoadingNote;
#ifdef LOCALIZATION
QTranslator *iTranslator;
--- a/qtinternetradio/ui/inc/irbaseview.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irbaseview.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/ircategoryview.h Thu May 27 12:46:34 2010 +0300
@@ -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/irfavoritesmodel.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irfavoritesmodel.h Thu May 27 12:46:34 2010 +0300
@@ -39,11 +39,13 @@
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);
signals:
void modelChanged();
--- a/qtinternetradio/ui/inc/irfavoritesview.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irfavoritesview.h Thu May 27 12:46:34 2010 +0300
@@ -20,6 +20,7 @@
#include "irabstractlistviewbase.h"
#include "irqevent.h"
+class HbSelectionDialog;
class IRFavoritesModel;
class IRQPreset;
@@ -37,13 +38,14 @@
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 deleteDialogClosed(HbAction *aAction);
private:
//from IrAbstractListViewBase
@@ -55,6 +57,7 @@
void deleteContextAction();
void renameContextAction();
void detailsContextAction();
+ void updateIconIndexArray();
//from base view
void listViewLongPressed(HbAbstractViewItem *aItem, const QPointF& aCoords);
@@ -68,7 +71,8 @@
private:
IRFavoritesModel *iModel;
- HbAction *iClearFavoriteAction;
+ HbSelectionDialog *iMultiDeleteDialog;
+ HbAction *iMultiDeleteAction;
//the following are used to support the img
QList<int> iIconIndexArray;
IRQPreset *iLogoPreset;
--- a/qtinternetradio/ui/inc/irhistoryview.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irhistoryview.h Thu May 27 12:46:34 2010 +0300
@@ -63,7 +63,7 @@
void convertStationHistory2Preset(const IRQSongHistoryInfo& aHistoryInfo, IRQPreset& aPreset);
void addContextAction();
void deleteContextAction();
- void detailContextAction();
+ void detailsContextAction();
private:
IRHistoryModel *iModel;
--- a/qtinternetradio/ui/inc/irmainview.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irmainview.h Thu May 27 12:46:34 2010 +0300
@@ -52,6 +52,8 @@
void lazyInit();
+ void initToolBar();
+
private:
IRMainModel *iMainModel;
--- a/qtinternetradio/ui/inc/irplaycontroller.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irplaycontroller.h Thu May 27 12:46:34 2010 +0300
@@ -22,7 +22,6 @@
#include "irqenums.h"
-class HbProgressDialog;
class IRApplication;
class IRQMediaPlayer;
class IRQPreset;
@@ -45,26 +44,21 @@
// 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();
-
// Play control methods
void resume();
void stop(IRQTerminatedType aStopReason);
int getVolume() const;
void setVolume(int aVolume);
- void enableStereo();
- void disableStereo();
// 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;
@@ -125,7 +119,6 @@
IRQConnectedFrom iConnectedFrom;
bool iGetServerResult;
- HbProgressDialog *iBufferingDialog;
IRQPreset *iNowPlayingPreset;
// reference of IRQMediaPlayer meta data
IRQMetaData *iMetaData;
--- a/qtinternetradio/ui/inc/irsettingsview.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irsettingsview.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irsonghistorymodel.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irsonghistoryview.h Thu May 27 12:46:34 2010 +0300
@@ -43,10 +43,11 @@
private slots:
void modelChanged();
void newMetadataAdded(IRQMetaData * aMetadata);
- void clearHisotrySongDB();
+ void clearList();
void showPrompt();
void gotoStationHistory();
void handleOrientationChanged(Qt::Orientation aOrientation);
+ void actionClicked(HbAction *aAction);
private:
void showSongHistory();
@@ -54,6 +55,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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irstationdetailsview.h Thu May 27 12:46:34 2010 +0300
@@ -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/irstationsview.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irstationsview.h Thu May 27 12:46:34 2010 +0300
@@ -24,7 +24,6 @@
class IRQPreset;
class IrChannelModel;
class QTimer;
-class HbProgressDialog;
class IRStationsView : public IrAbstractListViewBase
{
@@ -35,19 +34,12 @@
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();
-
private slots:
void presetResponse(IRQPreset *aPreset);
@@ -82,14 +74,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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irtermsconsview.h Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/iruidefines.h Thu May 27 12:46:34 2010 +0300
@@ -34,6 +34,10 @@
static const char* GO_TO_STATION_ACTION = "go2station_act";
static const char* OBJECT_TOOLBAR = "toolbar";
+// Common Sections
+static const char* PORTRAIT_SEC = "prt_section";
+static const char* LANDSCAPE_SEC = "lsc_section";
+
// IrAbstractListViewBase -- Object Name
static const char* ABSTRACT_LIST_VIEW_BASE_OBJECT_VIEW = "ext-IrAbstractListViewBase";
@@ -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,8 @@
// 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";
#endif /* IRUIDEFINES_H_ */
--- a/qtinternetradio/ui/inc/irviewmanager.h Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/inc/irviewmanager.h Thu May 27 12:46:34 2010 +0300
@@ -35,6 +35,7 @@
void setApplication(IRApplication *aApplication);
IRBaseView* getView(TIRViewId aViewId, bool aCreateIfNotExist = false);
+ TIRViewId getExitingView();
bool isViewInStack(TIRViewId aViewId) const;
--- a/qtinternetradio/ui/resources/layout/abstractlistviewbase.docml Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/abstractlistviewbase.docml Thu May 27 12:46:34 2010 +0300
@@ -104,21 +104,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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/nowplayingview.docml Thu May 27 12:46:34 2010 +0300
@@ -4,7 +4,7 @@
<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,12 +61,7 @@
<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 name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
</widget>
<string locid="txt_irad_title_internet_radio" name="title"/>
</widget>
--- a/qtinternetradio/ui/resources/layout/searchchannelsview.docml Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/searchchannelsview.docml Thu May 27 12:46:34 2010 +0300
@@ -2,43 +2,70 @@
<hbdocument version="1.0">
<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="headingText" type="HbGroupBox">
+ <string locid="txt_irad_subtitle_search_result" name="heading"/>
+ <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"/>
+ <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+ <bool name="visible" value="FALSE"/>
+ </widget>
+
<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"/>
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
<stretchitem stretchfactor="1"/>
- <linearitem itemname="search_panel"/>
+ <linearitem itemname="search_panel" spacing="0un"/>
</layout>
</widget>
<string locid="txt_irad_title_internet_radio" name="title"/>
</widget>
+
<section name="section_without_listview">
+ <widget name="headingText" type="HbGroupBox">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+
<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"/>
+ <linearitem itemname="search_panel" spacing="0un"/>
</layout>
</widget>
</section>
+
<section name="section_with_listview">
+ <widget name="headingText" type="HbGroupBox">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+
<widget name="search_listview" type="HbListView">
<bool name="visible" value="TRUE"/>
</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"/>
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="headingText" spacing="0un"/>
+ <linearitem itemname="search_listview" spacing="0un"/>
+ <stretchitem stretchfactor="1"/>
+ <linearitem itemname="search_panel" spacing="0un"/>
</layout>
</widget>
</section>
+
<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"/>
--- a/qtinternetradio/ui/resources/layout/termsconsview.docml Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/termsconsview.docml Thu May 27 12:46:34 2010 +0300
@@ -1,23 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<hbdocument version="1.0">
<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="text_edit" type="HbTextEdit">
+ <bool name="readOnly" value="TRUE"/>
+ <string locid="txt_irad_terms_content" name="plainText"/>
+ <enums name="cursorVisibility" value="TextCursorHidden"/>
+ <enums name="contextMenuFlags" value="ShowTextContextMenuOnSelectionClicked"/>
</widget>
- <widget name="deny_btn" type="HbPushButton">
- <string name="text" value="Deny"/>
+ <widget name="btn_container" type="HbWidget">
+ <widget name="accept_btn" type="HbPushButton">
+ <sizehint height="6un" type="PREFERRED" width="40un"/>
+ <string locid="txt_irad_accept" name="text"/>
+ </widget>
+ <widget name="decline_btn" type="HbPushButton">
+ <sizehint height="6un" type="PREFERRED" width="40un"/>
+ <string locid="txt_irad_decline" name="text"/>
+ </widget>
+ <layout orientation="Vertical" type="linear">
+ <linearitem itemname="accept_btn"/>
+ <linearitem itemname="decline_btn"/>
+ </layout>
</widget>
- <layout orientation="Vertical" type="linear">
- <stretchitem stretchfactor="1"/>
- <linearitem itemname="accept_btn"/>
- <linearitem itemname="deny_btn"/>
- <stretchitem stretchfactor="1"/>
+ <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="btn_container"/>
</layout>
</widget>
<string locid="txt_irad_title_internet_radio" name="title"/>
</widget>
+ <section name="prt_section">
+ <widget name="container" role="HbView:widget" type="HbWidget">
+ <widget name="btn_container" type="HbWidget">
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="20un" type="PREFERRED"/>
+ <layout type="anchor">
+ <anchoritem dst="decline_btn" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="decline_btn" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="decline_btn" dstEdge="BOTTOM" spacing="-3un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="accept_btn" dstEdge="LEFT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="accept_btn" dstEdge="TOP" spacing="3un" src="" srcEdge="TOP"/>
+ <anchoritem dst="accept_btn" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
+ </layout>
+ </widget>
+ </widget>
+ </section>
+ <section name="lsc_section">
+ <widget name="container" role="HbView:widget" type="HbWidget">
+ <widget name="btn_container" type="HbWidget">
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="10un" type="PREFERRED"/>
+ <layout type="anchor">
+ <anchoritem dst="accept_btn" dstEdge="LEFT" spacing="5un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="accept_btn" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
+ <anchoritem dst="decline_btn" dstEdge="RIGHT" spacing="-5un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="decline_btn" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
+ </layout>
+ </widget>
+ </widget>
+ </section>
<metadata activeUIState="Common ui state" display="NHD 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>
--- a/qtinternetradio/ui/src/irabstractlistviewbase.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irabstractlistviewbase.cpp Thu May 27 12:46:34 2010 +0300
@@ -24,6 +24,8 @@
#include <HbGroupBox>
#include <HbMarqueeItem>
#include <HbLabel>
+#include <hbframedrawer.h>
+#include <hbframeitem.h>
#include "irviewmanager.h"
#include "irabstractlistviewbase.h"
@@ -36,6 +38,8 @@
#include "iruidefines.h"
const int KAnimationLoopTimes = 2; // Animation loop times
+//#define NOW_PLAYING_BANNER_FRAME "qtg_fr_multimedia_trans"
+#define NOW_PLAYING_BANNER_FRAME "qtg_fr_popup_list_highlight"
IrAbstractListViewBase::IrAbstractListViewBase(IRApplication *aApplication, TIRViewId aViewId)
: IRBaseView(aApplication, aViewId),
@@ -117,6 +121,17 @@
iArtistSongName->setLoopCount(KAnimationLoopTimes);
iListView = qobject_cast<HbListView *>(iLoader.findObject(ABSTRACT_LIST_VIEW_BASE_OBJECT_LISTVIEW));
+
+ // 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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irapplication.cpp Thu May 27 12:46:34 2010 +0300
@@ -43,11 +43,11 @@
#include "irqsettings.h"
#include "irmediakeyobserver.h"
#include "ircategoryview.h"
-#include "irstationsview.h"
#include "irqlogger.h"
#include "iruidefines.h"
#include "irqsystemeventhandler.h"
#include "irplaylist.h"
+#include "irabstractlistviewbase.h"
#define INTERNETRADIO_SERVICE_NAME "internet_radio_10_1.com.nokia.symbian.IFileView"
/*
@@ -74,7 +74,7 @@
iDisconnected(false),
iConnectingCanceled(false),
iLocalServer(NULL),
- iConnectingNote(NULL),
+ iLoadingNote(NULL),
#ifdef LOCALIZATION
iTranslator(NULL),
#endif
@@ -122,8 +122,8 @@
delete iLastPlayedStationInfo;
iLastPlayedStationInfo = NULL;
- delete iConnectingNote;
- iConnectingNote = NULL;
+ delete iLoadingNote;
+ iLoadingNote = NULL;
delete iSystemEventHandler;
@@ -153,6 +153,15 @@
//normal launch, launch starting view
TIRViewId viewId = EIRView_CategoryView;
iSettings->getStartingViewId(viewId);
+ if (EIRView_PlayingView == viewId)
+ {
+ //handle error case
+ if (NULL == getLastPlayedStationInfo()->getLastPlayedStation())
+ {
+ viewId = EIRView_CategoryView;
+ }
+ }
+
launchStartingView(viewId);
}
}
@@ -182,31 +191,58 @@
return ret;
}
-void IRApplication::createConnectingDialog()
+void IRApplication::createLoadingDialog(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);
+ 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);
action->setText(hbTrId("txt_common_button_cancel"));
- connect(action, SIGNAL(triggered()), this, SLOT(cancelConnect()));
}
- 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
+ {
+ iLoadingNote->setText(hbTrId("txt_common_info_loading"));
+ }
+
+ iLoadingNote->show();
}
-void IRApplication::closeConnectingDialog()
+void IRApplication::closeLoadingDialog()
{
LOG_METHOD_ENTER;
- if (iConnectingNote)
+ if (iLoadingNote)
{
- iConnectingNote->close();
- delete iConnectingNote;
- iConnectingNote = NULL;
+ iLoadingNote->close();
}
}
@@ -416,6 +452,7 @@
return;
}
+ closeLoadingDialog();
iConnectingCanceled = true;
if (iNetworkController->getNetworkStatus())
{
@@ -437,7 +474,7 @@
switch (aEvent)
{
case EIRQNetworkConnectionConnecting :
- createConnectingDialog();
+ createLoadingDialog(this, SLOT(cancelConnect()));
iConnectingCanceled = false;
break;
@@ -456,7 +493,6 @@
break;
case EIRQAccessPointSelectionCancelled :
- closeConnectingDialog();
cancelConnect();
break;
@@ -471,7 +507,7 @@
case EIRQDisplayNetworkMessageNoConnectivity:
{
- closeConnectingDialog();
+ closeLoadingDialog();
HbMessageBox::warning(hbTrId("txt_irad_info_no_network_connectiion"), (QObject*)NULL, NULL);
if (!iDisconnected)
{
@@ -555,7 +591,6 @@
if (EIR_UseNetwork_LoadCategory == currView->getUseNetworkReason())
{
- closeConnectingDialog();
IRCategoryView *categoryView = static_cast<IRCategoryView*>(getViewManager()->getView(EIRView_CategoryView, true));
categoryView->loadCategory(IRQIsdsClient::EGenre);
currView->setUseNetworkReason(EIR_UseNetwork_NoReason);
@@ -599,20 +634,14 @@
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;
+ if (XQServiceUtil::isService())
+ {
+ return;
+ }
+ TIRViewId viewId = iViewManager->getExitingView();
+ if(EIRView_InvalidId != viewId)
+ {
+ getSettings()->setStartingViewId(viewId);
}
}
@@ -648,12 +677,29 @@
{
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( (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,6 +708,8 @@
{
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();
}
@@ -675,6 +723,40 @@
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);
+ closeLoadingDialog();
+ }
+
+ //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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irbaseview.cpp Thu May 27 12:46:34 2010 +0300
@@ -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/ircategoryview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/ircategoryview.cpp Thu May 27 12:46:34 2010 +0300
@@ -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
@@ -94,18 +92,7 @@
}
}
break;
-
- case EIR_ViewCommand_ACTIVATED:
- break;
-
- case EIR_ViewCommand_DEACTIVATE:
- if (iWaitDialog)
- {
- iWaitDialog->close();
- ret = EIR_NoDefault;
- }
- break;
-
+
default:
break;
}
@@ -180,7 +167,7 @@
resetCurrentItem();
}
setViewParameter(EIRViewPara_Genre);
- setFlag(EViewFlag_ClearStackWhenActivate);
+ setFlag(EViewFlag_ClearStackWhenActivate|EViewFlag_StickyViewEnabled);
iIsdsClient->isdsCategoryRequest(IRQIsdsClient::EGenre, cache);
break;
@@ -192,7 +179,8 @@
resetCurrentItem();
}
setViewParameter(EIRViewPara_Language);
- setFlag(EViewFlag_None);
+ clearFlag(EViewFlag_ClearStackWhenActivate);
+ clearFlag(EViewFlag_StickyViewEnabled);
iIsdsClient->isdsCategoryRequest(IRQIsdsClient::ELanguages, cache);
break;
@@ -204,7 +192,8 @@
resetCurrentItem();
}
setViewParameter(EIRViewPara_Country);
- setFlag(EViewFlag_None);
+ clearFlag(EViewFlag_ClearStackWhenActivate);
+ clearFlag(EViewFlag_StickyViewEnabled);
iIsdsClient->isdsCategoryRequest(IRQIsdsClient::ECountries, cache);
break;
@@ -215,7 +204,7 @@
if (!cache)
{
- createWaitDialog(hbTrId("txt_common_info_loading"));
+ iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
}
}
@@ -275,15 +264,14 @@
connectToIsdsClient();
bool cache = false;
iIsdsClient->isdsCategoryRequest(request, cache);
+ iApplication->createLoadingDialog(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 +291,8 @@
setCheckedAction();
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
@@ -362,17 +352,12 @@
void IRCategoryView::dataChanged()
{
disconnectIsdsClient();
- iApplication->closeConnectingDialog();
+ iApplication->closeLoadingDialog();
iListView->reset();
iListView->setCurrentIndex(iModel->index(iLastSelectItem));
iListView->scrollTo(iModel->index(iLastSelectItem));
getViewManager()->activateView(this);
-
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
}
/*
@@ -383,6 +368,14 @@
{
iIsdsClient->isdsCancelRequest();
disconnectIsdsClient();
+ iApplication->closeLoadingDialog();
+
+ //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,13 +385,8 @@
void IRCategoryView::operationException(IRQError aError)
{
Q_UNUSED(aError);
- iApplication->closeConnectingDialog();
-
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
-
+ iApplication->closeLoadingDialog();
+
disconnectIsdsClient();
popupNote(hbTrId("txt_irad_info_failed_to_connect"), HbMessageBox::MessageTypeWarning);
@@ -413,27 +401,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 +466,13 @@
setInitCompleted(true);
}
}
+
+void IRCategoryView::initToolBar()
+{
+ //add HbActions to the toolbar, the HbActions have been created in IrAbstractListViewBase
+ HbToolBar *viewToolBar = toolBar();
+ viewToolBar->addAction(iGenresAction);
+ viewToolBar->addAction(iCollectionsAction);
+ viewToolBar->addAction(iFavoritesAction);
+ viewToolBar->addAction(iSearchAction);
+}
--- a/qtinternetradio/ui/src/irfavoritesmodel.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irfavoritesmodel.cpp Thu May 27 12:46:34 2010 +0300
@@ -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,59 @@
}
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;
+}
+
--- a/qtinternetradio/ui/src/irfavoritesview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irfavoritesview.cpp Thu May 27 12:46:34 2010 +0300
@@ -18,6 +18,8 @@
#include <hbtoolbar.h>
#include <hbaction.h>
#include <hbmenu.h>
+#include <hbgroupbox.h>
+#include <hbselectiondialog.h>
#include <QPixmap>
#include <QTimer>
@@ -33,7 +35,8 @@
#include "irqisdsdatastructure.h"
#include "irqutility.h"
#include "iruidefines.h"
-
+#include "irstationshare.h"
+#include "irstationdetailsview.h"
const int KBitmapSize = 59;
const QString KActionShareName("Share");
@@ -48,9 +51,11 @@
*/
IRFavoritesView::IRFavoritesView(IRApplication *aApplication, TIRViewId aViewId)
: IrAbstractListViewBase(aApplication, aViewId),
- iClearFavoriteAction(NULL),iLogoPreset(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 +71,9 @@
{
delete iLogoPreset;
iLogoPreset = NULL;
+
+ delete iMultiDeleteDialog;
+ iMultiDeleteDialog = NULL;
}
TIRHandleResult IRFavoritesView::handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason)
@@ -82,14 +90,17 @@
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 )
{
@@ -175,14 +186,33 @@
}
// ---------------------------------------------------------------------------
-// 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;
+ header->setHeading(hbTrId("txt_irad_select_items_to_delete"));
+ 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);
+ }
+
+ iMultiDeleteDialog->addAction(new HbAction(hbTrId("txt_common_button_delete")));
+ iMultiDeleteDialog->addAction(new HbAction(hbTrId("txt_common_button_cancel")));
+ }
+
+ iMultiDeleteDialog->setModel(iModel);
+ iMultiDeleteDialog->open(this,SLOT(deleteDialogClosed(HbAction*)));
}
void IRFavoritesView::networkRequestNotified(IRQNetworkEvent aEvent)
@@ -195,38 +225,37 @@
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()));
+ iMultiDeleteAction = new HbAction(hbTrId("txt_irad_opt_delete_favorites"), menu());
+ 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);
}
}
@@ -304,20 +333,43 @@
{
QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
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))
+ {
+ popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+ }
+
+ updateIconIndexArray();
+ QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
+ setHeadingText(headingStr);
+
+ if (!iIconIndexArray.empty())
+ {
+ iConvertTimer->start();
+ }
+ }
+ }
+ iMultiDeleteDialog->setModel(NULL);
+}
+
void IRFavoritesView::actionClicked(HbAction *aAction)
{
if ( aAction )
@@ -376,7 +428,24 @@
void IRFavoritesView::shareContextAction()
{
+ int current = iListView->currentIndex().row();
+
+ IRStationShare stationShare;
+ stationShare.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()
@@ -385,18 +454,40 @@
}
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();
+ QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
+ setHeadingText(headingStr);
+ }
+ else
+ {
+ popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+ }
+
+ if (!iIconIndexArray.empty())
+ {
+ iConvertTimer->start();
+ }
}
void IRFavoritesView::initToolBar()
--- a/qtinternetradio/ui/src/irhistoryview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irhistoryview.cpp Thu May 27 12:46:34 2010 +0300
@@ -17,6 +17,7 @@
#include <hblistview.h>
#include <hbmenu.h>
#include <hbaction.h>
+#include <hbnotificationdialog.h>
#include <QPixmap>
#include <QTimer>
@@ -58,7 +59,7 @@
iListView->setModel(iModel);
iListView->setCurrentIndex(iModel->index(0));
- iClearHistoryAction = new HbAction(hbTrId("txt_irad_opt_clear_station_history"), menu());
+ iClearHistoryAction = new HbAction(hbTrId("txt_irad_menu_clear_list"), menu());
iConvertTimer = new QTimer(this);
@@ -100,6 +101,12 @@
switch (aCommand)
{
+
+ case EIR_ViewCommand_TOBEACTIVATED:
+ showHistory();
+ ret = EIR_NoDefault;
+ break;
+
case EIR_ViewCommand_ACTIVATED:
connect(iIsdsClient, SIGNAL(presetResponse(IRQPreset *)),
this, SLOT(presetResponse(IRQPreset *)));
@@ -110,7 +117,6 @@
connect(iIsdsClient, SIGNAL(presetLogoDownloadError()),
this, SLOT(presetLogoDownloadError()));
- showHistory();
leftCount = iIconIndexArray.count();
if( leftCount > 0 )
{
@@ -166,7 +172,7 @@
if (hisInfo->getChannelType())
{
// channel from isds server, get this preset
- iPlayController->createBufferingDialog(this, SLOT(cancelRequest()));
+ iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
iIsdsClient->isdsListenRequest(hisInfo->getChannelId(), true);
}
else
@@ -181,6 +187,9 @@
preset.name = hisInfo->getChannelName();
preset.description = hisInfo->getChannelDesc();
preset.shortDesc = hisInfo->getChannelDesc();
+ preset.genreName = hisInfo->getGenreName();
+ preset.countryName = hisInfo->getCountryName();
+ preset.languageName = hisInfo->getLanguageName();
preset.type = 0;
preset.uniqID = 0;
preset.presetId = 0;
@@ -201,7 +210,7 @@
void IRHistoryView::operationException(IRQError aError)
{
Q_UNUSED(aError);
- iPlayController->closeBufferingDialog();
+ iApplication->closeLoadingDialog();
popupNote(hbTrId("txt_irad_info_failed_to_connect"), HbMessageBox::MessageTypeWarning);
}
@@ -216,20 +225,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);
}
void IRHistoryView::cancelRequest()
@@ -383,7 +390,7 @@
}
else if( objectName == KActionDetailsName)
{
- detailContextAction();
+ detailsContextAction();
}
}
}
@@ -396,23 +403,33 @@
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);
-
+ add2FavNote->setTitle(hbTrId("txt_irad_info_added_to_favorites"));
+ //add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
+ add2FavNote->show();
break;
case EIRQErrorOutOfMemory:
- popupNote(hbTrId("txt_irad_info_can_not_add_more"), HbMessageBox::MessageTypeInformation);
- break;
+ add2FavNote->setTitle(hbTrId("txt_irad_info_can_not_add_more"));
+ //add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
+ add2FavNote->show();
+ break;
case EIRQErrorAlreadyExist:
- popupNote(hbTrId("txt_irad_info_favorite_updated"), HbMessageBox::MessageTypeInformation);
- break;
+ add2FavNote->setTitle(hbTrId("txt_irad_info_favorite_updated"));
+ //add2FavNote->setIcon(HbIcon( QString("qtg_large_ok")));
+ add2FavNote->show();
+ break;
- default:
- break;
+ default:
+ Q_ASSERT(false);
+ break;
}
}
@@ -425,13 +442,18 @@
popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
}
}
-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)
@@ -465,6 +487,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/irmainview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irmainview.cpp Thu May 27 12:46:34 2010 +0300
@@ -14,6 +14,7 @@
* Description:
*
*/
+#include <hbtoolbar.h>
#include <hbaction.h>
#include <hblistview.h>
@@ -36,7 +37,7 @@
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
@@ -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);
}
/*
@@ -178,7 +177,7 @@
if (!initCompleted())
{
IrAbstractListViewBase::lazyInit();
-
+ initToolBar();
setCheckedAction();
connect(iNetworkController, SIGNAL(networkRequestNotified(IRQNetworkEvent)),
@@ -191,3 +190,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/irnowplayingview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irnowplayingview.cpp Thu May 27 12:46:34 2010 +0300
@@ -14,6 +14,7 @@
* Description:
*
*/
+#include <hbtoolbar.h>
#include <QPixmap>
#include <hbaction.h>
#include <hblabel.h>
@@ -80,6 +81,8 @@
{
normalInit();
}
+
+ setFlag(EViewFlag_StickyViewEnabled);
}
/*
@@ -164,6 +167,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()
@@ -499,7 +509,6 @@
{
case EIRQNetworkConnectionEstablished:
{
- iApplication->closeConnectingDialog();
if( EIR_UseNetwork_StartingView == getUseNetworkReason() )
{
IRPlayList *playList = iApplication->getPlayList();
@@ -523,24 +532,13 @@
{
handlePlayStopAction();
}
- 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 +550,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);
}
}
@@ -660,7 +658,15 @@
void IRNowPlayingView::handlePlayStopAction()
{
- setUseNetworkReason(EIR_UseNetwork_PlayStation);
+ if(iPlayController->isIdle())
+ {
+ setUseNetworkReason(EIR_UseNetwork_StartingView);
+ }
+ else
+ {
+ setUseNetworkReason(EIR_UseNetwork_PlayStation);
+ }
+
if (false == iApplication->verifyNetworkConnectivity())
{
return;
--- a/qtinternetradio/ui/src/iropenwebaddressview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/iropenwebaddressview.cpp Thu May 27 12:46:34 2010 +0300
@@ -91,9 +91,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 +100,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();
+ }
}
/*
@@ -249,19 +249,17 @@
switch (aEvent)
{
case EIRQNetworkConnectionEstablished:
- iApplication->closeConnectingDialog();
-
if (EIR_UseNetwork_OpenWebAddress == getUseNetworkReason())
{
play();
}
-
- setUseNetworkReason(EIR_UseNetwork_NoReason);
break;
default:
break;
}
+
+ setUseNetworkReason(EIR_UseNetwork_NoReason);
}
/*
--- a/qtinternetradio/ui/src/irplaycontroller.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irplaycontroller.cpp Thu May 27 12:46:34 2010 +0300
@@ -1,20 +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:
-*
-*/
-#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
@@ -34,7 +33,8 @@
#include "irqsettings.h"
#include "irqfavoritesdb.h"
#include "irqstatisticsreporter.h"
-#include "irenummapper.h"
+#include "irenummapper.h"
+#include "irqlogger.h"
#ifdef Q_CC_NOKIAX86
void getRadioServerAddress(QString & aUrl);
@@ -88,7 +88,6 @@
iStatisticsReporter(NULL),
iConnectedFrom(EIRQIsds),
iGetServerResult(false),
- iBufferingDialog(NULL),
iNowPlayingPreset(new IRQPreset()),
iMetaData(NULL),
iSongHistoryEngine(IRQSongHistoryEngine::openInstance()),
@@ -109,9 +108,6 @@
*/
IRPlayController::~IRPlayController()
{
- delete iBufferingDialog;
- iBufferingDialog = NULL;
-
stop(EIRQUserTerminated);
delete iMediaPlayer;
iMediaPlayer = NULL;
@@ -295,31 +291,9 @@
}
/*
- * Description : enable stereo effect
- */
-void IRPlayController::enableStereo()
-{
- if (iMediaPlayer)
- {
- iMediaPlayer->enableStereoEffect();
- }
-}
-
-/*
- * Description : disable stereo effect
- */
-void IRPlayController::disableStereo()
-{
- if (iMediaPlayer)
- {
- iMediaPlayer->disableStereoEffect();
- }
-}
-
-/*
* 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 +303,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 +311,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 +353,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 +390,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 +402,8 @@
*/
void IRPlayController::handleError()
{
+ LOG_METHOD;
+ LOG_FORMAT("the last error is %d", iLastError);
qDebug("IRPlayController::handleError(), Entering, iLastError - %d", iLastError);
switch (iLastError)
{
@@ -494,15 +446,20 @@
qDebug("IRPlayController::handleError, connection lost");
stop(EIRQNoConnectionToServer);
break;
-
+
+ case EIRQPlayerErrorAudioDeviceLost:
+ //this is a temporary way to handle the plug-out event
+ iApplication->closeLoadingDialog();
+ stop(EIRQCallIsActivated);
+ return;
+
case EIRQPlayerErrorGeneral:
- case EIRQPlayerErrorAudioDeviceLost:
default:
stop(EIRQUnknownTermination);
break;
}
- closeBufferingDialog();
+ iApplication->closeLoadingDialog();
createNote();
qDebug("IRPlayController::handleError(), Exiting");
@@ -516,18 +473,9 @@
*/
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();
+ iApplication->closeLoadingDialog();
//updateProgress(100) sometimes can be called more than one time, to improve performance,
//we only need to do the following work once.
@@ -576,8 +524,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() != "")
@@ -603,10 +549,7 @@
void IRPlayController::cancelBuffering()
{
stop(EIRQUserTerminated);
- if (!iResuming && EIRView_PlayingView == iApplication->getViewManager()->currentViewId())
- {
- iApplication->getViewManager()->backToPreviousView();
- }
+ iApplication->closeLoadingDialog();
}
// private functions
@@ -715,7 +658,7 @@
iMediaPlayer->playStation(aUrl, apId);
iPlayState = EBuffering;
startSession();
- createBufferingDialog(this, SLOT(cancelBuffering()));
+ iApplication->createLoadingDialog(this, SLOT(cancelBuffering()));
}
/*
--- a/qtinternetradio/ui/src/irplsview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irplsview.cpp Thu May 27 12:46:34 2010 +0300
@@ -61,20 +61,18 @@
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);
}
void IRPlsView::handleItemSelected()
--- a/qtinternetradio/ui/src/irsearchchannelsview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irsearchchannelsview.cpp Thu May 27 12:46:34 2010 +0300
@@ -20,6 +20,7 @@
#include <hbsearchpanel.h>
#include <hbaction.h>
#include <hbprogressdialog.h>
+#include <hbscrollbar.h>
#include "irsearchchannelsview.h"
#include "iruidefines.h"
@@ -110,15 +111,23 @@
{
// 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);
+
iSearchPanelWidget = qobject_cast<HbSearchPanel *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHPANEL_WIDGET));
- iListView = qobject_cast<HbListView *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHLISTVIEW_WIDGET));
+
+ 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);
iListView->setModel(iChannelModel);
}
@@ -160,7 +169,6 @@
this, SLOT(presetLogoDownloadError()));
}
-
void IRSearchChannelsView::switch2InitState()
{
iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME,SEARCH_CHANNELS_VIEW_NO_LISTVIEW_SECTION);
@@ -169,11 +177,14 @@
void IRSearchChannelsView::switch2SearchedState()
{
- iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME,SEARCH_CHANNELS_VIEW_LISTVIEW_SECTION);
iSearchState = ESearch_Searched;
}
+
void IRSearchChannelsView::switch2SearchingState()
{
+ iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME,SEARCH_CHANNELS_VIEW_LISTVIEW_SECTION);
+ iSearchPanelWidget->clearFocus();
+ iListView->setFocus();
iSearchState = ESearch_Searching;
startSearchingAnimation();
}
@@ -227,7 +238,7 @@
{
//once an item is selected, we show a dialog to prevent user from clicking the
//item again
- iPlayController->createBufferingDialog(this, SLOT(cancelRequest()));
+ iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
if (iIsdsClient->isdsIsChannelBanner())
{
@@ -266,6 +277,7 @@
{
Q_ASSERT( !iKeyText.isEmpty() );
iIsdsClient->isdsSearchRequest(iKeyText);
+ iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
}
else if( EIR_UseNetwork_SelectItem == getUseNetworkReason() )
{
@@ -307,12 +319,9 @@
createSearchingDialog();
}
-
-
void IRSearchChannelsView::operationException(IRQError aError)
{
- iApplication->closeConnectingDialog();
- iPlayController->closeBufferingDialog();
+ iApplication->closeLoadingDialog();
closeSearchingDialog();
stopSearchingAnimation();
iSearchState = ESearch_init;
@@ -367,7 +376,7 @@
void IRSearchChannelsView::dataChanged()
{
- iApplication->closeConnectingDialog();
+ iApplication->closeLoadingDialog();
stopSearchingAnimation();
//the following will remove into the stopSearchingAnimation() function
@@ -376,14 +385,10 @@
iListView->reset();
iListView->setCurrentIndex(iChannelModel->index(0));
iListView->scrollTo(iChannelModel->index(0));
- GraphicsItemFlags flags = iListView->flags();
- bool focusEnable = flags & QGraphicsItem::ItemIsFocusable;
- if( focusEnable )
- {
- //we move the focus to the listview and the search panel will
- //hide the virtual keyboard at the same time
- iListView->setFocus(Qt::OtherFocusReason);
- }
+
+ //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
--- a/qtinternetradio/ui/src/irsettingsview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irsettingsview.cpp Thu May 27 12:46:34 2010 +0300
@@ -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,18 +42,6 @@
{
}
-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);
@@ -70,18 +60,56 @@
//set the preferred quality
setPreferredQuality();
iForm->setModel(iModel);
+
+ HbMenu *viewMenu = menu();
+ viewMenu->addAction(hbTrId("txt_common_opt_exit"),iApplication, SIGNAL(quit()));
}
void IRSettingsView::setPreferredQuality()
{
HbDataFormModelItem *preferredQualityItem = new HbDataFormModelItem(
- HbDataFormModelItem::RadioButtonListItem, hbTrId("txt_irad_setlabel_download_quality"));
+ HbDataFormModelItem::ToggleValueItem, hbTrId("txt_irad_setlabel_download_quality"));
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)
+ {
+ preferredQualityItem->setContentWidgetData("text", hbTrId("txt_irad_setlabel_download_quality_val_standard"));
+ preferredQualityItem->setContentWidgetData("additionalText", hbTrId("txt_irad_setlabel_download_quality_val_high"));
+ }
+ else if(EIRQHighQuality == settingValue)
+ {
+ preferredQualityItem->setContentWidgetData("text", hbTrId("txt_irad_setlabel_download_quality_val_high"));
+ preferredQualityItem->setContentWidgetData("additionalText", hbTrId("txt_irad_setlabel_download_quality_val_standard"));
+ }
+
+ 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)
+ {
+ if(item->data(HbDataFormModelItem::LabelRole).toString() == hbTrId("txt_irad_setlabel_download_quality"))
+ {
+ QVariant data = item->contentWidgetData("text");
+ QString value = data.toString();
+
+ if(value == (hbTrId("txt_irad_setlabel_download_quality_val_standard")))
+ {
+ // User has made it Standard.
+ iSettings->setPreferredQuality(EIRQStandardQuality);
+ }
+ else if(value == (hbTrId("txt_irad_setlabel_download_quality_val_high")))
+ {
+ // User has made it High.
+ iSettings->setPreferredQuality(EIRQHighQuality);
+ }
+ }
+ }
+}
--- a/qtinternetradio/ui/src/irsonghistorymodel.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irsonghistorymodel.cpp Thu May 27 12:46:34 2010 +0300
@@ -103,14 +103,16 @@
return NULL;
}
-void IRSongHistoryModel::clearAllList()
+void IRSongHistoryModel::clearList()
{
while (!mSongHistoryList.isEmpty())
{
IRQSongInfo *firstItem = mSongHistoryList.takeFirst();
delete firstItem;
}
-
+
+ mHistoryEngine->clearAllSongHistory();
+
emit modelChanged();
}
@@ -126,20 +128,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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irsonghistoryview.cpp Thu May 27 12:46:34 2010 +0300
@@ -31,7 +31,8 @@
#include "irqsettings.h"
#include "iruidefines.h"
-
+const QString KActionSearchInMusicStoreName("SearchInMusicStore");
+const QString KActionDeleteName("Delete");
// public functions
@@ -51,17 +52,16 @@
iListView->setModel(iModel);
iListView->setCurrentIndex(iModel->index(0));
- iClearSongHistoryAction = new HbAction(hbTrId("txt_irad_opt_clear_song_history"), this);
+ iClearSongHistoryAction = new HbAction(hbTrId("txt_irad_menu_clear_list"), this);
iStatisticsReporter = IRQStatisticsReporter::openInstance();
-
-
+
iShowPrompt = iSettings->getSongHistoryShow();
if( iShowPrompt )
{
iSettings->setSongHistoryShow(0);
}
- connect(iClearSongHistoryAction, SIGNAL(triggered()), this, SLOT(clearHisotrySongDB()));
+ connect(iClearSongHistoryAction, SIGNAL(triggered()), this, SLOT(clearList()));
connect(iModel, SIGNAL(modelChanged()), this, SLOT(modelChanged()));
}
@@ -91,10 +91,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()));
@@ -184,9 +187,9 @@
}
-void IRSongHistoryView::clearHisotrySongDB()
+void IRSongHistoryView::clearList()
{
- iModel->clearHisotrySongDB();
+ iModel->clearList();
}
void IRSongHistoryView::showPrompt()
@@ -200,7 +203,40 @@
/* 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*)));
+
+ action = contextMenu->addAction(hbTrId("txt_irad_menu_search_in_music_store"));
+ action->setObjectName(KActionSearchInMusicStoreName);
+ action = contextMenu->addAction(hbTrId("txt_common_menu_delete"));
+ action->setObjectName(KActionDeleteName);
+
+ contextMenu->open();
+}
+
+void IRSongHistoryView::searchInMusicStoreContextAction()
+{
+ // Need to log the find song in NMS event, iStatisticsReporter->logNmsEvent(IRQStatisticsReporter::EIRFind,channelId);
+ popupNote(hbTrId("txt_irad_info_music_store_not_available"), HbMessageBox::MessageTypeInformation);
+}
+void IRSongHistoryView::deleteContextAction()
+{
+ int current = iListView->currentIndex().row();
+ bool ret = iModel->deleteOneItem(current);
+ if( !ret )
+ {
+ popupNote(hbTrId("txt_irad_info_operation_failed"), HbMessageBox::MessageTypeWarning);
+ }
+}
+
void IRSongHistoryView::gotoStationHistory()
{
getViewManager()->activateView(EIRView_HistoryView);
@@ -212,3 +248,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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irstationdetailsview.cpp Thu May 27 12:46:34 2010 +0300
@@ -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,19 @@
/*
* 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);
+ iNowPlayingUrl->setPlainText(aPreset->getURLsForBitrate(bitrate)->at(KChannelURLIndex));
}
/*
@@ -71,7 +80,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/irstationsview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irstationsview.cpp Thu May 27 12:46:34 2010 +0300
@@ -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->createLoadingDialog(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,12 +157,6 @@
return ret;
}
-void IRStationsView::launchAction()
-{
- setUseNetworkReason(EIR_UseNetwork_StartingView);
- iApplication->verifyNetworkConnectivity();
-}
-
// slots functions
/*
@@ -233,7 +178,7 @@
//once an item is selected, we show a dialog to prevent user from clicking the
//item again
- iPlayController->createBufferingDialog(this, SLOT(cancelRequest()));
+ iApplication->createLoadingDialog(this, SLOT(cancelRequest()));
if (iIsdsClient->isdsIsChannelBanner())
{
@@ -254,32 +199,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 +218,7 @@
}
getViewManager()->activateView(this);
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
+ iApplication->closeLoadingDialog();
}
/*
@@ -324,14 +248,8 @@
*/
void IRStationsView::operationException(IRQError aError)
{
- iApplication->closeConnectingDialog();
- iPlayController->closeBufferingDialog();
-
- if (iWaitDialog)
- {
- iWaitDialog->close();
- }
-
+ iApplication->closeLoadingDialog();
+
disconnectIsdsClient();
QString errorString = hbTrId("txt_irad_info_failed_to_connect");
@@ -353,17 +271,13 @@
void IRStationsView::cancelRequest()
{
- if( iWaitDialog )
- {
- iWaitDialog->close();
- }
-
if( iConnectTimer->isActive())
{
iConnectTimer->stop();
}
iIsdsClient->isdsCancelRequest();
disconnectIsdsClient();
+ iApplication->closeLoadingDialog();
}
void IRStationsView::startConvert(int aIndex)
@@ -374,23 +288,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 +360,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 +369,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 +398,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();
--- a/qtinternetradio/ui/src/irtermsconsview.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irtermsconsview.cpp Thu May 27 12:46:34 2010 +0300
@@ -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 Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irviewmanager.cpp Thu May 27 12:46:34 2010 +0300
@@ -124,6 +124,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 +208,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);
}
@@ -448,7 +480,7 @@
IRBaseView *topView = static_cast<IRBaseView*>(currentView());
if (topView)
{
- if (EViewFlag_ClearStackWhenActivate == topView->flag())
+ if (topView->testFlag(IRBaseView::EViewFlag_ClearStackWhenActivate))
{
topView->setNavigationAction(iExitAction);
}
--- a/qtinternetradio/ui/src/main.cpp Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/main.cpp Thu May 27 12:46:34 2010 +0300
@@ -35,6 +35,8 @@
int main(int argc, char* argv[])
{
+ installLogDir();
+
INSTALL_MESSAGE_HANDLER;
HbApplication app(argc, argv);