|
1 /* |
|
2 * Copyright (c) 2002 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 * Holds Email setting item |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CWPEmailItem_H |
|
21 #define CWPEmailItem_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <MWPVisitor.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CWPCharacteristic; |
|
29 |
|
30 //E-mail Notification and retrieval parameters |
|
31 _LIT( KParamEMN, "EMN" ); |
|
32 _LIT( KParamCS, "CS" ); |
|
33 _LIT( KParamLMS, "LMS" ); |
|
34 _LIT( KParamRETRMODE, "RETR-MODE" ); |
|
35 _LIT( KParamRETRSIZE, "RETR-SIZE" ); |
|
36 _LIT( KParamPOLL, "POLL" ); |
|
37 _LIT( KParamONLINE, "ONLINE" ); |
|
38 |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * CWPEmailItem handles Email settings. |
|
44 * @since 2.0 |
|
45 */ |
|
46 class CWPEmailItem : public CBase, public MWPVisitor |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Creates Email setting item |
|
52 * @since 2.0 |
|
53 * @return self |
|
54 */ |
|
55 static CWPEmailItem* NewL(); |
|
56 static CWPEmailItem* NewLC(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CWPEmailItem(); |
|
62 |
|
63 public: // New functions |
|
64 |
|
65 /** |
|
66 * Get parameter value. Must be one of enumeration |
|
67 * TWPParameterID. |
|
68 * @since 2.0 |
|
69 * @return param value or KNullDesC if not found |
|
70 */ |
|
71 const TDesC& ParameterValue(TInt aParamID) const; |
|
72 |
|
73 /** |
|
74 * Get associated IAP name for email settings. |
|
75 * @since 2.0 |
|
76 * @return Internet Access Point name. |
|
77 */ |
|
78 HBufC* AssociatedIapNameL(); |
|
79 |
|
80 /** |
|
81 * Get associated IAP id |
|
82 * @since 2.0 |
|
83 * @return IAP id or Zero if not found |
|
84 */ |
|
85 TUint32 AssociatedIapId(); |
|
86 |
|
87 /** |
|
88 * Check that current settings are valid |
|
89 * since 2.0 |
|
90 * @return ETrue if settings are valid |
|
91 */ |
|
92 TBool IsValid() const; |
|
93 |
|
94 /** |
|
95 * Get parameter value. Must be one of enumeration |
|
96 * TWPParameterID. |
|
97 * @since 2.0 |
|
98 * @return param value or KNullDesC if not found |
|
99 */ |
|
100 const TDesC& ParameterValue(const TDesC& aParamName); |
|
101 |
|
102 |
|
103 public: // From MWPVisitor |
|
104 |
|
105 void VisitL(CWPCharacteristic& aCharacteristic); |
|
106 void VisitL(CWPParameter& aParameter); |
|
107 void VisitLinkL(CWPCharacteristic& aCharacteristic ); |
|
108 |
|
109 |
|
110 private: // constructor |
|
111 |
|
112 /** |
|
113 * C++ default constructor. |
|
114 */ |
|
115 CWPEmailItem(); |
|
116 |
|
117 /** |
|
118 * 2nd phase constructor |
|
119 */ |
|
120 void ConstructL(); |
|
121 |
|
122 private: // Data |
|
123 |
|
124 /** |
|
125 * Ref: Array to Mail setting parameters |
|
126 **/ |
|
127 CArrayPtr<CWPParameter>* iEmailSettingParams; |
|
128 |
|
129 ///Ref:to the IAP settings |
|
130 CWPCharacteristic* iNapDef; |
|
131 |
|
132 |
|
133 private: // for testing use |
|
134 friend class T_CWPEmailItem; |
|
135 |
|
136 }; |
|
137 |
|
138 #endif // CWPEmailItem_H |
|
139 |
|
140 // End of File |