// ----------------------------------------------------------------------------- // CEcmtPanPlugin::SendCurrentValues // // ----------------------------------------------------------------------------- // void CEcmtPanPlugin::SendCurrentValuesL( ) { #ifdef ECMT_RDEBUG RDebug::Print( _L( "EcmtPanPlugin::SendCurrentValuesL" ) ); #endif TBuf<KMaxWin32Path> buf; TBuf8<KMaxPanMsgLen> msg; TPtrC8 line; TLex8 lexer; /* * Handle bt.esk */ GetBtEskFilename( buf ); REcmtFile btFile( buf ); btFile.Read(); if ( !btFile.IsGood() ) { return; } line.Set( btFile.FindLine( KBtPort ) ); if ( line.Length() == 0 ) { return; } msg.Append( KBtCom ); msg.Append( ' ' ); lexer.Assign( line ); lexer.SkipCharacters(); msg.Append( lexer.NextToken() ); msg.Append( ' ' ); line.Set( btFile.FindLine( KHciDll ) ); if ( line.Length() == 0 ) { return; } msg.Append( KHci ); msg.Append( ' ' ); lexer.Assign( line ); lexer.SkipCharacters(); TPtrC8 dll( lexer.NextToken() ); if ( dll.CompareF( KHciDllBcsp ) == 0 ) { msg.Append( '0' ); } else if ( dll.CompareF( KHciDllH4 ) == 0 ) { msg.Append( '1' ); } else if ( dll.CompareF( KHciDllUsb ) == 0 ) { msg.Append( '2' ); } else { msg.Append( '-1' ); } /* * Handle irda.esk */ GetIrdaEskFilename( buf ); REcmtFile irdaFile( buf ); irdaFile.Read(); if ( !irdaFile.IsGood() ) { return; } line.Set( irdaFile.FindLine( KIrdaPort ) ); if ( line.Length() == 0 ) { return; } msg.Append( ' ' ); msg.Append( KIrdaCom ); msg.Append( ' ' ); lexer.Assign( line ); lexer.SkipCharacters(); msg.Append( lexer.NextToken() ); /* * Send values */ CEcmtMessageEvent* m = iMessaging->NewMessageEvent( iTargetUid, msg ); if ( m ) { #ifdef ECMT_RDEBUG RDebug::Print( _L( "EcmtPanPlugin::SendCurrentValuesL: Sending a message" ) ); #endif iMessageSender->SendMessage( m ); } }