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