equal
deleted
inserted
replaced
95 iReceivePtr( 0, 0 ), |
95 iReceivePtr( 0, 0 ), |
96 iReceiveMessageLength( 0 ), |
96 iReceiveMessageLength( 0 ), |
97 iReceivedMessage( NULL ), |
97 iReceivedMessage( NULL ), |
98 iPepObjId(0), |
98 iPepObjId(0), |
99 iPipeController(NULL), |
99 iPipeController(NULL), |
100 iDisconnected( EFalse ) |
100 iDisconnected( EFalse ), |
|
101 iModemAtExistInCmt( EFalse ) |
101 { |
102 { |
102 C_TRACE (( _T("CModemAtHandler::CModemAtHandler") )); |
103 C_TRACE (( _T("CModemAtHandler::CModemAtHandler") )); |
103 |
|
104 } |
104 } |
105 |
105 |
106 void CModemAtHandler::DoCancel() |
106 void CModemAtHandler::DoCancel() |
107 { |
107 { |
108 C_TRACE (( _T("CModemAtHandler::DoCancel()") )); |
108 C_TRACE (( _T("CModemAtHandler::DoCancel()") )); |
109 iIscApi->ReceiveCancel(); |
109 iIscApi->ReceiveCancel(); |
110 |
|
111 } |
110 } |
112 |
111 |
113 |
112 |
114 void CModemAtHandler::RunL() |
113 void CModemAtHandler::RunL() |
115 { |
114 { |
227 } |
226 } |
228 |
227 |
229 #ifndef __WINSCW__ |
228 #ifndef __WINSCW__ |
230 OpenChannelL(); |
229 OpenChannelL(); |
231 #ifndef NCP_COMMON_BRIDGE_FAMILY |
230 #ifndef NCP_COMMON_BRIDGE_FAMILY |
232 iPipeController->SendTaskIdQuery(); |
231 iPipeController->QueryModemAtFromNameService(); |
233 #endif |
232 #endif |
234 #else |
233 #else |
235 iEmulatedValue = 0; |
234 iEmulatedValue = 0; |
236 #endif |
235 #endif |
237 |
236 |
238 } |
|
239 |
|
240 |
|
241 TInt CModemAtHandler::GetMinSizeDividendByFour( TInt aSize) |
|
242 { |
|
243 C_TRACE (( _T("CModemAtHandler::GetMinSizeDividendByFour(%d)"),aSize )); |
|
244 aSize += aSize % KAlignToFourBytes; |
|
245 |
|
246 C_TRACE (( _T("CModemAtHandler::GetMinSizeDividendByFour return: %d"),aSize )); |
|
247 return aSize; |
|
248 } |
237 } |
249 |
238 |
250 TInt CModemAtHandler::SendATCommand(const TUint8 aDteId, |
239 TInt CModemAtHandler::SendATCommand(const TUint8 aDteId, |
251 const TATPluginInterface aPluginType, |
240 const TATPluginInterface aPluginType, |
252 const TUint8 aMessageType, |
241 const TUint8 aMessageType, |
271 return KErrNone; |
260 return KErrNone; |
272 #endif |
261 #endif |
273 |
262 |
274 TInt size = ISI_HEADER_SIZE + AT_MODEM_CMD_REQ_OFFSET_CMDLINEBUFFER + aCmd.Length(); |
263 TInt size = ISI_HEADER_SIZE + AT_MODEM_CMD_REQ_OFFSET_CMDLINEBUFFER + aCmd.Length(); |
275 |
264 |
276 TInt sizeWithFillers = GetMinSizeDividendByFour( size ); |
265 TInt sizeWithFillers = size; |
|
266 while( sizeWithFillers % KAlignToFourBytes ) |
|
267 { |
|
268 sizeWithFillers++; |
|
269 } |
277 C_TRACE((_L("Message length %d"), sizeWithFillers)); |
270 C_TRACE((_L("Message length %d"), sizeWithFillers)); |
278 |
271 |
279 HBufC8* message = HBufC8::New( sizeWithFillers ); |
272 HBufC8* message = HBufC8::New( sizeWithFillers ); |
280 if( message ) |
273 if( message ) |
281 { |
274 { |
422 #endif |
415 #endif |
423 |
416 |
424 |
417 |
425 TInt CModemAtHandler::Connect(const TUint8 aDteId) |
418 TInt CModemAtHandler::Connect(const TUint8 aDteId) |
426 { |
419 { |
427 C_TRACE (( _T("CModemAtHandler::Connect()") )); |
420 C_TRACE (( _T("CModemAtHandler::Connect()") )); |
|
421 |
|
422 if( !iModemAtExistInCmt ) |
|
423 { |
|
424 C_TRACE((_T("Connection failed, PN_AT_MODEM is not in CMT"))); |
|
425 TRACE_ASSERT_ALWAYS; |
|
426 return KErrNotFound; |
|
427 } |
428 |
428 |
429 C_TRACE((_L("Connecting with dteid:%d "), aDteId)); |
429 C_TRACE((_L("Connecting with dteid:%d "), aDteId)); |
430 SetDisconnected( EFalse ); |
430 SetDisconnected( EFalse ); |
431 |
431 |
432 #ifdef __WINSCW__ //emulate, modem is connected |
432 #ifdef __WINSCW__ //emulate, modem is connected |
692 TInt result = aMessage.Get8bit( ISI_HEADER_SIZE + AT_MODEM_SIGNAL_DETECTED_RESP_OFFSET_RESULT ); |
692 TInt result = aMessage.Get8bit( ISI_HEADER_SIZE + AT_MODEM_SIGNAL_DETECTED_RESP_OFFSET_RESULT ); |
693 C_TRACE((_L("CModemAtHandler::HandleSignalDetectedResp() dteId %d"), dteId)); |
693 C_TRACE((_L("CModemAtHandler::HandleSignalDetectedResp() dteId %d"), dteId)); |
694 TRACE_ASSERT( result == AT_MODEM_RESULT_OK ); |
694 TRACE_ASSERT( result == AT_MODEM_RESULT_OK ); |
695 } |
695 } |
696 |
696 |
|
697 void CModemAtHandler::SetModemAtExistsInCmt( TBool aModemAtExistsInCmt ) |
|
698 { |
|
699 C_TRACE((_T("CModemAtHandler::SetModemAtExistsInCmt(%d)"), (TInt)aModemAtExistsInCmt)); |
|
700 iModemAtExistInCmt = aModemAtExistsInCmt; |
|
701 } |
|
702 |