telephonyprotocols/pdplayer/umts/spudtel/src/cservicechangenotifier.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 /**
    18 /**
    19  @file 
    19  @file 
    20  @internalComponent
    20  @internalComponent
    21 */
    21 */
    22 
    22 
       
    23 
       
    24 
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "cservicechangenotifierTraces.h"
       
    28 #endif
       
    29 
    23 #include <e32def.h>
    30 #include <e32def.h>
    24 
    31 
    25 #include "cservicechangenotifier.h"
    32 #include "cservicechangenotifier.h"
    26 #include "PDPFSM.h"
    33 #include "PDPFSM.h"
    27 #include "spudteldebuglogger.h"
       
    28 #include "pdpfsmnmspace.h"
    34 #include "pdpfsmnmspace.h"
    29 
    35 
    30 #include <pcktcs.h>
    36 #include <pcktcs.h>
    31 
    37 
    32 /** c'tor
    38 /** c'tor
    63 */
    69 */
    64 void CServiceChangeNotifier::Notify(const TRequestStatus& aStatus)
    70 void CServiceChangeNotifier::Notify(const TRequestStatus& aStatus)
    65 	{
    71 	{
    66 	if(aStatus == KErrNone)
    72 	if(aStatus == KErrNone)
    67 		{
    73 		{
    68 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set ServiceStatus"));
    74 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSERVICECHANGENOTIFIER_NOTIFY_1, "FSM set ServiceStatus");
    69 		iPdpFsmInterface.Set(iServiceStatus);
    75 		iPdpFsmInterface.Set(iServiceStatus);
    70 		SPUDTELVERBOSE_INFO_LOG(_L("FSM input EServiceStatusChangeNetwork"));
    76 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSERVICECHANGENOTIFIER_NOTIFY_2, "FSM input EServiceStatusChangeNetwork");
    71 		iPdpFsmInterface.Input(KAllContexts, 
    77 		iPdpFsmInterface.Input(KAllContexts, 
    72 								PdpFsm::EServiceStatusChangeNetwork);
    78 								PdpFsm::EServiceStatusChangeNetwork);
    73 		}
    79 		}
    74 	else
    80 	else
    75 		{ 
    81 		{ 
    76 		SPUDTEL_ERROR_LOG(_L("CServiceChangeNotifier::Notify(), error: %d"), 
    82 		OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSERVICECHANGENOTIFIER_NOTIFY_3, "CServiceChangeNotifier::Notify(), error: %d", aStatus.Int());
    77 							aStatus.Int());
       
    78 		ASSERT(aStatus == KErrCancel); 
    83 		ASSERT(aStatus == KErrCancel); 
    79 		}
    84 		}
    80 	}
    85 	}
    81 
    86 
    82 /** cancels notification */	
    87 /** cancels notification */	
    83 void CServiceChangeNotifier::DoCancel()
    88 void CServiceChangeNotifier::DoCancel()
    84 	{
    89 	{
    85 	if(IsActive())
    90 	if(IsActive())
    86 		{ 
    91 		{ 
    87 		SPUDTELVERBOSE_INFO_LOG(
    92 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSERVICECHANGENOTIFIER_DOCANCEL_1, "CServiceChangeNotifier::DoCancel EPacketNotifyStatusChange");
    88 			_L("CServiceChangeNotifier::DoCancel EPacketNotifyStatusChange"));
       
    89 		iPacketService.CancelAsyncRequest(EPacketNotifyStatusChange); 
    93 		iPacketService.CancelAsyncRequest(EPacketNotifyStatusChange); 
    90 		}
    94 		}
    91 	}
    95 	}