64
|
1 |
/*
|
|
2 |
* Copyright (c) 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: Header for common constant declearations.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef IPSSETUTILSCONSTS_H
|
|
20 |
#define IPSSETUTILSCONSTS_H
|
|
21 |
|
|
22 |
#include <e32std.h>
|
|
23 |
|
|
24 |
#include "ipssetutilsconsts.hrh"
|
|
25 |
#include "ipssetdata.h"
|
|
26 |
|
|
27 |
/** Plain text buffer. */
|
|
28 |
typedef TBuf<KIpsSetUiMaxSettingsLongTextLength> TIpsSetUtilsTextPlain;
|
|
29 |
/** Password text buffer. */
|
|
30 |
typedef TBuf<KIpsSetUiMaxPasswordLength> TIpsSetUiPasswordText;
|
|
31 |
/** Space string. */
|
|
32 |
_LIT( KIpsSetUiStrSpace, " " );
|
|
33 |
|
|
34 |
_LIT( KIpsSetGenPanicLit, "IpsSet");
|
|
35 |
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Supported always online states.
|
|
39 |
*/
|
|
40 |
enum TIpsSetDataAoStates
|
|
41 |
{
|
|
42 |
EMailAoAlways = 0,
|
|
43 |
EMailAoHomeOnly,
|
|
44 |
EMailAoOff
|
|
45 |
};
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Supported OMA EMN states
|
|
49 |
*/
|
|
50 |
enum TIpsSetDataEmnStates
|
|
51 |
{
|
|
52 |
EMailEmnAutomatic = 0,
|
|
53 |
EMailEmnHomeOnly,
|
|
54 |
EMailEmnOff
|
|
55 |
};
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Update modes.
|
|
59 |
*/
|
|
60 |
// not used in fs email
|
|
61 |
enum TIpsSetDataAoUpdateModes
|
|
62 |
{
|
|
63 |
EMailAoHeadersOnly = 0,
|
|
64 |
EMailAoBody,
|
|
65 |
EMailAoBodyAndAttas
|
|
66 |
};
|
|
67 |
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Flags to handle status of settings
|
|
71 |
*/
|
|
72 |
enum TIpsSetDataMailSettingsStatusFlags
|
|
73 |
{
|
|
74 |
EIpsSetDataStatusTempRcvPassword = 0x1,
|
|
75 |
EIpsSetDataStatusTempSndPassword = 0x2
|
|
76 |
};
|
|
77 |
|
|
78 |
/**
|
|
79 |
* Utility structure TAOInfo.
|
|
80 |
* Contains info was last update successful ( TBool )
|
|
81 |
* and the date and time of last successful update ( TTime )
|
|
82 |
*
|
|
83 |
* @since FS v1.0
|
|
84 |
* @lib IpsSosSettings.lib
|
|
85 |
*/
|
|
86 |
struct TAOInfo
|
|
87 |
{
|
|
88 |
TBool iLastUpdateFailed;
|
|
89 |
TTime iLastSuccessfulUpdate;
|
|
90 |
TBool iUpdateSuccessfulWithCurSettings;
|
|
91 |
};
|
|
92 |
|
|
93 |
// default settings values
|
|
94 |
|
|
95 |
const TInt KIpsSetFetchHeadersDefaultLimit = 50;
|
|
96 |
const TInt KIpsSetMaxFetchHeadersDefaultLimit = 2000;
|
|
97 |
const TInt KIpsSetDataFiveMinutes = 5;
|
|
98 |
const TInt KIpsSetDataTenMinutes = 10;
|
|
99 |
const TInt KIpsSetDataFifteenMinutes = 15;
|
|
100 |
const TInt KIpsSetDataThirtyMinutes = 30;
|
|
101 |
const TInt KIpsSetDataMinutesInHour = 60;
|
|
102 |
const TInt KIpsSetDataMinutesInFourHours = 4 * KIpsSetDataMinutesInHour;
|
|
103 |
const TInt KIpsSetDataMinutesInTwelveHours = 12 * KIpsSetDataMinutesInHour;
|
|
104 |
const TInt KIpsSetDataMinutesInOneDay = 24 * KIpsSetDataMinutesInHour;
|
|
105 |
const TInt KIpsSetDataHeadersOnly = -2;
|
|
106 |
const TInt KIpsSetDataFullBodyAndAttas = -1;
|
|
107 |
const TInt KIpsSetDataFullBodyOnly = -3;
|
|
108 |
const TInt KIpsSetDataDefaultDownloadSizeKb = 2;
|
|
109 |
const TUint KIpsSetDataEveryDayMask = 0x7f;
|
|
110 |
|
|
111 |
const TInt KRetrieve50Messages = 50;
|
|
112 |
const TInt KRetrieve100Messages = 100;
|
|
113 |
const TInt KRetrieve250Messages = 250;
|
|
114 |
// default values for ipssetdataextension
|
|
115 |
//<cmail> cmail has different default value
|
|
116 |
const TInt KIpsSetExtDefaultAlwaysOnlineState = EMailAoOff;
|
|
117 |
//</cmail>
|
|
118 |
const TInt KIpsSetExtDefaultEmailNotificationState = EMailEmnOff;
|
|
119 |
const TBool KIpsSetExtDefaultHideMsgs = EFalse;
|
|
120 |
const TInt KIpsSetExtDefaultInboxRefreshTime = KIpsSetDataMinutesInHour;
|
|
121 |
const TInt64 KIpsSetExtDefaultLastModified = 0;
|
|
122 |
const TBool KIpsSetExtDefaultTAOInfoLastUpdateFailed = EFalse;
|
|
123 |
const TInt64 KIpsSetExtDefaultTAOInfoLastSuccessfulUpdate = 0;
|
|
124 |
const TBool KIpsSetExtDefaultTAOInfoUpdateSuccessfulWithCurSettings = EFalse;
|
|
125 |
const TInt KIpsSetExtDefaultNewMailIndicators = ETrue;
|
|
126 |
const TInt KIpsSetExtDefaultOpenHtmlMail = EFalse;
|
|
127 |
const TInt KIpsSetExtDefaultOutgoingLogin = CIpsSetData::EOwnOutgoing;
|
|
128 |
const TInt64 KIpsSetExtDefaultSelectedTimeStart = 0;
|
|
129 |
const TInt64 KIpsSetExtDefaultSelectedTimeStop = 0;
|
|
130 |
const TUint KIpsSetExtDefaultSelectedWeekDays = KIpsSetDataEveryDayMask;
|
|
131 |
const TUint64 KIpsSetExtDefaultStatusFlags = 0;
|
|
132 |
const TBool KIpsSetExtDefaultEmnReceivedButNotSyncedFlag = EFalse;
|
|
133 |
const TBool KIpsSetExtDefaultFirstEMNReceived = EFalse;
|
|
134 |
// this is from TSSMailSyncState defined in CFSMailCommon.h
|
|
135 |
// 0 is Idle value
|
|
136 |
const TInt KIpsSetExtDefaultSyncStatus = 0;
|
|
137 |
const TInt KIpsSetExtDefaultUpdateMode = EMailAoBody;
|
|
138 |
// not used in freestyle
|
|
139 |
const TInt KIpsSetExtDefaultAoVersion = 0;
|
|
140 |
//<cmail>
|
|
141 |
const TBool KIpsSetExtDefaultHiddenData = EFalse;
|
|
142 |
//</cmail>
|
|
143 |
/**
|
|
144 |
* Common UI on/off switch.
|
|
145 |
*/
|
|
146 |
enum TIpsSetUiSwitch
|
|
147 |
{
|
|
148 |
EIpsSetUiOn = 0,
|
|
149 |
EIpsSetUiOff
|
|
150 |
};
|
|
151 |
|
|
152 |
/**
|
|
153 |
* Common option / user defined UI editor layout.
|
|
154 |
*/
|
|
155 |
enum TIpsSetUiChoice
|
|
156 |
{
|
|
157 |
EIpsSetUiDefault = 0,
|
|
158 |
EIpsSetUiCustom
|
|
159 |
};
|
|
160 |
|
|
161 |
/**
|
|
162 |
* States used in UI editor launching and handling.
|
|
163 |
*/
|
|
164 |
enum TIpsSetUiPageResult
|
|
165 |
{
|
|
166 |
EIpsSetUiPageResultOk = 0,
|
|
167 |
EIpsSetUiPageResultSubMenuOpen,
|
|
168 |
EIpsSetUiPageResultInvalidResult,
|
|
169 |
EIpsSetUiPageResultReadOnly,
|
|
170 |
EIpsSetUiPageResultCancelled,
|
|
171 |
EIpsSetUiPageResultEditing,
|
|
172 |
EIpsSetUiPageResultEventCancel
|
|
173 |
};
|
|
174 |
|
|
175 |
/**
|
|
176 |
* User input evaluation results.
|
|
177 |
*/
|
|
178 |
enum TIpsSetUiEventResult
|
|
179 |
{
|
|
180 |
// Given value is approved
|
|
181 |
EIpsSetUiPageEventResultApproved = 0,
|
|
182 |
// User has entered an invalid value, editor page should be reopened
|
|
183 |
EIpsSetUiPageEventResultDisapproved,
|
|
184 |
// The editor has been cancelled and should be closed
|
|
185 |
EIpsSetUiPageEventResultCancel
|
|
186 |
};
|
|
187 |
|
|
188 |
/**
|
|
189 |
* Note errors for notes.
|
|
190 |
*/
|
|
191 |
enum TIpsSetUiNoteErrors
|
|
192 |
{
|
|
193 |
/** No errors occurred. */
|
|
194 |
EIpsSetUiNoError = 0,
|
|
195 |
/** Item contains invalid data. */
|
|
196 |
EIpsSetUiItemInvalid,
|
|
197 |
/** Item is empty and empty values are not allowed. */
|
|
198 |
EIpsSetUiItemEmpty
|
|
199 |
};
|
|
200 |
|
|
201 |
const TInt KIpsSetDataDefaultPortImap4 = 143;
|
|
202 |
const TInt KIpsSetDataDefaultSecurityPortImap4 = 993;
|
|
203 |
const TInt KIpsSetDataDefaultPortPop3 = 110;
|
|
204 |
const TInt KIpsSetDataDefaultSecurityPortPop3 = 995;
|
|
205 |
const TInt KIpsSetDataDefaultPortSmtp = 25;
|
|
206 |
const TInt KIpsSetDataDefaultSecurityPortSmtp = 465;
|
|
207 |
const TInt KIpsSetUtilsMaxMailboxCount = 9;
|
|
208 |
|
|
209 |
#endif /* IPSSETUTILSCONSTS_H */ |