telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp
branchRCL_3
changeset 7 fe8b59ab9fa0
parent 0 3553901f7fa8
child 19 630d2f34d719
equal deleted inserted replaced
6:fc69e1e37771 7:fe8b59ab9fa0
   119     const TDataPackage& aPackage )        
   119     const TDataPackage& aPackage )        
   120     {
   120     {
   121     TInt ret = KErrNone;
   121     TInt ret = KErrNone;
   122     TInt trapError = KErrNone;
   122     TInt trapError = KErrNone;
   123 
   123 
   124     // reset last tsy request type
       
   125     iReqHandleType = EMultimodeUssdReqHandleUnknown;
       
   126 
       
   127     // before processing further the request, check if offline mode status
   124     // before processing further the request, check if offline mode status
   128     // is enabled and if the given request can be perfomed in that case.
   125     // is enabled and if the given request can be perfomed in that case.
   129     if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo() && 
   126     if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo() && 
   130         ( !IsRequestPossibleInOffline( aIpc ) ) )  
   127         ( !IsRequestPossibleInOffline( aIpc ) ) )  
   131         {
   128         {
   148             }
   145             }
   149         else if ( ret != KErrNone )
   146         else if ( ret != KErrNone )
   150             {
   147             {
   151             ReqCompleted( aTsyReqHandle, ret );
   148             ReqCompleted( aTsyReqHandle, ret );
   152             }
   149             }
   153 
   150         }
   154         // save request handle
   151     
   155         if ( EMultimodeUssdReqHandleUnknown != iReqHandleType )
       
   156             {
       
   157 #ifdef REQHANDLE_TIMER
       
   158             SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
       
   159 #else
       
   160             iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, 
       
   161                 aTsyReqHandle );
       
   162 #endif // REQHANDLE_TIMER
       
   163             }
       
   164         }
       
   165         
       
   166     return KErrNone;
   152     return KErrNone;
   167     }
   153     }
   168 
   154 
   169 // ---------------------------------------------------------------------------
   155 // ---------------------------------------------------------------------------
   170 // CMmUssdTsy::DoExtFuncL
   156 // CMmUssdTsy::DoExtFuncL
   892             RMobilePhone::TMobilePhoneSendSSRequestV3* tempReturnNotifyPtr;
   878             RMobilePhone::TMobilePhoneSendSSRequestV3* tempReturnNotifyPtr;
   893             if (iReturnNotifyUssdMessageAttributesPtr != NULL)
   879             if (iReturnNotifyUssdMessageAttributesPtr != NULL)
   894 				{
   880 				{
   895 				RMobileUssdMessaging::TMobileUssdAttributesV1* tempReturnNotifyUssdMessageAttributesPtr;
   881 				RMobileUssdMessaging::TMobileUssdAttributesV1* tempReturnNotifyUssdMessageAttributesPtr;
   896 				aDataPackage->UnPackData ( &tempReturnNotifyPtr, &tempReturnNotifyUssdMessageAttributesPtr );
   882 				aDataPackage->UnPackData ( &tempReturnNotifyPtr, &tempReturnNotifyUssdMessageAttributesPtr );
   897 				*iReturnNotifyPtr = *tempReturnNotifyPtr;
   883 				if (tempReturnNotifyPtr != NULL)
   898 				*iReturnNotifyUssdMessageAttributesPtr = *tempReturnNotifyUssdMessageAttributesPtr;
   884 				    {
       
   885 				    *iReturnNotifyPtr = *tempReturnNotifyPtr;
       
   886 				    }
       
   887 				else
       
   888 				    {
       
   889                     iReturnNotifyPtr->iOpCode = KErrNone;
       
   890                     iReturnNotifyPtr->iAdditionalInfo.Append( KErrNone );
       
   891 				    }
       
   892 				if (tempReturnNotifyUssdMessageAttributesPtr != NULL)
       
   893 					{
       
   894 					*iReturnNotifyUssdMessageAttributesPtr = *tempReturnNotifyUssdMessageAttributesPtr;
       
   895 					}
       
   896 				else
       
   897 				    {
       
   898                     iReturnNotifyUssdMessageAttributesPtr->iFormat = RMobileUssdMessaging::EFormatUnspecified;
       
   899                     iReturnNotifyUssdMessageAttributesPtr->iType = RMobileUssdMessaging::EUssdUnknown;
       
   900 				    }
   899 				}
   901 				}
   900             else
   902             else
   901 				{
   903 				{
   902 				aDataPackage->UnPackData ( &tempReturnNotifyPtr );
   904 				aDataPackage->UnPackData ( &tempReturnNotifyPtr );
   903 				*iReturnNotifyPtr = *tempReturnNotifyPtr;
   905 				if(tempReturnNotifyPtr != NULL)
       
   906 				    {
       
   907                     *iReturnNotifyPtr = *tempReturnNotifyPtr;
       
   908 				    }
       
   909 				else
       
   910 				    {
       
   911                     iReturnNotifyPtr->iOpCode = KErrNone;
       
   912                     iReturnNotifyPtr->iAdditionalInfo.Append( KErrNone );
       
   913 				    }
   904 				}
   914 				}
   905             }
   915             }
   906          // Null ret pointers
   916          // Null ret pointers
   907         iReturnNotifyPtr = NULL;
   917         iReturnNotifyPtr = NULL;
   908         iReturnNotifyUssdMessageAttributesPtr = NULL;
   918         iReturnNotifyUssdMessageAttributesPtr = NULL;