libraries/qr3/src/msgqlistboxdata.cpp
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // msgqlistboxdata.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 CMsgQueListBoxData::CMsgQueListBoxData(CKernListBoxModel* aModel)
       
    20 	: CKernListBoxData(aModel)
       
    21 	{
       
    22 	}
       
    23 
       
    24 void CMsgQueListBoxData::DoFormatL(TObjectKernelInfo* aInfo, RBuf& name, RBuf& more, TInt& /*itemId*/)
       
    25 	{
       
    26 	TMsgQueueKernelInfo& info = *(TMsgQueueKernelInfo*)aInfo;
       
    27 	name.Copy(info.iFullName);
       
    28 	PrettyName(iType, name);
       
    29 
       
    30 	more.Format(_L("Message max size=%u"), info.iMaxMsgLength);
       
    31 	}
       
    32 
       
    33 void CMsgQueListBoxData::DumpToCloggerL(RClogger& clogger, TInt i, TInt /*count*/)
       
    34 	{
       
    35 	TMsgQueueKernelInfo& info = *(TMsgQueueKernelInfo*)iInfo;
       
    36 	_LIT8(KDesc,"MsgQ;KernObjAddr;FullName;AccessCount;MsgLength");
       
    37 	_LIT8(KFmt,"MsgQ;%x;%S;%d;%d");
       
    38 	
       
    39 	if (i == 0) clogger.Log(KDesc);
       
    40 	clogger.Log(KFmt, info.iAddressOfKernelObject, &info.iFullName, info.iAccessCount, info.iMaxMsgLength);
       
    41 	}
       
    42 
       
    43 void CMsgQueListBoxData::DoInfoForDialogL(RBuf& aTitle, RBuf& inf, TDes* /*aTemp*/)
       
    44 	{
       
    45 	TMsgQueueKernelInfo& info = *(TMsgQueueKernelInfo*)iInfo;
       
    46 	_LIT(KInfo, "Message queue 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("Message max size: %u\n"), info.iMaxMsgLength);
       
    54 	inf.AppendFormat(_L("Access count: %u"), info.iAccessCount);
       
    55 	//inf.AppendFormat(_L("Kernel owner address:  0x%08x\n"), info.iAddressOfKernelOwner);
       
    56 	}