sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file te_createconfigfullstep.cpp sl@0: */ sl@0: sl@0: #include "te_createconfigfullstep.h" sl@0: #include "te_clearconfig.h" sl@0: #include "uloggerdatatypes.h" sl@0: sl@0: using namespace Ulogger; sl@0: sl@0: CCreateConfigFUllTestStep::~CCreateConfigFUllTestStep() sl@0: /** sl@0: * Destructor sl@0: */ sl@0: { sl@0: } sl@0: sl@0: CCreateConfigFUllTestStep::CCreateConfigFUllTestStep() sl@0: /** sl@0: * Constructor sl@0: */ sl@0: { sl@0: // **MUST** call SetTestStepName in the constructor as the controlling sl@0: // framework uses the test step name immediately following construction to set sl@0: // up the step's unique logging ID. sl@0: SetTestStepName(KCreateConfigFullStep); sl@0: } sl@0: sl@0: sl@0: /** sl@0: * Override of base class virtual sl@0: * @return - TVerdict code sl@0: * sl@0: */ sl@0: TVerdict CCreateConfigFUllTestStep::doTestStepPreambleL() sl@0: { sl@0: return TestStepResult(); sl@0: } sl@0: sl@0: /** sl@0: * Override of base class virtual sl@0: * @return - TVerdict code sl@0: */ sl@0: TVerdict CCreateConfigFUllTestStep::doTestStepPostambleL() sl@0: { sl@0: return TestStepResult(); sl@0: } sl@0: sl@0: /** sl@0: * Test sl@0: * @return - TVerdict code sl@0: */ sl@0: TVerdict CCreateConfigFUllTestStep::doTestStepL() sl@0: { sl@0: RULogger logger; sl@0: sl@0: logger.Connect(); sl@0: CClearConfig configIni; sl@0: sl@0: configIni.ClearL(logger); sl@0: sl@0: _LIT8(KTextplugin,"uloggerfileplugin"); sl@0: logger.ActivateOutputPlugin(KTextplugin); sl@0: sl@0: _LIT(KTextsetting, "output_path"); sl@0: _LIT(KTextvalue, "c:\\logs\\Ulogger.log"); sl@0: sl@0: _LIT(KTextsetting2, "max_size"); sl@0: _LIT(KTextvalue2, "10000000"); sl@0: sl@0: const TPtrC settingptr(KTextsetting); sl@0: const TPtrC valueptr(KTextvalue); sl@0: sl@0: const TPtrC settingptr2(KTextsetting2); sl@0: const TPtrC valueptr2(KTextvalue2); sl@0: sl@0: TPluginConfiguration setpluginsettings1; sl@0: setpluginsettings1.SetKey(settingptr); sl@0: setpluginsettings1.SetValue(valueptr); sl@0: sl@0: TPluginConfiguration setpluginsettings2; sl@0: setpluginsettings2.SetKey(settingptr2); sl@0: setpluginsettings2.SetValue(valueptr2); sl@0: sl@0: logger.SetPluginConfigurations(KTextplugin, setpluginsettings1); sl@0: logger.SetPluginConfigurations(KTextplugin, setpluginsettings2); sl@0: sl@0: _LIT8(KTextplugin2,"uloggerserialplugin"); sl@0: _LIT(KTextsetting3, "output_port"); sl@0: _LIT(KTextvalue3, "1"); sl@0: sl@0: const TPtrC settingptr3(KTextsetting3); sl@0: const TPtrC valueptr3(KTextvalue3); sl@0: sl@0: TPluginConfiguration setpluginsettings3; sl@0: setpluginsettings3.SetKey(settingptr3); sl@0: setpluginsettings3.SetValue(valueptr3); sl@0: sl@0: logger.SetPluginConfigurations(KTextplugin2, setpluginsettings3); sl@0: sl@0: CArrayFixFlat *setfilter = new (ELeave)CArrayFixFlat(1); sl@0: setfilter->AppendL(3); sl@0: logger.SetPrimaryFiltersEnabled(*setfilter, true); sl@0: sl@0: RArray setfilter2; sl@0: setfilter2.Append((TUint32)2223); sl@0: logger.SetSecondaryFiltersEnabled(setfilter2, true); sl@0: sl@0: logger.SetSecondaryFilteringEnabled(false); sl@0: sl@0: SetTestStepResult(EPass); sl@0: sl@0: return TestStepResult(); sl@0: }