64
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2007 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: Freestyle Email source file
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// SYSTEM INCLUDES
|
|
20 |
#include "emailtrace.h"
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <StringLoader.h>
|
|
23 |
#include <barsread.h>
|
|
24 |
#include <FreestyleEmailUi.rsg>
|
|
25 |
|
|
26 |
// LOCAL INCLUDES
|
|
27 |
#include "FreestyleEmailUiGlobalSettingsData.h"
|
|
28 |
|
|
29 |
/**
|
|
30 |
* C/C++ constructor for settings data, cannot throw
|
|
31 |
*/
|
|
32 |
CFsEmailUiGlobalSettingsData::CFsEmailUiGlobalSettingsData()
|
|
33 |
{
|
|
34 |
FUNC_LOG;
|
|
35 |
}
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Two-phase constructor for settings data
|
|
39 |
*/
|
|
40 |
CFsEmailUiGlobalSettingsData* CFsEmailUiGlobalSettingsData::NewL()
|
|
41 |
{
|
|
42 |
FUNC_LOG;
|
|
43 |
|
|
44 |
CFsEmailUiGlobalSettingsData* data = new( ELeave ) CFsEmailUiGlobalSettingsData;
|
|
45 |
CleanupStack::PushL( data );
|
|
46 |
data->ConstructL();
|
|
47 |
CleanupStack::Pop( data );
|
|
48 |
|
|
49 |
return data;
|
|
50 |
}
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Second phase for initializing settings data
|
|
54 |
*/
|
|
55 |
void CFsEmailUiGlobalSettingsData::ConstructL()
|
|
56 |
{
|
|
57 |
FUNC_LOG;
|
|
58 |
|
|
59 |
SetMessageListLayout( 1 );
|
|
60 |
SetBodyPreview( 1 );
|
|
61 |
SetTitleDividers( 1 );
|
|
62 |
SetDownloadNotifications( 0 );
|
|
63 |
SetActiveIdle( 0 );
|
|
64 |
SetWarnBeforeDelete( 1 );
|
|
65 |
SetDownloadHTMLImages( 1 );
|
|
66 |
}
|
|
67 |
|
|
68 |
TBool& CFsEmailUiGlobalSettingsData::WarnBeforeDelete()
|
|
69 |
{
|
|
70 |
FUNC_LOG;
|
|
71 |
return iWarnBeforeDelete;
|
|
72 |
}
|
|
73 |
|
|
74 |
void CFsEmailUiGlobalSettingsData::SetWarnBeforeDelete(const TBool& aValue)
|
|
75 |
{
|
|
76 |
FUNC_LOG;
|
|
77 |
|
|
78 |
iWarnBeforeDelete = aValue;
|
|
79 |
|
|
80 |
}
|
|
81 |
|
|
82 |
TBool& CFsEmailUiGlobalSettingsData::MessageHeader()
|
|
83 |
{
|
|
84 |
FUNC_LOG;
|
|
85 |
return iMessageHeader;
|
|
86 |
}
|
|
87 |
|
|
88 |
void CFsEmailUiGlobalSettingsData::SetMessageHeader(const TBool& aValue)
|
|
89 |
{
|
|
90 |
FUNC_LOG;
|
|
91 |
|
|
92 |
iMessageHeader = aValue;
|
|
93 |
}
|
|
94 |
|
|
95 |
TBool& CFsEmailUiGlobalSettingsData::MessageListLayout()
|
|
96 |
{
|
|
97 |
FUNC_LOG;
|
|
98 |
return iMessageListLayout;
|
|
99 |
}
|
|
100 |
|
|
101 |
void CFsEmailUiGlobalSettingsData::SetMessageListLayout(const TBool& aValue)
|
|
102 |
{
|
|
103 |
FUNC_LOG;
|
|
104 |
iMessageListLayout = aValue;
|
|
105 |
}
|
|
106 |
|
|
107 |
TBool& CFsEmailUiGlobalSettingsData::BodyPreview()
|
|
108 |
{
|
|
109 |
FUNC_LOG;
|
|
110 |
return iBodyPreview;
|
|
111 |
}
|
|
112 |
|
|
113 |
void CFsEmailUiGlobalSettingsData::SetBodyPreview(const TBool& aValue)
|
|
114 |
{
|
|
115 |
FUNC_LOG;
|
|
116 |
|
|
117 |
iBodyPreview = aValue;
|
|
118 |
}
|
|
119 |
|
|
120 |
TBool& CFsEmailUiGlobalSettingsData::TitleDividers()
|
|
121 |
{
|
|
122 |
FUNC_LOG;
|
|
123 |
return iTitleDividers;
|
|
124 |
}
|
|
125 |
|
|
126 |
void CFsEmailUiGlobalSettingsData::SetTitleDividers( const TBool& aValue )
|
|
127 |
{
|
|
128 |
FUNC_LOG;
|
|
129 |
|
|
130 |
iTitleDividers = aValue;
|
|
131 |
}
|
|
132 |
|
|
133 |
TBool& CFsEmailUiGlobalSettingsData::DownloadNotifications()
|
|
134 |
{
|
|
135 |
FUNC_LOG;
|
|
136 |
return iDownloadNotifications;
|
|
137 |
}
|
|
138 |
|
|
139 |
void CFsEmailUiGlobalSettingsData::SetDownloadNotifications( const TBool& aValue )
|
|
140 |
{
|
|
141 |
FUNC_LOG;
|
|
142 |
|
|
143 |
iDownloadNotifications = aValue;
|
|
144 |
}
|
|
145 |
|
|
146 |
TInt& CFsEmailUiGlobalSettingsData::ActiveIdle()
|
|
147 |
{
|
|
148 |
FUNC_LOG;
|
|
149 |
return iActiveIdle;
|
|
150 |
}
|
|
151 |
|
|
152 |
void CFsEmailUiGlobalSettingsData::SetActiveIdle( const TInt& aValue )
|
|
153 |
{
|
|
154 |
FUNC_LOG;
|
|
155 |
iActiveIdle = aValue;
|
|
156 |
|
|
157 |
}
|
|
158 |
|
|
159 |
void CFsEmailUiGlobalSettingsData::SetDownloadHTMLImages( const TBool& aValue )
|
|
160 |
{
|
|
161 |
FUNC_LOG;
|
|
162 |
iDownloadHTMLImages = aValue;
|
|
163 |
}
|
|
164 |
|
|
165 |
TBool& CFsEmailUiGlobalSettingsData::DownloadHTMLImages()
|
|
166 |
{
|
|
167 |
FUNC_LOG;
|
|
168 |
return iDownloadHTMLImages;
|
|
169 |
}
|
|
170 |
|
|
171 |
|