--- a/phoneengine/networkhandlingstarter/inc/cnetworklistener.h Wed Aug 18 09:48:26 2010 +0300
+++ b/phoneengine/networkhandlingstarter/inc/cnetworklistener.h Thu Sep 02 20:26:16 2010 +0300
@@ -23,12 +23,17 @@
#include <e32base.h>
#include <nwhandlingengine.h>
#include <qsysteminfo.h>
+#include <MSSSettingsRefreshObserver.h>
+#include <MPsetNetworkInfoObs.h>
// User includes
// Forward declarations
class CNWSession;
class MNetworkListenerObserver;
+class CPsetNetwork;
+class CPsetContainer;
+class CPSetRefreshHandler;
using namespace QtMobility;
@@ -36,7 +41,9 @@
* Network info listener.
*/
NONSHARABLE_CLASS( CNetworkListener ) : public CBase,
- public MNWMessageObserver
+ public MNWMessageObserver,
+ public MSSSettingsRefreshObserver,
+ public MPsetNetworkInfoObserver
{
public:
@@ -66,6 +73,101 @@
void HandleNetworkError( const TNWOperation aOperation, TInt aErrorCode );
static TInt NWLostDelayCallBack(TAny* aParam);
+
+ static TInt NWSimRefreshCallBack(TAny* aParam);
+
+ /**
+ * From MSSSettingsRefreshObserver.
+ * Refresh query. Client should determine whether it allow the
+ * refresh to happen.
+ *
+ * @param aType Refresh type.
+ * @param aFiles Elementary files which are to be changed.
+ * May be zero length.
+ * @return ETrue to allow refresh, EFalse to decline refresh.
+ */
+ TBool AllowRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles );
+
+ /**
+ * From MSSSettingsRefreshObserver.
+ * Notification of refresh.
+ *
+ * @param aType Type of refresh which has happened.
+ * @param aFiles List of elementary files which have been changed.
+ * May be zero length.
+ */
+ void Refresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles );
+
+ /**
+ * Shows notes when network information received.
+ *
+ * @param aInfoArray Network information. Receiver owns the array.
+ * @param aResult Result of action.
+ */
+ void HandleNetworkInfoReceivedL(
+ const CNetworkInfoArray* aInfoArray, const TInt aResult );
+
+ /**
+ * Shows notes when requested for current network information.
+ *
+ * @param aCurrentInfo Current network information.
+ * @param aResult Result of action.
+ */
+ void HandleCurrentNetworkInfoL(
+ const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo,
+ const TInt aResult );
+
+ /**
+ * DEPRECATED.
+ */
+ void HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const MPsetNetworkSelect::TCurrentNetworkStatus aStatus,
+ const TInt aResult );
+
+ /**
+ * Shows notes when network change has been approved.
+ *
+ * @param aCurrentInfo Current network information.
+ * @param aStatus Current network status.
+ * @param aResult Result of action.
+ */
+ void HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus,
+ const TInt aResult );
+
+ /**
+ * Searches for networks that have coverage.
+ *
+ * @param aRequest Type of request that is being handled.
+ */
+ void HandleSearchingNetworksL( TServiceRequest aRequest );
+
+ /**
+ * Handles user request to register to specific network.
+ *
+ * @param aOngoing Is there an ongoing request.
+ */
+ void HandleRequestingSelectedNetworkL( TBool aOngoing );
+
+ /**
+ * Handles notes when call is active.
+ */
+ void HandleCallActivatedL();
+
+ /**
+ * Handles errors.
+ *
+ * @param aRequest current request.
+ * @param aError error code.
+ */
+ void HandleNetworkErrorL( const MPsetNetworkInfoObserver::TServiceRequest aRequest,
+ const TInt aError );
private:
@@ -129,6 +231,25 @@
* Own.
*/
QSystemDeviceInfo* iDeviceInfo;
+
+ /**
+ * PhoneSettings container.
+ * Own.
+ */
+ CPsetContainer* iContainer;
+
+ /**
+ * PhoneSettings engine object.
+ * Own.
+ */
+ CPsetNetwork* iSettingsEngine;
+
+ /**
+ * PhoneSettings refresh handler.
+ * Own.
+ */
+ CPSetRefreshHandler* iRefreshHandler;
+
};
#endif // CNETWORKLISTENER_H