adaptationlayer/systemstatemanageradaptation/iscservice/src/sa_common_isc_service.cpp
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * ============================================================================== |
2 * ============================================================================== |
3 * Name: sa_common_isc_service.cpp |
3 * Name: sa_common_isc_service.cpp |
4 * Part of: System adaptation |
4 * Part of: System adaptation |
5 * Description: Implementation of CSACommonIscService class |
5 * Description: Implementation of CSACommonIscService class |
6 * %version: 1 % |
6 * %version: 2 % |
7 * %date_modified: Tue Dec 29 15:59:32 2009 % |
7 * %date_modified: Tue May 04 09:25:00 2010 % |
8 * |
8 * |
9 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
9 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
10 * All rights reserved. |
10 * All rights reserved. |
11 * This component and the accompanying materials are made available |
11 * This component and the accompanying materials are made available |
12 * under the terms of the License "Eclipse Public License v1.0" |
12 * under the terms of the License "Eclipse Public License v1.0" |
105 INTERNAL_TRACE( ( _L( "ISCSERVICE # CSACommonIscService::ConstructL(0x%x)" ), aEvents ) ); |
105 INTERNAL_TRACE( ( _L( "ISCSERVICE # CSACommonIscService::ConstructL(0x%x)" ), aEvents ) ); |
106 |
106 |
107 TRequestStatus status; |
107 TRequestStatus status; |
108 |
108 |
109 /* Open ISC channel */ |
109 /* Open ISC channel */ |
110 OstTrace0( TRACE_API, SA_COMMON_ISC_SERVICE_AUTOMATED_4, |
110 OstTrace0( TRACE_BORDER, SA_COMMON_ISC_SERVICE_AUTOMATED_4, |
111 "ISCSERVICE - CSACommonIscService::ConstructL() - Opening ISC channel" ); |
111 "ISCSERVICE - CSACommonIscService::ConstructL() - Opening ISC channel" ); |
112 API_TRACE( ( _L( "ISCSERVICE - CSACommonIscService::ConstructL() - Opening ISC channel" ) ) ); |
112 API_TRACE( ( _L( "ISCSERVICE - CSACommonIscService::ConstructL() - Opening ISC channel" ) ) ); |
113 iIscApi.Open( iChannelNumber, status ); |
113 iIscApi.Open( iChannelNumber, status ); |
114 User::WaitForRequest( status ); |
114 User::WaitForRequest( status ); |
115 |
115 |
194 /* Cancel monitoring ISC channel state */ |
194 /* Cancel monitoring ISC channel state */ |
195 delete iSACommonIscServiceChannelListener; |
195 delete iSACommonIscServiceChannelListener; |
196 iSACommonIscServiceChannelListener = NULL; |
196 iSACommonIscServiceChannelListener = NULL; |
197 |
197 |
198 /* Close ISC channel */ |
198 /* Close ISC channel */ |
199 OstTrace0( TRACE_API, SA_COMMON_ISC_SERVICE_AUTOMATED_10, |
199 OstTrace0( TRACE_BORDER, SA_COMMON_ISC_SERVICE_AUTOMATED_10, |
200 "ISCSERVICE - CSACommonIscService::~CSACommonIscService - Close ISC channel" ); |
200 "ISCSERVICE - CSACommonIscService::~CSACommonIscService - Close ISC channel" ); |
201 API_TRACE( ( _L( "ISCSERVICE - CSACommonIscService::~CSACommonIscService - Close ISC channel" ) ) ); |
201 API_TRACE( ( _L( "ISCSERVICE - CSACommonIscService::~CSACommonIscService - Close ISC channel" ) ) ); |
202 iIscApi.Close(); |
202 iIscApi.Close(); |
203 |
203 |
204 OstTrace0( TRACE_NORMAL, SA_COMMON_ISC_SERVICE_AUTOMATED_11, |
204 OstTrace0( TRACE_NORMAL, SA_COMMON_ISC_SERVICE_AUTOMATED_11, |
217 { |
217 { |
218 OstTrace1( TRACE_NORMAL, SA_COMMON_ISC_SERVICE_AUTOMATED_12, |
218 OstTrace1( TRACE_NORMAL, SA_COMMON_ISC_SERVICE_AUTOMATED_12, |
219 "ISCSERVICE # CSACommonIscService::SendMessageL(0x%x)", (TUint)&aMessage ); |
219 "ISCSERVICE # CSACommonIscService::SendMessageL(0x%x)", (TUint)&aMessage ); |
220 INTERNAL_TRACE( ( _L( "ISCSERVICE # CSACommonIscService::SendMessageL(0x%x)" ), (TUint)&aMessage ) ); |
220 INTERNAL_TRACE( ( _L( "ISCSERVICE # CSACommonIscService::SendMessageL(0x%x)" ), (TUint)&aMessage ) ); |
221 |
221 |
222 OstTrace1( TRACE_API, SA_COMMON_ISC_SERVICE_AUTOMATED_13, |
222 OstTrace1( TRACE_BORDER, SA_COMMON_ISC_SERVICE_AUTOMATED_13, |
223 "ISCSERVICE - CSACommonIscService::SendMessageL() - Sending ISI Message;aData=%x", |
223 "ISCSERVICE - CSACommonIscService::SendMessageL() - Sending ISI Message;aData=%x", |
224 (TUint)&aMessage ); |
224 (TUint)&aMessage ); |
225 ISIMSG_API_TRACE( _L("ISCSERVICE # CSACommonIscService::SendMessageL() - Sending ISI Message: "), aMessage); |
225 ISIMSG_API_TRACE( _L("ISCSERVICE # CSACommonIscService::SendMessageL() - Sending ISI Message: "), aMessage); |
226 |
226 |
227 User::LeaveIfError( iIscApi.Send( aMessage ) ); |
227 User::LeaveIfError( iIscApi.Send( aMessage ) ); |
245 aMessageLength ) ); |
245 aMessageLength ) ); |
246 |
246 |
247 if ( !IsActive() ) |
247 if ( !IsActive() ) |
248 { |
248 { |
249 |
249 |
250 OstTrace0( TRACE_API, SA_COMMON_ISC_SERVICE_AUTOMATED_17, |
250 OstTrace0( TRACE_BORDER, SA_COMMON_ISC_SERVICE_AUTOMATED_17, |
251 "ISCSERVICE - CSACommonIscService::ReceiveMessageL() - Receiving message" ); |
251 "ISCSERVICE - CSACommonIscService::ReceiveMessageL() - Receiving message" ); |
252 API_TRACE( ( _L( "ISCSERVICE - CSACommonIscService::ReceiveMessageL() - Receiving message" ) ) ); |
252 API_TRACE( ( _L( "ISCSERVICE - CSACommonIscService::ReceiveMessageL() - Receiving message" ) ) ); |
253 |
253 |
254 /* Reserve space for the received message buffer */ |
254 /* Reserve space for the received message buffer */ |
255 delete iBuffer; |
255 delete iBuffer; |
292 { |
292 { |
293 case KErrNone: |
293 case KErrNone: |
294 if ( iBufferPtr.Length() >= KSASMinIscMessageLength ) |
294 if ( iBufferPtr.Length() >= KSASMinIscMessageLength ) |
295 { |
295 { |
296 /* Forward receive message to System Adaptation proxy */ |
296 /* Forward receive message to System Adaptation proxy */ |
297 OstTrace1( TRACE_API, SA_COMMON_ISC_SERVICE_AUTOMATED_20, |
297 OstTrace1( TRACE_BORDER, SA_COMMON_ISC_SERVICE_AUTOMATED_20, |
298 "ISCSERVICE - CSACommonIscService::RunL() - Receive ISI Message;iBufferPtr=%x", |
298 "ISCSERVICE - CSACommonIscService::RunL() - Receive ISI Message;iBufferPtr=%x", |
299 (TUint)&(iBufferPtr) ); |
299 (TUint)&(iBufferPtr) ); |
300 ISIMSG_API_TRACE( _L("ISCSERVICE - CSACommonIscService::RunL() - Receive ISI Message: " ), |
300 ISIMSG_API_TRACE( _L("ISCSERVICE - CSACommonIscService::RunL() - Receive ISI Message: " ), |
301 iBufferPtr); |
301 iBufferPtr); |
302 |
302 |