telephonyserver/etelserverandcore/SETEL/ET_CORE.CPP
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 
    15 
    16 
       
    17 #include "OstTraceDefinitions.h"
       
    18 #ifdef OST_TRACE_COMPILER_IN_USE
       
    19 #include "ET_CORETraces.h"
       
    20 #endif
       
    21 
       
    22 #include "ET_SSTD.H"
    16 #include "ET_SSTD.H"
    23 #include "ETBUFFER.H"
    17 #include "ETBUFFER.H"
    24 #include <f32file.h>
    18 #include <f32file.h>
    25 #include "etsvr_slots.h"
    19 #include "etsvr_slots.h"
    26 #include "et_phone_util.h"
    20 #include "et_phone_util.h"
    27 
       
    28 //
    21 //
    29 //
    22 //
    30 // CFaxBase
    23 // CFaxBase
    31 //
    24 //
    32 //
    25 //
   184 //	D'Tor
   177 //	D'Tor
   185 //	Attual closing of the owner is done in CSubSessionBase destructor
   178 //	Attual closing of the owner is done in CSubSessionBase destructor
   186 //	This is for all object inherit fron CSubSessionBase
   179 //	This is for all object inherit fron CSubSessionBase
   187 //
   180 //
   188 	{
   181 	{
   189 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CCALLBASE_DTOR_1, "~CCallBase");
   182 	LOGTEXT("~CCallBase");
   190 	}
   183 	}
   191 
   184 
   192 EXPORT_C TInt CCallBase::CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle)
   185 EXPORT_C TInt CCallBase::CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle)
   193 //
   186 //
   194 // Cancel Service for Call
   187 // Cancel Service for Call
   331 //
   324 //
   332 // Perform close post-processing before object being close
   325 // Perform close post-processing before object being close
   333 // if is owner then set to EUnOwned
   326 // if is owner then set to EUnOwned
   334 //
   327 //
   335 	{
   328 	{
   336 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CCALLBASE_CLOSESUBSESSIONPREPROCESSING_1, "CCallBase::CloseSubSessionPreProcessing() - about to create dummy session");
   329 	LOGTEXT("CCallBase::CloseSubSessionPreProcessing() - about to create dummy session");
   337 	CreateDummySession(aSession,aSubSessionHandle);
   330 	CreateDummySession(aSession,aSubSessionHandle);
   338 	RCall::TOwnershipStatus owner=CheckOwnershipBySession(aSession,aSubSessionHandle);
   331 	RCall::TOwnershipStatus owner=CheckOwnershipBySession(aSession,aSubSessionHandle);
   339 	if (owner==RCall::EOwnershipOwnedByThisClient)
   332 	if (owner==RCall::EOwnershipOwnedByThisClient)
   340 		{
   333 		{
   341 		CreateDummySession(aSession,aSubSessionHandle,ETrue);
   334 		CreateDummySession(aSession,aSubSessionHandle,ETrue);
   679 EXPORT_C CLineBase::~CLineBase()
   672 EXPORT_C CLineBase::~CLineBase()
   680 //
   673 //
   681 //	D'Tor
   674 //	D'Tor
   682 //
   675 //
   683 	{
   676 	{
   684 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CLINEBASE_DTOR_1, "~CLineBase");
   677 	LOGTEXT("~CLineBase");
   685 	}
   678 	}
   686 
   679 
   687 EXPORT_C TInt CLineBase::CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle)
   680 EXPORT_C TInt CLineBase::CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle)
   688 //
   681 //
   689 // Cancel Service for Line
   682 // Cancel Service for Line
   791 EXPORT_C void CLineBase::CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle)
   784 EXPORT_C void CLineBase::CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle)
   792 //
   785 //
   793 // 
   786 // 
   794 //
   787 //
   795 	{
   788 	{
   796 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CLINEBASE_CLOSESUBSESSIONPREPROCESSING_1, "CLineBase::CloseSubSessionPreProcessing() - about to create dummy session");
   789 	LOGTEXT("CLineBase::CloseSubSessionPreProcessing() - about to create dummy session");
   797 	CreateDummySession(aSession,aSubSessionHandle);
   790 	CreateDummySession(aSession,aSubSessionHandle);
   798 	FlushReqs(aSession,aSubSessionHandle);
   791 	FlushReqs(aSession,aSubSessionHandle);
   799 	}
   792 	}
   800 
   793 
   801 EXPORT_C CTelObject::TReqMode CLineBase::ReqModeL(const TInt aIpc)
   794 EXPORT_C CTelObject::TReqMode CLineBase::ReqModeL(const TInt aIpc)
   867 //	CPhone destructor.
   860 //	CPhone destructor.
   868 //	Attual closing of the owner is done in CSubSessionBase destructor
   861 //	Attual closing of the owner is done in CSubSessionBase destructor
   869 //	This is for all object inherit fron CSubSesissionBase
   862 //	This is for all object inherit fron CSubSesissionBase
   870 //
   863 //
   871 	{
   864 	{
   872 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CPHONEBASE_DTOR_1, "~CPhoneBase");
   865 	LOGTEXT("~CPhoneBase");
   873 	}
   866 	}
   874 
   867 
   875 //
   868 //
   876 // Request List Manipulation Functions
   869 // Request List Manipulation Functions
   877 //
   870 //
  1056 void CPhoneBase::AddReqToActive(CReqEntry* aReqEntry)
  1049 void CPhoneBase::AddReqToActive(CReqEntry* aReqEntry)
  1057 //
  1050 //
  1058 //	Add reqEntry to the 'active list'
  1051 //	Add reqEntry to the 'active list'
  1059 //
  1052 //
  1060 	{
  1053 	{
  1061 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPHONEBASE_ADDREQTOACTIVE_1, "CPhoneBase::AddReqToActive with TsyHandle of %d", aReqEntry->iTsyReqHandle);
  1054 	LOGTEXT2("CPhoneBase::AddReqToActive with TsyHandle of %d", aReqEntry->iTsyReqHandle);
  1062 	iReqActiveList.AddLast(*aReqEntry);
  1055 	iReqActiveList.AddLast(*aReqEntry);
  1063 	}
  1056 	}
  1064 
  1057 
  1065 void CPhoneBase::AddReqToWaiting(CReqEntry* aReqEntry)
  1058 void CPhoneBase::AddReqToWaiting(CReqEntry* aReqEntry)
  1066 //
  1059 //
  1067 //	Add entry to the 'wait list'
  1060 //	Add entry to the 'wait list'
  1068 //
  1061 //
  1069 	{
  1062 	{
  1070 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPHONEBASE_ADDREQTOWAITING_1, "CPhoneBase::AddReqToWaiting with TsyHandle of %d", aReqEntry->iTsyReqHandle);
  1063 	LOGTEXT2("CPhoneBase::AddReqToWaiting with TsyHandle of %d", aReqEntry->iTsyReqHandle);
  1071 	iReqWaitList.AddLast(*aReqEntry);
  1064 	iReqWaitList.AddLast(*aReqEntry);
  1072 	}
  1065 	}
  1073 
  1066 
  1074 TTsyReqHandle CPhoneBase::TsyReqHandle()
  1067 TTsyReqHandle CPhoneBase::TsyReqHandle()
  1075 //
  1068 //
  1115 EXPORT_C void CPhoneBase::CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle)
  1108 EXPORT_C void CPhoneBase::CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle)
  1116 //
  1109 //
  1117 //  Find if any active request if so create a dummy session
  1110 //  Find if any active request if so create a dummy session
  1118 //
  1111 //
  1119 	{
  1112 	{
  1120 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CPHONEBASE_CLOSESUBSESSIONPREPROCESSING_1, "CPhoneBase::CloseSubSessionPreProcessing");
  1113 	LOGTEXT("CPhoneBase::CloseSubSessionPreProcessing");
  1121 	CreateDummySession(aSession,aSubSessionHandle);
  1114 	CreateDummySession(aSession,aSubSessionHandle);
  1122 	FlushReqs(aSession,aSubSessionHandle);
  1115 	FlushReqs(aSession,aSubSessionHandle);
  1123 	}
  1116 	}
  1124 
  1117 
  1125 EXPORT_C TInt CPhoneBase::Service(const RMessage2& aMessage, CReqEntry* aReqEntry)
  1118 EXPORT_C TInt CPhoneBase::Service(const RMessage2& aMessage, CReqEntry* aReqEntry)
  1275 void CPhoneBase::FlowControlInc()
  1268 void CPhoneBase::FlowControlInc()
  1276 //
  1269 //
  1277 // Increase iFlowControlCnt
  1270 // Increase iFlowControlCnt
  1278 //
  1271 //
  1279 	{
  1272 	{
  1280 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPHONEBASE_FLOWCONTROLINC_1, "Incrementing Flow Control from %d to %d", iFlowControlCnt, iFlowControlCnt+1);
  1273 	LOGTEXT3("Incrementing Flow Control from %d to %d", iFlowControlCnt, iFlowControlCnt+1);
  1281 	iFlowControlCnt++;
  1274 	iFlowControlCnt++;
  1282 	}
  1275 	}
  1283 
  1276 
  1284 void CPhoneBase::FlowControlDec()
  1277 void CPhoneBase::FlowControlDec()
  1285 //
  1278 //
  1286 // Decrease iFlowControlCnt
  1279 // Decrease iFlowControlCnt
  1287 //
  1280 //
  1288 	{
  1281 	{
  1289 	__ASSERT_ALWAYS((iFlowControlCnt>0),Fault(EEtelFaultNegativeFlowcontrolCount));
  1282 	__ASSERT_ALWAYS((iFlowControlCnt>0),Fault(EEtelFaultNegativeFlowcontrolCount));
  1290 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPHONEBASE_FLOWCONTROLDEC_1, "Decrementing Flow Control from %d to %d", iFlowControlCnt, iFlowControlCnt-1);
  1283 	LOGTEXT3("Decrementing Flow Control from %d to %d", iFlowControlCnt, iFlowControlCnt-1);
  1291 	iFlowControlCnt--;
  1284 	iFlowControlCnt--;
  1292 	}
  1285 	}
  1293 
  1286 
  1294 EXPORT_C TBool CPhoneBase::CheckEmergencyClient(const TTsyReqHandle aTsyReqHandle) const
  1287 EXPORT_C TBool CPhoneBase::CheckEmergencyClient(const TTsyReqHandle aTsyReqHandle) const
  1295 	{
  1288 	{