telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp
branchRCL_3
changeset 16 fe8b59ab9fa0
parent 14 7ef16719d8cb
child 47 8b9e023e329f
equal deleted inserted replaced
15:fc69e1e37771 16:fe8b59ab9fa0
   121     mmPhoneTsy->ConstructL();
   121     mmPhoneTsy->ConstructL();
   122     CleanupStack::Pop( mmPhoneTsy );
   122     CleanupStack::Pop( mmPhoneTsy );
   123     return mmPhoneTsy;
   123     return mmPhoneTsy;
   124     }
   124     }
   125 
   125 
   126 CMmPhoneTsy::CMmPhoneTsy()
   126 CMmPhoneTsy::CMmPhoneTsy():
       
   127     iReqHandleType(EMultimodePhoneReqHandleUnknown)
   127     {
   128     {
   128     }
   129     }
   129 
   130 
   130 void CMmPhoneTsy::ConstructL()
   131 void CMmPhoneTsy::ConstructL()
   131     {
   132     {
   786 // CMmPhoneTsy::NosBootState
   787 // CMmPhoneTsy::NosBootState
   787 // Returns current DOS boot state
   788 // Returns current DOS boot state
   788 // (other items were commented in a header).
   789 // (other items were commented in a header).
   789 // ---------------------------------------------------------------------------
   790 // ---------------------------------------------------------------------------
   790 //
   791 //
   791 CMmPhoneTsy::CNosBootState* CMmPhoneTsy::NosBootState()
   792 CMmPhoneTsy::TNosBootState* CMmPhoneTsy::NosBootState()
   792     {
   793     {
   793     return &iBootState;
   794     return &iBootState;
   794     }
   795     }
   795 
   796 
   796 // ---------------------------------------------------------------------------
   797 // ---------------------------------------------------------------------------
   800 // ---------------------------------------------------------------------------
   801 // ---------------------------------------------------------------------------
   801 //
   802 //
   802 CStorageInfoData* CMmPhoneTsy::PhoneBookState()
   803 CStorageInfoData* CMmPhoneTsy::PhoneBookState()
   803     {
   804     {
   804     return iPhoneBookState;
   805     return iPhoneBookState;
   805     }
       
   806 
       
   807 // ---------------------------------------------------------------------------
       
   808 // CMmPhoneTsy::SetNosBootState
       
   809 // Returns current Phonebook state
       
   810 // (other items were commented in a header).
       
   811 // ---------------------------------------------------------------------------
       
   812 //
       
   813 void CMmPhoneTsy::SetNosBootState(
       
   814     CMmPhoneTsy::CNosBootState* aNewState )
       
   815     {
       
   816     iBootState.iSIMReady = aNewState->iSIMReady;
       
   817     iBootState.iADNReady = aNewState->iADNReady;
       
   818     iBootState.iSecReady = aNewState->iSecReady;
       
   819     iBootState.iCachingActive = aNewState->iCachingActive;
       
   820     }
   806     }
   821 
   807 
   822 // ---------------------------------------------------------------------------
   808 // ---------------------------------------------------------------------------
   823 // CMmPhoneTsy::OpenNewObjectByNameL
   809 // CMmPhoneTsy::OpenNewObjectByNameL
   824 // Creates new object and returns a pointer to it. The ETel
   810 // Creates new object and returns a pointer to it. The ETel
  1138 TFLOGSTRING3("TSY: CMmPhoneTsy::ExtFunc, IPC:%d, Handle:%d", aIpc, aTsyReqHandle);
  1124 TFLOGSTRING3("TSY: CMmPhoneTsy::ExtFunc, IPC:%d, Handle:%d", aIpc, aTsyReqHandle);
  1139 
  1125 
  1140     TInt ret = KErrNone;
  1126     TInt ret = KErrNone;
  1141     TInt trapError = KErrNone;
  1127     TInt trapError = KErrNone;
  1142 
  1128 
  1143     //reset last tsy request type
  1129     // Ensure the ReqHandleType is unset.
  1144     iReqHandleType = EMultimodePhoneReqHandleUnknown;
  1130     // This will detect cases where this method indirectly calls itself
       
  1131     // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
       
  1132     // Such cases are not supported because iReqHandleType is in the context of this class instance,
       
  1133     // not this request, and we don't want the values set by the inner request and the outer request
       
  1134     // interfering with each other.
       
  1135     __ASSERT_DEBUG(iReqHandleType==EMultimodePhoneReqHandleUnknown, User::Invariant());
  1145 
  1136 
  1146     //before processing further the request, check if offline mode status
  1137     //before processing further the request, check if offline mode status
  1147     //is enabled and if the given request can be perfomed in that case.
  1138     //is enabled and if the given request can be perfomed in that case.
  1148     if ( ERfsStateInfoInactive == iStateInfo &&
  1139     if ( ERfsStateInfoInactive == iStateInfo &&
  1149         !IsRequestPossibleInOffline( aIpc ) )
  1140         !IsRequestPossibleInOffline( aIpc ) )
  1175             SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
  1166             SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
  1176 #else
  1167 #else
  1177             iTsyReqHandleStore->SetTsyReqHandle( 
  1168             iTsyReqHandleStore->SetTsyReqHandle( 
  1178                 iReqHandleType, aTsyReqHandle );
  1169                 iReqHandleType, aTsyReqHandle );
  1179 #endif //REQHANDLE_TIMER
  1170 #endif //REQHANDLE_TIMER
  1180             }
  1171             // We've finished with this value now. Clear it so it doesn't leak
  1181 
  1172             //  up to any other instances of this method down the call stack
  1182         //reset last tsy request type
  1173             iReqHandleType = EMultimodePhoneReqHandleUnknown;
  1183         iReqHandleType = EMultimodePhoneReqHandleUnknown;
  1174             }
  1184         }
  1175         }
  1185 
  1176 
  1186     return KErrNone;
  1177     return KErrNone;
  1187 
  1178 
  1188     }
  1179     }
  2476                 {
  2467                 {
  2477 #ifdef REQHANDLE_TIMER
  2468 #ifdef REQHANDLE_TIMER
  2478                 SetTypeOfResponse( EMultimodePhoneTerminateAllCalls, aTsyReqHandle );
  2469                 SetTypeOfResponse( EMultimodePhoneTerminateAllCalls, aTsyReqHandle );
  2479 #else
  2470 #else
  2480                 iTsyReqHandleStore->SetTsyReqHandle( 
  2471                 iTsyReqHandleStore->SetTsyReqHandle( 
  2481                 		iReqHandleType, aTsyReqHandle );
  2472                         EMultimodePhoneTerminateAllCalls, aTsyReqHandle );
  2482 #endif //REQHANDLE_TIMER
  2473 #endif //REQHANDLE_TIMER
  2483                 }
  2474                 }
  2484             else
  2475             else
  2485             	{
  2476             	{
  2486                 // request failed, complete with error value
  2477                 // request failed, complete with error value