telephonyprotocols/umtsgprsscpr/spudfsm/src/PDPSCPRFSM.cpp
changeset 68 d0d9cc530d21
parent 62 8ef833fbf5aa
child 75 f45cd1ad4667
equal deleted inserted replaced
62:8ef833fbf5aa 68:d0d9cc530d21
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Implementation file for the PDP Context Finite State Machine
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20 */
       
    21 
       
    22 
       
    23 #include "PDPFSM.h"
       
    24 #include "cpdpfsmfactory.h"
       
    25 #include "spudfsmdebuglogger.h"
       
    26 #include "PDPDeftSCPR.h"
       
    27 
       
    28 
       
    29 //-=========================================================
       
    30 // Custom methods
       
    31 //-=========================================================
       
    32 CPdpFsmInterface::CPdpFsmInterface(CPDPDefaultSubConnectionProvider& aOwner)
       
    33 :iPdpFsmFactory(NULL), 
       
    34  iNetworkStatus(RPacketService::EStatusUnattached),
       
    35  iDefaultSubConnProvd(aOwner)
       
    36     {
       
    37 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
       
    38     }
       
    39 
       
    40 CPdpFsmInterface::~CPdpFsmInterface()
       
    41     {
       
    42 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
       
    43 	
       
    44 	CPdpFsmInterface::Close();
       
    45 	delete iPdpFsmFactory;
       
    46     }
       
    47 
       
    48 TContextId CPdpFsmInterface::NewFsmContextL(MPdpFsmEventHandler& aPdpFsmEventHandler)
       
    49     {
       
    50     return iPdpFsmFactory->NewFsmContextL(aPdpFsmEventHandler);
       
    51     }
       
    52 
       
    53 
       
    54 /** request to open the FSM
       
    55 
       
    56 @param aSpudManInterface reference to SpudMan interface
       
    57 */
       
    58 void CPdpFsmInterface::OpenL(TName& aTsyName)
       
    59     {
       
    60 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::OpenL()");
       
    61 
       
    62 	iPdpFsmFactory = CPdpFsmFactory::NewL();
       
    63 	iPdpFsmFactory->InitL(aTsyName, this);
       
    64     }
       
    65 
       
    66 /** closes the FSM and frees underlying resources
       
    67 */
       
    68 void CPdpFsmInterface::Close()
       
    69     {
       
    70 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Close()");
       
    71 
       
    72 	if (iPdpFsmFactory)
       
    73 	    {
       
    74 		iPdpFsmFactory->Close();
       
    75 	    }
       
    76     }
       
    77 
       
    78 
       
    79 /** 
       
    80  Performs and input action/notification for context ID aPdpId
       
    81  If aPdpId is KAllContexts, the notification is sent to every context, unless it is of type EServiceStatusChangeNetwork
       
    82 
       
    83 @param aPdpId the PDP context ID, 0 to KMaxPdpContexts
       
    84 @param aOperation the operation id to perform
       
    85 @param aParam extra id for ETelDriver errors
       
    86 @return error code for the synchronus patrt of the operation
       
    87 */
       
    88 TInt CPdpFsmInterface::Input(TContextId aPdpId, const TInt aOperation, const TInt aParam)
       
    89     {
       
    90 	TInt ret = KErrNone;
       
    91 
       
    92 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Input(aParam)");
       
    93 
       
    94 	ASSERT(iPdpFsmFactory);
       
    95 
       
    96 
       
    97     // Control structure is in order of the most frequent operation first (hopefully)
       
    98     //
       
    99 	if (iPdpFsmFactory->ContextIsValid(aPdpId))
       
   100 	    {
       
   101 	    // We have a valid PDP FSM Context, so go ahead with the operation...
       
   102 	    //
       
   103 	    ret = (iPdpFsmFactory->GetFsmContext(aPdpId))->Input(aOperation, aParam);
       
   104 
       
   105         // Recovering memory by deleting the Fsm Context
       
   106         //
       
   107         // Tricky, definitely don't try with 'SpudMan::EContextDelete' it's far too early.
       
   108         // You can get a bit further deleting on 'PdpFsm::EContextDeleted' (and 'PdpFsm::EContextDeletedFailed')
       
   109         // from TContextDeleteStrategy::NotifyFsm(), but you then find that GuQoS is calling into Spud in order to
       
   110         // transfer data from the deleted context to another...
       
   111         //
       
   112         // Additionally, the spud unit test is expecting to be able to "reuse" deleted contexts...
       
   113 	    }
       
   114 	else if (aPdpId == KAllContexts)
       
   115 	    {
       
   116 		TInt err = KErrNone;
       
   117 	
       
   118 		// this has to be here to avoid sending it from every context
       
   119 		//
       
   120 		if (aOperation == PdpFsm::EServiceStatusChangeNetwork)
       
   121 		    {	
       
   122 			iDefaultSubConnProvd.PdpFsmAllContextEvent(KNetworkStatusEvent, KErrNone);
       
   123 		    }
       
   124 		else
       
   125 		    {
       
   126 			for (TContextId i = 0; (i < KMaxPdpContexts) && iPdpFsmFactory->HaveFsmContext(i); i++)
       
   127 			    {
       
   128 		        // Process any current PDP contexts.
       
   129 		        
       
   130 		        err = (iPdpFsmFactory->GetFsmContext(i))->Input(aOperation, aParam);
       
   131 
       
   132                 // See above about trials and tribulations of trying to recover the memory taken by these 
       
   133                 // CPdpFsm objects.
       
   134 
       
   135 				if (err != KErrNone)
       
   136 				    {
       
   137 				    // We return the last error found, ignoring any earlier ones
       
   138 				    //
       
   139 					ret = err;
       
   140 				    }
       
   141 			    }
       
   142 		    }		
       
   143         }
       
   144 	else
       
   145 	    {
       
   146 		ret = KErrBadHandle;
       
   147 	    }
       
   148 	
       
   149 	return ret;
       
   150     }
       
   151 
       
   152 
       
   153 
       
   154 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   155 
       
   156 /**
       
   157 Set context parameters
       
   158 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
       
   159 @param aParam - RPacketQoS::TQoSR5Requested data to set
       
   160 @return - KErrBadHandle or KErrNone
       
   161 */
       
   162 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam)
       
   163 {
       
   164 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Requested)");
       
   165 
       
   166 	ASSERT(iPdpFsmFactory);
       
   167 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   168 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   169 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   170 	return KErrNone;
       
   171 }
       
   172 
       
   173 
       
   174 /**
       
   175 Set context parameters
       
   176 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
       
   177 @param aParam - RPacketQoS::TQoSR5Negotiated data to set
       
   178 @return - KErrBadHandle or KErrNone
       
   179 */
       
   180 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam)
       
   181 {
       
   182 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Negotiated)");
       
   183 
       
   184 	ASSERT(iPdpFsmFactory);
       
   185 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   186 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   187 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   188 	return KErrNone;
       
   189 }
       
   190 
       
   191 
       
   192 #else
       
   193 // !SYMBIAN_NETWORKING_UMTSR5
       
   194 
       
   195 /**
       
   196 Set context parameters
       
   197 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   198 @param aParam - RPacketQoS::TQoSR99_R4Requested data to set
       
   199 @return - KErrBadHandle or KErrNone
       
   200 */
       
   201 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam)
       
   202     {
       
   203 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Requested)");
       
   204 
       
   205 	ASSERT(iPdpFsmFactory);
       
   206     ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   207 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   208     iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   209 	return KErrNone;
       
   210     }
       
   211 
       
   212 
       
   213 /**
       
   214 Set context parameters
       
   215 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   216 @param aParam - RPacketQoS::TQoSR99_R4Negotiated data to set
       
   217 @return - KErrBadHandle or KErrNone
       
   218 */
       
   219 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam)
       
   220     {
       
   221 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Negotiated)");
       
   222 
       
   223 	ASSERT(iPdpFsmFactory);
       
   224 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   225 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   226 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   227 	return KErrNone;
       
   228     }
       
   229 
       
   230 #endif 
       
   231 // SYMBIAN_NETWORKING_UMTSR5 
       
   232 
       
   233 
       
   234 
       
   235 
       
   236 /** Set context parameters
       
   237 
       
   238 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   239 @param aParam - TFTInfo data to set
       
   240 @return - KErrBadHandle or KErrNone
       
   241 */
       
   242 TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTInfo& aParam)
       
   243     {
       
   244 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TFTInfo)");
       
   245 
       
   246 	ASSERT(iPdpFsmFactory);
       
   247 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   248 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   249 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   250 	return KErrNone;
       
   251     }
       
   252 
       
   253 /** Set context parameters
       
   254 
       
   255 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   256 @param aParam - TFTOperationCode to set to go with the data
       
   257 @return - KErrBadHandle or KErrNone
       
   258 */
       
   259 TInt CPdpFsmInterface::Set(TContextId aPdpId, const TTFTOperationCode& aParam)
       
   260     {
       
   261 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TTFTOperationCode)");
       
   262 
       
   263 	ASSERT(iPdpFsmFactory);
       
   264 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   265 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   266 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   267 	return KErrNone;
       
   268     }
       
   269 
       
   270 /** Set context parameters
       
   271 
       
   272 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   273 @param aParam - RPacketContext::TDataChannelV2 data to set
       
   274 @return - KErrBadHandle or KErrNone
       
   275 */
       
   276 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam)
       
   277     {
       
   278 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TDataChannelV2)");
       
   279 
       
   280 	ASSERT(iPdpFsmFactory);
       
   281 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   282 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   283 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   284 	return KErrNone;
       
   285     }
       
   286 
       
   287 /** Set context parameters
       
   288 
       
   289 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   290 @param aParam - RPacketContext::TContextStatus data to set
       
   291 @return - KErrBadHandle or KErrNone
       
   292 */
       
   293 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam)
       
   294     {
       
   295 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextStatus)");
       
   296 
       
   297 	ASSERT(iPdpFsmFactory);
       
   298 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   299 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   300 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   301 	return KErrNone;
       
   302     }
       
   303 
       
   304 /** Set context parameters
       
   305 
       
   306 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   307 @param aParam - RPacketContext::TContextConfigGPRS& data to set
       
   308 @return - KErrBadHandle or KErrNone
       
   309 */
       
   310 TInt CPdpFsmInterface::Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam)
       
   311     {
       
   312 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextConfigGPRS)");
       
   313 
       
   314 	ASSERT(iPdpFsmFactory);
       
   315 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   316 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   317 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   318 	return KErrNone;
       
   319     }
       
   320 
       
   321 /** Set network status
       
   322 
       
   323 @param aParam - RPacketService::TStatus data to set
       
   324 */
       
   325 void CPdpFsmInterface::Set(const RPacketService::TStatus aParam)
       
   326     {
       
   327 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketService::TStatus)");
       
   328 
       
   329 	ASSERT(iPdpFsmFactory);
       
   330 
       
   331 	iNetworkStatus = aParam;
       
   332     }
       
   333 
       
   334 
       
   335 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   336 /**
       
   337 Get context parameters
       
   338 
       
   339 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   340 @param aParam - RPacketQoS::TQoSR5Requested data to get
       
   341 @return - KErrBadHandle or KErrNone
       
   342 */
       
   343 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const
       
   344 {
       
   345 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSR5Requested)");
       
   346 
       
   347 	ASSERT(iPdpFsmFactory);
       
   348 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   349 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   350 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   351 	return KErrNone;
       
   352 }
       
   353 
       
   354 
       
   355 /**
       
   356 Get context parameters
       
   357 
       
   358 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   359 @param aParam - RPacketQoS::TQoSR5Negotiated data to get
       
   360 @return - KErrBadHandle or KErrNone
       
   361 */
       
   362 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const
       
   363 {
       
   364 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR5Negotiated)");
       
   365 
       
   366 	ASSERT(iPdpFsmFactory);
       
   367 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   368 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   369 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   370 	return KErrNone;
       
   371 }
       
   372 
       
   373 #else
       
   374 // !SYMBIAN_NETWORKING_UMTSR5
       
   375 
       
   376 /**
       
   377 Get context parameters
       
   378 
       
   379 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   380 @param aParam - RPacketQoS::TQoSR99_R4Requested data to get
       
   381 @return - KErrBadHandle or KErrNone
       
   382 */
       
   383 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const
       
   384     {
       
   385 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSRequestedR99_R4)");
       
   386 
       
   387 	ASSERT(iPdpFsmFactory);
       
   388 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   389 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   390 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   391 	return KErrNone;
       
   392     }
       
   393 
       
   394 
       
   395 /**
       
   396 Get context parameters
       
   397 
       
   398 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   399 @param aParam - RPacketQoS::TQoSR99_R4Negotiated data to get
       
   400 @return - KErrBadHandle or KErrNone
       
   401 */
       
   402 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const
       
   403     {
       
   404 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR99_R4Negotiated)");
       
   405 
       
   406 	ASSERT(iPdpFsmFactory);
       
   407 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   408 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   409 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   410 	return KErrNone;
       
   411     }
       
   412 
       
   413 #endif 
       
   414 // SYMBIAN_NETWORKING_UMTSR5 
       
   415 
       
   416 
       
   417 
       
   418 /** Get context parameters
       
   419 
       
   420 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   421 @param aParam - TTFTInfo data to get
       
   422 @return - KErrBadHandle or KErrNone
       
   423 */
       
   424 TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTInfo& aParam) const
       
   425     {
       
   426 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
       
   427 
       
   428 	ASSERT(iPdpFsmFactory);
       
   429 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   430 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   431 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   432 	return KErrNone;
       
   433     }
       
   434 
       
   435 /** Get context parameters
       
   436 
       
   437 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   438 @param aParam - TTFTOperationCode for the TFT data
       
   439 @return - KErrBadHandle or KErrNone
       
   440 */
       
   441 TInt CPdpFsmInterface::Get(TContextId aPdpId, TTFTOperationCode& aParam) const
       
   442     {
       
   443 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
       
   444 
       
   445 	ASSERT(iPdpFsmFactory);
       
   446 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   447 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   448 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   449 	return KErrNone;
       
   450     }
       
   451 
       
   452 
       
   453 
       
   454 /** Get context parameters
       
   455 
       
   456 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   457 @param aParam - RPacketContext::TDataChannelV2 data to set
       
   458 @return - KErrBadHandle or KErrNone
       
   459 */
       
   460 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const
       
   461     {
       
   462 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TDataChannelV2)");
       
   463 
       
   464 	ASSERT(iPdpFsmFactory);
       
   465 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   466 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   467 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   468 	return KErrNone;
       
   469     }
       
   470 
       
   471 /** Get context parameters
       
   472 
       
   473 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   474 @param aParam - RPacketContext::TContextConfigGPRS data to set
       
   475 @return - KErrBadHandle or KErrNone
       
   476 */
       
   477 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const
       
   478     {
       
   479 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextConfigGPRS)");
       
   480 
       
   481 	ASSERT(iPdpFsmFactory);
       
   482 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   483 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   484 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   485 	return KErrNone;
       
   486     }
       
   487 
       
   488 /** Get context parameters
       
   489 
       
   490 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   491 @param aParam - RPacketContext::TContextStatus data to get
       
   492 @return - KErrBadHandle or KErrNone
       
   493 */
       
   494 TInt CPdpFsmInterface::Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const
       
   495     {
       
   496 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextStatus)");
       
   497 
       
   498 	ASSERT(iPdpFsmFactory);
       
   499 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   500 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   501 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   502 	return KErrNone;
       
   503     }
       
   504 
       
   505 /** Get context parameters
       
   506 
       
   507 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   508 @param aParam - RPacketContext::TContextConfigGPRS data to set
       
   509 @return - KErrBadHandle or KErrNone
       
   510 */
       
   511 void CPdpFsmInterface::Get(RPacketService::TStatus& aParam)
       
   512     {
       
   513 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketService::TStatus)");
       
   514 
       
   515 	ASSERT(iPdpFsmFactory);
       
   516 
       
   517 	aParam = iNetworkStatus;
       
   518     }
       
   519 
       
   520 
       
   521 /** Get the TsyName
       
   522 
       
   523 @return - TsyName in a TName
       
   524 */
       
   525 const TName& CPdpFsmInterface::TsyName(void)
       
   526     {
       
   527 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::TsyName");
       
   528 
       
   529 	ASSERT(iPdpFsmFactory);
       
   530 	
       
   531 	return iPdpFsmFactory->TsyName();
       
   532 }
       
   533 
       
   534