Revision: 201023
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 23 Jun 2010 18:04:00 +0300
changeset 11 f683e24efca3
parent 8 3b03c28289e6
child 12 608f67c22514
Revision: 201023 Kit: 2010125
internetradio2.0/bmarm/irnetworkcontrolleru.def
internetradio2.0/bwinscw/irnetworkcontrolleru.def
internetradio2.0/cachemgmtsrc/ircachemgmt.cpp
internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp
internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp
internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp
internetradio2.0/filerecognizersrc/irrecognizer.cpp
internetradio2.0/include/irpubsubkeys.h
internetradio2.0/networkcontrollerinc/irnetworkcontroller.h
internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp
internetradio2.0/networkcontrollersrc/irnetworkobserver.cpp
qtinternetradio/bwins/irqnetworkcontrolleru.def
qtinternetradio/eabi/irqnetworkcontrolleru.def
qtinternetradio/irhswidgetplugin/inc/irappinspector.h
qtinternetradio/irhswidgetplugin/inc/irhswidget.h
qtinternetradio/irhswidgetplugin/inc/irhswidgetplugin.h
qtinternetradio/irhswidgetplugin/inc/irserviceclient.h
qtinternetradio/irhswidgetplugin/irhswidgetplugin.pro
qtinternetradio/irhswidgetplugin/irhswidgetplugin_rom.pri
qtinternetradio/irhswidgetplugin/resource/irhswidget.docml
qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.manifest
qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.png
qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.xml
qtinternetradio/irhswidgetplugin/resources.qrc
qtinternetradio/irhswidgetplugin/rom/irhswidgetplugin.iby
qtinternetradio/irhswidgetplugin/rom/irhswidgetplugin_resources.iby
qtinternetradio/irhswidgetplugin/src/irappinspector.cpp
qtinternetradio/irhswidgetplugin/src/irhswidget.cpp
qtinternetradio/irhswidgetplugin/src/irhswidgetplugin.cpp
qtinternetradio/irhswidgetplugin/src/irserviceclient.cpp
qtinternetradio/irqcommon/inc/irqisdsdatastructure.h
qtinternetradio/irqcommon/inc/irservicedata.h
qtinternetradio/irqcommon/inc/irservicedef.h
qtinternetradio/irqcommon/irqcommon.pro
qtinternetradio/irqcommon/src/irqisdsdatastructure.cpp
qtinternetradio/irqcommon/src/irqutility.cpp
qtinternetradio/irqfavoritesdb/irqfavoritesdb.pro
qtinternetradio/irqisdsclient/irqisdsclient.pro
qtinternetradio/irqlogger/irqlogger.pro
qtinternetradio/irqmediaplayer/irqmediaplayer.pro
qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontroller.h
qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontrollerbody.h
qtinternetradio/irqnetworkcontroller/irqnetworkcontroller.pro
qtinternetradio/irqnetworkcontroller/src/irqnetworkcontroller.cpp
qtinternetradio/irqnetworkcontroller/src/irqnetworkcontrollerbody.cpp
qtinternetradio/irqnwkinfoobserver/irqnwkinfoobserver.pro
qtinternetradio/irqsettings/inc/irqsettings.h
qtinternetradio/irqsettings/irqsettings.pro
qtinternetradio/irqsettings/src/irqsettings.cpp
qtinternetradio/irqsonghistory/irqsonghistory.pro
qtinternetradio/irqstatisticsreporter/irqstatisticsreporter.pro
qtinternetradio/irqsystemeventhandler/irqsystemeventhandler.pro
qtinternetradio/ui/inc/irapplication.h
qtinternetradio/ui/inc/irchannelmodel.h
qtinternetradio/ui/inc/irfileviewservice.h
qtinternetradio/ui/inc/irnowplayingview.h
qtinternetradio/ui/inc/irsearchchannelsview.h
qtinternetradio/ui/inc/irsearchresultdb.h
qtinternetradio/ui/inc/iruidefines.h
qtinternetradio/ui/resources/layout/abstractlistviewbase.docml
qtinternetradio/ui/resources/layout/nowplayingview.docml
qtinternetradio/ui/resources/layout/openwebaddressview.docml
qtinternetradio/ui/resources/layout/searchchannelsview.docml
qtinternetradio/ui/resources/layout/termsconsview.docml
qtinternetradio/ui/service_conf.xml
qtinternetradio/ui/src/irabstractlistviewbase.cpp
qtinternetradio/ui/src/irapplication.cpp
qtinternetradio/ui/src/ircategorymodel.cpp
qtinternetradio/ui/src/ircategoryview.cpp
qtinternetradio/ui/src/irchannelmodel.cpp
qtinternetradio/ui/src/irfavoritesview.cpp
qtinternetradio/ui/src/irfileviewservice.cpp
qtinternetradio/ui/src/irhistoryview.cpp
qtinternetradio/ui/src/irnowplayingview.cpp
qtinternetradio/ui/src/iropenwebaddressview.cpp
qtinternetradio/ui/src/irsearchchannelsview.cpp
qtinternetradio/ui/src/irsearchresultdb.cpp
qtinternetradio/ui/src/irsettingsview.cpp
qtinternetradio/ui/src/irsonghistoryview.cpp
qtinternetradio/ui/src/irstationdetailsview.cpp
qtinternetradio/ui/ui.pro
--- a/internetradio2.0/bmarm/irnetworkcontrolleru.def	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/bmarm/irnetworkcontrolleru.def	Wed Jun 23 18:04:00 2010 +0300
@@ -18,12 +18,8 @@
 	_ZN20CIRNetworkController32RegisterLogoDataTransferTrackerLER12RHTTPSession @ 17 NONAME
 	_ZN20CIRNetworkController5CloseEv @ 18 NONAME
 	_ZN20CIRNetworkController5OpenLEP20MIRNetworkController @ 19 NONAME
-	_ZNK20CIRNetworkController13GetBearerListEv @ 20 NONAME
-	_ZNK20CIRNetworkController14GetNetworkListEv @ 21 NONAME
-	_ZNK20CIRNetworkController15IsWlanSupportedEv @ 22 NONAME
-	_ZNK20CIRNetworkController16GetNetworkStatusEv @ 23 NONAME
-	_ZNK20CIRNetworkController18GetAccessPointListEv @ 24 NONAME
-	_ZNK20CIRNetworkController22IdentifyConnectionTypeEv @ 25 NONAME
-	_ZNK20CIRNetworkController8GetIAPIdERm @ 26 NONAME
-	_ZNK20CIRNetworkController9GetApListEv @ 27 NONAME
+	_ZNK20CIRNetworkController15IsWlanSupportedEv @ 20 NONAME
+	_ZNK20CIRNetworkController16GetNetworkStatusEv @ 21 NONAME
+	_ZNK20CIRNetworkController22IdentifyConnectionTypeEv @ 22 NONAME
+	_ZNK20CIRNetworkController8GetIAPIdERm @ 23 NONAME
 
--- a/internetradio2.0/bwinscw/irnetworkcontrolleru.def	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/bwinscw/irnetworkcontrolleru.def	Wed Jun 23 18:04:00 2010 +0300
@@ -1,29 +1,25 @@
 EXPORTS
-	?CancelConnecting@CIRNetworkController@@QAEXXZ @ 1  NONAME ; void CIRNetworkController::CancelConnecting(void)
-	?ChooseAccessPointL@CIRNetworkController@@QAEXH@Z @ 2  NONAME ; void CIRNetworkController::ChooseAccessPointL(int)
-	?Close@CIRNetworkController@@QAEXXZ @ 3  NONAME ; void CIRNetworkController::Close(void)
-	?DataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 4  NONAME ; class MIRDataTransferTracker & CIRNetworkController::DataTransferTracker(void)
-	?DeleteActiveNetworkObserver@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 5  NONAME ; void CIRNetworkController::DeleteActiveNetworkObserver(class MIRActiveNetworkObserver &)
-	?GetAccessPointList@CIRNetworkController@@QBEPBVCDesC16Array@@XZ @ 6  NONAME ; class CDesC16Array const * CIRNetworkController::GetAccessPointList(void) const
-	?GetApList@CIRNetworkController@@QBE?BV?$RArray@K@@XZ @ 7  NONAME ; class RArray<unsigned long> const CIRNetworkController::GetApList(void) const
-	?GetBearerList@CIRNetworkController@@QBE?BV?$RArray@K@@XZ @ 8  NONAME ; class RArray<unsigned long> const CIRNetworkController::GetBearerList(void) const
-	?GetIAPId@CIRNetworkController@@QBEHAAK@Z @ 9  NONAME ; int CIRNetworkController::GetIAPId(unsigned long &) const
-	?GetIRConnection@CIRNetworkController@@QAEAAVRConnection@@XZ @ 10  NONAME ; class RConnection & CIRNetworkController::GetIRConnection(void)
-	?GetIRSocketServer@CIRNetworkController@@QAEAAVRSocketServ@@XZ @ 11  NONAME ; class RSocketServ & CIRNetworkController::GetIRSocketServer(void)
-	?GetNetworkList@CIRNetworkController@@QBE?BV?$RArray@K@@XZ @ 12  NONAME ; class RArray<unsigned long> const CIRNetworkController::GetNetworkList(void) const
-	?GetNetworkStatus@CIRNetworkController@@QBEHXZ @ 13  NONAME ; int CIRNetworkController::GetNetworkStatus(void) const
-	?GetUAProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 14  NONAME ; class HBufC8 * CIRNetworkController::GetUAProfString(void)
-	?GetWapProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 15  NONAME ; class HBufC8 * CIRNetworkController::GetWapProfString(void)
-	?IdentifyConnectionType@CIRNetworkController@@QBE?AW4TIRConnectionType@@XZ @ 16  NONAME ; enum TIRConnectionType CIRNetworkController::IdentifyConnectionType(void) const
-	?InitializeHttpSessionL@CIRNetworkController@@QAEXABVRHTTPSession@@W4TIRTransferCategory@MIRDataTransferTracker@@@Z @ 17  NONAME ; void CIRNetworkController::InitializeHttpSessionL(class RHTTPSession const &, enum MIRDataTransferTracker::TIRTransferCategory)
-	?IsHandingOverConnection@CIRNetworkController@@QAEHXZ @ 18  NONAME ; int CIRNetworkController::IsHandingOverConnection(void)
-	?IsOfflineMode@CIRNetworkController@@QAEHXZ @ 19  NONAME ; int CIRNetworkController::IsOfflineMode(void)
+	?GetUAProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 1  NONAME ; class HBufC8 * CIRNetworkController::GetUAProfString(void)
+	?GetWapProfString@CIRNetworkController@@QAEPAVHBufC8@@XZ @ 2  NONAME ; class HBufC8 * CIRNetworkController::GetWapProfString(void)
+	?IsOfflineMode@CIRNetworkController@@QAEHXZ @ 3  NONAME ; int CIRNetworkController::IsOfflineMode(void)
+	?GetIRSocketServer@CIRNetworkController@@QAEAAVRSocketServ@@XZ @ 4  NONAME ; class RSocketServ & CIRNetworkController::GetIRSocketServer(void)
+	?IsHandingOverConnection@CIRNetworkController@@QAEHXZ @ 5  NONAME ; int CIRNetworkController::IsHandingOverConnection(void)
+	?GetIAPId@CIRNetworkController@@QBEHAAK@Z @ 6  NONAME ; int CIRNetworkController::GetIAPId(unsigned long &) const
+	?RegisterActiveNetworkObserverL@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 7  NONAME ; void CIRNetworkController::RegisterActiveNetworkObserverL(class MIRActiveNetworkObserver &)
+	?IdentifyConnectionType@CIRNetworkController@@QBE?AW4TIRConnectionType@@XZ @ 8  NONAME ; enum TIRConnectionType CIRNetworkController::IdentifyConnectionType(void) const
+	?GetNetworkStatus@CIRNetworkController@@QBEHXZ @ 9  NONAME ; int CIRNetworkController::GetNetworkStatus(void) const
+	?ResetConnectionStatus@CIRNetworkController@@QAEXXZ @ 10  NONAME ; void CIRNetworkController::ResetConnectionStatus(void)
+	?DeleteActiveNetworkObserver@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 11  NONAME ; void CIRNetworkController::DeleteActiveNetworkObserver(class MIRActiveNetworkObserver &)
+	?GetIRConnection@CIRNetworkController@@QAEAAVRConnection@@XZ @ 12  NONAME ; class RConnection & CIRNetworkController::GetIRConnection(void)
+	?OpenL@CIRNetworkController@@SAPAV1@PAVMIRNetworkController@@@Z @ 13  NONAME ; class CIRNetworkController * CIRNetworkController::OpenL(class MIRNetworkController *)
+	?NewL@CIRNetworkObserver@@SAPAV1@PAVCIRNetworkController@@@Z @ 14  NONAME ; class CIRNetworkObserver * CIRNetworkObserver::NewL(class CIRNetworkController *)
+	?CancelConnecting@CIRNetworkController@@QAEXXZ @ 15  NONAME ; void CIRNetworkController::CancelConnecting(void)
+	?ChooseAccessPointL@CIRNetworkController@@QAEXH@Z @ 16  NONAME ; void CIRNetworkController::ChooseAccessPointL(int)
+	?DataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 17  NONAME ; class MIRDataTransferTracker & CIRNetworkController::DataTransferTracker(void)
+	?NotifyActiveNetworkObserversL@CIRNetworkController@@QAEXW4TIRNetworkEvent@@@Z @ 18  NONAME ; void CIRNetworkController::NotifyActiveNetworkObserversL(enum TIRNetworkEvent)
+	?InitializeHttpSessionL@CIRNetworkController@@QAEXABVRHTTPSession@@W4TIRTransferCategory@MIRDataTransferTracker@@@Z @ 19  NONAME ; void CIRNetworkController::InitializeHttpSessionL(class RHTTPSession const &, enum MIRDataTransferTracker::TIRTransferCategory)
 	?IsWlanSupported@CIRNetworkController@@QBEHXZ @ 20  NONAME ; int CIRNetworkController::IsWlanSupported(void) const
-	?LogoDataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 21  NONAME ; class MIRDataTransferTracker & CIRNetworkController::LogoDataTransferTracker(void)
-	?NewL@CIRNetworkObserver@@SAPAV1@PAVCIRNetworkController@@@Z @ 22  NONAME ; class CIRNetworkObserver * CIRNetworkObserver::NewL(class CIRNetworkController *)
-	?NotifyActiveNetworkObserversL@CIRNetworkController@@QAEXW4TIRNetworkEvent@@@Z @ 23  NONAME ; void CIRNetworkController::NotifyActiveNetworkObserversL(enum TIRNetworkEvent)
-	?OpenL@CIRNetworkController@@SAPAV1@PAVMIRNetworkController@@@Z @ 24  NONAME ; class CIRNetworkController * CIRNetworkController::OpenL(class MIRNetworkController *)
-	?RegisterActiveNetworkObserverL@CIRNetworkController@@QAEXAAVMIRActiveNetworkObserver@@@Z @ 25  NONAME ; void CIRNetworkController::RegisterActiveNetworkObserverL(class MIRActiveNetworkObserver &)
-	?RegisterLogoDataTransferTrackerL@CIRNetworkController@@QAEXAAVRHTTPSession@@@Z @ 26  NONAME ; void CIRNetworkController::RegisterLogoDataTransferTrackerL(class RHTTPSession &)
-	?ResetConnectionStatus@CIRNetworkController@@QAEXXZ @ 27  NONAME ; void CIRNetworkController::ResetConnectionStatus(void)
+	?Close@CIRNetworkController@@QAEXXZ @ 21  NONAME ; void CIRNetworkController::Close(void)
+	?RegisterLogoDataTransferTrackerL@CIRNetworkController@@QAEXAAVRHTTPSession@@@Z @ 22  NONAME ; void CIRNetworkController::RegisterLogoDataTransferTrackerL(class RHTTPSession &)
+	?LogoDataTransferTracker@CIRNetworkController@@QAEAAVMIRDataTransferTracker@@XZ @ 23  NONAME ; class MIRDataTransferTracker & CIRNetworkController::LogoDataTransferTracker(void)
 
--- a/internetradio2.0/cachemgmtsrc/ircachemgmt.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/cachemgmtsrc/ircachemgmt.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -450,15 +450,16 @@
 				{
 				iPtrCategory->ResetAndDestroy();
 				}
+			else
+			{
+				break;
+			}
 			for(TInt iter=0;iter<aCountItems;iter++)
 				{
 				ptr=CIRBrowseCatagoryItems::NewL();
 				CleanupStack::PushL(ptr);
 				instream>>*ptr;
-			    if (iPtrCategory)
-				    {				
-				    iPtrCategory->AppendL(ptr);
-				    }
+				iPtrCategory->AppendL(ptr);
 				CleanupStack::Pop(ptr);
 				}
 	        CleanupStack::PopAndDestroy( &instream );
--- a/internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/dataprovidersrc/irhttpdataprovider.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -740,12 +740,16 @@
 		TInt pfCount = pf.Count();
         for(ii=0;ii<pf.Count();ii++)
             {
-            TBuf<KSize> z;
-            TBuf<KSize> z1;
+            RBuf z;
+            RBuf z1;
             TBool first;
             //file extensions
             const CDesC8Array &fe=pf[ii]->SupportedFileExtensions();
             first=TRUE;
+            z.CreateL(KSize);
+            z.CleanupClosePushL();
+            z1.CreateL(KSize);
+            z1.CleanupClosePushL();
             z1.Zero();
             for(j=0;j<fe.Count();j++)
                 {
@@ -787,7 +791,7 @@
                 	tempD++;	                	
 	                }
                 };
-
+            CleanupStack::PopAndDestroy(2);
             };// for play formats
             }
    
--- a/internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/dataprovidersrc/irlogodownloadengine.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -22,7 +22,6 @@
 #include "irnetworkcontroller.h"
 #include "ircachemgmt.h"
 #include "irhttprequestdata.h"
-#include "irpreset.h"
 #include "irdebug.h"
 #include "irdataproviderconstants.h"
 #include "iractivenetworkobserver.h"
--- a/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -204,7 +204,7 @@
 	IRLOG_DEBUG( "CIRFavoritesDb::AddPresetL(des des int int)" );
 	iMoveStatus=EFalse;
     CIRIsdsPreset* saveItem;
-    saveItem = CIRIsdsPreset::NewL();
+    saveItem = CIRIsdsPreset::NewLC();
     saveItem->SetName(aName);
 	saveItem->SetUrlCount(1);//only one url is saved for manually added channel
 	saveItem->SetChannelType(EUserDefined);
@@ -212,7 +212,8 @@
 	//bitrate set to zero so that it is accessible to all kinds of bitrate settings
 	saveItem->SetUrlL(KNotAvailable,aURl,0);
 	AddPresetL(*saveItem,aReturn);
-	delete saveItem;
+	CleanupStack::PopAndDestroy(saveItem);
+
 	IRLOG_DEBUG( "CIRFavoritesDb::AddPresetL(des des int int) - Exiting." );
 	}
 
--- a/internetradio2.0/filerecognizersrc/irrecognizer.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/filerecognizersrc/irrecognizer.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -152,7 +152,13 @@
     RFs fs;
     User::LeaveIfError(fs.Connect());
     RFile file;
