supl/locationsuplfw/gateway/src/epos_csuplipcsubsession.cpp
branchRCL_3
changeset 19 02ba3f1733c6
parent 0 667063e416a2
child 20 2b4ea9893b66
--- a/supl/locationsuplfw/gateway/src/epos_csuplipcsubsession.cpp	Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplipcsubsession.cpp	Thu Aug 19 10:20:18 2010 +0300
@@ -34,6 +34,8 @@
 #include "epos_csuplsettings.h"
 #include "epos_csuplsettingsinternal.h"
 #include "epos_csuplsettingparams.h"
+#include "epos_suplgeocellinfo.h"
+
 
 // CONSTANTS
 //#ifdef _DEBUG
@@ -226,6 +228,19 @@
         	HandleNotifyTriggerFiredL(aMessage);
         	break;
         	}
+        case ESuplTerminalSubssnLocationConversion:
+                    {
+                    iMessage=aMessage;
+                    iReqType = ESuplTerminalSubssnLocationConversion;
+                    HandleLocationConversionL(aMessage);
+                    break;
+                    }
+                            
+                case ESuplTerminalSubssnCancelLocationConversion:
+                    {
+                    HandleCancelLocationConversionL(aMessage);
+                    break;
+                    }  
 		default:
 			User::Leave(KErrNotSupported);
         }
@@ -728,5 +743,53 @@
 						
 	CleanupStack::Pop(fireInfoBuf);	    		
 	}
+
+// ---------------------------------------------------------
+// CSuplIPCSubSession::HandleLocationConversionL
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//  
+void CSuplIPCSubSession::HandleLocationConversionL(const RMessage2& aMessage)
+    {
+    DEBUG_TRACE("CSuplIPCSubSession::HandleLocationConversionL", __LINE__)
+
+    if (iSuplSessnReq->IsActive())
+        {
+        SuplGlobal::RequestComplete(aMessage, KErrAlreadyExists);
+        }
+
+    if(iReqType==ESuplTerminalSubssnLocationConversion)
+        {
+        HBufC8* cellBuf = SuplGlobal::CopyClientBuffer8LC(aMessage,0);
+                
+        TGeoCellInfo& cellInfo = reinterpret_cast
+        <TGeoCellInfo&>(const_cast<TUint8&>(*cellBuf->Ptr()));
+                            
+        iSuplSessnReq->MakeLocationConversionRequestL( iSuplSession,cellInfo );
+        
+        CleanupStack::PopAndDestroy(cellBuf);        
+        }
+         
+    }
+
+// ---------------------------------------------------------
+// CSuplIPCSubSession::HandleCancelLocationConversionL
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//  
+void CSuplIPCSubSession::HandleCancelLocationConversionL(const RMessage2& aMessage)
+    {
+    DEBUG_TRACE("CSuplIPCSubSession::HandleCancelLocationConversionL", __LINE__)
+
+    if (!iSuplSessnReq->IsActive()||(iReqType!=ESuplTerminalSubssnLocationConversion))
+        {
+        User::Leave(KErrNotFound);
+        }
+    iSuplSessnReq->CancelLocationConversionRequest();
+    SuplGlobal::RequestComplete(aMessage, KErrNone);
+    CompleteRunSession(KErrCancel);            
+    }
 	
 // End of File