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