-    file.Open(fs, aFileName, EFileRead);
+    TInt ret = file.Open(fs, aFileName, EFileRead);
+    if (KErrNone != ret)
+    {
+        fs.Close();
+        return;
+    }
+    
     RBuf8 content;
     TInt maxLen = 0;
     file.Size(maxLen);
--- a/internetradio2.0/include/irpubsubkeys.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/include/irpubsubkeys.h	Wed Jun 23 18:04:00 2010 +0300
@@ -164,5 +164,10 @@
 
 const TUint32 KIRPSBufferingState = { KIRPubSubBase + 0x00000012 };
 
+/********************************************************************
+*  KIRPubSubBase + 0x00000015 should be reserved for startup key which is defined in \qtinternetradio\irqcommon\inc\irservicedef.h
+*const unsigned long int KInternetRadioStartupKey = 0x00000035; // = KIRPubSubBase + 0x00000015
+*/
+
 #endif // IRPUBSUBKEYS_H
 
--- a/internetradio2.0/networkcontrollerinc/irnetworkcontroller.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/networkcontrollerinc/irnetworkcontroller.h	Wed Jun 23 18:04:00 2010 +0300
@@ -23,10 +23,6 @@
 #include <es_sock.h>
 #include <rhttpsession.h>
 
-//Added for ALR/SNAP
-#include <cmmanager.h>
-#include <connpref.h>
-#include <commdbconnpref.h>
 #include <comms-infras/cs_mobility_apiext.h>
 #include "iractivenetworkobserver.h"
 
@@ -38,25 +34,6 @@
 class CIRSettings;
 class MIRActiveNetworkObserver;
 
-typedef RArray<TUint32> RDestinationArray;
-
-//Added for ALR/SNAP
-enum TUserDefinedSelection
-   {
-    EUserDefinedSelectionAlwaysAsk = 0,
-    EUserDefinedSelectionDefaultConnection,
-    EUserDefinedSelectionDestination,
-    EUserDefinedSelectionConnectionMethod
-    };
-    
-    
-namespace CommsDat
-    {
-    class CMDBSession;
-    }
-
-using namespace CommsDat;
-
 /**
  * This class provides the interface to IRNetworkController component
  *
@@ -102,18 +79,6 @@
  * // this is used by download manager for choosing the access point
  * iNetworkController->GetIAPId();
  *
- * // This API returns the list of available access points
- * iNetworkController->GetAccessPointList();
- *
- * // This API returns the list of bearer ids for available access points
- * iNetworkController->GetBearerList();
- *
- * // This API returns the list of network ids for available access points
- * iNetworkController->GetNetworkList();
- *
- * // This API returns the list of iap ids for available access points
- * iNetworkController->GetApList();
- *
  * // This API is called to initiate access point selection
  * iNetworkController->ChooseAccessPointL();
  *
@@ -203,30 +168,6 @@
 	IMPORT_C TInt GetIAPId(TUint32& aIapId) const;
 
 	/**
-	 *  Returns the list of available access points
-	 *  @return CDesCArray* array specifying the access point names
-	 */
-	IMPORT_C const CDesCArray* GetAccessPointList() const;
-
-	/**
-	 *  Returns the list of bearer ids for available access points
-	 *  @return const RArray<TUint32> array specifying the bearer ids
-	 */
-	IMPORT_C const RArray<TUint32> GetBearerList() const;
-
-	/**
-	 *  Returns the list of network ids for available access points
-	 *  @return const RArray<TUint32> array specifying the network ids
-	 */
-	IMPORT_C const RArray<TUint32> GetNetworkList() const;
-
-	/**
-	 *  Returns the list of iap ids for available access points
-	 *  @return const RArray<TUint32> array specifying the iap ids
-	 */
-	IMPORT_C const RArray<TUint32> GetApList() const;
-
-	/**
 	 *  Configures the Access Point which is used by all the components for network connectivity
 	 */
 	IMPORT_C void ChooseAccessPointL(TBool aDefaultConnection = ETrue);
@@ -522,21 +463,6 @@
 	CDesCArrayFlat* iIapList;
 
 	/**
-	 * Array of bearer ids for access points
-	 */
-	RArray<TUint32> iBearerList;
-
-	/**
-	 * Array of network ids for access points
-	 */
-	RArray<TUint32> iNetworkList;
-
-	/**
-	 * Array of iap ids for access points
-	 */
-	RArray<TUint32> iIapIdList;
-
-	/**
 	 * Indicates if WiFi is supported or not
 	 */
 	TBool iIsWlanSupported;
--- a/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/networkcontrollersrc/irnetworkcontroller.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -36,15 +36,10 @@
 
 #include "iractivenetworkobserver.h"
 
-//for ALR/SNAP
-#include <cmmanager.h>
-#include <cmdestination.h>
-
 
 const TInt KMaxIRUAProfLength = 250; // Max length of the UAProf string
 const TInt KIRDefaultUAProfBufferSize = 0x80;
 const TUint KIRESockMessageSlots = 16;
-const TUint32 KIRUniqueWlanId = 0x2000883F; // Just to make it unique
 const TInt KArraySize = 5;
 const TInt KWlanStringMaxLength = 9;
 const TInt KTwo = 2;
@@ -101,6 +96,13 @@
         CleanupStack::Pop(networkController);
 	}
     networkController->iSingletonInstances++;
+    
+    if (NULL != aObserver)
+    {
+        networkController->iObserver = aObserver;
+        networkController->iIRNetworkObserver->SetObserver(aObserver);
+    }
+    
     IRLOG_DEBUG( "CIRNetworkController::OpenL - Exiting." );
     return networkController;
 }
@@ -261,49 +263,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// CIRNetworkController::GetAccessPointList
-// Reset the connection status to Disconnected statet
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const CDesCArray* CIRNetworkController::GetAccessPointList() const
-{
-    IRLOG_DEBUG( "CIRNetworkController::GetAccessPointList" );
-    return iIapList;
-}
-
-// ---------------------------------------------------------------------------
-// CIRNetworkController::GetBearerList
-// Reset the connection status to Disconnected statet
-//
-EXPORT_C const RArray<TUint32> CIRNetworkController::GetBearerList() const
-{
-    IRLOG_DEBUG( "CIRNetworkController::GetBearerList" );
-    return iBearerList;
-}
-
-// ---------------------------------------------------------------------------
-// CIRNetworkController::GetNetworkList
-// Reset the connection status to Disconnected statet
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const RArray<TUint32> CIRNetworkController::GetNetworkList() const
-{
-    IRLOG_DEBUG( "CIRNetworkController::GetNetworkList" );
-    return iNetworkList;
-}
-
-// ---------------------------------------------------------------------------
-// CIRNetworkController::GetApList
-// Reset the connection status to Disconnected statet
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const RArray<TUint32> CIRNetworkController::GetApList() const
-{
-    IRLOG_DEBUG( "CIRNetworkController::GetApList" );
-    return iIapIdList;
-}
-
-// ---------------------------------------------------------------------------
 //  CIRNetworkController::ChooseAccessPointL
 //  Configures the Access Point which is used by all the components for network
 //  connectivity
@@ -330,6 +289,13 @@
     // Always validate the Access Points status
     if ( ValidateAccessPointsL() )
     { 
+        if(NULL != iMobility)
+        {
+         iMobility->Cancel();
+         delete iMobility;
+         iMobility = NULL;
+        }
+
         // Connect to the Symbian Socket Server
         iIRNetworkConnection->Close();
         iIRSocketServer.Close();
@@ -531,7 +497,13 @@
     _LIT(KErrorMsg,"Method Close not called");
     __ASSERT_ALWAYS(iSingletonInstances == 0, User::Panic(KErrorMsg, KErrCorrupt));
 
-    delete iMobility;
+    if(NULL != iMobility)
+    {
+     iMobility->Cancel();
+     delete iMobility;
+     iMobility = NULL;
+    }
+
     if (IsActive())
     {
         Cancel();
@@ -552,9 +524,7 @@
     }
     delete iIRNetworkObserver;
     iIRSocketServer.Close();
-    iBearerList.Close();
-    iNetworkList.Close();
-    iIapIdList.Close();
+
     if (iIapList)
     {
         iIapList->Reset();
@@ -622,9 +592,6 @@
 
     // Reset all the comms info
     iIapList->Reset();
-    iBearerList.Reset();
-    iNetworkList.Reset();
-    iIapIdList.Reset();
     
 #ifndef __WINS__
     CIRFilteredApReader* filteredReader = CIRFilteredApReader::
@@ -639,9 +606,6 @@
         CleanupStack::PushL( iapRecord );
 
         iIapList->AppendL( iapRecord->iRecordName.GetL() );
-        iBearerList.AppendL( static_cast<TUint32>(iapRecord->iBearer) );
-        iNetworkList.AppendL( static_cast<TUint32>(iapRecord->iNetwork) );
-        iIapIdList.AppendL( iapRecord->RecordId() );
 
         CleanupStack::PopAndDestroy( iapRecord );
         iapRecord = filteredReader->NextRecordL();
@@ -662,9 +626,6 @@
         CCDIAPRecord* iapRecord =
                 static_cast<CCDIAPRecord*> (iapSet->iRecords[i]);
         iIapList->AppendL(iapRecord->iRecordName.GetL());
-        iBearerList.AppendL(static_cast<TUint32> (iapRecord->iBearer));
-        iNetworkList.AppendL(static_cast<TUint32> (iapRecord->iNetwork));
-        iIapIdList.AppendL(iapRecord->RecordId());
     }
     CleanupStack::PopAndDestroy(2, dbSession);
 
@@ -679,10 +640,6 @@
         TBuf<KWlanStringMaxLength> wlanString;
         wlanString.Copy(KIRWLanName);
         iIapList->AppendL(wlanString);
-        TUint32 WlanIdentifier(KIRUniqueWlanId);
-        iBearerList.AppendL(WlanIdentifier);
-        iNetworkList.AppendL((TUint32)KErrNotFound);
-        iIapIdList.AppendL((TUint32)KErrNotFound);
     }
 #endif
 
@@ -871,6 +828,14 @@
 void CIRNetworkController::DoCancel()
 {
     IRLOG_DEBUG( "CIRNetworkController::DoCancel - Entering" );
+
+    if(NULL != iMobility)
+    {
+     iMobility->Cancel();
+     delete iMobility;
+     iMobility = NULL;
+    }
+
     iIRNetworkConnection->Stop();
     iIRNetworkConnection->Close();
     iIRSocketServer.Close();
--- a/internetradio2.0/networkcontrollersrc/irnetworkobserver.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/internetradio2.0/networkcontrollersrc/irnetworkobserver.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -181,7 +181,14 @@
 				{
 				if(iMonitoringRequired)
 					{
-					iMonitorObserver->IRNetworkEventL(ENetworkConnectionDisconnected);
+				    if (iMonitorObserver)
+					{
+				        iMonitorObserver->IRNetworkEventL(ENetworkConnectionDisconnected);
+					}
+				    else
+				    {
+				        iNetworkController->NotifyActiveNetworkObserversL(ENetworkConnectionDisconnected);
+				    }
 					}
 				}			
 			}
@@ -369,60 +376,30 @@
 			        case EBearerGPRS:
 			            {
 			            iIRConnectionType = EGprs;
-			            if(iMonitoringRequired)
-			             {
-			             // Intimate the connection established event
-			                 iMonitorObserver->IRNetworkEventL(
-			                     ENetworkConnectionEstablished);
-			             }
 			            }
 			        break;
                     
 			        case EBearerEdgeGPRS:
 			            {
 			            iIRConnectionType = EEdge;
-			            if(iMonitoringRequired)
-			             {
-			             // Intimate the connection established event
-			                 iMonitorObserver->IRNetworkEventL(
-			                     ENetworkConnectionEstablished);
-			             }
 			            }
 			        break;
                     
 			        case EBearerWLAN:
 			            {
 			            iIRConnectionType = EWiFi;    
-			            if(iMonitoringRequired)
-			                {
-			                // Intimate the connection established event
-			                iMonitorObserver->IRNetworkEventL(
-			                    ENetworkConnectionEstablished);
-			                }
 			            }
 			        break;
                     
 			        case EBearerWCDMA:
 			            {
 			            iIRConnectionType = EWcdma;
-			            if(iMonitoringRequired)
-			            {
-			            // Intimate the connection established event
-			                iMonitorObserver->IRNetworkEventL(
-			                    ENetworkConnectionEstablished);
-			            }
 			            }
                     break;
 			            
 			        case EBearerCDMA2000:
 			            {
 			            iIRConnectionType = ECdma2000;
-			            if(iMonitoringRequired)
-			            {
-			            // Intimate the connection established event
-			                iMonitorObserver->IRNetworkEventL(
-			                    ENetworkConnectionEstablished);
-			            }
 			            }
 			        break;
 			        
@@ -430,17 +407,25 @@
 			            {
 			            #ifdef __WINS__
 			            iIRConnectionType = EGprs;
-			            if(iMonitoringRequired)
-			             {
-			             // Intimate the connection established event
-			                 iMonitorObserver->IRNetworkEventL(
-			                     ENetworkConnectionEstablished);
-			             }
 			            #endif
 			            }
 			        break;
 			    }
 			    
+                
+                if (iMonitoringRequired)
+                {
+                    if (iMonitorObserver)    
+                    {
+                        // Intimate the connection established event
+                        iMonitorObserver->IRNetworkEventL(ENetworkConnectionEstablished);
+                    }
+                    else
+                    {
+                        iNetworkController->NotifyActiveNetworkObserversL(ENetworkConnectionEstablished);
+                    }
+                }
+                
 			    iNetworkController->ResetHandingOverConnection();
 			}
 			break;
--- a/qtinternetradio/bwins/irqnetworkcontrolleru.def	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/bwins/irqnetworkcontrolleru.def	Wed Jun 23 18:04:00 2010 +0300
@@ -1,19 +1,15 @@
 EXPORTS
-	?getNetworkList@IRQNetworkController@@QAEXAAV?$QList@K@@@Z @ 1 NONAME ; void IRQNetworkController::getNetworkList(class QList<unsigned long> &)
-	?isWlanSupported@IRQNetworkController@@QBE_NXZ @ 2 NONAME ; bool IRQNetworkController::isWlanSupported(void) const
-	?getIAPId@IRQNetworkController@@QBE?AW4IRQError@@AAK@Z @ 3 NONAME ; enum IRQError IRQNetworkController::getIAPId(unsigned long &) const
-	?getApIdList@IRQNetworkController@@QAEXAAV?$QList@K@@@Z @ 4 NONAME ; void IRQNetworkController::getApIdList(class QList<unsigned long> &)
-	?cancelConnecting@IRQNetworkController@@QAEXXZ @ 5 NONAME ; void IRQNetworkController::cancelConnecting(void)
-	?isHandlingOverConnection@IRQNetworkController@@QAE_NXZ @ 6 NONAME ; bool IRQNetworkController::isHandlingOverConnection(void)
-	?getBearerList@IRQNetworkController@@QAEXAAV?$QList@K@@@Z @ 7 NONAME ; void IRQNetworkController::getBearerList(class QList<unsigned long> &)
-	?getAccessPointList@IRQNetworkController@@QAEXAAVQStringList@@@Z @ 8 NONAME ; void IRQNetworkController::getAccessPointList(class QStringList &)
-	?identifyConnectionType@IRQNetworkController@@QBE?AW4IRQConnectionType@@XZ @ 9 NONAME ; enum IRQConnectionType IRQNetworkController::identifyConnectionType(void) const
-	?openInstance@IRQNetworkController@@SAPAV1@XZ @ 10 NONAME ; class IRQNetworkController * IRQNetworkController::openInstance(void)
-	?closeInstance@IRQNetworkController@@QAEXXZ @ 11 NONAME ; void IRQNetworkController::closeInstance(void)
-	?notifyActiveNetworkObservers@IRQNetworkController@@QAEXW4IRQNetworkEvent@@@Z @ 12 NONAME ; void IRQNetworkController::notifyActiveNetworkObservers(enum IRQNetworkEvent)
-	?getNetworkStatus@IRQNetworkController@@QBE_NXZ @ 13 NONAME ; bool IRQNetworkController::getNetworkStatus(void) const
-	?resetConnectionStatus@IRQNetworkController@@QAEXXZ @ 14 NONAME ; void IRQNetworkController::resetConnectionStatus(void)
-	?isOfflineMode@IRQNetworkController@@QAE_NXZ @ 15 NONAME ; bool IRQNetworkController::isOfflineMode(void)
-	?isConnectRequestIssued@IRQNetworkController@@QBE_NXZ @ 16 NONAME ; bool IRQNetworkController::isConnectRequestIssued(void) const
-	?chooseAccessPoint@IRQNetworkController@@QAEXXZ @ 17 NONAME ; void IRQNetworkController::chooseAccessPoint(void)
+	?isWlanSupported@IRQNetworkController@@QBE_NXZ @ 1  NONAME ; bool IRQNetworkController::isWlanSupported(void) const
+	?getIAPId@IRQNetworkController@@QBE?AW4IRQError@@AAK@Z @ 2  NONAME ; enum IRQError IRQNetworkController::getIAPId(unsigned long &) const
+	?cancelConnecting@IRQNetworkController@@QAEXXZ @ 3  NONAME ; void IRQNetworkController::cancelConnecting(void)
+	?isHandlingOverConnection@IRQNetworkController@@QAE_NXZ @ 4  NONAME ; bool IRQNetworkController::isHandlingOverConnection(void)
+	?identifyConnectionType@IRQNetworkController@@QBE?AW4IRQConnectionType@@XZ @ 5  NONAME ; enum IRQConnectionType IRQNetworkController::identifyConnectionType(void) const
+	?openInstance@IRQNetworkController@@SAPAV1@XZ @ 6  NONAME ; class IRQNetworkController * IRQNetworkController::openInstance(void)
+	?closeInstance@IRQNetworkController@@QAEXXZ @ 7  NONAME ; void IRQNetworkController::closeInstance(void)
+	?notifyActiveNetworkObservers@IRQNetworkController@@QAEXW4IRQNetworkEvent@@@Z @ 8  NONAME ; void IRQNetworkController::notifyActiveNetworkObservers(enum IRQNetworkEvent)
+	?getNetworkStatus@IRQNetworkController@@QBE_NXZ @ 9  NONAME ; bool IRQNetworkController::getNetworkStatus(void) const
+	?resetConnectionStatus@IRQNetworkController@@QAEXXZ @ 10  NONAME ; void IRQNetworkController::resetConnectionStatus(void)
+	?isOfflineMode@IRQNetworkController@@QAE_NXZ @ 11  NONAME ; bool IRQNetworkController::isOfflineMode(void)
+	?isConnectRequestIssued@IRQNetworkController@@QBE_NXZ @ 12  NONAME ; bool IRQNetworkController::isConnectRequestIssued(void) const
+	?chooseAccessPoint@IRQNetworkController@@QAEXXZ @ 13  NONAME ; void IRQNetworkController::chooseAccessPoint(void)
 
--- a/qtinternetradio/eabi/irqnetworkcontrolleru.def	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/eabi/irqnetworkcontrolleru.def	Wed Jun 23 18:04:00 2010 +0300
@@ -1,19 +1,15 @@
 EXPORTS
