telephonyprotocols/pdplayer/umts/spudfsm/src/PDPSCPRFSM.cpp
changeset 0 3553901f7fa8
child 19 630d2f34d719
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     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  iDefaultSubConnProvd(aOwner),
       
    35  iNetworkStatus(RPacketService::EStatusUnattached),
       
    36  iRefCount(1),
       
    37  iUmtsRelease(TPacketDataConfigBase::KConfigGPRS)
       
    38     {
       
    39 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
       
    40     }
       
    41 
       
    42 CPdpFsmInterface::~CPdpFsmInterface()
       
    43     {
       
    44 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::()");
       
    45 	delete iPdpFsmFactory;
       
    46     }
       
    47 
       
    48 TContextId CPdpFsmInterface::NewFsmContextL(MPdpFsmEventHandler& aPdpFsmEventHandler,SpudMan::TPdpContextType aContextType)
       
    49     {
       
    50     return iPdpFsmFactory->NewFsmContextL(aPdpFsmEventHandler,aContextType);
       
    51     }
       
    52 
       
    53     
       
    54 TBool CPdpFsmInterface::FsmContextExists(const TContextId aPdpId)
       
    55     {
       
    56     return iPdpFsmFactory->HaveFsmContext(aPdpId);
       
    57     }
       
    58     
       
    59 void CPdpFsmInterface::DeleteFsmContext(const TContextId aPdpId)
       
    60     {
       
    61     iPdpFsmFactory->DeleteFsmContext(aPdpId);
       
    62     }    
       
    63 
       
    64 
       
    65 /** request to open the FSM
       
    66 
       
    67 @param aSpudManInterface reference to SpudMan interface
       
    68 */
       
    69 void CPdpFsmInterface::NewL(const TName& aTsyName, TInt aUmtsRelease)
       
    70     {
       
    71 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::NewL()");
       
    72 	
       
    73 	iUmtsRelease = aUmtsRelease;
       
    74 	iPdpFsmFactory = CPdpFsmFactory::NewL();
       
    75 	iPdpFsmFactory->InitL(aTsyName, this);
       
    76     }
       
    77 
       
    78 /** request to open the FSM
       
    79 
       
    80 @param aSpudManInterface reference to SpudMan interface
       
    81 */
       
    82 void CPdpFsmInterface::Open()
       
    83     {
       
    84 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Open()");
       
    85 	iRefCount++;
       
    86     }
       
    87     
       
    88 /** closes the FSM and frees underlying resources
       
    89 */
       
    90 void CPdpFsmInterface::Close()
       
    91     {
       
    92 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Close()");
       
    93     ASSERT( iRefCount > 0 );
       
    94 	if (--iRefCount == 0 )
       
    95 	    {
       
    96 	    if (iPdpFsmFactory)
       
    97     	    {
       
    98     	    iPdpFsmFactory->Close();
       
    99     	    }
       
   100     	delete this;
       
   101 	    }
       
   102     }
       
   103 
       
   104 
       
   105 /** 
       
   106  Performs and input action/notification for context ID aPdpId
       
   107  If aPdpId is KAllContexts, the notification is sent to every context, unless it is of type EServiceStatusChangeNetwork
       
   108 
       
   109 @param aPdpId the PDP context ID, 0 to KMaxPdpContexts
       
   110 @param aOperation the operation id to perform
       
   111 @param aParam extra id for ETelDriver errors
       
   112 @return error code for the synchronus patrt of the operation
       
   113 */
       
   114 TInt CPdpFsmInterface::Input(TContextId aPdpId, const TInt aOperation, const TInt aParam)
       
   115     {
       
   116 	TInt ret = KErrNone;
       
   117 
       
   118 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Input(aParam)");
       
   119 
       
   120 	ASSERT(iPdpFsmFactory);
       
   121 
       
   122 
       
   123     // Control structure is in order of the most frequent operation first (hopefully)
       
   124     //
       
   125 	if (iPdpFsmFactory->ContextIsValid(aPdpId))
       
   126 	    {
       
   127 	    // We have a valid PDP FSM Context, so go ahead with the operation...
       
   128 	    //
       
   129 	    ret = (iPdpFsmFactory->GetFsmContext(aPdpId))->Input(aOperation, aParam);
       
   130 
       
   131         // Recovering memory by deleting the Fsm Context
       
   132         //
       
   133         // Tricky, definitely don't try with 'SpudMan::EContextDelete' it's far too early.
       
   134         // You can get a bit further deleting on 'PdpFsm::EContextDeleted' (and 'PdpFsm::EContextDeletedFailed')
       
   135         // from TContextDeleteStrategy::NotifyFsm(), but you then find that GuQoS is calling into Spud in order to
       
   136         // transfer data from the deleted context to another...
       
   137         //
       
   138         // Additionally, the spud unit test is expecting to be able to "reuse" deleted contexts...
       
   139 	    }
       
   140 	else if (aPdpId == KAllContexts)
       
   141 	    {
       
   142 		TInt err = KErrNone;
       
   143 	
       
   144 		// this has to be here to avoid sending it from every context
       
   145 		//
       
   146 		if (aOperation == PdpFsm::EServiceStatusChangeNetwork)
       
   147 		    {	
       
   148 			iDefaultSubConnProvd.PdpFsmAllContextEvent(KNetworkStatusEvent, KErrNone);
       
   149 		    }
       
   150 		else
       
   151 		    {
       
   152 			for (TContextId i = 0; (i < KMaxPdpContexts) && iPdpFsmFactory->HaveFsmContext(i); i++)
       
   153 			    {
       
   154 		        // Process any current PDP contexts.
       
   155 		        
       
   156 		        err = (iPdpFsmFactory->GetFsmContext(i))->Input(aOperation, aParam);
       
   157 
       
   158                 // See above about trials and tribulations of trying to recover the memory taken by these 
       
   159                 // CPdpFsm objects.
       
   160 
       
   161 				if (err != KErrNone)
       
   162 				    {
       
   163 				    // We return the last error found, ignoring any earlier ones
       
   164 				    //
       
   165 					ret = err;
       
   166 				    }
       
   167 			    }
       
   168 		    }		
       
   169         }
       
   170 	else
       
   171 	    {
       
   172 		ret = KErrBadHandle;
       
   173 	    }
       
   174 	
       
   175 	return ret;
       
   176     }
       
   177 
       
   178 
       
   179 
       
   180 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   181 
       
   182 /**
       
   183 Set context parameters
       
   184 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
       
   185 @param aParam - RPacketQoS::TQoSR5Requested data to set
       
   186 @return - KErrBadHandle or KErrNone
       
   187 */
       
   188 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketQoS::TQoSR5Requested& aParam)
       
   189 	{
       
   190 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Requested)");
       
   191 
       
   192 	ASSERT(iPdpFsmFactory);
       
   193 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   194 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   195 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   196 	return KErrNone;
       
   197 	}
       
   198 
       
   199 
       
   200 /**
       
   201 Set context parameters
       
   202 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts - 1
       
   203 @param aParam - RPacketQoS::TQoSR5Negotiated data to set
       
   204 @return - KErrBadHandle or KErrNone
       
   205 */
       
   206 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketQoS::TQoSR5Negotiated& aParam)
       
   207 {
       
   208 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR5Negotiated)");
       
   209 
       
   210 	ASSERT(iPdpFsmFactory);
       
   211 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   212 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   213 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   214 	return KErrNone;
       
   215 }
       
   216 
       
   217 
       
   218 #else
       
   219 // !SYMBIAN_NETWORKING_UMTSR5
       
   220 
       
   221 /**
       
   222 Set context parameters
       
   223 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   224 @param aParam - RPacketQoS::TQoSR99_R4Requested data to set
       
   225 @return - KErrBadHandle or KErrNone
       
   226 */
       
   227 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketQoS::TQoSR99_R4Requested& aParam)
       
   228     {
       
   229 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Requested)");
       
   230 
       
   231 	ASSERT(iPdpFsmFactory);
       
   232     ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   233 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   234     iPdpFsmFactory->GetFsmContext(aPdpId,aContextType)->Set(aParam);
       
   235 	return KErrNone;
       
   236     }
       
   237 
       
   238 
       
   239 /**
       
   240 Set context parameters
       
   241 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   242 @param aParam - RPacketQoS::TQoSR99_R4Negotiated data to set
       
   243 @return - KErrBadHandle or KErrNone
       
   244 */
       
   245 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketQoS::TQoSR99_R4Negotiated& aParam)
       
   246     {
       
   247 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Negotiated)");
       
   248 
       
   249 	ASSERT(iPdpFsmFactory);
       
   250 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   251 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   252 	iPdpFsmFactory->GetFsmContext(aPdpId,aContextType)->Set(aParam);
       
   253 	return KErrNone;
       
   254     }
       
   255 
       
   256 #endif 
       
   257 // SYMBIAN_NETWORKING_UMTSR5 
       
   258 
       
   259 
       
   260 void CPdpFsmInterface::Set(const TContextId aPdpId,MPdpFsmEventHandler& aPdpFsmEventHandler)
       
   261     {
       
   262 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketQoS::TQoSR99_R4Negotiated)");
       
   263 
       
   264 	ASSERT(iPdpFsmFactory);
       
   265 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   266 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   267 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aPdpFsmEventHandler);
       
   268     }
       
   269 
       
   270 /** Set context parameters
       
   271 
       
   272 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   273 @param aParam - TFTInfo data to set
       
   274 @return - KErrBadHandle or KErrNone
       
   275 */
       
   276 TInt CPdpFsmInterface::Set(TContextId aPdpId,const TTFTInfo& aParam)
       
   277     {
       
   278 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TFTInfo)");
       
   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 - TFTOperationCode to set to go with the data
       
   291 @return - KErrBadHandle or KErrNone
       
   292 */
       
   293 TInt CPdpFsmInterface::Set(TContextId aPdpId,const TTFTOperationCode& aParam)
       
   294     {
       
   295 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TTFTOperationCode)");
       
   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::TDataChannelV2 data to set
       
   308 @return - KErrBadHandle or KErrNone
       
   309 */
       
   310 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketContext::TDataChannelV2& aParam)
       
   311     {
       
   312 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TDataChannelV2)");
       
   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 context parameters
       
   322 
       
   323 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   324 @param aParam - RPacketContext::TContextStatus data to set
       
   325 @return - KErrBadHandle or KErrNone
       
   326 */
       
   327 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketContext::TContextStatus& aParam)
       
   328     {
       
   329 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketContext::TContextStatus)");
       
   330 
       
   331 	ASSERT(iPdpFsmFactory);
       
   332 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   333 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   334 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   335 	return KErrNone;
       
   336     }
       
   337 
       
   338 /** Set context parameters
       
   339 
       
   340 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   341 @param aParam - RPacketContext::TContextConfigGPRS& data to set
       
   342 @return - KErrBadHandle or KErrNone
       
   343 */
       
   344 TInt CPdpFsmInterface::Set(TContextId aPdpId, const TPacketDataConfigBase& aParam)
       
   345     {
       
   346 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(TPacketDataConfigBase)");
       
   347 
       
   348 	ASSERT(iPdpFsmFactory);
       
   349 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   350 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   351 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   352 	return KErrNone;
       
   353     }
       
   354 
       
   355 /** Set network status
       
   356 
       
   357 @param aParam - RPacketService::TStatus data to set
       
   358 */
       
   359 void CPdpFsmInterface::Set(const RPacketService::TStatus aParam)
       
   360     {
       
   361 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketService::TStatus)");
       
   362 
       
   363 	ASSERT(iPdpFsmFactory);
       
   364 
       
   365 	iNetworkStatus = aParam;
       
   366     }
       
   367 
       
   368 
       
   369 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   370 /**
       
   371 Get context parameters
       
   372 
       
   373 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   374 @param aParam - RPacketQoS::TQoSR5Requested data to get
       
   375 @return - KErrBadHandle or KErrNone
       
   376 */
       
   377 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketQoS::TQoSR5Requested& aParam) const
       
   378 {
       
   379 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSR5Requested)");
       
   380 
       
   381 	ASSERT(iPdpFsmFactory);
       
   382 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   383 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   384 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   385 	return KErrNone;
       
   386 }
       
   387 
       
   388 
       
   389 /**
       
   390 Get context parameters
       
   391 
       
   392 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   393 @param aParam - RPacketQoS::TQoSR5Negotiated data to get
       
   394 @return - KErrBadHandle or KErrNone
       
   395 */
       
   396 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketQoS::TQoSR5Negotiated& aParam) const
       
   397 {
       
   398 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR5Negotiated)");
       
   399 
       
   400 	ASSERT(iPdpFsmFactory);
       
   401 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   402 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   403 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   404 	return KErrNone;
       
   405 }
       
   406 
       
   407 #else
       
   408 // !SYMBIAN_NETWORKING_UMTSR5
       
   409 
       
   410 /**
       
   411 Get context parameters
       
   412 
       
   413 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   414 @param aParam - RPacketQoS::TQoSR99_R4Requested data to get
       
   415 @return - KErrBadHandle or KErrNone
       
   416 */
       
   417 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketQoS::TQoSR99_R4Requested& aParam) const
       
   418     {
       
   419 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQos::TQoSRequestedR99_R4)");
       
   420 
       
   421 	ASSERT(iPdpFsmFactory);
       
   422 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   423 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   424 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   425 	return KErrNone;
       
   426     }
       
   427 
       
   428 
       
   429 /**
       
   430 Get context parameters
       
   431 
       
   432 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   433 @param aParam - RPacketQoS::TQoSR99_R4Negotiated data to get
       
   434 @return - KErrBadHandle or KErrNone
       
   435 */
       
   436 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketQoS::TQoSR99_R4Negotiated& aParam) const
       
   437     {
       
   438 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketQoS::TQoSR99_R4Negotiated)");
       
   439 
       
   440 	ASSERT(iPdpFsmFactory);
       
   441 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   442 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   443 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   444 	return KErrNone;
       
   445     }
       
   446 
       
   447 #endif 
       
   448 // SYMBIAN_NETWORKING_UMTSR5 
       
   449 
       
   450 
       
   451 
       
   452 /** Get context parameters
       
   453 
       
   454 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   455 @param aParam - TTFTInfo data to get
       
   456 @return - KErrBadHandle or KErrNone
       
   457 */
       
   458 TInt CPdpFsmInterface::Get(TContextId aPdpId,TTFTInfo& aParam) const
       
   459     {
       
   460 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
       
   461 
       
   462 	ASSERT(iPdpFsmFactory);
       
   463 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   464 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   465 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   466 	return KErrNone;
       
   467     }
       
   468 
       
   469 /** Get context parameters
       
   470 
       
   471 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   472 @param aParam - TTFTOperationCode for the TFT data
       
   473 @return - KErrBadHandle or KErrNone
       
   474 */
       
   475 TInt CPdpFsmInterface::Get(TContextId aPdpId,TTFTOperationCode& aParam) const
       
   476     {
       
   477 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TFTInfo)");
       
   478 
       
   479 	ASSERT(iPdpFsmFactory);
       
   480 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   481 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   482 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   483 	return KErrNone;
       
   484     }
       
   485 
       
   486 
       
   487 
       
   488 /** Get context parameters
       
   489 
       
   490 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   491 @param aParam - RPacketContext::TDataChannelV2 data to set
       
   492 @return - KErrBadHandle or KErrNone
       
   493 */
       
   494 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketContext::TDataChannelV2& aParam) const
       
   495     {
       
   496 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TDataChannelV2)");
       
   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 TInt CPdpFsmInterface::Get(TContextId aPdpId, TPacketDataConfigBase& aParam) const
       
   512     {
       
   513 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(TPacketDataConfigBase)");
       
   514 
       
   515 	ASSERT(iPdpFsmFactory);
       
   516 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   517 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   518 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   519 	return KErrNone;
       
   520     }
       
   521 
       
   522 /** Get context parameters
       
   523 
       
   524 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   525 @param aParam - RPacketContext::TContextStatus data to get
       
   526 @return - KErrBadHandle or KErrNone
       
   527 */
       
   528 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketContext::TContextStatus& aParam) const
       
   529     {
       
   530 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketContext::TContextStatus)");
       
   531 
       
   532 	ASSERT(iPdpFsmFactory);
       
   533 	ASSERT(iPdpFsmFactory->ContextIdIsValid(aPdpId));
       
   534 	ASSERT(iPdpFsmFactory->HaveFsmContext(aPdpId));
       
   535 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   536 	return KErrNone;
       
   537     }
       
   538 
       
   539 /** Get context parameters
       
   540 
       
   541 @param aPdpId - the PDP context ID, 0 to KMaxPdpContexts
       
   542 @param aParam - RPacketContext::TContextConfigGPRS data to set
       
   543 @return - KErrBadHandle or KErrNone
       
   544 */
       
   545 void CPdpFsmInterface::Get(RPacketService::TStatus& aParam)
       
   546     {
       
   547 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Get(RPacketService::TStatus)");
       
   548 
       
   549 	ASSERT(iPdpFsmFactory);
       
   550 
       
   551 	aParam = iNetworkStatus;
       
   552     }
       
   553 
       
   554 
       
   555 /** Get the TsyName
       
   556 
       
   557 @return - TsyName in a TName
       
   558 */
       
   559 const TName& CPdpFsmInterface::TsyName(void)
       
   560     {
       
   561 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::TsyName");
       
   562 
       
   563 	ASSERT(iPdpFsmFactory);
       
   564 	
       
   565 	return iPdpFsmFactory->TsyName();
       
   566 }
       
   567 
       
   568 
       
   569 
       
   570 
       
   571 
       
   572 /**
       
   573 Set Mbms context parameters
       
   574 @param aPdpId - the Mbms PDP context ID
       
   575 @param aParam - RPacketMbmsContext::TContextConfigMbmsV1 data to set
       
   576 @return - KErrBadHandle or KErrNone
       
   577 */
       
   578 TInt CPdpFsmInterface::Set(TContextId aPdpId,const RPacketMbmsContext::TContextConfigMbmsV1& aParam)
       
   579 	{
       
   580 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketMbmsContext::TContextConfigMbmsV1)");
       
   581 
       
   582 	ASSERT(iPdpFsmFactory);
       
   583 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   584 	return KErrNone;
       
   585 	}
       
   586 
       
   587 /**
       
   588 Get Mbms context parameters
       
   589 @param aPdpId - the Mbms PDP context ID
       
   590 @param aParam - RPacketMbmsContext::TContextConfigMbmsV1 data to get
       
   591 @return - KErrBadHandle or KErrNone
       
   592 */
       
   593 TInt CPdpFsmInterface::Get(TContextId aPdpId,RPacketMbmsContext::TContextConfigMbmsV1& aParam) const 
       
   594 	{
       
   595 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketMbmsContext::TContextConfigMbmsV1)");
       
   596 
       
   597 	ASSERT(iPdpFsmFactory);
       
   598 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   599 	return KErrNone;
       
   600 	}
       
   601 	
       
   602 /**
       
   603 Get Mbms Session  parameters
       
   604 @param aPdpId - the Mbms PDP context ID
       
   605 @param aParam - TSessionOperatioInfo data to set
       
   606 @return - KErrBadHandle or KErrNone
       
   607 */
       
   608 TInt CPdpFsmInterface::Set(TContextId aPdpId, const TSessionOperatioInfo& aParam)
       
   609 	{
       
   610 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketMbmsContext::TContextConfigMbmsV1)");
       
   611 
       
   612 	ASSERT(iPdpFsmFactory);
       
   613 	iPdpFsmFactory->GetFsmContext(aPdpId)->Set(aParam);
       
   614 	return KErrNone;
       
   615 	}
       
   616 
       
   617 
       
   618 /**
       
   619 Get Mbms Session parameters
       
   620 @param aPdpId - the Mbms PDP context ID
       
   621 @param aParam - TSessionOperatioInfo data to get
       
   622 @return - KErrBadHandle or KErrNone
       
   623 */
       
   624 TInt CPdpFsmInterface::Get(TContextId aPdpId, TSessionOperatioInfo& aParam) const 
       
   625 	{
       
   626 	SPUDFSMVERBOSE_FNLOG("CPdpFsmInterface::Set(RPacketMbmsContext::TContextConfigMbmsV1)");
       
   627 
       
   628 	ASSERT(iPdpFsmFactory);
       
   629 	iPdpFsmFactory->GetFsmContext(aPdpId)->Get(aParam);
       
   630 	return KErrNone;
       
   631 	}
       
   632