supl/locationsuplfw/gateway/src/epos_csuplipcsubsession.cpp
branchRCL_3
changeset 19 02ba3f1733c6
parent 0 667063e416a2
child 20 2b4ea9893b66
equal deleted inserted replaced
18:d746aee05493 19:02ba3f1733c6
    32 #include "epos_csuplipcsubsession.h"
    32 #include "epos_csuplipcsubsession.h"
    33 #include "epos_suplparameters.h"
    33 #include "epos_suplparameters.h"
    34 #include "epos_csuplsettings.h"
    34 #include "epos_csuplsettings.h"
    35 #include "epos_csuplsettingsinternal.h"
    35 #include "epos_csuplsettingsinternal.h"
    36 #include "epos_csuplsettingparams.h"
    36 #include "epos_csuplsettingparams.h"
       
    37 #include "epos_suplgeocellinfo.h"
       
    38 
    37 
    39 
    38 // CONSTANTS
    40 // CONSTANTS
    39 //#ifdef _DEBUG
    41 //#ifdef _DEBUG
    40 _LIT(KTraceFileName, "SUPL_GW::epos_csuplipcsubsession.cpp");
    42 _LIT(KTraceFileName, "SUPL_GW::epos_csuplipcsubsession.cpp");
    41 //#endif
    43 //#endif
   224 			iMessage=aMessage;
   226 			iMessage=aMessage;
   225         	iReqType = ESuplTerminalSubssnNotifyTriggerFired;
   227         	iReqType = ESuplTerminalSubssnNotifyTriggerFired;
   226         	HandleNotifyTriggerFiredL(aMessage);
   228         	HandleNotifyTriggerFiredL(aMessage);
   227         	break;
   229         	break;
   228         	}
   230         	}
       
   231         case ESuplTerminalSubssnLocationConversion:
       
   232                     {
       
   233                     iMessage=aMessage;
       
   234                     iReqType = ESuplTerminalSubssnLocationConversion;
       
   235                     HandleLocationConversionL(aMessage);
       
   236                     break;
       
   237                     }
       
   238                             
       
   239                 case ESuplTerminalSubssnCancelLocationConversion:
       
   240                     {
       
   241                     HandleCancelLocationConversionL(aMessage);
       
   242                     break;
       
   243                     }  
   229 		default:
   244 		default:
   230 			User::Leave(KErrNotSupported);
   245 			User::Leave(KErrNotSupported);
   231         }
   246         }
   232     }
   247     }
   233 
   248 
   726     	
   741     	
   727 	iSuplSessnReq->NotifyTriggerFiredRequestL(iSuplSession,fireInfo);				
   742 	iSuplSessnReq->NotifyTriggerFiredRequestL(iSuplSession,fireInfo);				
   728 						
   743 						
   729 	CleanupStack::Pop(fireInfoBuf);	    		
   744 	CleanupStack::Pop(fireInfoBuf);	    		
   730 	}
   745 	}
       
   746 
       
   747 // ---------------------------------------------------------
       
   748 // CSuplIPCSubSession::HandleLocationConversionL
       
   749 //
       
   750 // (other items were commented in a header).
       
   751 // ---------------------------------------------------------
       
   752 //  
       
   753 void CSuplIPCSubSession::HandleLocationConversionL(const RMessage2& aMessage)
       
   754     {
       
   755     DEBUG_TRACE("CSuplIPCSubSession::HandleLocationConversionL", __LINE__)
       
   756 
       
   757     if (iSuplSessnReq->IsActive())
       
   758         {
       
   759         SuplGlobal::RequestComplete(aMessage, KErrAlreadyExists);
       
   760         }
       
   761 
       
   762     if(iReqType==ESuplTerminalSubssnLocationConversion)
       
   763         {
       
   764         HBufC8* cellBuf = SuplGlobal::CopyClientBuffer8LC(aMessage,0);
       
   765                 
       
   766         TGeoCellInfo& cellInfo = reinterpret_cast
       
   767         <TGeoCellInfo&>(const_cast<TUint8&>(*cellBuf->Ptr()));
       
   768                             
       
   769         iSuplSessnReq->MakeLocationConversionRequestL( iSuplSession,cellInfo );
       
   770         
       
   771         CleanupStack::PopAndDestroy(cellBuf);        
       
   772         }
       
   773          
       
   774     }
       
   775 
       
   776 // ---------------------------------------------------------
       
   777 // CSuplIPCSubSession::HandleCancelLocationConversionL
       
   778 //
       
   779 // (other items were commented in a header).
       
   780 // ---------------------------------------------------------
       
   781 //  
       
   782 void CSuplIPCSubSession::HandleCancelLocationConversionL(const RMessage2& aMessage)
       
   783     {
       
   784     DEBUG_TRACE("CSuplIPCSubSession::HandleCancelLocationConversionL", __LINE__)
       
   785 
       
   786     if (!iSuplSessnReq->IsActive()||(iReqType!=ESuplTerminalSubssnLocationConversion))
       
   787         {
       
   788         User::Leave(KErrNotFound);
       
   789         }
       
   790     iSuplSessnReq->CancelLocationConversionRequest();
       
   791     SuplGlobal::RequestComplete(aMessage, KErrNone);
       
   792     CompleteRunSession(KErrCancel);            
       
   793     }
   731 	
   794 	
   732 // End of File
   795 // End of File