-	_ZN20IRQNetworkController11getApIdListER5QListImE @ 1 NONAME
-	_ZN20IRQNetworkController12openInstanceEv @ 2 NONAME
-	_ZN20IRQNetworkController13closeInstanceEv @ 3 NONAME
-	_ZN20IRQNetworkController13getBearerListER5QListImE @ 4 NONAME
-	_ZN20IRQNetworkController13isOfflineModeEv @ 5 NONAME
-	_ZN20IRQNetworkController14getNetworkListER5QListImE @ 6 NONAME
-	_ZN20IRQNetworkController16cancelConnectingEv @ 7 NONAME
-	_ZN20IRQNetworkController17chooseAccessPointEv @ 8 NONAME
-	_ZN20IRQNetworkController18getAccessPointListER11QStringList @ 9 NONAME
-	_ZN20IRQNetworkController21resetConnectionStatusEv @ 10 NONAME
-	_ZN20IRQNetworkController24isHandlingOverConnectionEv @ 11 NONAME
-	_ZN20IRQNetworkController28notifyActiveNetworkObserversE15IRQNetworkEvent @ 12 NONAME
-	_ZNK20IRQNetworkController15isWlanSupportedEv @ 13 NONAME
-	_ZNK20IRQNetworkController16getNetworkStatusEv @ 14 NONAME
-	_ZNK20IRQNetworkController22identifyConnectionTypeEv @ 15 NONAME
-	_ZNK20IRQNetworkController22isConnectRequestIssuedEv @ 16 NONAME
-	_ZNK20IRQNetworkController8getIAPIdERm @ 17 NONAME
+	_ZN20IRQNetworkController12openInstanceEv @ 1 NONAME
+	_ZN20IRQNetworkController13closeInstanceEv @ 2 NONAME
+	_ZN20IRQNetworkController13isOfflineModeEv @ 3 NONAME
+	_ZN20IRQNetworkController16cancelConnectingEv @ 4 NONAME
+	_ZN20IRQNetworkController17chooseAccessPointEv @ 5 NONAME
+	_ZN20IRQNetworkController21resetConnectionStatusEv @ 6 NONAME
+	_ZN20IRQNetworkController24isHandlingOverConnectionEv @ 7 NONAME
+	_ZN20IRQNetworkController28notifyActiveNetworkObserversE15IRQNetworkEvent @ 8 NONAME
+	_ZNK20IRQNetworkController15isWlanSupportedEv @ 9 NONAME
+	_ZNK20IRQNetworkController16getNetworkStatusEv @ 10 NONAME
+	_ZNK20IRQNetworkController22identifyConnectionTypeEv @ 11 NONAME
+	_ZNK20IRQNetworkController22isConnectRequestIssuedEv @ 12 NONAME
+	_ZNK20IRQNetworkController8getIAPIdERm @ 13 NONAME
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irappinspector.h	Wed Jun 23 18:04:00 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: Internet Radio App Insecptor
+*
+*/
+
+#ifndef IRAPPINSPECTOR_H_
+#define IRAPPINSPECTOR_H_
+
+// System includes
+#include <QObject>
+#include <xqsettingskey.h>
+
+// User includes
+
+// Forward declarations
+class XQSettingsManager;
+class QVariant;
+
+Q_ENUMS(IrServiceCmd::IrRunningStatus)
+    
+class IrAppInspector : public QObject
+{
+    Q_OBJECT
+
+public:
+    explicit IrAppInspector(QObject *aParent = 0);
+    virtual ~IrAppInspector();
+
+    bool isIrRunning();
+
+    bool startInspectingIrRunningStatus();
+    void stopInspectingIrRunningStatus();
+
+    enum IrRunningStatus
+    {
+        StartingUp = 0,
+        Exiting    = 1
+    };
+       
+signals:
+    void irRunningStatusChanged(IrAppInspector::IrRunningStatus aNewStatus);
+
+private slots:
+    void handleIrExit(const XQSettingsKey &aKey);
+    void handleIrRunningStatusChanged(const XQSettingsKey &aKey, const QVariant &aValue);
+
+private:
+    XQSettingsManager *mSettingsManager; // For getting and P&S notifications
+    XQSettingsKey      mIrRunningStatusKey;
+    
+    Q_DISABLE_COPY(IrAppInspector)    
+};
+
+#endif /* IRAPPINSPECTOR_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidget.h	Wed Jun 23 18:04:00 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:  Internet Radio home screen widget
+*
+*/
+
+#ifndef IRHSWIDGET_H
+#define IRHSWIDGET_H
+
+// System includes
+#include <QObject>
+#include <hbwidget.h>
+#include <hbicon.h>
+
+// User includes
+#include "irservicedef.h"
+
+// Forward declarations
+class HbLabel;
+class IrServiceClient;
+
+class IrHsWidget : public HbWidget
+{
+    Q_OBJECT
+
+public:
+    explicit IrHsWidget(QGraphicsItem *aParent = 0, Qt::WindowFlags aFlags = 0);
+    virtual ~IrHsWidget();
+
+
+public slots:
+    // from KQTI widget model framework, must be slots
+    void onInitialize();
+    void onUninitialize();    
+    void onShow();
+    void onHide();
+
+private:
+    void setupUi();
+    void setupConnection();
+
+    enum IrHsWidgetState
+    {
+        EUnknown   = -1,
+        EInit      = 0,
+        EPlaying   = 1,
+        EStopped   = 2,
+        ELoading   = 3
+        
+    };
+    void handleHsWidgetStateChange(IrHsWidgetState aNewState);
+    
+    void loadStationLogo();
+    
+    void initHomeSreenWidget();
+    void loadInitLayout();
+    void loadStoppedLayout();
+    void loadPlayingLayout();
+    void loadLoadingLayout();
+
+    // from QObject
+    bool eventFilter(QObject *aObject, QEvent *aEvent);
+
+private slots:
+    // handle user press event
+    void handleLogoAreaAction();
+    void handleControlAreaAction();
+    void handleGoToIrAreaAction();
+    void handleCentralAreaAction();
+    
+    void handleControlFailed();
+
+    // for service notification
+    void handleStationNameUpdated(const QString &aStationName);
+    void handleStationLogoUpdated(bool aLogoAvailable);
+    void handleMetaDataUpdated(const QString &aMetaData);
+    void handleIrStateUpdated(IrAppState::Type aNewState);
+
+private:   
+    HbIcon   mLoadingIcon;
+    
+    HbLabel *mLogoLabel;
+    HbLabel *mControlLabel;
+    HbLabel *mGoToIrLabel;
+    HbLabel *mStationNameLabel;
+    HbLabel *mMetadataLabel;
+
+    HbWidget *mInfoControlArea;
+    HbWidget *mCentralArea;
+
+    IrServiceClient *mServiceClient;
+
+    IrAppState::Type mIrState;
+    IrHsWidgetState  mIrHsWidgetState;
+    
+    Q_DISABLE_COPY(IrHsWidget)    
+};
+
+#endif // IRHSWIDGET_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irhswidgetplugin.h	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Internet Radio home screen widget plugin
+*
+*/
+
+#ifndef IRHSWIDGETPLUGIN_H
+#define IRHSWIDGETPLUGIN_H
+
+#include <QObject>
+#include <qserviceplugininterface.h>
+
+QTM_USE_NAMESPACE
+class IrHsWidgetPlugin : public QObject, public QServicePluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(QtMobility::QServicePluginInterface)
+
+public:
+    QObject *createInstance(const QServiceInterfaceDescriptor &aDescriptor,
+                            QServiceContext *aContext,
+                            QAbstractSecuritySession *aSession);
+};
+
+#endif // IRHSWIDGETPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/inc/irserviceclient.h	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: internet radio hs widget service client
+*
+*/
+
+#ifndef IRSERVICECLIENT_H_
+#define IRSERVICECLIENT_H_
+
+// System includes
+#include <QObject>
+#include <xqappmgr.h>
+
+// User includes
+#include "irservicedef.h"
+#include "irappinspector.h"
+
+// Forward declarations
+class XQAiwRequest;
+class IrServiceData;
+class QString;
+class QVariant;
+
+class IrServiceClient : public QObject
+{
+Q_OBJECT
+
+public:
+    explicit IrServiceClient(QObject *aParent = 0);
+    virtual ~IrServiceClient();
+
+public:
+    bool startMonitoringIrState();
+    void stopMonitoringIrState();
+
+    bool isStationPlayed();
+    bool loadStationName(QString &aStationName);
+    bool loadStationLogoFlag();    
+    
+    bool bringIrForeground();
+    bool launchIrNormally();
+    bool launchIrNowPlaying();
+
+    bool startPlaying();
+    bool stopPlaying();
+    bool cancelLoading();
+
+signals:
+    void stationNameUpdated(const QString &aStationName);
+    void stationLogoUpdated(bool aIsLogoAvailable);
+    void metaDataUpdated(const QString &aMetaData);
+    void irStateChanged(IrAppState::Type aNewState);
+    
+    void controlFailed();
+
+private slots:
+    // used for return value from Monitor Service via Qt HighWay
+    void handleMonitorRequestOk(const QVariant &aRetValue);
+    void handleMonitorRequestError(int aErrCode, const QString &aErrMessage);
+
+    // used for return value from Control Service via Qt HighWay
+    void handleControlRequestOk(const QVariant &aRetValue);
+    void handleControlRequestError(int aErrCode, const QString &aErrMessage);
+    
+    // used for signals from IrAppInspector
+    void handleIrRunningStatusChanged(IrAppInspector::IrRunningStatus aNewStatus);
+
+private:
+    bool createControlServiceRequest();
+    bool createMonitorServiceRequest();
+    bool createRefreshServiceRequest();
+
+    enum IrAppVisibilty
+    {
+        DoNotChange,
+        ToForeground,
+        ToBackground
+    };
+    
+    bool doSendMonitorRequest();
+    bool doSendRefreshRequest();
+    bool doSendControlRequest(const QVariant &aArgument, bool aIsSync, IrAppVisibilty aVisibility);
+    void prepareRequestInfo(XQAiwRequest *aRequest, IrAppVisibilty aVisibility);
+    
+    void processNotificationData(const IrServiceData &aServiceData);
+    
+    void initHsWidgetNoRunStopped();
+    void resetHsWidgetExitStopped();
+    
+private:    
+    IrAppInspector   *mIrAppInspector;
+    
+    bool  mMonitorReqOngoing;
+    bool  mControlReqOngoing;
+    
+    XQApplicationManager mApplicationManager;
+    XQAiwRequest        *mMonitorRequest;
+    XQAiwRequest        *mRefreshRequest;
+    XQAiwRequest        *mControlRequest;
+    
+    Q_DISABLE_COPY(IrServiceClient)    
+};
+
+#endif /* IRSERVICECLIENT_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/irhswidgetplugin.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,76 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:  
+
+TEMPLATE = lib
+TARGET   = irhswidgetplugin
+CONFIG += plugin mobility hb
+MOBILITY = serviceframework
+
+LIBS += -lxqsettingsmanager \
+        -lxqservice \
+        -lxqserviceutil
+
+MOC_DIR = moc
+        
+HEADERS += ./inc/*.h
+SOURCES += ./src/*.cpp
+
+INCLUDEPATH += ./inc               
+INCLUDEPATH += ../irqcommon/inc
+
+UID = E257CD03
+RESOURCES = resources.qrc
+
+symbian: {
+
+    DESTDIR = /private/20022F35/import/widgetregistry/$${UID}
+    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+    TARGET.UID3 = 0x$${UID}
+    TARGET.EPOCALLOWDLLDATA=1
+    TARGET.CAPABILITY = ALL -TCB
+    
+    plugins.path = $${DESTDIR}
+    plugins.sources = $${TARGET}.dll 
+    
+    widgetResources.path = $${DESTDIR}
+    widgetResources.sources += resource/$${TARGET}.xml    
+    widgetResources.sources += resource/$${TARGET}.manifest
+    widgetResources.sources += resource/$${TARGET}.png
+        
+    DEPLOYMENT += plugins \
+                  widgetResources
+}
+
+win32: {
+
+    CONFIG(debug, debug|release) {
+      SUBDIRPART = debug
+    } else {
+      SUBDIRPART = release
+    }    
+    
+    PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/$${UID}
+    
+    DESTDIR = $$PWD/../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR}
+
+    manifest.path = $${DESTDIR}
+    manifest.files = ./resource/*.manifest ./resource/*.xml ./resource/*.png
+    
+    INSTALLS += manifest    
+    
+}
+
+symbian:include(irhswidgetplugin_rom.pri)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/irhswidgetplugin_rom.pri	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+BLD_INF_RULES.prj_exports += \
+"$${LITERAL_HASH}include <platform_paths.hrh>"
+
+#iby exports to core
+BLD_INF_RULES.prj_exports += \
+"rom/irhswidgetplugin.iby  CORE_APP_LAYER_IBY_EXPORT_PATH(irhswidgetplugin.iby)"
+
+#iby exports to language
+#BLD_INF_RULES.prj_exports += \
+#"rom/irhswidgetplugin_resources.iby  LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(irhswidgetplugin_resources.iby)"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidget.docml	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="irhswidget" type="HbWidget">
+        <widget name="logoLabel" type="HbLabel">
+            <icon iconName="qtg_large_internet_radio" name="icon"/>
+            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            <sizehint height="14un" type="PREFERRED" width="10un"/>
+            <contentsmargins bottom="2un" left="1un" right="1un" top="2un"/>
+            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+        </widget>
+        <widget name="leftSideArea" type="HbWidget">
+            <widget name="stack_container" type="HbWidget">
+                <widget name="info_control_area" type="HbWidget">
+                    <widget name="infoLayout" type="HbWidget">
+                        <widget name="firstRowLabel" type="HbLabel">
+                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                            <sizehint height="7un" type="PREFERRED" width="23un"/>
+                            <fontspec name="fontSpec" role="PrimarySmall" textheight="3.5un"/>
+                        </widget>
+                        <widget name="secondRowLabel" type="HbLabel">
+                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                            <sizehint height="7un" type="PREFERRED" width="23un"/>
+                            <fontspec name="fontSpec" role="PrimarySmall" textheight="3un"/>
+                        </widget>
+                        <widget name="hInterLineLabel" type="HbLabel">
+                            <icon iconName="qtg_graf_divider_h_thin" name="icon"/>
+                            <sizehint height="1un" type="PREFERRED" width="23un"/>
+                            <contentsmargins bottom="0un" left="expr(var(hb-param-margin-gene-middle-horizontal) )" right="expr(var(hb-param-margin-gene-middle-horizontal) )" top="0un"/>
+                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                        </widget>
+                        <sizehint height="14un" type="PREFERRED" width="23un"/>
+                        <layout orientation="Vertical" spacing="0un" type="linear">
+                            <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                            <linearitem itemname="firstRowLabel"/>
+                            <linearitem itemname="hInterLineLabel"/>
+                            <linearitem itemname="secondRowLabel"/>
+                        </layout>
+                    </widget>
+                    <widget name="vLineLabelRight" type="HbLabel">
+                        <icon iconName="qtg_graf_divider_v_thin" name="icon"/>
+                        <sizehint height="14un" type="PREFERRED" width="1un"/>
+                        <contentsmargins bottom="expr(var(hb-param-margin-gene-middle-vertical) )" left="0un" right="0un" top="expr(var(hb-param-margin-gene-middle-vertical) )"/>
+                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    </widget>
+                    <widget name="controlLabel" type="HbLabel">
+                        <icon iconName="qtg_mono_play" name="icon"/>
+                        <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                        <sizehint height="14un" type="PREFERRED" width="10un"/>
+                        <contentsmargins bottom="2un" left="2un" right="2un" top="2un"/>
+                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    </widget>
+                    <sizehint height="14un" type="PREFERRED" width="34un"/>
+                    <layout orientation="Horizontal" spacing="0un" type="linear">
+                        <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                        <linearitem itemname="infoLayout"/>
+                        <linearitem itemname="vLineLabelRight"/>
+                        <linearitem itemname="controlLabel"/>
+                    </layout>
+                </widget>
+                <widget name="goToIrLabel" type="HbLabel">
+                    <sizehint height="14un" type="PREFERRED" width="34un"/>
+                    <string name="plainText" value="Go To Internet Radio"/>
+                    <fontspec name="fontSpec" role="PrimarySmall" textheight="4un"/>
+                    <enums name="alignment" value="AlignLeft|AlignVCenter|AlignLeading"/>
+                </widget>
+                <sizehint height="14un" type="PREFERRED" width="34un"/>
+                <layout type="stacked">
+                    <stackitem itemname="info_control_area"/>
+                    <stackitem itemname="goToIrLabel"/>
+                </layout>
+            </widget>
+            <widget name="vLineLabelLeft" type="HbLabel">
+                <icon iconName="qtg_graf_divider_v_thin" name="icon"/>
+                <sizehint height="14un" type="PREFERRED" width="1un"/>
+                <contentsmargins bottom="expr(var(hb-param-margin-gene-middle-vertical) )" left="0un" right="0un" top="expr(var(hb-param-margin-gene-middle-vertical) )"/>
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+            </widget>
+            <sizehint height="14un" type="PREFERRED" width="35un"/>
+            <layout orientation="Horizontal" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="vLineLabelLeft"/>
+                <linearitem itemname="stack_container"/>
+            </layout>
+        </widget>
+        <size height="14un" name="size" width="45un"/>
+        <rect height="14un" name="geometry" width="45un" x="0" y="0"/>
+        <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+        <sizehint height="14un" type="PREFERRED" width="45un"/>
+        <layout orientation="Horizontal" spacing="0un" type="linear">
+            <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+            <linearitem itemname="logoLabel"/>
+            <linearitem itemname="leftSideArea"/>
+        </layout>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.manifest	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<hswidgetmanifest>
+    <uri>irhswidgetplugin</uri>
+    <title>Internet Radio HS Widget</title>
+    <description>Internet Radio HS Widget</description>
+    <icon>irhswidgetplugin.png</icon>
+    <hidden>false</hidden>
+    <servicexml>irhswidgetplugin.xml</servicexml>
+</hswidgetmanifest>
Binary file qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resource/irhswidgetplugin.xml	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service>
+    <name>irhswidgetplugin</name>
+    <filepath>irhswidgetplugin</filepath>
+    <description>Internet Radio HS Widget</description>
+    <interface>
+        <name>com.nokia.symbian.IHomeScreenWidget</name>
+        <version>1.0</version>
+        <description>Internet Radio HS Widget</description>
+        <capabilities></capabilities>
+        <customproperty key="iconuri">irhswidgetplugin.png</customproperty>
+        <customproperty key="title">Internet Radio HS Widget</customproperty>
+    </interface>
+</service>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/resources.qrc	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource>
+        <file>resource/irhswidget.docml</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/rom/irhswidgetplugin.iby	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __IRHSWIDGETPLUGIN_IBY__
+#define __IRHSWIDGETPLUGIN_IBY__
+
+file=ABI_DIR\BUILD_DIR\irhswidgetplugin.dll                                            SHARED_LIB_DIR\irhswidgetplugin.dll
+data=ZPRIVATE\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.qtplugin        private\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.qtplugin
+data=ZPRIVATE\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.manifest        private\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.manifest
+data=ZPRIVATE\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.xml             private\20022f35\import\widgetregistry\E257CD03\irhswidgetplugin.xml
+
+
+#endif //__IRHSWIDGETPLUGIN_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/rom/irhswidgetplugin_resources.iby	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef IRHSWIDGETPLUGIN_RESOURCES_IBY
+#define IRHSWIDGETPLUGIN_RESOURCES_IBY
+
+
+#endif  // IRHSWIDGETPLUGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irappinspector.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Internet Radio App Insecptor
+*
+*/
+
+// System includes
+#include <QVariant>
+#include <xqsettingsmanager.h>
+#include <xqpublishandsubscribeutils.h>
+
+// User includes
+#include "irappinspector.h"
+#include "irservicedef.h"
+
+// Constructor
+IrAppInspector::IrAppInspector(QObject *aParent) :
+    QObject(aParent),
+    mSettingsManager(new XQSettingsManager(this)),
+    mIrRunningStatusKey(XQSettingsKey::TargetPublishAndSubscribe,
+                        KInternetRadioPSUid,
+                        KInternetRadioStartupKey)   
+{   
+    QObject::connect(mSettingsManager, SIGNAL(itemDeleted(XQSettingsKey)),
+        this, SLOT(handleIrExit(XQSettingsKey)));
+    QObject::connect(mSettingsManager, SIGNAL(valueChanged(XQSettingsKey, QVariant)),
+        this, SLOT(handleIrRunningStatusChanged(XQSettingsKey, QVariant)));
+}
+
+// Destructor 
+IrAppInspector::~IrAppInspector()
+{
+    stopInspectingIrRunningStatus();
+}
+
+
+/*!
+ Handling of deletion of listened P&S key.
+ \param aKey Deleted key.
+ */
+void IrAppInspector::handleIrExit(const XQSettingsKey &aKey)
+{
+    if (KInternetRadioPSUid == aKey.uid()
+         && KInternetRadioStartupKey == aKey.key())
+    {
+        emit irRunningStatusChanged(Exiting);
+        
+        // since the P&S key has been deleted, should re-start the inspecting
+        startInspectingIrRunningStatus();
+    }
+}
+
+
+void IrAppInspector::handleIrRunningStatusChanged(const XQSettingsKey &aKey,
+                                                 const QVariant &aValue)
+{
+    if (KInternetRadioPSUid == aKey.uid()
+         && KInternetRadioStartupKey == aKey.key())
+    {
+        if (aValue.isValid())
+        {
+            if (aValue.canConvert(QVariant::Int))
+            {
+                emit irRunningStatusChanged(StartingUp);
+            }
+        }
+    }
+}
+
+bool IrAppInspector::startInspectingIrRunningStatus()
+{
+    return mSettingsManager->startMonitoring(mIrRunningStatusKey);
+}
+
+void IrAppInspector::stopInspectingIrRunningStatus()
+{
+    mSettingsManager->stopMonitoring(mIrRunningStatusKey);
+}
+
+bool IrAppInspector::isIrRunning()
+{
+    QVariant value = mSettingsManager->readItemValue(mIrRunningStatusKey);
+    if (value.isValid())
+    {
+        if (value.canConvert(QVariant::Int))
+        {
+            return true;
+        }
+    }
+    return false;  
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidget.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,484 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Internet Radio home screen widget
+*
+*/
+
+// System includes
+#include <HbLabel>
+#include <HbDocumentLoader>
+#include <HbFrameDrawer>
+#include <HbFrameItem>
+#include <HbIconAnimationManager>
+#include <HbIconAnimationDefinition>
+#include <HbColorScheme>
+#include <HbStyleLoader>
+#include <QGraphicsLinearLayout>
+#include <QSettings>
+#include <QPixmap>
+
+// User includes
+#include "irhswidget.h"
+#include "irserviceclient.h"
+
+// Defines
+static const QString KIrHsWidgetDocml  = ":/resource/irhswidget.docml";
+static const QString KIrHsWidget       = "irhswidget";
+static const QString KLogoLabel        = "logoLabel";
+static const QString KGoToIrLabel      = "goToIrLabel";
+static const QString KControlLabel     = "controlLabel";
+static const QString KFirstRowLabel    = "firstRowLabel";
+static const QString KSecondRowLabel   = "secondRowLabel";
+static const QString KInfoControlArea  = "info_control_area";
+static const QString KCentrolArea      = "infoLayout";
+
+static const QString KDefaultStationLogo = "qtg_large_internet_radio";
+static const QString KPlayButtonIcon     = "qtg_mono_play";
+static const QString KStopButtonIcon     = "qtg_mono_stop";
+
+static const QString KFrameGraphicsName  = "qtg_fr_hswidget_normal";
+static const QString KStationNameColor   = "qtc_hs_list_item_title";
+static const QString KMetaDataColor      = "qtc_hs_list_item_content";
+
+static const QString KLoadingAnimationPrefix  = "qtg_anim_loading_";
+static const QString KLoadingIconName = "LoadingAnimation";
+
+const int KIrHsWidgetLogoSize = 50; // hs widget logo size
+
+// ======== MEMBER FUNCTIONS ========
+// Constructor
+IrHsWidget::IrHsWidget(QGraphicsItem* aParent, Qt::WindowFlags aFlags)
+    : HbWidget(aParent, aFlags),
+      mLogoLabel(NULL),
+      mControlLabel(NULL),
+      mGoToIrLabel(NULL),
+      mStationNameLabel(NULL),
+      mMetadataLabel(NULL),
+      mInfoControlArea(NULL),
+      mCentralArea(NULL),
+      mServiceClient(NULL),
+      mIrState(IrAppState::Unknown),
+      mIrHsWidgetState(EUnknown)
+{
+    setupUi();
+    initHomeSreenWidget();
+    
+    mServiceClient = new IrServiceClient(this);
+    setupConnection();
+}
+
+// Destructor
+IrHsWidget::~IrHsWidget()
+{
+}
+
+// Initializes the widget.
+// called by kqti fw when widget is added to home screen
+void IrHsWidget::onInitialize()
+{    
+    mServiceClient->startMonitoringIrState();    
+}
+
+// Uninitializes the widget.
+// called by kqti fw when widget is removed from home screen
+void IrHsWidget::onUninitialize()
+{
+}
+
+// Called when widget is shown in the home screen
+void IrHsWidget::onShow()
+{
+}
+
+// Called when widget is hidden from the home screen
+void IrHsWidget::onHide()
+{
+}
+
+
+void IrHsWidget::setupUi()
+{
+    HbDocumentLoader *uiLoader = new HbDocumentLoader();
+    uiLoader->reset();
+
+    bool loaded = false;
+    uiLoader->load(KIrHsWidgetDocml, &loaded);
+
+    if (loaded)
+    {
+        HbWidget *irHsWidget = qobject_cast<HbWidget *>(uiLoader->findWidget(KIrHsWidget));
+        HbFrameDrawer *irHsWidgetDrawer = new HbFrameDrawer(KFrameGraphicsName, HbFrameDrawer::NinePieces);
+        HbFrameItem   *irHsWidgetBgItem = new HbFrameItem(irHsWidgetDrawer, irHsWidget);
+        irHsWidgetBgItem->setPreferredSize(irHsWidget->preferredSize());
+
+        QGraphicsLinearLayout *irHsWidgetLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
+        irHsWidgetLayout->addItem(irHsWidget);
+        setLayout(irHsWidgetLayout);
+
+        mGoToIrLabel      = qobject_cast<HbLabel *>(uiLoader->findWidget(KGoToIrLabel));
+        mLogoLabel        = qobject_cast<HbLabel *>(uiLoader->findWidget(KLogoLabel));
+        mControlLabel     = qobject_cast<HbLabel *>(uiLoader->findWidget(KControlLabel));
+        mInfoControlArea  = qobject_cast<HbWidget *>(uiLoader->findWidget(KInfoControlArea));
+        mCentralArea      = qobject_cast<HbWidget *>(uiLoader->findWidget(KCentrolArea));
+
+        // make system's hs backgourd item under logo
+        irHsWidgetBgItem->stackBefore(mLogoLabel);
+
+        // set font for station name line
+        mStationNameLabel = qobject_cast<HbLabel *>(uiLoader->findWidget(KFirstRowLabel));
+        mStationNameLabel->setTextColor(HbColorScheme::color(KStationNameColor));
+
+        // set font for meta data line
+        mMetadataLabel = qobject_cast<HbLabel *>(uiLoader->findWidget(KSecondRowLabel));
+        mMetadataLabel->setTextColor(HbColorScheme::color(KMetaDataColor));
+
+        // Create animation.
+        HbIconAnimationManager *animationManager = HbIconAnimationManager::global();
+        HbIconAnimationDefinition animationDefinition;
+        HbIconAnimationDefinition::AnimationFrame animationFrame;
+        QList<HbIconAnimationDefinition::AnimationFrame> animationFrameList;
+        
+        QString animationFrameIconName;
+        for (int i = 1; i < 11; i++)
+        {
+            animationFrame.duration = 100;
+            animationFrameIconName.clear();
+            animationFrameIconName.append(KLoadingAnimationPrefix);
+            animationFrameIconName.append(animationFrameIconName.number(i));
+            animationFrame.iconName = animationFrameIconName;
+            animationFrameList.append(animationFrame);
+        }
+        animationDefinition.setPlayMode(HbIconAnimationDefinition::Loop);
+        animationDefinition.setFrameList(animationFrameList);
+        animationManager->addDefinition(KLoadingIconName, animationDefinition);
+
+        // Construct an icon using the animation definition.
+        mLoadingIcon.setIconName(KLoadingIconName);        
+        
+        // install event filter to widget
+        mGoToIrLabel->installEventFilter(this);
+        mControlLabel->installEventFilter(this);
+        mLogoLabel->installEventFilter(this);
+        mCentralArea->installEventFilter(this);
+    }
+    
+    delete uiLoader;
+}
+
+void IrHsWidget::initHomeSreenWidget()
+{
+    if (mServiceClient->isStationPlayed())
+    {
+        loadStoppedLayout();
+        QString stationName;
+        if (mServiceClient->loadStationName(stationName))
+        {
+            mStationNameLabel->setPlainText(stationName);
+        }
+        
+        if (mServiceClient->loadStationLogoFlag())
+        {
+            loadStationLogo();
+        }
+    }
+    else
+    {
+        loadInitLayout();
+    }
+}
+
+void IrHsWidget::setupConnection()
+{
+    // signal - slot for service event
+    QObject::connect(mServiceClient, SIGNAL(stationNameUpdated(QString)),
+        this, SLOT(handleStationNameUpdated(QString)));
+    QObject::connect(mServiceClient, SIGNAL(stationLogoUpdated(bool)),
+        this, SLOT(handleStationLogoUpdated(bool)));
+    QObject::connect(mServiceClient, SIGNAL(metaDataUpdated(QString)),
+        this, SLOT(handleMetaDataUpdated(QString)));
+    QObject::connect(mServiceClient, SIGNAL(irStateChanged(IrAppState::Type)),
+        this, SLOT(handleIrStateUpdated(IrAppState::Type)));
+    QObject::connect(mServiceClient, SIGNAL(controlFailed()),
+        this, SLOT(handleControlFailed()));    
+}
+
+bool IrHsWidget::eventFilter(QObject *aObject, QEvent *aEvent)
+{
+    bool eventWasConsumed = false;
+    QString objectName     = aObject->objectName();
+    QEvent::Type eventType = aEvent->type();
+    
+    if (KGoToIrLabel == objectName)
+    {
+        if (QEvent::GraphicsSceneMousePress == eventType)
+        {
+            eventWasConsumed = true;
+            handleGoToIrAreaAction();
+        }
+    }
+    else if (KLogoLabel == objectName)
+    {
+        if (QEvent::GraphicsSceneMousePress == eventType)
+        {
+            eventWasConsumed = true;
+            handleLogoAreaAction();
+        }
+    }
+    else if (KControlLabel == objectName)
+    {
+        if (QEvent::GraphicsSceneMousePress == eventType)
+        {
+            eventWasConsumed = true;
+            handleControlAreaAction();
+        }
+    }
+    else if (KCentrolArea == objectName)
+    {
+        if (QEvent::GraphicsSceneMousePress == eventType)
+        {
+            eventWasConsumed = true;
+            handleCentralAreaAction();
+        }
+    }
+        
+    return eventWasConsumed;
+}
+
+// ================ handle user press event ===============
+void IrHsWidget::handleLogoAreaAction()
+{
+    switch (mIrState)
+    {
+        case IrAppState::NoRunInit:
+        case IrAppState::NoRunStopped:
+            mServiceClient->launchIrNormally();
+            break;
+            
+        case IrAppState::RunningInit:
+        case IrAppState::RunningStopped:
+        case IrAppState::Playing:
+        case IrAppState::Loading:
+            mServiceClient->bringIrForeground();
+            break;
+
+        default:
+            break;
+    }
+}
+
+void IrHsWidget::handleControlAreaAction()
+{
+    switch (mIrState)
+    {
+        case IrAppState::NoRunStopped:          
+            mServiceClient->launchIrNowPlaying();
+            loadLoadingLayout();              
+            break;
+                    
+        case IrAppState::RunningStopped:
+            mServiceClient->startPlaying();
+            loadLoadingLayout();         
+            break;
+                    
+        case IrAppState::Playing:
+            mServiceClient->stopPlaying();
+            loadStoppedLayout();          
+            break;
+            
+        case IrAppState::Loading: 
+            mServiceClient->cancelLoading();
+            loadStoppedLayout();                     
+            break;       
+
+        default:
+            break;
+    }
+}
+
+void IrHsWidget::handleGoToIrAreaAction()
+{
+    handleLogoAreaAction();
+}
+
+void IrHsWidget::handleCentralAreaAction()
+{
+    handleLogoAreaAction();
+}
+
+void IrHsWidget::handleControlFailed()
+{
+    switch (mIrHsWidgetState)
+    {
+        case EInit:     // LAF == [logo][go to interneat radio]
+            loadInitLayout();
+            break;
+
+        case EPlaying:  // LAF == [logo][StationInfo][Play]
+            loadPlayingLayout();
+            break;
+
+        case EStopped:  // LAF == [logo][StationInfo][Stop]
+            loadStoppedLayout();
+            break;
+
+        case ELoading:  // LAF == [logo][StationInfo][Loading]
+            loadLoadingLayout();
+            break;
+
+        default:
+            break;
+    }    
+}
+
+
+// ======== for service notification ========
+void IrHsWidget::handleStationNameUpdated(const QString &aStationName)
+{
+    if (mStationNameLabel->plainText() != aStationName)
+    {
+        mStationNameLabel->setPlainText(aStationName);
+    }
+}
+
+void IrHsWidget::handleStationLogoUpdated(bool aLogoAvailable)
+{    
+    if (aLogoAvailable)
+    {
+        loadStationLogo();
+    }
+    else
+    {
+        mLogoLabel->setIcon(KDefaultStationLogo);
+    }
+}
+
+void IrHsWidget::handleMetaDataUpdated(const QString &aMetaData)
+{
+    if (mMetadataLabel->plainText() != aMetaData)
+    {
+        mMetadataLabel->setPlainText(aMetaData);
+    }    
+}
+
+
+void IrHsWidget::handleIrStateUpdated(IrAppState::Type aNewState)
+{
+    if (aNewState == mIrState)
+    {
+        return;
+    }
+    
+    mIrState = aNewState;
+    switch (mIrState)
+    {
+        case IrAppState::NoRunInit:
+        case IrAppState::RunningInit:   // LAF == [logo][go to interneat radio]
+            handleHsWidgetStateChange(EInit);
+            break;
+
+        case IrAppState::NoRunStopped:
+        case IrAppState::RunningStopped: // LAF == [logo][StationInfo][Play]
+            handleHsWidgetStateChange(EStopped);
+            break;
+
+        case IrAppState::Playing:        // LAF == [logo][StationInfo][Stop]
+            handleHsWidgetStateChange(EPlaying);
+            break;
+
+        case IrAppState::Loading:        // LAF == [logo][StationInfo][Loading]
+            handleHsWidgetStateChange(ELoading);
+            break;
+
+        default:
+            break;
+    }
+}
+
+void IrHsWidget::handleHsWidgetStateChange(IrHsWidgetState aNewState)
+{
+    if (aNewState == mIrHsWidgetState)
+    {
+        return;
+    }
+    
+    mIrHsWidgetState = aNewState;
+    switch (mIrHsWidgetState)
+    {
+        case EInit:     // LAF == [logo][go to interneat radio]
+            loadInitLayout();
+            break;
+
+        case EPlaying:  // LAF == [logo][StationInfo][Play]
+            loadPlayingLayout();
+            break;
+
+        case EStopped:  // LAF == [logo][StationInfo][Stop]
+            loadStoppedLayout();
+            break;
+
+        case ELoading:  // LAF == [logo][StationInfo][Loading]
+            loadLoadingLayout();
+            break;
+
+        default:
+            break;
+    }
+}
+// LAF == [logo][go to interneat radio]
+void IrHsWidget::loadInitLayout()
+{
+    mInfoControlArea->hide();
+    mGoToIrLabel->show();
+}
+
+// LAF == [logo][StationInfo][Play]
+void IrHsWidget::loadStoppedLayout()
+{
+    mGoToIrLabel->hide();
+    mInfoControlArea->show();
+    mMetadataLabel->setPlainText(QString(""));
+    mControlLabel->setIcon(KPlayButtonIcon);
+}
+
+// LAF == [logo][StationInfo][Stop]
+void IrHsWidget::loadPlayingLayout()
+{
+    mGoToIrLabel->hide();
+    mInfoControlArea->show();
+    mControlLabel->setIcon(KStopButtonIcon);      
+}
+
+// LAF == [logo][StationInfo][Loading]
+void IrHsWidget::loadLoadingLayout()
+{
+    mGoToIrLabel->hide();
+    mInfoControlArea->show();
+    mMetadataLabel->setPlainText(QString(""));
+    mControlLabel->setIcon(mLoadingIcon);   
+}
+
+void IrHsWidget::loadStationLogo()
+{
+    QSettings settings(KIrSettingOrganization, KIrSettingApplicaton);
+    if (settings.value(KIrSettingStationLogo).canConvert<QPixmap>())
+    {
+        QPixmap logoPixmap = settings.value(KIrSettingStationLogo).value<QPixmap>();
+        QPixmap newLogoPixmap = 
+             logoPixmap.scaled(QSize(KIrHsWidgetLogoSize,KIrHsWidgetLogoSize),Qt::KeepAspectRatio);
+        QIcon logoQIcon(newLogoPixmap);
+        HbIcon logoHbIcon(logoQIcon);            
+        mLogoLabel->setIcon(logoHbIcon);
+    }  
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irhswidgetplugin.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Internet Radio home screen widget plugin
+*
+*/
+
+#include <qserviceinterfacedescriptor.h>
+#include <qabstractsecuritysession.h>
+#include <qservicecontext.h>
+
+#include "irhswidgetplugin.h"
+#include "irhswidget.h"
+
+
+/*!
+    Initialize plugin for Internet Radio home screen widget. Contains necessary information about
+    the internet radio widget that it can be loaded through QT Service Framework.
+*/
+QObject *IrHsWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &aDescriptor,
+                                             QServiceContext *aContext,
+                                             QAbstractSecuritySession *aSession)
+{
+    Q_UNUSED(aContext);
+    Q_UNUSED(aSession);
+
+    if (aDescriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget"))
+    {
+        return new IrHsWidget();
+    }
+    else
+    {
+        return 0;
+    }
+}
+
+Q_EXPORT_PLUGIN2(irhswidgetplugin, IrHsWidgetPlugin)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irhswidgetplugin/src/irserviceclient.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,507 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: internet radio hs widget service client
+*
+*/
+
+// System includes
+#include <QSettings>
+#include <QVariant>
+#include <QString>
+#include <hbicon.h>
+#include <xqserviceglobal.h>
+#include <xqservicerequest.h>
+
+
+// User includes
+#include "irserviceclient.h"
+#include "irservicedata.h"
+
+// Constants
+// For services via Qt HighWay
+static const QString KIrServiceName = "internet_radio_10_1";
+static const QString KIrServiceControlInterfaceName = "com.nokia.symbian.IInternetRadioControl";
+static const QString KIrServiceControlOperation     = "handleCmd(int)";
+static const QString KIrServiceMonitorInterfaceName = "com.nokia.symbian.IInternetRadioMonitor";
+static const QString KIrServiceMonitorOperation     = "registerNotifications()";
+static const QString KIrServiceRefreshOperation     = "refreshAllData()";
+
+// ==================== MEMBER FUNCTIONS ======================
+// Constructor
+IrServiceClient::IrServiceClient(QObject *aParent) :
+    QObject(aParent),
+    mIrAppInspector(NULL),
+    mMonitorReqOngoing(false),    
+    mControlReqOngoing(false),
+    mMonitorRequest(NULL),
+    mRefreshRequest(NULL),
+    mControlRequest(NULL)
+{
+    mIrAppInspector = new IrAppInspector(this);
+    
+    QObject::connect(mIrAppInspector, SIGNAL(irRunningStatusChanged(IrAppInspector::IrRunningStatus)),
+        this, SLOT(handleIrRunningStatusChanged(IrAppInspector::IrRunningStatus)));
+}
+
+// Destructor
+IrServiceClient::~IrServiceClient()
+{   
+    delete mMonitorRequest;
+    mMonitorRequest = NULL;
+    
+    delete mRefreshRequest;
+    mRefreshRequest = NULL;
+    
+    delete mControlRequest;
+    mControlRequest = NULL;
+}
+
+bool IrServiceClient::startMonitoringIrState()
+{
+    bool retVal = false;
+    if (mIrAppInspector->isIrRunning())
+    {
+        retVal = doSendRefreshRequest();
+    }
+    else
+    {
+        if (isStationPlayed())
+        {
+            initHsWidgetNoRunStopped();
+        }
+        else
+        {
+            emit irStateChanged(IrAppState::NoRunInit);
+        }
+    }
+    
+    return mIrAppInspector->startInspectingIrRunningStatus() && retVal;    
+}
+
+void IrServiceClient::stopMonitoringIrState()
+{
+    delete mMonitorRequest;
+    mMonitorRequest = NULL;
+
+    delete mRefreshRequest;
+    mRefreshRequest = NULL;
+}
+
+void IrServiceClient::initHsWidgetNoRunStopped()
+{
+    emit irStateChanged(IrAppState::NoRunStopped);
+    
+    QString stationName;
+    if (loadStationName(stationName))
+    {
+        emit stationNameUpdated(stationName);
+    }
+    else
+    {
+        emit stationNameUpdated(QString(""));
+    }
+    
+    emit stationLogoUpdated(loadStationLogoFlag());
+}
+
+/******************************************************************
+****************   Monitor Service Request  **********************
+*******************************************************************/
+bool IrServiceClient::doSendMonitorRequest()
+{
+    if(mMonitorReqOngoing)
+    {
+        return false;
+    }
+    
+    if (NULL == mMonitorRequest
+        &&!createMonitorServiceRequest())
+    {
+        return false;
+    }
+
+    prepareRequestInfo(mMonitorRequest, DoNotChange);
+    return mMonitorRequest->send();
+}
+
+bool IrServiceClient::createMonitorServiceRequest()
+{
+    bool retVal = false;
+
+    if (NULL == mMonitorRequest)
+    {
+        mMonitorRequest = mApplicationManager.create(KIrServiceName,
+                KIrServiceMonitorInterfaceName,
+                KIrServiceMonitorOperation,
+                false);
+
+        if (mMonitorRequest)
+        {
+            retVal = true;
+
+            connect(mMonitorRequest, SIGNAL(requestOk(const QVariant&)),
+                this, SLOT(handleMonitorRequestOk(const QVariant&)));
+            connect(mMonitorRequest, SIGNAL(requestError(int,const QString&)),
+                this, SLOT(handleMonitorRequestError(int,const QString&)));
+
+            mMonitorRequest->setEmbedded(false);
+            mMonitorRequest->setSynchronous(false);
+        }
+    }
+    else
+    {
+        retVal = true;
+    }
+
+    return retVal;
+}
+
+// ==================== Refresh Service Request ===========================
+bool IrServiceClient::doSendRefreshRequest()
+{
+    if(mMonitorReqOngoing)
+    {
+        return false;
+    }
+    
+    if (NULL == mRefreshRequest
+        && !createRefreshServiceRequest())
+    {
+        return false;
+    }
+       
+    prepareRequestInfo(mRefreshRequest, DoNotChange);        
+    return mRefreshRequest->send();
+}
+
+bool IrServiceClient::createRefreshServiceRequest()
+{
+    bool retVal = false;
+
+    if (NULL == mRefreshRequest)
+    {
+        mRefreshRequest = mApplicationManager.create(KIrServiceName,
+                KIrServiceMonitorInterfaceName,
+                KIrServiceRefreshOperation,
+                false);
+
+        if (mRefreshRequest)
+        {
+            retVal = true;
+
+            connect(mRefreshRequest, SIGNAL(requestOk(const QVariant&)),
+                this, SLOT(handleMonitorRequestOk(const QVariant&)));
+            connect(mRefreshRequest, SIGNAL(requestError(int,const QString&)),
+                this, SLOT(handleMonitorRequestError(int,const QString&)));
+            
+            mRefreshRequest->setEmbedded(false);
+            mRefreshRequest->setSynchronous(false);
+        }
+    }
+    else
+    {
+        retVal = true;
+    }
+
+    return retVal;
+}
+
+void IrServiceClient::handleMonitorRequestOk(const QVariant &aRetValue)
+{
+    mMonitorReqOngoing = false;
+    
+    doSendMonitorRequest();
+
+    if (aRetValue.isValid()
+         && aRetValue.canConvert(QVariant::List))
+    {
+        QVariantList dataList = aRetValue.toList();
+        foreach (const QVariant& data, dataList)
+        {
+            if (data.canConvert<IrServiceData>())
+            {
+                IrServiceData serviceData = data.value<IrServiceData>();
+                processNotificationData(serviceData);
+            }
+        }
+    }
+}
+
+void IrServiceClient::handleMonitorRequestError(int aErrCode, const QString &aErrMessage)
+{
+    mMonitorReqOngoing = false;
+    
+    Q_UNUSED(aErrCode);
+    Q_UNUSED(aErrMessage);
+}
+
+/******************************************************************
+****************   Control Service Request  **********************
+*******************************************************************/
+bool IrServiceClient::bringIrForeground()
+{
+    QVariant commandArgument(QVariant::Int);
+    commandArgument.setValue((int)IrServiceCmd::Foreground);
+    return doSendControlRequest(commandArgument, true, ToForeground);
+}
+
+bool IrServiceClient::launchIrNormally()
+{
+    QVariant commandArgument(QVariant::Int);
+    commandArgument.setValue((int)IrServiceCmd::LaunchNormally);
+    return doSendControlRequest(commandArgument, true, ToForeground);
+}
+
+bool IrServiceClient::launchIrNowPlaying()
+{
+    QVariant commandArgument(QVariant::Int);
+    commandArgument.setValue((int)IrServiceCmd::LaunchNowPlayingView);
+    return doSendControlRequest(commandArgument, false, ToBackground);
+}
+
+
+bool IrServiceClient::startPlaying()
+{
+    QVariant commandArgument(QVariant::Int);
+    commandArgument.setValue((int)IrServiceCmd::Play);
+    return doSendControlRequest(commandArgument, true, DoNotChange);
+}
+
+
+bool IrServiceClient::stopPlaying()
+{
+    QVariant commandArgument(QVariant::Int);
+    commandArgument.setValue((int)IrServiceCmd::Stop);
+    return doSendControlRequest(commandArgument, true, DoNotChange);
+}
+
+bool IrServiceClient::cancelLoading()
+{
+    QVariant commandArgument(QVariant::Int);
+    commandArgument.setValue((int)IrServiceCmd::Cancel);
+    return doSendControlRequest(commandArgument, true, DoNotChange);
+}
+
+bool IrServiceClient::doSendControlRequest(const QVariant &aArgument, bool aIsSync, IrAppVisibilty aVisibility)
+{
+    if(mControlReqOngoing)
+    {
+        return false;
+    }
+    
+    if (NULL == mControlRequest &&
+        !createControlServiceRequest())
+    {
+        return false;
+    }
+
+    QList<QVariant> arguments;
+    arguments.append(aArgument);
+    mControlRequest->setArguments(arguments);
+
+    prepareRequestInfo(mControlRequest, aVisibility);
+    mControlRequest->setSynchronous(aIsSync);    
+    return mControlRequest->send();
+}
+
+bool IrServiceClient::createControlServiceRequest()
+{
+    bool retVal = false;
+
+    if (NULL == mControlRequest)
+    {
+        mControlRequest = mApplicationManager.create(KIrServiceName,
+                KIrServiceControlInterfaceName,
+                KIrServiceControlOperation,
+                false);
+
+        if (mControlRequest)
+        {
+            retVal = true;
+            
+            connect(mControlRequest, SIGNAL(requestOk(const QVariant&)),
+                this, SLOT(handleControlRequestOk(const QVariant&)));
+            connect(mControlRequest, SIGNAL(requestError(int,const QString&)),
+                this, SLOT(handleControlRequestError(int,const QString&)));
+            
+            mControlRequest->setEmbedded(false);
+        }
+    }
+    else
+    {
+        retVal = true;
+    }
+
+    return retVal;
+}
+
+void IrServiceClient::handleControlRequestOk(const QVariant &aRetValue)
+{
+    mControlReqOngoing = false;    
+    
+    if (aRetValue.isValid()
+         && aRetValue.canConvert(QVariant::Int))
+    {
+        if (IrServiceResult::Fail == aRetValue.toInt())
+        {
+            emit controlFailed();
+        }
+    }    
+}
+
+void IrServiceClient::handleControlRequestError(int aErrCode, const QString &aErrMessage)
+{
+    mControlReqOngoing = false;
+    
+    emit controlFailed();
+    
+    Q_UNUSED(aErrCode);
+    Q_UNUSED(aErrMessage);    
+}
+/******************************************************************
+*************************   Others   ******************************
+*******************************************************************/
+// slot connected to signals from IrAppInspector,
+// used to monitor the startup / exit of IR
+void IrServiceClient::handleIrRunningStatusChanged(IrAppInspector::IrRunningStatus aNewStatus)
+{
+    switch (aNewStatus)
+    {
+        case IrAppInspector::StartingUp :
+            doSendRefreshRequest();
+            break;
+            
+        case IrAppInspector::Exiting :
+            stopMonitoringIrState();
+                    
+            if (isStationPlayed())
+            {
+                resetHsWidgetExitStopped();
+            }
+            else
+            {
+                emit irStateChanged(IrAppState::NoRunInit);
+            }            
+            break;
+            
+        default:
+            break;
+    }
+}
+
+void IrServiceClient::resetHsWidgetExitStopped()
+{
+    emit irStateChanged(IrAppState::NoRunStopped);
+    emit metaDataUpdated(QString(""));
+}
+
+// used to process service data sent from IR app.
+void IrServiceClient::processNotificationData(const IrServiceData &aServiceData)
+{
+    QVariant data = aServiceData.mData;
+    if (!data.isValid())
+    {
+        return;
+    }
+    switch (aServiceData.mType)
+    {
+        case IrServiceNotification::StationName:
+            if (data.canConvert(QVariant::String))
+            {
+                emit stationNameUpdated(data.toString());
+            }
+            break;
+
+        case IrServiceNotification::MetaData:
+            if (data.canConvert(QVariant::String))
+            {
+                emit metaDataUpdated(data.toString());
+            }
+            break;
+
+        case IrServiceNotification::StationLogo:
+            if (data.canConvert(QVariant::Bool))
+            {
+                emit stationLogoUpdated(data.toBool());
+            }            
+            break;
+
+        case IrServiceNotification::IrState:
+            if (data.canConvert(QVariant::Int))
+            {
+                emit irStateChanged((IrAppState::Type)data.toInt());
+            }
+            break;
+
+        default:
+            break;
+    }
+
+}
+
+// prepare the request send to IR app, including control request, refresh request, monitor request.
+void IrServiceClient::prepareRequestInfo(XQAiwRequest *aRequest, IrAppVisibilty aVisibility)
+{
+    if (NULL == aRequest)
+    {
+        return;
+    } 
+        
+    XQRequestInfo reqInfo;
+    switch (aVisibility)
+    {
+        case ToForeground:
+            reqInfo.setForeground(true);
+            break;
+        case ToBackground:
+            reqInfo.setBackground(true);
+            break;
+        case DoNotChange:
+            break;
+        default:
+            break;
+    }
+
+    aRequest->setInfo(reqInfo);
+}
+
+bool IrServiceClient::isStationPlayed()
+{
+    QSettings settings(KIrSettingOrganization, KIrSettingApplicaton);
+    QString stationName = settings.value(KIrSettingStationName,KIrDefaultStationName).toString();
+    return stationName != KIrDefaultStationName;
+}
+
+bool IrServiceClient::loadStationLogoFlag()
+{
+    QSettings settings(KIrSettingOrganization, KIrSettingApplicaton);
+    return settings.value(KIrSettingStationLogoAvailable,false).toBool();
+}
+
+bool IrServiceClient::loadStationName(QString &aStationName)
+{
+    QSettings settings(KIrSettingOrganization, KIrSettingApplicaton);
+    aStationName = settings.value(KIrSettingStationName,KIrDefaultStationName).toString();
+    if(aStationName != KIrDefaultStationName)
+    {
+        return true;
+    }
+    else
+    {
+        return false;
+    }
+}
+
+Q_IMPLEMENT_USER_METATYPE(IrServiceData)
+
--- a/qtinternetradio/irqcommon/inc/irqisdsdatastructure.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqcommon/inc/irqisdsdatastructure.h	Wed Jun 23 18:04:00 2010 +0300
@@ -103,7 +103,6 @@
    int uniqID; //unique id generated for the preset saved at favourite
    
    int type; //0 for user defined 1 for isds type.
-   int index;//index in the preset table
    int presetId;//isds generated preset id
    QString name; //preset name        
    QString languageCode;//preset language code
@@ -118,7 +117,6 @@
    QString shortDesc;//channel short desription    
    QString genreName;//channel genre name 
    QString genreId;//channel genre id     
-   int bitrate;//channel bitrate
 
    //in our spec but not in current code 
    QString advertisementUrl; 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqcommon/inc/irservicedata.h	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef IRSERVICEDATA_H
+#define IRSERVICEDATA_H
+
+#include <QVariant>
+#include <QMetaType>
+#include <xqserviceipcmarshal.h>
+
+class IrServiceData
+{
+public:
+
+    IrServiceData() : mType(-1) {}
+    IrServiceData(int aType, const QVariant &aData) :
+        mType(aType),
+        mData(aData)
+    {}
+
+    virtual ~IrServiceData() {}
+
+    template <typename Stream> void serialize(Stream &aStream) const;
+    template <typename Stream> void deserialize(Stream &aStream);
+
+    int         mType;
+    QVariant    mData;
+};
+
+template <typename Stream> inline void IrServiceData::serialize(Stream &aStream) const
+{
+    aStream << mType;
+    aStream << mData;
+}
+
+template <typename Stream> inline void IrServiceData::deserialize(Stream &aStream)
+{
+    aStream >> mType;
+    aStream >> mData;
+}
+
+Q_DECLARE_USER_METATYPE(IrServiceData)
+
+
+
+#endif // IRSERVICEDATA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/irqcommon/inc/irservicedef.h	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef IRSERVICEDEF_H
+#define IRSERVICEDEF_H
+
+#include <QString>
+
+// For settings via QSetting
+static const QString KIrSettingOrganization = "nokia.s60.mymex";
+static const QString KIrSettingApplicaton   = "internetradio";
+static const QString KIrSettingStationName  = "lastplayedinfo/station_name";
+static const QString KIrDefaultStationName  = "no_station_played_yet";
+static const QString KIrSettingStationLogo  = "lastplayedinfo/station_logo";
+static const QString KIrSettingStationLogoAvailable  = "lastplayedinfo/station_logo_available";
+
+// For P&S XQSettingsManager
+const long int KInternetRadioPSUid = 0xE28364bb;   // Internet Radio's UID3
+const unsigned long int KInternetRadioStartupKey = 0x00000035;  // a empty slot in internetradio2.0\include\irpubsubkeys.h
+
+
+Q_ENUMS(IrServiceCmd::Type IrServiceNotification::Type IrAppState::Type IrServiceResult::Type)
+
+namespace IrServiceCmd
+{
+    enum Type
+    {
+        Unknown                 = -1,
+        LaunchNormally          = 0,
+        LaunchNowPlayingView    = 1,
+        Play                    = 2,
+        Stop                    = 3,
+        Cancel                  = 4,
+        Foreground              = 5
+    };
+}
+
+namespace IrServiceNotification
+{
+    enum Type
+    {
+        Unknown       = -1,
+        IrState       = 0,
+        StationLogo   = 1,
+        StationName   = 2,
+        MetaData      = 3
+    };
+}
+
+
+namespace IrAppState
+{
+    enum Type
+    {
+        Unknown         = -1,
+        NoRunInit       = 0,  // internet radio is not running, and no station has been played yet
+        NoRunStopped    = 1,  // internet radio is not running, with last played station
+        RunningInit     = 2,  // running, no station has been played yet
+        RunningStopped  = 3,  // running, with last played station
+        Playing         = 4,
+        Loading         = 5
+    };
+}
+
+namespace IrServiceResult
+{
+    enum Type
+    {
+        Success  = -1,
+        Fail     = 0
+    };
+}
+
+#endif // IRSERVICEDEF_H
--- a/qtinternetradio/irqcommon/irqcommon.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqcommon/irqcommon.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -18,7 +18,7 @@
 
 MOC_DIR = moc
 DEPENDPATH = src
-
+defFilePath = ..
 INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
 
 INCLUDEPATH += ../../internetradio2.0/datastructuresinc \
@@ -31,6 +31,7 @@
         -lapgrfx \
         -lxqsettingsmanager \
         -lapmime \
+        -lapparc \
         -lpsclient100
         
 symbian{
@@ -42,7 +43,9 @@
 
 #header files list
 HEADERS += inc\irqisdsdatastructure.h \
-           inc\irqutility.h
+           inc\irqutility.h \
+           inc\irservicedata.h \
+           inc\irservicedef.h
                        
 
 #source files list
--- a/qtinternetradio/irqcommon/src/irqisdsdatastructure.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqcommon/src/irqisdsdatastructure.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -31,8 +31,8 @@
 
 //we need to initialize all the member for sometimes, it will 
 //crash by overflow if we don't do this. 
-EXPORT_C IRQPreset::IRQPreset():uniqID(0),type(0),index(0),presetId(0),
-                                bitrate(0),iIsSorted(false),iChannelUrlCount(0)
+EXPORT_C IRQPreset::IRQPreset():uniqID(0),type(0),presetId(0),
+                                iIsSorted(false),iChannelUrlCount(0)
 {
  
 }
@@ -63,7 +63,6 @@
     this->imgUrl = aOther.imgUrl;
     this->advertisementInUse = aOther.advertisementInUse;
     this->advertisementUrl = aOther.advertisementUrl;
-    this->bitrate = aOther.bitrate;
     this->genreId = aOther.genreId;
     this->genreName = aOther.genreName;
     this->shortDesc = aOther.shortDesc;
@@ -78,7 +77,6 @@
     this->languageName = aOther.languageName;
     this->name = aOther.name;
     this->presetId = aOther.presetId;
-    this->index = aOther.index;
     this->type = aOther.type;
     this->iChannelUrlCount = aOther.iChannelUrlCount;
     this->uniqID = aOther.uniqID;
@@ -87,7 +85,7 @@
 
 EXPORT_C void IRQPreset::internalize(QDataStream &aStream)
 {
-    aStream>>uniqID>>presetId>>index>>type>>iChannelUrlCount;
+    aStream>>uniqID>>presetId>>type>>iChannelUrlCount;
     
     aStream>>languageCode>>languageName 
            >>countryCode>>countryName
@@ -108,7 +106,7 @@
 
 EXPORT_C void IRQPreset::externalize(QDataStream &aStream) const
 {
-    aStream<<uniqID<<presetId<<index<<type<<iChannelUrlCount;
+    aStream<<uniqID<<presetId<<type<<iChannelUrlCount;
     
     aStream<<languageCode<<languageName
            <<countryCode<<countryName
--- a/qtinternetradio/irqcommon/src/irqutility.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqcommon/src/irqutility.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -155,7 +155,6 @@
 {
     aIRQPreset.uniqID = aCIRPreset.Id(); 
     aIRQPreset.type = aCIRPreset.GetChannelType();
-    aIRQPreset.index  = aCIRPreset.Index();
     
     aIRQPreset.presetId = aCIRPreset.GetId();
     aIRQPreset.iChannelUrlCount  = aCIRPreset.GetUrlCount();
@@ -274,28 +273,28 @@
     
     bool ret = false;
     TUid songRecognitionAppUid = getSongRecognitionAppUid();
-    TApaAppInfo appInfo;
+    TApaAppInfo *appInfo = new TApaAppInfo;
     lsSession.GetAllApps();  
 
-    while( KErrNone == lsSession.GetNextApp(appInfo) )
+    while( KErrNone == lsSession.GetNextApp(*appInfo) )
     {
         TBool appIsHidden = EFalse;
         TApaAppCapabilityBuf capability;
-        if( KErrNone == lsSession.GetAppCapability(capability,appInfo.iUid) )
+        if( KErrNone == lsSession.GetAppCapability(capability,appInfo->iUid) )
         {
             appIsHidden = capability().iAppIsHidden;
         }
         
         if(!appIsHidden)
         {
-            if(songRecognitionAppUid == appInfo.iUid)
+            if(songRecognitionAppUid == appInfo->iUid)
             {
                 ret = true;
                 break;
             }
         }
     }
-    
+    delete appInfo;
     lsSession.Close();
     return ret;         
 }   
--- a/qtinternetradio/irqfavoritesdb/irqfavoritesdb.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqfavoritesdb/irqfavoritesdb.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -19,6 +19,7 @@
 QT -= gui
 CONFIG += dll
 DEFINES += BUILD_IRQFAVORITES_DLL
+defFilePath = ..
 
 MOC_DIR = moc
 DEPENDPATH = src
--- a/qtinternetradio/irqisdsclient/irqisdsclient.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqisdsclient/irqisdsclient.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -17,6 +17,7 @@
 TARGET = irqisdsclient
 TARGET.CAPABILITY += CAP_GENERAL_DLL
 
+defFilePath = ..
 MOC_DIR = moc
 DEPENDPATH = src
 
--- a/qtinternetradio/irqlogger/irqlogger.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqlogger/irqlogger.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -19,7 +19,7 @@
 TARGET      =  irqlogger
 CONFIG      += dll
 DEFINES     += BUILD_IRQLOGGER_DLL
-
+defFilePath = ..
 
 
 MOC_DIR = moc
--- a/qtinternetradio/irqmediaplayer/irqmediaplayer.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqmediaplayer/irqmediaplayer.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -16,6 +16,7 @@
 TARGET = irqmediaplayer
 TARGET.CAPABILITY = CAP_GENERAL_DLL
 
+defFilePath = ..
 DEFINES += MMFADAPTER
 
 DEPENDPATH += src
--- a/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontroller.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontroller.h	Wed Jun 23 18:04:00 2010 +0300
@@ -60,30 +60,6 @@
      *  @return int Error code
      */
     IMPORT_C IRQError getIAPId(unsigned long& aIapId) const;
-
-    /**
-     *  Returns the list of available access points
-     *  @return QStringList &aList specifying the access point names
-     */
-    IMPORT_C void getAccessPointList(QStringList &aList);
-
-    /**
-     *  Returns the list of iap ids for available access points
-     *  @return QList<unsigned long> &aList specifying the iap ids
-     */
-    IMPORT_C void getApIdList(QList<unsigned long> &aList);
-
-    /**
-     *  Returns the list of bearer ids for available access points
-     *  @return QList<unsigned long> &aList specifying the bearer ids
-     */
-    IMPORT_C void getBearerList(QList<unsigned long> &aList);
-
-    /**
-     *  Returns the list of network ids for available access points
-     *  @return QList<unsigned long> &aList specifying the network ids
-     */
-    IMPORT_C void getNetworkList(QList<unsigned long> &aList);
     
     /**
      *  Configure the Access Point which is used by all the components for network connectivity
--- a/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontrollerbody.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqnetworkcontroller/inc/irqnetworkcontrollerbody.h	Wed Jun 23 18:04:00 2010 +0300
@@ -53,30 +53,6 @@
      *  @return int Error code
      */
     IRQError getIAPId(unsigned long& aIapId) const;
-
-    /**
-     *  Returns the list of available access points
-     *  @return QStringList &aList specifying the access point names
-     */
-    void getAccessPointList(QStringList &aList);
-
-    /**
-     *  Returns the list of iap ids for available access points
-     *  @return QList<unsigned long> &aList specifying the iap ids
-     */
-    void getApIdList(QList<unsigned long> &aList);
-
-    /**
-     *  Returns the list of bearer ids for available access points
-     *  @return QList<unsigned long> &aList specifying the bearer ids
-     */
-    void getBearerList(QList<unsigned long> &aList);
-
-    /**
-     *  Returns the list of network ids for available access points
-     *  @return QList<unsigned long> &aList specifying the network ids
-     */
-    void getNetworkList(QList<unsigned long> &aList);
     
     /**
      *  Configure the Access Point which is used by all the components for network connectivity
--- a/qtinternetradio/irqnetworkcontroller/irqnetworkcontroller.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqnetworkcontroller/irqnetworkcontroller.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -19,6 +19,7 @@
 
 MOC_DIR = moc
 DEPENDPATH += src
+defFilePath = ..
 
 INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE 
 INCLUDEPATH += $${OS_LAYER_PUBLIC_EXPORT_PATH(http)}
--- a/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontroller.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontroller.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -88,50 +88,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// IRQNetworkController::getAccessPointList()
-// Returns the list of available access points
-// @return QStringList &aList specifying the access point names
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getAccessPointList(QStringList &aList)
-{
-    iBody->getAccessPointList(aList);
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkController::getApIdList()
-// Returns the list of iap ids for available access points
-// @return QList<unsigned long> &aList specifying the iap ids
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getApIdList(QList<unsigned long> &aList)
-{
-    iBody->getApIdList(aList);
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkController::getBearerList()
-// Returns the list of bearer ids for available access points
-// @return QList<unsigned long> &aList specifying the bearer ids
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getBearerList(QList<unsigned long> &aList)
-{
-    iBody->getBearerList(aList);
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkController::getNetworkList()
-// Returns the list of network ids for available access points
-// @return QList<unsigned long> &aList specifying the network ids
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void IRQNetworkController::getNetworkList(QList<unsigned long> &aList)
-{
-    iBody->getNetworkList(aList);
-}
-
-// ---------------------------------------------------------------------------
 // IRQNetworkController::chooseAccessPoint()
 // Configures the Access Point which is used by all the components for network
 // connectivity
--- a/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontrollerbody.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqnetworkcontroller/src/irqnetworkcontrollerbody.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -61,68 +61,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getAccessPointList()
-// Returns the list of available access points
-// @return QStringList &aList specifying the access point names
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getAccessPointList(QStringList &aList)
-{
-    const CDesCArray *apArray = iNetworkController->GetAccessPointList();
-    int count = apArray->MdcaCount();
-    for (int i = 0; i < count; ++i)
-    {
-        QString str = QString::fromUtf16(apArray->MdcaPoint(i).Ptr(), apArray->MdcaPoint(i).Length());
-        aList.append(str);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getApIdList()
-// Returns the list of iap ids for available access points
-// @return QList<unsigned long> &aList specifying the iap ids
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getApIdList(QList<unsigned long> &aList)
-{
-    const RArray<TUint32>& accessPointIDArray = iNetworkController->GetApList();
-    for (int i = 0; i < accessPointIDArray.Count(); ++i)
-    {
-        aList.append(accessPointIDArray[i]);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getBearerList()
-// Returns the list of bearer ids for available access points
-// @return QList<unsigned long> &aList specifying the bearer ids
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getBearerList(QList<unsigned long> &aList)
-{
-    const RArray<TUint32>& bearerIDArray = iNetworkController->GetBearerList();
-    for (int i = 0; i < bearerIDArray.Count(); ++i)
-    {
-        aList.append(bearerIDArray[i]);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// IRQNetworkControllerBody::getNetworkList()
-// Returns the list of network ids for available access points
-// @return QList<unsigned long> &aList specifying the network ids
-// ---------------------------------------------------------------------------
-//
-void IRQNetworkControllerBody::getNetworkList(QList<unsigned long> &aList)
-{
-    const RArray<TUint32>& networkIDArray = iNetworkController->GetNetworkList();
-    for (int i = 0; i < networkIDArray.Count(); ++i)
-    {
-        aList.append(networkIDArray[i]);
-    }
-}
-
-// ---------------------------------------------------------------------------
 // IRQNetworkControllerBody::chooseAccessPoint()
 // Configures the Access Point which is used by all the components for network
 // connectivity
--- a/qtinternetradio/irqnwkinfoobserver/irqnwkinfoobserver.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqnwkinfoobserver/irqnwkinfoobserver.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -19,6 +19,7 @@
 
 MOC_DIR = moc
 DEPENDPATH += src
+defFilePath = ..
 
 INCLUDEPATH += inc
 
--- a/qtinternetradio/irqsettings/inc/irqsettings.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqsettings/inc/irqsettings.h	Wed Jun 23 18:04:00 2010 +0300
@@ -101,7 +101,8 @@
     /**
      *  Creates IRQSettings instance
      */
-    static IRQSettings* createInstanceL();
+    static IRQSettings* createInstance();
+	static void doCreateInstanceL(IRQSettings * aQsettings);
     
     void constructL();
 
--- a/qtinternetradio/irqsettings/irqsettings.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqsettings/irqsettings.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -19,6 +19,7 @@
 
 MOC_DIR = moc
 DEPENDPATH += src
+defFilePath = ..
 
 INCLUDEPATH += inc \
                ..\irqcommon\inc \
--- a/qtinternetradio/irqsettings/src/irqsettings.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqsettings/src/irqsettings.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -31,13 +31,7 @@
 
     if (NULL == irqsettings)
     {
-        TRAPD(error, irqsettings = createInstanceL());
-        if (KErrNone != error)
-        {
-            delete irqsettings;
-            irqsettings = NULL;
-            Dll::SetTls(NULL);
-        }
+        irqsettings = createInstance();
     }
     else
     {
@@ -366,17 +360,37 @@
 // @return IRQSettings*
 // ---------------------------------------------------------------------------
 //
-IRQSettings* IRQSettings::createInstanceL()
+IRQSettings* IRQSettings::createInstance()
 {
-    IRQSettings* irqsettings = new (ELeave) IRQSettings();
-    irqsettings->constructL();
-    User::LeaveIfError(Dll::SetTls(irqsettings));
-    irqsettings->iSingletonInstances = 1;
-
-    return irqsettings;
+    IRQSettings* irqsettings = new IRQSettings();
+    
+    TRAPD(leaveCode, doCreateInstanceL(irqsettings));
+    if (KErrNone != leaveCode)
+    {
+        delete irqsettings;
+        irqsettings = NULL;
+        return NULL;
+    }
+    else
+    {
+        irqsettings->iSingletonInstances = 1;
+        return irqsettings;
+    }
 }
 
 // ---------------------------------------------------------------------------
+// IRQSettings::doCreateInstanceL()
+// Creates IRQSettings instance
+// @return IRQSettings*
+// ---------------------------------------------------------------------------
+//
+void IRQSettings::doCreateInstanceL(IRQSettings * aQsettings)
+{
+    aQsettings->constructL();
+    Dll::SetTls(aQsettings);
+
+}
+// ---------------------------------------------------------------------------
 // IRQSettings::constructL()
 // Two-Phase Constructor.
 // ---------------------------------------------------------------------------
--- a/qtinternetradio/irqsonghistory/irqsonghistory.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqsonghistory/irqsonghistory.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -16,6 +16,8 @@
 TARGET = irqsonghistory
 TARGET.CAPABILITY = CAP_GENERAL_DLL
 
+defFilePath = ..
+
 DEPENDPATH += src ..\..\internetradio2.0\songhistorysrc
 LIBS += -lbafl -ledbms -lefsrv -lirsettings -lflogger
 
--- a/qtinternetradio/irqstatisticsreporter/irqstatisticsreporter.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqstatisticsreporter/irqstatisticsreporter.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -17,6 +17,7 @@
 QT -= gui
 CONFIG += dll
 DEFINES += BUILD_IRQSTATISTICSREPORTER_DLL
+defFilePath = ..
 
 symbian{
   TARGET.UID3 = 0xe3801560
@@ -28,7 +29,8 @@
 ########## Dependency Path ##############################
 MOC_DIR = moc
 DEPENDPATH += src
-INCLUDEPATH += inc \
+INCLUDEPATH += /epoc32/include/platform \
+               inc \
                ../irqcommon\inc \
                ../irqisdsclient/inc \
                ../irqnetworkcontroller/inc \
--- a/qtinternetradio/irqsystemeventhandler/irqsystemeventhandler.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/irqsystemeventhandler/irqsystemeventhandler.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -11,6 +11,8 @@
 DEPENDPATH += . inc src
 INCLUDEPATH += .
 
+defFilePath = ..
+
 DEFINES += BUILD_IRQSYSTEMEVENTHANDLEREXPORTS_DLL
 
 INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE \
--- a/qtinternetradio/ui/inc/irapplication.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/inc/irapplication.h	Wed Jun 23 18:04:00 2010 +0300
@@ -17,9 +17,9 @@
 #ifndef IRAPPLICATION_H
 #define IRAPPLICATION_H
 
+#include <QObject>
 #include <QEvent>
 #include <hbglobal.h>
-#include <xqserviceprovider.h>
 #include <qpoint.h>
 
 #include "irqevent.h"
@@ -40,15 +40,15 @@
 class IRQAdvClient;
 class HbProgressDialog;
 class IRQSystemEventHandler;
-class XQSharableFile;
 class IRPlayList;
 class HbIconItem;
+class IRFileViewService;
 
 #ifdef LOCALIZATION
 class QTranslator;
 #endif
 
-class IRApplication : public XQServiceProvider
+class IRApplication : public QObject
 {
     Q_OBJECT
     
@@ -74,6 +74,8 @@
     IRQAdvClient* getAdvClient(); 
     IRPlayList* getPlayList() const;
     
+    void launchStartingView(TIRViewId aViewId);
+    
 #ifdef LOCALIZATION
     /*
      * this function will take ownership of the translator
@@ -88,10 +90,6 @@
 public:
     bool iTestPreferredBitrate;
 #endif
-
-public slots:
-    void view(const QString &aFileName);
-    void view(const XQSharableFile &aSharableFile);
     
 signals:
     void quit();
@@ -114,7 +112,6 @@
     void destroyComponents();
     void setupConnection();
     void setLaunchView();
-    void launchStartingView(TIRViewId aViewId);
     void startSystemEventMonitor();
     void initApp();
     void setExitingView();
@@ -170,8 +167,8 @@
     
     IRQSystemEventHandler *iSystemEventHandler;
     
-    IRPlayList *iPlayList;
     HbIconItem          *iLoadingAnimation;    
+    IRFileViewService *iFileViewService;
 };
 
 #endif
--- a/qtinternetradio/ui/inc/irchannelmodel.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/inc/irchannelmodel.h	Wed Jun 23 18:04:00 2010 +0300
@@ -39,8 +39,8 @@
     void initWithCache();    
     void save2Cache();
     //not take ownership
-    IRQChannelItem * getChannelItemByIndex(int aIndex);
-    
+    IRQChannelItem * getChannelItemByIndex(int aIndex); 
+    void cleanupDatabase();
     void clearAndDestroyLogos();
     
 public slots:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/inc/irfileviewservice.h	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef IRFILEVIEWSERVICE_H_
+#define IRFILEVIEWSERVICE_H_
+
+#include <xqserviceprovider.h>
+
+class XQSharableFile;
+class IRPlayList;
+class IRApplication;
+
+class IRFileViewService : public XQServiceProvider
+{
+    Q_OBJECT
+    
+public:
+    IRFileViewService(IRApplication *aApplication);
+    ~IRFileViewService();
+    IRPlayList* getPlayList() const;
+    
+public slots:
+    void view(const QString &aFileName);
+    void view(const XQSharableFile &aSharableFile);
+    
+private:
+    IRApplication *iApplication;
+    IRPlayList *iPlayList;
+    
+    Q_DISABLE_COPY(IRFileViewService)
+};
+
+#endif /* IRFILEVIEWSERVICE_H_ */
--- a/qtinternetradio/ui/inc/irnowplayingview.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/inc/irnowplayingview.h	Wed Jun 23 18:04:00 2010 +0300
@@ -23,7 +23,6 @@
 class HbAction;
 class IRQPreset;
 class IRQStatisticsReporter;
-class IRQNetworkController;
 class IRQMetaData;
 class IRStationShare;
 class HbLabel;
@@ -107,7 +106,6 @@
     
 private:
     IRQStatisticsReporter *iStatisticsReporter;
-    IRQNetworkController  *iNetworkController;
     IRStationShare *iStationShare;
 
     // tool bar actions
--- a/qtinternetradio/ui/inc/irsearchchannelsview.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/inc/irsearchchannelsview.h	Wed Jun 23 18:04:00 2010 +0300
@@ -21,7 +21,7 @@
 #include "irbaseview.h"
 #include "irqenums.h"
 
-
+class HbGroupBox;
 class HbListView;
 class HbSearchPanel;
 class HbAction;
@@ -59,7 +59,8 @@
     void lazyInit();
     void startConvert(int aIndex);   
     void initTimer();
-    
+    //set the subtitle and counter;
+    void setHeadingText(const QString &aText);
 private slots: //slots
      
     void cancelRequest();
@@ -84,7 +85,7 @@
         ESearch_init = 0,
         ESearch_Loading //loading means searching or buffering.
     };    
-    
+    HbGroupBox          *iHeadingLabel;
     HbListView          *iListView;
     QString              iKeyText;
     
--- a/qtinternetradio/ui/inc/irsearchresultdb.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/inc/irsearchresultdb.h	Wed Jun 23 18:04:00 2010 +0300
@@ -34,10 +34,10 @@
 	IRQError cacheChannelList(QList<IRQChannelItem*> *aChannelList);
 	//caller needs to release the memory
 	QList<IRQChannelItem*> * getCahcedChannelList();	
+	IRQError clearCache();
     
 private:		
-    void createDBConnection();
-    IRQError clearCache();
+    void createDBConnection();    
 		
 private:
 	  QSqlDatabase         *iDB;
--- a/qtinternetradio/ui/inc/iruidefines.h	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/inc/iruidefines.h	Wed Jun 23 18:04:00 2010 +0300
@@ -70,6 +70,7 @@
 static const char* SEARCH_CHANNELS_VIEW_OBJECT_VIEW                   = "ext-IRSearchChannelsView"; 
 static const char* SEARCH_CHANNELS_VIEW_SEARCHPANEL_WIDGET            = "search_panel";
 static const char* SEARCH_CHANNELS_VIEW_SEARCHLISTVIEW_WIDGET         = "search_listview";
+static const char* SEARCH_CHANNELS_VIEW_HEADINGTEXT_WIDGET            = "headingText";
 
 // IRNowplayingView  -- Object Name
 static const char* NOW_PLAYING_VIEW_OBJECT_NAME                       = "ext-nowplayingview"; 
--- a/qtinternetradio/ui/resources/layout/abstractlistviewbase.docml	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/abstractlistviewbase.docml	Wed Jun 23 18:04:00 2010 +0300
@@ -4,7 +4,7 @@
         <string locid="txt_irad_opt_go_to_station" name="text"/>
     </object>
     <object name="setting_act" type="HbAction">
-        <string locid="txt_irad_opt_network_setting" name="text"/>
+        <string locid="txt_common_opt_settings" name="text"/>
     </object>
     <object name="exit_act" type="HbAction">
         <string locid="txt_common_opt_exit" name="text"/>
@@ -93,9 +93,6 @@
         </widget>
     </section>
     <section name="section_no_toolbar_with_heading">
-        <widget name="ext-IrAbstractListViewBase" type="HbView">
-            <widget name="viewToolbar_empty" role="HbView:toolBar" type="HbToolBar"/>
-        </widget>
         <widget name="headingText" type="HbGroupBox">
             <sizehint height="expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical))" type="PREFERRED"/>
             <sizehint height="expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical))" type="MINIMUM"/>
--- a/qtinternetradio/ui/resources/layout/nowplayingview.docml	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/nowplayingview.docml	Wed Jun 23 18:04:00 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <object name="go2station_act" type="HbAction">
         <string locid="txt_irad_opt_go_to_station" name="text"/>
     </object>
@@ -61,28 +61,27 @@
                 <linearitem itemname="station_name"/>
             </layout>
         </widget>
-        <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">            
-        </widget>
+        <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar"/>
         <string locid="txt_irad_title_internet_radio" name="title"/>
     </widget>
     <section name="song_recog_yes_section">
         <widget name="ext-nowplayingview" type="HbView">
             <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-                <ref object="songrecg_act" role="HbMenu:addAction"/>
-                <ref object="go2station_act" role="HbMenu:addAction"/>
-                <ref object="share_station_act" role="HbMenu:addAction"/>
-                <ref object="setting_act" role="HbMenu:addAction"/>
-                <ref object="exit_act" role="HbMenu:addAction"/>
+                <ref object="songrecg_act" role="HbWidget:addAction"/>
+                <ref object="go2station_act" role="HbWidget:addAction"/>
+                <ref object="share_station_act" role="HbWidget:addAction"/>
+                <ref object="setting_act" role="HbWidget:addAction"/>
+                <ref object="exit_act" role="HbWidget:addAction"/>
             </widget>
         </widget>
     </section>
     <section name="song_recog_no_section">
         <widget name="ext-nowplayingview" type="HbView">
             <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-                <ref object="go2station_act" role="HbMenu:addAction"/>
-                <ref object="share_station_act" role="HbMenu:addAction"/>
-                <ref object="setting_act" role="HbMenu:addAction"/>
-                <ref object="exit_act" role="HbMenu:addAction"/>
+                <ref object="go2station_act" role="HbWidget:addAction"/>
+                <ref object="share_station_act" role="HbWidget:addAction"/>
+                <ref object="setting_act" role="HbWidget:addAction"/>
+                <ref object="exit_act" role="HbWidget:addAction"/>
             </widget>
         </widget>
     </section>
@@ -91,7 +90,9 @@
             <widget name="station_logo" type="HbLabel">
                 <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
                 <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                <sizehint height="30un" type="FIXED" width="30un"/>
+                <sizehint height="38un" type="FIXED" width="38un"/>
+                <sizehint height="38un" type="MAXIMUM" width="38un"/>
+                <sizehint height="38un" type="MINIMUM" width="38un"/>
             </widget>
             <contentsmargins bottom="var(hb-param-margin-gene-screen)" left="var(hb-param-margin-gene-screen)" right="var(hb-param-margin-gene-screen)" top="var(hb-param-margin-gene-screen)"/>
             <layout type="anchor">
@@ -101,10 +102,10 @@
                 <anchoritem dst="song_name" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="song_name" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-horizontal)" src="artist_name" srcEdge="BOTTOM"/>
                 <anchoritem dst="song_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="station_logo" dstEdge="TOP" spacing="12un" src="" srcEdge="TOP"/>
+                <anchoritem dst="station_logo" dstEdge="TOP" spacing="5un" src="" srcEdge="TOP"/>
                 <anchoritem dst="station_logo" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
                 <anchoritem dst="artist_name" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="artist_name" dstEdge="TOP" spacing="8un" src="station_logo" srcEdge="BOTTOM"/>
+                <anchoritem dst="artist_name" dstEdge="TOP" spacing="4un" src="station_logo" srcEdge="BOTTOM"/>
                 <anchoritem dst="artist_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
@@ -113,26 +114,28 @@
         <widget name="container" role="HbView:widget" type="HbWidget">
             <widget name="station_logo" type="HbLabel">
                 <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                <sizehint height="20un" type="PREFERRED" width="20un"/>
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint height="20un" type="FIXED" width="20un"/>
+                <sizehint height="20un" type="MINIMUM" width="20un"/>
+                <sizehint height="20un" type="MAXIMUM" width="20un"/>
             </widget>
             <contentsmargins bottom="var(hb-param-margin-gene-screen)" left="var(hb-param-margin-gene-screen)" right="var(hb-param-margin-gene-screen)" top="var(hb-param-margin-gene-screen)"/>
             <layout type="anchor">
-                <anchoritem dst="artist_name" dstEdge="LEFT" spacing="6un" src="station_logo" srcEdge="RIGHT"/>
-                <anchoritem dst="artist_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="artist_name" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="TOP"/>
-                <anchoritem dst="song_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="song_name" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
-                <anchoritem dst="song_name" dstEdge="LEFT" spacing="6un" src="station_logo" srcEdge="RIGHT"/>
-                <anchoritem dst="station_name" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="BOTTOM"/>
-                <anchoritem dst="station_name" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="station_name" dstEdge="LEFT" spacing="6un" src="station_logo" srcEdge="RIGHT"/>
                 <anchoritem dst="station_logo" dstEdge="LEFT" spacing="5un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="station_logo" dstEdge="TOP" spacing="5un" src="" srcEdge="TOP"/>
+                <anchoritem dst="song_name" dstEdge="LEFT" spacing="5un" src="station_logo" srcEdge="RIGHT"/>
+                <anchoritem dst="song_name" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="song_name" dstEdge="CENTERV" spacing="0un" src="" srcEdge="CENTERV"/>
+                <anchoritem dst="artist_name" dstEdge="LEFT" spacing="5un" src="station_logo" srcEdge="RIGHT"/>
+                <anchoritem dst="artist_name" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="artist_name" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="TOP"/>
+                <anchoritem dst="station_name" dstEdge="LEFT" spacing="5un" src="station_logo" srcEdge="RIGHT"/>
+                <anchoritem dst="station_name" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="song_name" srcEdge="BOTTOM"/>
+                <anchoritem dst="station_name" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
     </section>
-    <metadata activeUIState="prt_ui" display="NHD portrait" unit="un">
+    <metadata activeUIState="prt_ui" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="prt_ui" sections="#common prt_section"/>
         <uistate name="lsc_ui" sections="#common lsc_section"/>
--- a/qtinternetradio/ui/resources/layout/openwebaddressview.docml	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/openwebaddressview.docml	Wed Jun 23 18:04:00 2010 +0300
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <hbdocument context="IROpenWebAddressView" version="0.9">
     <object name="setting_act" type="HbAction">
-        <string locid="txt_irad_opt_network_setting" name="text"/>
+        <string locid="txt_common_opt_settings" name="text"/>
     </object>  
     <object name="exit_act" type="HbAction">
         <string locid="txt_common_opt_exit" name="text"/>
--- a/qtinternetradio/ui/resources/layout/searchchannelsview.docml	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/searchchannelsview.docml	Wed Jun 23 18:04:00 2010 +0300
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <hbdocument version="1.0">     
+    <object name="exit_act" type="HbAction">
+        <string locid="txt_common_opt_exit" name="text"/>
+    </object>
     <widget name="ext-IRSearchChannelsView" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
             <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
@@ -27,6 +30,9 @@
                 <linearitem itemname="search_panel" spacing="0un"/>
             </layout>
         </widget> 
+        <widget name="view_menu" role="HbView:menu" type="HbMenu">            
+            <ref object="exit_act" role="HbMenu:addAction"/>
+        </widget>
         <string locid="txt_irad_title_internet_radio" name="title"/>
     </widget>
     
--- a/qtinternetradio/ui/resources/layout/termsconsview.docml	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/resources/layout/termsconsview.docml	Wed Jun 23 18:04:00 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="ext-IRTermsConsView" type="HbView">
         <widget name="container" role="HbView:widget" type="HbWidget">
             <widget name="heading_text" type="HbGroupBox">
@@ -10,65 +10,87 @@
                 <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
             </widget>
             <widget name="text_edit" type="HbTextEdit">
-                <bool name="readOnly" value="TRUE"/>
+                <enums name="cursorVisibility" value="TextCursorHidden"/>
                 <string locid="txt_irad_terms_content" name="plainText"/>
-                <enums name="cursorVisibility" value="TextCursorHidden"/>
+                <bool name="readOnly" value="TRUE"/>
                 <enums name="contextMenuFlags" value="ShowTextContextMenuOnSelectionClicked"/>
+                <fontspec name="fontSpec" role="Secondary" textheight="expr(var(hb-param-text-height-secondary) )"/>
             </widget>
-            <widget name="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 name="accept_btn" type="HbPushButton">
+                <string locid="txt_irad_accept" name="text"/>
+            </widget>
+            <widget name="decline_btn" type="HbPushButton">
+                <string locid="txt_irad_decline" name="text"/>
             </widget>
             <layout orientation="Vertical" spacing="0un" type="linear">
                 <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
                 <linearitem itemname="heading_text"/>
                 <linearitem itemname="text_edit"/>
-                <linearitem itemname="btn_container"/>
+                <linearitem itemname="accept_btn"/>
+                <linearitem itemname="decline_btn"/>
             </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"/>
+            <widget name="prt_content_container" type="HbWidget">
+                <widget name="text_edit" type="HbTextEdit"/>
+                <widget name="accept_btn" type="HbPushButton"/>
+                <widget name="decline_btn" type="HbPushButton"/>
+                <contentsmargins bottom="expr(var(hb-param-margin-gene-screen) )" left="expr(var(hb-param-margin-gene-screen) )" right="expr(var(hb-param-margin-gene-screen) )" top="expr(var(hb-param-margin-gene-screen) )"/>
                 <layout type="anchor">
-                    <anchoritem dst="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"/>
+                    <anchoritem dst="accept_btn" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="accept_btn" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="text_edit" srcEdge="BOTTOM"/>
+                    <anchoritem dst="accept_btn" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="text_edit" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="text_edit" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
+                    <anchoritem dst="text_edit" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="decline_btn" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="decline_btn" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="accept_btn" srcEdge="BOTTOM"/>
+                    <anchoritem dst="decline_btn" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="decline_btn" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 </layout>
             </widget>
+            <layout orientation="Vertical" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="heading_text"/>
+                <linearitem itemname="prt_content_container"/>
+            </layout>
         </widget>
     </section>
     <section name="lsc_section">
         <widget name="container" role="HbView:widget" type="HbWidget">
-            <widget name="btn_container" type="HbWidget">
-                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                <sizehint height="10un" type="PREFERRED"/>
+            <widget name="lsc_content_container" type="HbWidget">
+                <widget name="text_edit" type="HbTextEdit"/>
+                <widget name="lsc_btn_container" type="HbWidget">
+                    <widget name="accept_btn" type="HbPushButton"/>
+                    <widget name="decline_btn" type="HbPushButton"/>
+                    <layout orientation="Horizontal" spacing="expr(var(hb-param-margin-gene-screen) )" type="linear">
+                        <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                        <linearitem itemname="accept_btn"/>
+                        <linearitem itemname="decline_btn"/>
+                    </layout>
+                </widget>
+                <contentsmargins bottom="expr(var(hb-param-margin-gene-screen) )" left="expr(var(hb-param-margin-gene-screen) )" right="expr(var(hb-param-margin-gene-screen) )" top="expr(var(hb-param-margin-gene-screen) )"/>
                 <layout type="anchor">
-                    <anchoritem dst="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"/>
+                    <anchoritem dst="text_edit" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="text_edit" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
+                    <anchoritem dst="text_edit" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="lsc_btn_container" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="lsc_btn_container" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="text_edit" srcEdge="BOTTOM"/>
+                    <anchoritem dst="lsc_btn_container" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="lsc_btn_container" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 </layout>
             </widget>
+            <layout orientation="Vertical" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="heading_text"/>
+                <linearitem itemname="lsc_content_container"/>
+            </layout>
         </widget>
     </section>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="lsc_state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="prt_state" sections="#common prt_section"/>
         <uistate name="lsc_state" sections="#common lsc_section"/>
--- a/qtinternetradio/ui/service_conf.xml	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/service_conf.xml	Wed Jun 23 18:04:00 2010 +0300
@@ -1,11 +1,21 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <service>
- <name>internet_radio_10_1</name>
- <filepath>No path</filepath>
- <description>InternetRadio can play .pls file and .m3u file</description>
- <interface>
-    <name>com.nokia.symbian.IFileView</name>
-    <version>1.0</version>
-    <description>Interface for viewing and playing .pls file and .m3u file</description>
-  </interface>
+   <name>internet_radio_10_1</name>
+   <filepath>No path</filepath>
+   <description>InternetRadio Services</description>
+   <interface>
+      <name>com.nokia.symbian.IFileView</name>
+      <version>1.0</version>
+      <description>Interface for viewing .pls file and .m3u file</description>
+   </interface>
+   <interface>
+      <name>com.nokia.symbian.IInternetRadioControl</name>
+      <version>1.0</version>
+      <description>Interface to control internet radio playback</description>
+   </interface>
+   <interface>
+      <name>com.nokia.symbian.IInternetRadioMonitor</name>
+      <version>1.0</version>
+      <description>Interface to monitor internet radio status changes</description>
+   </interface>
 </service>
--- a/qtinternetradio/ui/src/irabstractlistviewbase.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irabstractlistviewbase.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -19,7 +19,7 @@
 #include <hbtoolbar.h>
 #include <hbaction.h>
 #include <hblistview.h>
-#include <hbabstractviewitem.h>
+#include <hblistviewitem.h>
 #include <hbscrollbar.h>
 #include <HbGroupBox>
 #include <HbMarqueeItem>
@@ -121,7 +121,8 @@
     iArtistSongName->setLoopCount(KAnimationLoopTimes);
 
     iListView = qobject_cast<HbListView *>(iLoader.findObject(ABSTRACT_LIST_VIEW_BASE_OBJECT_LISTVIEW));
-
+    iListView->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);
+    
     // draw background for now playing banner
     HbFrameDrawer* drawer = new HbFrameDrawer(NOW_PLAYING_BANNER_FRAME, HbFrameDrawer::NinePieces);
     HbFrameItem* backgroundItem = new HbFrameItem(drawer, iPlayingBanner);
--- a/qtinternetradio/ui/src/irapplication.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irapplication.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -24,7 +24,7 @@
 #include <QFile>
 #include <QTextStream>
 #include <QDir>
-#include <xqsharablefile.h> 
+
 #include <xqserviceutil.h>
 #include <hbiconitem.h>
 #include <hbiconanimator.h>
@@ -49,17 +49,14 @@
 #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"
+#include "irfileviewservice.h"
 /*
  * Description : constructor, initialize all data members
  * Parameters  : aViewManager : pointer to the view manager object
  * Return      : None
  */
 IRApplication::IRApplication(IRViewManager* aViewManager, IRQSystemEventHandler* aSystemEventHandler):
-                                     XQServiceProvider(INTERNETRADIO_SERVICE_NAME),
 #ifdef _DEBUG
                                      iTestPreferredBitrate(false),
 #endif
@@ -82,16 +79,11 @@
                                      iTranslator(NULL),
                                      #endif
                                      iSystemEventHandler(aSystemEventHandler),
-                                     iPlayList(NULL),
-                                     iLoadingAnimation(NULL)
+                                     iLoadingAnimation(NULL),
+                                     iFileViewService(NULL)
                                      
 {
     LOG_METHOD;
-    if (XQServiceUtil::isService())
-    {
-        //Publishes all public slots on this object
-        publishAll();
-    }
     
     iViewManager->setApplication(this);
     iInitEvent = static_cast<QEvent::Type>(QEvent::registerEventType());
@@ -105,6 +97,12 @@
     iSettings->getGlobalAdvFlag(iEnableGlobalAdv);
     setupConnection();
     setLaunchView();
+    
+    QString name = XQServiceUtil::interfaceName();
+    if (name == QString("com.nokia.symbian.IFileView"))
+    {
+        iFileViewService = new IRFileViewService(this);
+    }
 } 
 
 /*
@@ -131,8 +129,6 @@
     
     delete iSystemEventHandler;
     
-    delete iPlayList;
-    
 #ifdef LOCALIZATION
     if( iTranslator )
     {
@@ -141,6 +137,9 @@
         iTranslator = NULL;
     }
 #endif
+    
+    delete iFileViewService;
+    iFileViewService = NULL;
 }
 
  
@@ -298,6 +297,8 @@
     if(NULL == iNetworkController)
     {
         iNetworkController = IRQNetworkController::openInstance(); 
+        connect(iNetworkController, SIGNAL(networkEventNotified(IRQNetworkEvent)),
+               this, SLOT(networkEventNotified(IRQNetworkEvent)));
     } 
     return iNetworkController;
 }
@@ -379,7 +380,12 @@
 
 IRPlayList* IRApplication::getPlayList() const
 {
-    return iPlayList;
+    if (NULL == iFileViewService)
+    {
+        return NULL;
+    }
+    
+    return iFileViewService->getPlayList();
 }
 
 #ifdef LOCALIZATION
@@ -392,37 +398,6 @@
 }
 #endif
 
-void IRApplication::view(const QString &aFileName)
-{
-    if (NULL == iPlayList)
-    {
-        iPlayList = new IRPlayList;
-    }
-    
-    iPlayList->parseFile(aFileName);
-    
-    if (1 == iPlayList->getNumberOfEntries())
-    {
-        launchStartingView(EIRView_PlayingView);
-    }
-    else if (iPlayList->getNumberOfEntries() > 1)
-    {
-        launchStartingView(EIRView_PlsView);
-    }
-    else
-    {
-        //normal launch, launch starting view
-        TIRViewId viewId = EIRView_CategoryView;
-        iSettings->getStartingViewId(viewId);        
-        launchStartingView(viewId);
-    }
-}
-
-void IRApplication::view(const XQSharableFile &/*aSharableFile*/)
-{
-    
-}
-
 /*
  * Description : create all the application level components, including network controller,
  *               favorites db, isds client, play controller, etc
@@ -611,9 +586,6 @@
 {
     getNetworkController();    
     
-    connect(iNetworkController, SIGNAL(networkEventNotified(IRQNetworkEvent)),
-            this, SLOT(networkEventNotified(IRQNetworkEvent)));
-    
     IRBaseView *view = static_cast<IRBaseView*> (iViewManager->currentView());
     if (view)
     {
--- a/qtinternetradio/ui/src/ircategorymodel.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/ircategorymodel.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -53,13 +53,20 @@
     if (aRole == Qt::DisplayRole)
     {
         int row = aIndex.row();
+        QVariantList list;
         
-        QString catNum;
-        catNum.sprintf(" (%d)", iItems->at(row)->size);
-        QString category = iItems->at(row)->catName + catNum;
+        QString category = iItems->at(row)->catName;
+        if (category.contains('(') && category.contains('-') && category.contains(')'))
+        {
+            list.append(category);
+        }
+        else
+        {
+            QString catNum;
+            catNum.sprintf(" (%d)", iItems->at(row)->size);
+            list.append(category + catNum);
+        }
         
-        QVariantList list;
-        list.append(category);
         return list;
     }
 
--- a/qtinternetradio/ui/src/ircategoryview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/ircategoryview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -88,6 +88,7 @@
                 {
                     iLoader.load(ABSTRACT_LIST_VIEW_BASE_LAYOUT_FILENAME, ABSTRACT_LIST_VIEW_BASE_NO_TOOLBAR_SECTION);
                     iLoadedSection = ABSTRACT_LIST_VIEW_BASE_NO_TOOLBAR_SECTION;
+                    setToolBar(NULL);
                 }
             }
         }
@@ -471,8 +472,10 @@
 {
     //add HbActions to the toolbar, the HbActions have been created in IrAbstractListViewBase
     HbToolBar *viewToolBar = toolBar();
+    viewToolBar->clearActions();
     viewToolBar->addAction(iGenresAction);
     viewToolBar->addAction(iCollectionsAction);
     viewToolBar->addAction(iFavoritesAction);
     viewToolBar->addAction(iSearchAction);
+    viewToolBar->setVisible(true);
 }
--- a/qtinternetradio/ui/src/irchannelmodel.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irchannelmodel.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -173,6 +173,15 @@
     return iChannelList->at(aIndex);
 }
 
+void IrChannelModel::cleanupDatabase()
+{
+    clearAndDestroyItems();
+    clearAndDestroyLogos();
+    iDB->clearCache();
+    
+    emit dataAvailable();
+}
+
 void IrChannelModel::clearAndDestroyLogos()
 {
     for (QMap<int, HbIcon*>::iterator it = iLogos.begin(); it != iLogos.end(); ++it)
--- a/qtinternetradio/ui/src/irfavoritesview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irfavoritesview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -45,6 +45,7 @@
 const QString KActionRenameName("Rename");
 const QString KActionDetailsName("Details");
 
+
 //                                        public functions
 
 /*
@@ -336,7 +337,11 @@
 
 void IRFavoritesView::modelChanged()
 {
-    QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
+#ifdef SUBTITLE_STR_BY_LOCID
+    QString headingStr = hbTrId("txt_irad_subtitle_favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+    QString headingStr = hbTrId("Favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
     setHeadingText(headingStr);
     updateIconIndexArray();
     
@@ -363,7 +368,11 @@
             }
 
             updateIconIndexArray();
-            QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
+#ifdef SUBTITLE_STR_BY_LOCID
+            QString headingStr = hbTrId("txt_irad_subtitle_favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+            QString headingStr = hbTrId("Favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
             setHeadingText(headingStr);  
 			
             if (!iIconIndexArray.empty())
@@ -486,7 +495,11 @@
     if (iModel->deleteOneFavorite(current))
     {
         updateIconIndexArray();
-        QString headingStr = QString::number(iModel->rowCount()) + QString(" ") + hbTrId("txt_irad_subtitle_stations");
+#ifdef SUBTITLE_STR_BY_LOCID
+        QString headingStr = hbTrId("txt_irad_subtitle_favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#else
+        QString headingStr = hbTrId("Favorites") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
         setHeadingText(headingStr);          
     }
     else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtinternetradio/ui/src/irfileviewservice.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <xqserviceutil.h>
+
+#include "irfileviewservice.h"
+#include "irplaylist.h"
+#include "irapplication.h"
+#include "irqsettings.h"
+
+#define INTERNETRADIO_SERVICE_NAME "internet_radio_10_1.com.nokia.symbian.IFileView"
+
+IRFileViewService::IRFileViewService(IRApplication *aApplication) : XQServiceProvider(INTERNETRADIO_SERVICE_NAME),
+iApplication(aApplication), iPlayList(NULL)
+{
+    if (XQServiceUtil::isService())
+    {
+        //Publishes all public slots on this object
+        publishAll();
+    }
+}
+
+IRFileViewService::~IRFileViewService()
+{
+    delete iPlayList;
+}
+
+IRPlayList* IRFileViewService::getPlayList() const
+{
+    return iPlayList;
+}
+
+void IRFileViewService::view(const QString &aFileName)
+{
+    if (NULL == iPlayList)
+    {
+        iPlayList = new IRPlayList;
+    }
+    
+    iPlayList->parseFile(aFileName);
+    
+    if (1 == iPlayList->getNumberOfEntries())
+    {
+        iApplication->launchStartingView(EIRView_PlayingView);
+    }
+    else if (iPlayList->getNumberOfEntries() > 1)
+    {
+        iApplication->launchStartingView(EIRView_PlsView);
+    }
+    else
+    {
+        //normal launch, launch starting view
+        TIRViewId viewId = EIRView_CategoryView;
+        iApplication->getSettings()->getStartingViewId(viewId);        
+        iApplication->launchStartingView(viewId);
+    }
+}
+
+void IRFileViewService::view(const XQSharableFile &/*aSharableFile*/)
+{
+
+}
--- a/qtinternetradio/ui/src/irhistoryview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irhistoryview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -322,7 +322,12 @@
 
 void IRHistoryView::modelChanged()
 {
-    QString headingStr = hbTrId("Station History") + " (" + QString::number(iModel->rowCount()) + ")";  
+#ifdef SUBTITLE_STR_BY_LOCID
+    QString headingStr = hbTrId("txt_irad_subtitle_recently_played_stations") + " (" + QString::number(iModel->rowCount()) + ")"; 
+#else
+    QString headingStr = hbTrId("Recently played stations") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif
+  
     setHeadingText(headingStr);
 }
  
--- a/qtinternetradio/ui/src/irnowplayingview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irnowplayingview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -67,7 +67,6 @@
 IRNowPlayingView::IRNowPlayingView(IRApplication* aApplication, TIRViewId aViewId) :
     IRBaseView(aApplication, aViewId),
     iStatisticsReporter(NULL),
-    iNetworkController(NULL),
     iStationShare(NULL),
     iPlayStopAction(NULL),
     iLaunchActionNeeded(false),
@@ -101,11 +100,6 @@
  */
 IRNowPlayingView::~IRNowPlayingView()
 {
-    if(iNetworkController)
-    {
-        iNetworkController->closeInstance();
-    }
-    
     if (iStatisticsReporter)
     {
         iStatisticsReporter->closeInstance();
@@ -386,7 +380,6 @@
         IRBaseView::lazyInit();
         
         iStatisticsReporter = IRQStatisticsReporter::openInstance();
-        iNetworkController = IRQNetworkController::openInstance();
             
         connect(iPlayController, SIGNAL(metaDataAvailable(IRQMetaData*)), this, SLOT(updateMetaData(IRQMetaData*)));
         connect(iPlayController, SIGNAL(playingStarted()), this, SLOT(handlePlayStarted()));
--- a/qtinternetradio/ui/src/iropenwebaddressview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/iropenwebaddressview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -198,13 +198,17 @@
  */
 void IROpenWebAddressView::initDataForm()
 {
-    iUrl = new HbDataFormModelItem(
-            HbDataFormModelItem::TextItem, hbTrId("txt_irad_formlabel_station_url"));
+#ifdef SUBTITLE_STR_BY_LOCID
+    iUrl = new HbDataFormModelItem(HbDataFormModelItem::TextItem, hbTrId("txt_irad_formlabel_station_address"));
+#else
+    iUrl = new HbDataFormModelItem(HbDataFormModelItem::TextItem, hbTrId("Station address"));
+#endif     
     iUrl->setContentWidgetData("maxLength",MAX_URL_CHARACTOR_NUMBER);
     iModel->appendDataFormItem(iUrl);
 
     iName = new HbDataFormModelItem(
             HbDataFormModelItem::TextItem, hbTrId("txt_irad_formlabel_station_name"));
+    iName->setContentWidgetData("maxLength", MAX_URL_CHARACTOR_NUMBER);
     iModel->appendDataFormItem(iName);
 
     iForm->addConnection(iUrl, SIGNAL(textChanged(const QString&)),
--- a/qtinternetradio/ui/src/irsearchchannelsview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irsearchchannelsview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -25,6 +25,7 @@
 #include <hbiconanimator.h>
 #include <hblabel.h> 
 #include <hbiconanimationmanager.h>
+#include <HbGroupBox>
 
 #include "irsearchchannelsview.h"
 #include "iruidefines.h"
@@ -40,7 +41,7 @@
 
 IRSearchChannelsView::IRSearchChannelsView(IRApplication* aApplication,
         TIRViewId aViewId): IRBaseView(aApplication, aViewId),
-        iListView(NULL),iSearchPanelWidget(NULL),iSearchState(ESearch_init),
+        iHeadingLabel(NULL),iListView(NULL),iSearchPanelWidget(NULL),iSearchState(ESearch_init),
         iChannelModel(NULL),iPreset(NULL),iLogoPreset(NULL),
         iConvertTimer(NULL) 
 {
@@ -78,7 +79,9 @@
 
 void IRSearchChannelsView::initMenu()
 {
-
+    HbMenu *viewMenu = menu();
+    QObject *exitAction = iLoader.findObject(EXIT_ACTION);
+    connect(exitAction, SIGNAL(triggered()), iApplication, SIGNAL(quit()));
 }
 
 void IRSearchChannelsView::initTimer()
@@ -123,6 +126,9 @@
     iLoader.setObjectTree( roots );
     iLoader.load(SEARCH_CHANNELS_VIEW_LAYOUT_FILENAME);
     
+    iHeadingLabel = qobject_cast<HbGroupBox *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_HEADINGTEXT_WIDGET));
+    
+    
     iSearchPanelWidget = qobject_cast<HbSearchPanel *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHPANEL_WIDGET));    
     
     iListView = qobject_cast<HbListView *>(iLoader.findWidget(SEARCH_CHANNELS_VIEW_SEARCHLISTVIEW_WIDGET));   
@@ -135,6 +141,14 @@
     iChannelModel = new IrChannelModel(this);
     iChannelModel->initWithCache();
     iListView->setModel(iChannelModel);    
+    //anywhere, before show the count, updated it ahead.
+#ifdef SUBTITLE_STR_BY_LOCID
+    QString headingStr = hbTrId("txt_irad_subtitle_search_results") + " (" + QString::number(iChannelModel->rowCount()) + ")"; 
+#else
+    QString headingStr = hbTrId("Search results") + " (" + QString::number(iChannelModel->rowCount()) + ")";
+#endif
+
+    setHeadingText(headingStr);  
 }
 
 void IRSearchChannelsView::connectWidget()
@@ -293,6 +307,7 @@
     }
     
     popupNote(errStr, HbMessageBox::MessageTypeWarning);     
+    iChannelModel->cleanupDatabase();
 }
 
 void IRSearchChannelsView::clickItem(const QModelIndex&)
@@ -332,13 +347,31 @@
     }
 }
 
