telephonyserver/etelserverandcore/SETEL/ET_SES.CPP
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
child 73 70d75957b98f
equal deleted inserted replaced
61:17af172ffa5f 65: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".
    16 /**
    16 /**
    17  @file
    17  @file
    18 */
    18 */
    19 
    19 
    20 
    20 
       
    21 
       
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "ET_SESTraces.h"
       
    25 #endif
       
    26 
    21 #include "ET_SSTD.H"
    27 #include "ET_SSTD.H"
    22 #include "e32svr.h"
    28 #include "e32svr.h"
    23 #include "et_record.h"
    29 #include "et_record.h"
    24 
       
    25 
    30 
    26 #define DOUBLE_COLON		_L("::")
    31 #define DOUBLE_COLON		_L("::")
    27 #define ETEL_NAME			_L("Etel")
    32 #define ETEL_NAME			_L("Etel")
    28 #define TSY_EXTENSION		_L(".TSY")
    33 #define TSY_EXTENSION		_L(".TSY")
    29 #define MBMS_CONTEXT_NAME	_L("MBMS_CONTEXT")
    34 #define MBMS_CONTEXT_NAME	_L("MBMS_CONTEXT")
    96 		{
   101 		{
    97 		TInt handle;
   102 		TInt handle;
    98 		CObject* theObj=NULL;
   103 		CObject* theObj=NULL;
    99 		TInt count=iObjectIx->Count();
   104 		TInt count=iObjectIx->Count();
   100 
   105 
   101 		LOGTEXT2("CTelSession::~CTelSession iObjectIx->Count()=%d", count);
   106 		OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSESSION_DTOR_1, "CTelSession::~CTelSession iObjectIx->Count()=%d", count);
   102 		
   107 		
   103 		for(TInt i=0;i<count;i++)
   108 		for(TInt i=0;i<count;i++)
   104 			{
   109 			{
   105 			theObj=iObjectIx->operator[](i);
   110 			theObj=iObjectIx->operator[](i);
   106 			if(theObj)
   111 			if(theObj)
   128 					count = newCount;
   133 					count = newCount;
   129 					i--;
   134 					i--;
   130 					}
   135 					}
   131 				}
   136 				}
   132 			}
   137 			}
   133 		LOGTEXT("Delete iObjectIx");
   138 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSESSION_DTOR_2, "Delete iObjectIx");
   134 		delete iObjectIx;
   139 		delete iObjectIx;
   135 		}
   140 		}
   136 
   141 
   137 
   142 
   138 	if (iTsyModulesIx)
   143 	if (iTsyModulesIx)
   139 		{
   144 		{
   140 		LOGTEXT("Delete TsyModulesIx");
   145 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSESSION_DTOR_3, "Delete TsyModulesIx");
   141 		delete iTsyModulesIx;
   146 		delete iTsyModulesIx;
   142 		}
   147 		}
   143 	UnsetPriorityClient();
   148 	UnsetPriorityClient();
   144 	UnsetEmergencyClient();
   149 	UnsetEmergencyClient();
   145     RECORD_SESSION_CLOSE(this);
   150     RECORD_SESSION_CLOSE(this);
   160 void CTelSession::ServiceL(const RMessage2 &aMessage)
   165 void CTelSession::ServiceL(const RMessage2 &aMessage)
   161 //
   166 //
   162 // Handle messages for this session
   167 // Handle messages for this session
   163 //
   168 //
   164 	{
   169 	{
   165 	LOGTEXT2("CTelSession::Service Called, IPC: %d", aMessage.Function());
   170 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSESSION_SERVICEL_1, "CTelSession::Service Called, IPC: %d", aMessage.Function());
   166 
   171 
   167 	iMessage=aMessage;
   172 	iMessage=aMessage;
   168 
   173 
   169 	switch (aMessage.Function())
   174 	switch (aMessage.Function())
   170 		{
   175 		{
   811 	name.Set(StripOutNextName(remaining,fullName));
   816 	name.Set(StripOutNextName(remaining,fullName));
   812 
   817 
   813 	TRAP(res,(newObject=iPhoneManager->OpenPhoneFromFactoryL(phoneFactory,name)));
   818 	TRAP(res,(newObject=iPhoneManager->OpenPhoneFromFactoryL(phoneFactory,name)));
   814 	if(res!=KErrNone)
   819 	if(res!=KErrNone)
   815 		{
   820 		{
   816 		LOGTEXT2("Open Phone from Factory returned %d", res);
   821 		OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSESSION_NEWTELOBJECT_1, "Open Phone from Factory returned %d", res);
   817 		if(newObject)
   822 		if(newObject)
   818 			newObject->TelObjectClose();
   823 			newObject->TelObjectClose();
   819 		else
   824 		else
   820 			phoneFactory->Close();
   825 			phoneFactory->Close();
   821 		if(!iMessage.IsNull())
   826 		if(!iMessage.IsNull())