telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmcalltsy.cpp
branchRCL_3
changeset 7 fe8b59ab9fa0
parent 0 3553901f7fa8
child 19 630d2f34d719
equal deleted inserted replaced
6:fc69e1e37771 7:fe8b59ab9fa0
    31 #include "cmmcallgsmwcdmaext.h"
    31 #include "cmmcallgsmwcdmaext.h"
    32 #include <ctsy/pluginapi/mtelephonyaudiocontrol.h>
    32 #include <ctsy/pluginapi/mtelephonyaudiocontrol.h>
    33 
    33 
    34 // ======== MEMBER FUNCTIONS ========
    34 // ======== MEMBER FUNCTIONS ========
    35 
    35 
    36 CMmCallTsy::CMmCallTsy() : iCallParamsPckg(iCallParams)
    36 CMmCallTsy::CMmCallTsy() :
       
    37     iCallParamsPckg(iCallParams),
       
    38     iReqHandleType(EMultimodeCallReqHandleUnknown)
    37     {
    39     {
    38     }
    40     }
    39 
    41 
    40 void CMmCallTsy::ConstructL( 
    42 void CMmCallTsy::ConstructL( 
    41 	RMobilePhone::TMobileService aMode )
    43 	RMobilePhone::TMobileService aMode )
   305     const TDataPackage& aPackage )
   307     const TDataPackage& aPackage )
   306     {    
   308     {    
   307     TInt ret( KErrNone );
   309     TInt ret( KErrNone );
   308     TInt trapError( KErrNone );
   310     TInt trapError( KErrNone );
   309 
   311 
   310     //reset last tsy request type
   312     // Ensure the ReqHandleType is unset.
   311     iReqHandleType = EMultimodeCallReqHandleUnknown;
   313     // This will detect cases where this method indirectly calls itself
       
   314     // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
       
   315     // Such cases are not supported because iReqHandleType is in the context of this class instance,
       
   316     // not this request, and we don't want the values set by the inner request and the outer request
       
   317     // interfering with each other.
       
   318     __ASSERT_DEBUG(iReqHandleType==EMultimodeCallReqHandleUnknown, User::Invariant());
       
   319 
   312 
   320 
   313     //before processing further the request, check if offline mode status
   321     //before processing further the request, check if offline mode status
   314     //is enabled and if the given request can be perfomed in that case.
   322     //is enabled and if the given request can be perfomed in that case.
   315     if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo () &&
   323     if ( ERfsStateInfoInactive == iMmPhone->GetRfStateInfo () &&
   316         !IsRequestPossibleInOffline( aIpc ) )  
   324         !IsRequestPossibleInOffline( aIpc ) )  
   342             SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
   350             SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
   343 #else
   351 #else
   344             iTsyReqHandleStore->SetTsyReqHandle(
   352             iTsyReqHandleStore->SetTsyReqHandle(
   345                 iReqHandleType, aTsyReqHandle );
   353                 iReqHandleType, aTsyReqHandle );
   346 #endif
   354 #endif
       
   355             // We've finished with this value now. Clear it so it doesn't leak
       
   356             //  up to any other instances of this method down the call stack
       
   357             iReqHandleType = EMultimodeCallReqHandleUnknown;
   347             }
   358             }
   348     
   359     
   349         }
   360         }
   350 
   361 
   351     return KErrNone;
   362     return KErrNone;