libraries/qr3/src/semaphorelistboxdata.cpp
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // semaphorelistboxdata.cpp
       
     2 // 
       
     3 // Copyright (c) 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // 
       
     9 // Initial Contributors:
       
    10 // Accenture - Initial contribution
       
    11 //
       
    12 #include "KernLbxModel.h"
       
    13 #include "Utils.h"
       
    14 #include <fshell/clogger.h>
       
    15 #include <fshell/memoryaccess.h>
       
    16 #include <fshell/qr3dll.h>
       
    17 #include "QResources3.hrh"
       
    18 
       
    19 CSemaphoreListBoxData::CSemaphoreListBoxData(CKernListBoxModel* aModel)
       
    20 	: CKernListBoxData(aModel)
       
    21 	{
       
    22 	}
       
    23 
       
    24 void CSemaphoreListBoxData::DoFormatL(TObjectKernelInfo* aInfo, RBuf& name, RBuf& more, TInt& /*itemId*/)
       
    25 	{
       
    26 	TSemaphoreKernelInfo& info = *(TSemaphoreKernelInfo*)aInfo;
       
    27 	name.Copy(info.iFullName);
       
    28 	PrettyName(iType, name);
       
    29 
       
    30 	more.Format(_L("Count=%d"), info.iCount);
       
    31 	}
       
    32 
       
    33 void CSemaphoreListBoxData::DumpToCloggerL(RClogger& clogger, TInt i, TInt /*count*/)
       
    34 	{
       
    35 	TSemaphoreKernelInfo& info = *(TSemaphoreKernelInfo*)iInfo;
       
    36 	_LIT8(KDesc,"Semaphore;KernObjAddr;FullName;AccessCount;Count");
       
    37 	_LIT8(KFmt, "Semaphore;%x;%S;%d;%d");
       
    38 	
       
    39 	if (i == 0) clogger.Log(KDesc);
       
    40 	clogger.Log(KFmt, info.iAddressOfKernelObject, &info.iFullName, info.iAccessCount, info.iCount);
       
    41 	}
       
    42 
       
    43 void CSemaphoreListBoxData::DoInfoForDialogL(RBuf& aTitle, RBuf& inf, TDes* /*aTemp*/)
       
    44 	{
       
    45 	TSemaphoreKernelInfo& info = *(TSemaphoreKernelInfo*)iInfo;
       
    46 	_LIT(KInfo, "Semaphore info");
       
    47 	aTitle.Copy(KInfo);
       
    48 
       
    49 	inf.Copy(iInfo->iFullName);
       
    50 	inf.Append(Klflf);
       
    51 	
       
    52 	inf.AppendFormat(_L("Kernel object address: 0x%08x\n"), info.iAddressOfKernelObject);
       
    53 	inf.AppendFormat(_L("Access count: %u\n"), info.iAccessCount);
       
    54 	inf.AppendFormat(_L("Count: %d"), info.iCount);
       
    55 	}