+//set the subtitle and counter;
+void IRSearchChannelsView::setHeadingText(const QString &aText)
+{
+    if (iHeadingLabel)
+    {
+        iHeadingLabel->setHeading(aText);
+    }    
+}
 void IRSearchChannelsView::dataChanged()
 {
     switch2InitState(); 
+    //here update count in subtitle
+#ifdef SUBTITLE_STR_BY_LOCID
+    QString headingStr = hbTrId("txt_irad_subtitle_search_results") + " (" + QString::number(iChannelModel->rowCount()) + ")"; 
+#else
+    QString headingStr = hbTrId("Search results") + " (" + QString::number(iChannelModel->rowCount()) + ")";
+#endif
+    setHeadingText(headingStr);   
     iListView->reset();
-    iListView->setCurrentIndex(iChannelModel->index(0));
-    iListView->scrollTo(iChannelModel->index(0)); 
- 
+    if( iChannelModel->rowCount() )
+    {
+        iListView->setCurrentIndex(iChannelModel->index(0));
+        iListView->scrollTo(iChannelModel->index(0));         
+    }
+    
     //we move the focus to the listview and the search panel will
     //hide the virtual keyboard at the same time
     iListView->setFocus();            
@@ -356,9 +389,7 @@
     if( iIconIndexArray.count() > 0 )
     {
         iConvertTimer->start();        
-    } 
-    
-    iSearchPanelWidget->setPlaceholderText(iKeyText); 
+    }   
 }
 
 void IRSearchChannelsView::startConvert(int aIndex)
