--- a/cellular/telephonysettings/src/PsetNetwork.cpp Fri Feb 19 23:21:58 2010 +0200
+++ b/cellular/telephonysettings/src/PsetNetwork.cpp Fri Mar 12 15:45:50 2010 +0200
@@ -18,18 +18,20 @@
// INCLUDE FILES
+#include "CNetworkResetHandler.h"
#include "MPsetNetworkInfoObs.h"
+#include "MPsetNetworkSelect.h"
#include "PsetNetwork.h"
#include "PsetSAObserver.h"
#include "PSetPanic.h"
#include "PsetConstants.h"
-#include "MPsetNetworkSelect.h"
+#include "PhoneSettingsLogger.h"
+
#include <etelmm.h>
#include <mmretrieve.h>
#include <rmmcustomapi.h>
#include <e32svr.h>
-#include "PhoneSettingsLogger.h"
// LOCAL CONSTANTS AND MACROS
_LIT( KPSNameOfClass, "CPsetNetwork" );
@@ -89,7 +91,9 @@
delete iNetworkRetrieve;
iNetworkRetrieve = NULL;
delete iSAObserver;
- iSAObserver = NULL;
+ iSAObserver = NULL;
+ delete iResetNetworkSearch;
+ iResetNetworkSearch = NULL;
}
// ---------------------------------------------------------------------------
@@ -145,10 +149,6 @@
//
EXPORT_C TInt CPsetNetwork::GetNetworkSelectMode( TSelectMode& aMode )
{
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
RMobilePhone::TMobilePhoneNetworkSelectionV1 setMode;
RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg setModePckg( setMode );
@@ -194,10 +194,6 @@
}
iTempNetInfo = aInfo;
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
if ( aInfo.iMode == ENetSelectModeManual )
{
//Copy data to member variables and make a request.
@@ -319,10 +315,7 @@
TInt amount = results->Enumerate();
__PHSLOGSTRING1("[PHS] CPsetNetwork::RunL: amount: %d", amount);
TInt i = 0;
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
+
RMobilePhone::TMobilePhoneNetworkInfoV2 nwNames;
while ( amount > i )
{
@@ -474,15 +467,13 @@
{
iObserver = &aObserver;
iActiveObserver = ENetSelectObserver;
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
+
iRegStatus = RMobilePhone::ERegistrationUnknown;
User::LeaveIfError( iCustomPhone.Open( iPhone ) );
iSAObserver = CPsetSAObserver::NewL();
CActiveScheduler::Add( this );
+ iResetNetworkSearch = CNetworkResetHandler::NewL( iPhone );
}
// ---------------------------------------------------------------------------
@@ -495,13 +486,11 @@
{
iNetworkModeObserver = &aModeObserver;
iActiveObserver = ENetModeObserver;
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
+
User::LeaveIfError( iCustomPhone.Open( iPhone ) );
CActiveScheduler::Add( this );
+ iResetNetworkSearch = CNetworkResetHandler::NewL( iPhone );
}
// ---------------------------------------------------------------------------
@@ -562,15 +551,11 @@
EXPORT_C TInt CPsetNetwork::ResetNetworkSearch()
{
__PHSLOGSTRING("[PHS]--> CPsetNetwork::ResetNetworkSearch");
- RMmCustomAPI customApi;
- TInt error = customApi.Open( iPhone );
- if (error == KErrNone)
- {
- customApi.ResetNetServer();
- }
- customApi.Close();
-
- __PHSLOGSTRING("[PHS] <--CPsetNetwork::ResetNetworkSearch");
+
+ TInt error = iResetNetworkSearch->ResetNetworkSearch();
+
+ __PHSLOGSTRING1("[PHS] <--CPsetNetwork::ResetNetworkSearch: error: %d", error);
+
//for compatibility reasons returns a value
return error;
}