libraries/qr3/src/featreglistboxdata.cpp
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // featreglistboxdata.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 
       
    16 CFeatRegListBoxData::CFeatRegListBoxData(CKernListBoxModel* aModel)
       
    17 	: CKernListBoxData(aModel)
       
    18 	{
       
    19 	}
       
    20 
       
    21 void CFeatRegListBoxData::DoFormatL(TObjectKernelInfo* aInfo, RBuf& name, RBuf& more, TInt& /*itemId*/)
       
    22 	{
       
    23 	SFeature& info = *reinterpret_cast<SFeature*>(aInfo);
       
    24 	more.Format(_L("Value: %i Info: %i"), info.iErr, info.iInfo);
       
    25 	gPlugin->FormatValue(name, MProductPlugin::EFeature, info.iFeature, 0);
       
    26 	}
       
    27 
       
    28 void CFeatRegListBoxData::DumpToCloggerL(RClogger& clogger, TInt i, TInt /*count*/)
       
    29 	{
       
    30 	_LIT(KFeatureDesc,"Feature;Uid;Name;Value;Info");
       
    31 	_LIT(KFeatureFmt, "Feature;0x%x;%S;%i;%i");
       
    32 
       
    33 	if (i == 0) clogger.Log(KFeatureDesc);
       
    34 	SFeature& info = *reinterpret_cast<SFeature*>(iInfo);
       
    35 	TBuf<256> buf;
       
    36 	gPlugin->FormatValue(buf, MProductPlugin::EFeature, info.iFeature, 0);
       
    37 	clogger.Log(KFeatureFmt, info.iFeature, &buf, info.iErr, info.iInfo);
       
    38 	}
       
    39 
       
    40 void CFeatRegListBoxData::DoInfoForDialogL(RBuf& aTitle, RBuf& inf, TDes* /*name*/)
       
    41 	{
       
    42 	SFeature& info = *reinterpret_cast<SFeature*>(iInfo);
       
    43 
       
    44 	_LIT(KInfo, "Feature info");
       
    45 	aTitle.Copy(KInfo);
       
    46 
       
    47 	gPlugin->FormatValue(inf, MProductPlugin::EFeature, info.iFeature, 0);
       
    48 	_LIT(KFeatureFmt, "\n0x%x\n\nFeature present: %i\n(Additional info: %i)");
       
    49 
       
    50 	inf.AppendFormat(KFeatureFmt, info.iFeature, info.iErr, info.iInfo);
       
    51 	}