--- a/qtinternetradio/ui/src/irsearchresultdb.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irsearchresultdb.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -62,7 +62,14 @@
             QString name = insertItem->channelName;
             int channelID = insertItem->channelID;
             QString imageURL = insertItem->imageURL;
-            QString description = insertItem->shortDescription;            
+            QString description = insertItem->shortDescription;
+            
+            //if some data overflows, we just skip it.note that
+            //the VARCHAR is word-based, so here we use the real size 
+            if( name.size()>= 256 || imageURL.size() >= 256 || description.size() >= 256 )
+            {
+                continue;
+            }            
             
             QSqlQuery query;
             bool result;
@@ -156,6 +163,8 @@
     {
         bool dbResult = false;
         QSqlQuery query;         
+        //note: the VARCHAR is word-based but not byte-based. and 255 
+        //means 255 unicode words.
         dbResult = query.exec("CREATE TABLE searchresult ("
             "id INTEGER PRIMARY KEY AUTOINCREMENT, "
             "name VARCHAR(255) NOT NULL, "
--- a/qtinternetradio/ui/src/irsettingsview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irsettingsview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -48,7 +48,7 @@
     setLayout(layout);
 
     HbGroupBox * titleText = new HbGroupBox();
-    titleText->setHeading( hbTrId("txt_irad_subtitle_network_setting") ); 
+    titleText->setHeading( hbTrId("txt_common_opt_settings") ); 
     layout->addItem(titleText);
 
     iForm = new HbDataForm();
--- a/qtinternetradio/ui/src/irsonghistoryview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irsonghistoryview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -176,7 +176,13 @@
 void IRSongHistoryView::modelChanged()
 {    
     iListView->reset();
-    QString headingStr = hbTrId("txt_irad_list_recently_played_songs") + " (" + QString::number(iModel->rowCount()) + ")";    
+    
+#ifdef SUBTITLE_STR_BY_LOCID
+    QString headingStr = hbTrId("txt_irad_subtitle_recently_played_songs") + " (" + QString::number(iModel->rowCount()) + ")";   
+#else
+    QString headingStr = hbTrId("Recently played songs") + " (" + QString::number(iModel->rowCount()) + ")";
+#endif    
+ 
     setHeadingText(headingStr);   
 }
 
--- a/qtinternetradio/ui/src/irstationdetailsview.cpp	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/src/irstationdetailsview.cpp	Wed Jun 23 18:04:00 2010 +0300
@@ -67,7 +67,13 @@
     iBitRate->setPlainText(QString::number(bitrate) + QString("kbps"));
 
     iDescription->setPlainText(aPreset->description);
-    iNowPlayingUrl->setPlainText(aPreset->getURLsForBitrate(bitrate)->at(KChannelURLIndex));
+
+    QList<QString> *urlList = aPreset->getURLsForBitrate(bitrate);
+    if (urlList != NULL)
+    {
+        iNowPlayingUrl->setPlainText(urlList->at(KChannelURLIndex));
+    }
+    delete urlList;
 }
 
 /*
--- a/qtinternetradio/ui/ui.pro	Fri Jun 11 13:30:40 2010 +0300
+++ b/qtinternetradio/ui/ui.pro	Wed Jun 23 18:04:00 2010 +0300
@@ -70,7 +70,7 @@
   TARGET.UID3 = 0xE28364bb
   TARGET.EPOCHEAPSIZE = 0x020000 0x2000000
   TARGET.VID = VID_DEFAULT
-  ICON = resources/qtg_large_internet_radio.svg
+  SKINICON = qtg_large_internet_radio
   datatype_list = "datatype_list={DATATYPE{priority=EDataTypePriorityHigh;type=\"audio/x-scpls\";}};"
   RSS_RULES += datatype_list 
 }
@@ -108,7 +108,8 @@
            inc\irstationdetailsview.h \
            inc\irtermsconsview.h \
            inc\irplaylist.h \
-           inc\irsearchresultdb.h
+           inc\irsearchresultdb.h \
+           inc\irfileviewservice.h
            
 #source files list
 SOURCES += main.cpp  \
@@ -143,7 +144,8 @@
            irstationdetailsview.cpp \
            irtermsconsview.cpp \
            irplaylist.cpp \
-           irsearchresultdb.cpp
+           irsearchresultdb.cpp \
+           irfileviewservice.cpp
           	   
 #resource
 RESOURCES += resources/irui.qrc