24
|
1 |
/**
|
|
2 |
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "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 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Header for PSD-specific logging class
|
|
16 |
*
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
/**
|
|
23 |
@file PsdLogger.h
|
|
24 |
@internalComponent
|
|
25 |
*/
|
|
26 |
|
|
27 |
#ifndef __PSDLOGGER_H__
|
|
28 |
#define __PSDLOGGER_H__
|
|
29 |
|
|
30 |
|
|
31 |
#include <comms-infras/eventlogger.h>
|
|
32 |
#include <etelpckt.h>
|
|
33 |
#include <comms-infras/cagentsmbase.h>
|
|
34 |
|
|
35 |
const TInt KRegularUpdateInterval = 60000000; ///< 1 minute in microseconds
|
|
36 |
|
|
37 |
class MPsdEnv;
|
|
38 |
class MAgentObserver;
|
|
39 |
|
|
40 |
class CDataLogger: public CBase
|
|
41 |
/**
|
|
42 |
Class responsible for logging data volume transfer details to the log file
|
|
43 |
|
|
44 |
@internalComponent
|
|
45 |
*/
|
|
46 |
{
|
|
47 |
public:
|
|
48 |
static CDataLogger* NewL(MPsdEnv* aPsdSM,MAgentNotify* aObserver);
|
|
49 |
~CDataLogger();
|
|
50 |
void Start();
|
|
51 |
void StopL();
|
|
52 |
private:
|
|
53 |
CDataLogger(MPsdEnv* aPsdSM,MAgentNotify* aObserver);
|
|
54 |
TBool IsVolumeChanged(RPacketContext::TDataVolume& aNewVolume) const;
|
|
55 |
static TInt Update(TAny* aContext);
|
|
56 |
void RegularUpdateL();
|
|
57 |
void LogData();
|
|
58 |
void ConstructL();
|
|
59 |
private:
|
|
60 |
MPsdEnv* iSM;
|
|
61 |
MAgentNotify* iSMObserver; ///< for access to Notification, Agt->Nif
|
|
62 |
CPeriodic* iRegularUpdater;
|
|
63 |
RPacketContext::TDataVolume iVolumeTransferred;
|
|
64 |
};
|
|
65 |
|
|
66 |
|
|
67 |
#endif
|