37
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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: Contains phone engine base central repository monitor class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDE FILES
|
|
20 |
#include "cpecalldurationdisplaysettingmonitor.h"
|
|
21 |
#include <LogsDomainCRKeys.h>
|
|
22 |
#include <talogger.h>
|
|
23 |
|
|
24 |
// -----------------------------------------------------------------------------
|
|
25 |
// CPECallDurationDisplaySettingMonitor::NewL
|
|
26 |
// Two-phased constructor.
|
|
27 |
// -----------------------------------------------------------------------------
|
|
28 |
//
|
|
29 |
CPECallDurationDisplaySettingMonitor* CPECallDurationDisplaySettingMonitor::NewL(
|
|
30 |
// None
|
|
31 |
)
|
|
32 |
{
|
|
33 |
TEFLOGSTRING(KTAOBJECT, "CPECallDurationDisplaySettingMonitor::NewL");
|
|
34 |
CPECallDurationDisplaySettingMonitor* me = new ( ELeave ) CPECallDurationDisplaySettingMonitor();
|
|
35 |
CleanupStack::PushL( me );
|
|
36 |
me->ConstructL();
|
|
37 |
CleanupStack::Pop( me );
|
|
38 |
return ( me );
|
|
39 |
}
|
|
40 |
|
|
41 |
// Destructor
|
|
42 |
CPECallDurationDisplaySettingMonitor::~CPECallDurationDisplaySettingMonitor()
|
|
43 |
{
|
|
44 |
// Base class object cancels outstanding request and deletes the repository
|
|
45 |
}
|
|
46 |
|
|
47 |
// -----------------------------------------------------------------------------
|
|
48 |
// CPECallDurationDisplaySettingMonitor::CPECallDurationDisplaySettingMonitor
|
|
49 |
// C++ default constructor can NOT contain any code, that
|
|
50 |
// might leave.
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
CPECallDurationDisplaySettingMonitor::CPECallDurationDisplaySettingMonitor()
|
|
54 |
: CPECenRepMonitor( KLogsShowCallDuration )
|
|
55 |
{
|
|
56 |
}
|
|
57 |
|
|
58 |
// -----------------------------------------------------------------------------
|
|
59 |
// CPECallDurationDisplaySettingMonitor::ConstructL
|
|
60 |
// Symbian 2nd phase constructor can leave.
|
|
61 |
// -----------------------------------------------------------------------------
|
|
62 |
//
|
|
63 |
void CPECallDurationDisplaySettingMonitor::ConstructL()
|
|
64 |
{
|
|
65 |
TEFLOGSTRING( KTAOBJECT, "CPECallDurationDisplaySettingMonitor::ConstructL" );
|
|
66 |
BaseConstructL( KCRUidLogs );
|
|
67 |
}
|
|
68 |
|
|
69 |
// -----------------------------------------------------------------------------
|
|
70 |
// CPECallDurationDisplaySettingMonitor::UpdateL
|
|
71 |
// Hardcoded values according to LogsDomainCRKeys.h
|
|
72 |
// 0 (call duration not shown)
|
|
73 |
// 1 (call duration shown)
|
|
74 |
// -----------------------------------------------------------------------------
|
|
75 |
//
|
|
76 |
void CPECallDurationDisplaySettingMonitor::UpdateL()
|
|
77 |
{
|
|
78 |
// Retrieve current value for call duration display
|
|
79 |
iError = Get( iDisplayCallDuration );
|
|
80 |
User::LeaveIfError( iError );
|
|
81 |
TEFLOGSTRING2( KTAINT, "CPECallDurationDisplaySettingMonitor::UpdateL %d", iDisplayCallDuration );
|
|
82 |
}
|
|
83 |
|
|
84 |
// -----------------------------------------------------------------------------
|
|
85 |
// CPECallDurationDisplaySettingMonitor::GetValue
|
|
86 |
// -----------------------------------------------------------------------------
|
|
87 |
//
|
|
88 |
TInt CPECallDurationDisplaySettingMonitor::GetValue(TInt& aValue)
|
|
89 |
{
|
|
90 |
aValue = (TInt)iDisplayCallDuration;
|
|
91 |
return iError;
|
|
92 |
}
|
|
93 |
|
|
94 |
// End of file
|