sipvoipprovider/src/svpsslogcall.cpp
branchRCL_3
changeset 11 6134b5029079
parent 10 ed1e38b404e5
child 20 65a3ef1d5bd0
equal deleted inserted replaced
10:ed1e38b404e5 11:6134b5029079
   218                             delete title;
   218                             delete title;
   219                             title = NULL;
   219                             title = NULL;
   220                             }       
   220                             }       
   221                         }
   221                         }
   222                     else
   222                     else
   223                         {					
   223                         {
   224 						title = tempContactItem->GetContactTitleL();
   224                         title = tempContactItem->GetContactTitleL();
   225                         compId = contactId;
   225                         compId = contactId;
   226                         ind = count;
   226                         ind = count;
   227                         }
   227                         }
   228                     }
   228                     }
   229                 }
   229                 }
   279     
   279     
   280     iLogEvent->SetNumber( KNullDesC );
   280     iLogEvent->SetNumber( KNullDesC );
   281     
   281     
   282     TLogString number;
   282     TLogString number;
   283     CnvUtfConverter::ConvertToUnicodeFromUtf8( number, aFrom );
   283     CnvUtfConverter::ConvertToUnicodeFromUtf8( number, aFrom );
   284     RemoveUnusedCharsFromSipAddress( number );            
   284     RemoveUnusedCharsFromSipAddress( number );
   285 	SVPDEBUG2("  CSVPSSLogCall::HandleCallLoggingL, number = %S", &number );        
   285     SVPDEBUG2("  CSVPSSLogCall::HandleCallLoggingL, number = %S", &number );
   286 
   286 
   287     if ( KErrNotFound == aFrom.Find( KSVPAnonymousName8 ) )
   287     if ( KErrNotFound == aFrom.Find( KSVPAnonymousName8 ) )
   288     	{
   288     	{
   289         SVPDEBUG1("  CSVPSSLogCall::HandleCallLoggingL, URI address is seen" );
   289         SVPDEBUG1("  CSVPSSLogCall::HandleCallLoggingL, URI address is seen" );
   290         HBufC* contactName = FindContactTitleL( number );
   290         HBufC* contactName = FindContactTitleL( number );
   291 	    if ( contactName )
   291         if ( contactName )
   292 		    { 
   292             { 
   293 	        //  Phonebook contact id has been found
   293             //  Phonebook contact id has been found
   294 		    tempBufTwo.Copy( number );
   294             tempBufTwo.Copy( number );
   295 		    iLogEvent->SetRemoteParty( contactName->Des() );
   295             iLogEvent->SetRemoteParty( contactName->Des() );
   296 	        }
   296             }
   297 	    else
   297         else
   298 	        { // No phonebook contact id has been found
   298             { // No phonebook contact id has been found
   299 	       	tempBufTwo.Copy( number );
   299            	tempBufTwo.Copy( number );
   300 	       	iLogEvent->SetRemoteParty( number );
   300            	iLogEvent->SetRemoteParty( number );
   301 	        }
   301             }
   302 	    
   302         
   303 	    if ( contactName )
   303         if ( contactName )
   304 	        {
   304             {
   305 	        delete contactName;
   305             delete contactName;
   306 	        contactName = NULL;
   306             contactName = NULL;
   307 	        }
   307             }
   308 	    
   308         
   309 	    tempBufOne.Append( tempBufTwo );             
   309         tempBufOne.Append( tempBufTwo );
   310 	    tempBufTwo.Zero();
   310         tempBufTwo.Zero();
   311 	    tempBufOne.Append( KLogFieldDelimiter() );
   311         tempBufOne.Append( KLogFieldDelimiter() );
   312 	    tempBufOne.Append( KLogTagMA() );
   312         tempBufOne.Append( KLogTagMA() );
   313 	    tempBufOne.Append( KLogValueDelimiter() );
   313         tempBufOne.Append( KLogValueDelimiter() );
   314     	}
   314         }
   315     else
   315     else
   316 	    {
   316         {
   317         SVPDEBUG1("  CSVPSSLogCall::HandleCallLoggingL, URI address is Anonymous" );
   317         SVPDEBUG1("  CSVPSSLogCall::HandleCallLoggingL, URI address is Anonymous" );
   318         iLogEvent->SetRemoteParty( KSVPPrivateNumber );
   318         iLogEvent->SetRemoteParty( KSVPPrivateNumber );
   319 	    }
   319         }
   320     TRAP_IGNORE( iLogEvent->SetDataL( tempBufOne ) );
   320     TRAP_IGNORE( iLogEvent->SetDataL( tempBufOne ) );
   321     TTime eventTime;
   321     TTime eventTime;
   322     eventTime.UniversalTime();
   322     eventTime.UniversalTime();
   323     iLogEvent->SetTime(eventTime);
   323     iLogEvent->SetTime(eventTime);
   324     iLogClient->AddEvent(*iLogEvent, iStatus);
   324     iLogClient->AddEvent(*iLogEvent, iStatus);