os/persistentdata/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_clearconfig.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file te_clearconfig.cpp
    18  @internalTechnology
    19 */
    20 
    21 #include <e32cons.h>
    22 #include <e32def.h>
    23 #include "te_clearconfig.h"
    24 
    25 CClearConfig::~CClearConfig()
    26 {
    27 	
    28 	/*Destructor*/
    29 }
    30 
    31 CClearConfig::CClearConfig()
    32 {
    33 	/*Constructor*/
    34 
    35 
    36 }
    37 
    38 void CClearConfig::ClearL(RULogger& loggerSession)
    39 	{	
    40 //	CArrayPtrFlat<HBufC8> *activeplugins = new (ELeave)CArrayPtrFlat<HBufC8>(1);				
    41 //	CleanupStack::PushL(activeplugins);
    42 //	loggerSession.GetActiveOutputPlugin(*activeplugins);
    43 //	if (activeplugins->Count())
    44 //	{
    45 //		TBuf<100> dataBuf;
    46 //		dataBuf.Copy(activeplugins->At(1)->Des());
    47 //		loggerSession.DeActivateOutputPlugin(dataBuf);
    48 //	}
    49 //	activeplugins->ResetAndDestroy();
    50 //	CleanupStack::PopAndDestroy();//ptrArray	
    51 //
    52 //	CArrayFixFlat<TUint8> *getfilter = new (ELeave)CArrayFixFlat<TUint8>(1);
    53 //	loggerSession.GetPrimaryFilters(*getfilter);
    54 //	
    55 //	
    56 //	TInt Result=loggerSession.RemovePrimaryFilter(*getfilter);
    57 //	
    58 ////	CleanupStack::PopAndDestroy();//ptrArray	
    59 //	RArray<TUint32> get2filter;	
    60 //	loggerSession.GetSecondaryFilters(get2filter);
    61 //				
    62 //	
    63 //	loggerSession.RemoveSecondaryFilter(get2filter);
    64 //	get2filter.Close();
    65 //	
    66 //	loggerSession.SetBufferMode(1);
    67 //	loggerSession.ResizeTraceBufferSize(65000);
    68 //
    69 //	loggerSession.SetDataNotificationSize(2);	
    70 
    71 	//disable all primary filters
    72 	CArrayFixFlat<TUint8>* enabledPrimaryFilters = new (ELeave)CArrayFixFlat<TUint8>(1);
    73 	CleanupStack::PushL(enabledPrimaryFilters);
    74 	loggerSession.GetPrimaryFiltersEnabled(*enabledPrimaryFilters);
    75 	loggerSession.SetPrimaryFiltersEnabled(*enabledPrimaryFilters, false);
    76 	CleanupStack::PopAndDestroy(enabledPrimaryFilters);
    77 
    78 	//disable all secondary filters
    79 	RArray<TUint32> enabledSecondaryFilters;
    80 	CleanupClosePushL(enabledSecondaryFilters);
    81 	loggerSession.GetSecondaryFiltersEnabled(enabledSecondaryFilters);
    82 	loggerSession.SetSecondaryFiltersEnabled(enabledSecondaryFilters, false);
    83 	CleanupStack::PopAndDestroy(); //enabledSecondaryFilters
    84 
    85 	//enable filtering by secondary filter
    86 	loggerSession.SetSecondaryFilteringEnabled(ETrue);
    87 
    88 	//set buffer mode: straight, buffer-size: 65000KB, notification size: 2KB
    89 	loggerSession.SetBufferMode(1);
    90 	loggerSession.SetBufferSize(65000);
    91 	loggerSession.SetNotificationSize(2);
    92 	}