1 /* |
|
2 * Copyright (c) 2008 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: Declares home network IAP setting item class to home network |
|
15 * setting item list |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef UPNPAPPSETTINGITEMHOMEIAP_H |
|
25 #define UPNPAPPSETTINGITEMHOMEIAP_H |
|
26 |
|
27 |
|
28 // INCLUDES |
|
29 #include <aknsettingitemlist.h> |
|
30 |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CUPnPFileSharingEngine; |
|
34 |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * UPnPAppSettingItemHomeIAP class. This class is used when |
|
40 * creating home network IAP setting item to setting item list |
|
41 * of home network application settings dialog. |
|
42 * |
|
43 * @lib CoverDisplaySettings.app |
|
44 */ |
|
45 class UPnPAppSettingItemHomeIAP: public CAknEnumeratedTextPopupSettingItem |
|
46 { |
|
47 public: // Constructor and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static UPnPAppSettingItemHomeIAP* NewL(TInt aIdentifier, |
|
53 TInt& aIAPSetting, |
|
54 TInt& aIAPId, TInt& aWAPId, TBool& aSharingState ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~UPnPAppSettingItemHomeIAP(); |
|
60 |
|
61 public: // From CAknEnumeratedTextPopupSettingItem |
|
62 |
|
63 /** |
|
64 * Returns setting text according to home network IAP setting. |
|
65 * This text is visible in this setting item. |
|
66 * |
|
67 * @return home network IAP setting/name text |
|
68 */ |
|
69 const TDesC& SettingTextL(); |
|
70 |
|
71 /** |
|
72 * Framework calls this method in order to create |
|
73 * and execute setting page |
|
74 */ |
|
75 void CreateAndExecuteSettingPageL(); |
|
76 |
|
77 private: // From CAknEnumeratedTextPopupSettingItem |
|
78 |
|
79 /** |
|
80 * Constructor. |
|
81 */ |
|
82 UPnPAppSettingItemHomeIAP(TInt aIdentifier, TInt& aIAPSetting, |
|
83 TInt& aIAPId, TInt& aWAPId, TBool& aSharingState ); |
|
84 |
|
85 /** |
|
86 * By default Symbian 2nd phase constructor is private. |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 private: // New methods |
|
91 |
|
92 /** |
|
93 * Changes iap name according to iap id |
|
94 */ |
|
95 void ChangeIAPNameL(); |
|
96 |
|
97 /** |
|
98 * Checks if access point is unsecured and warns user |
|
99 * @since S60 3.1 |
|
100 * @param aAccessPoint, selected access point |
|
101 * @return TInt, security mode |
|
102 */ |
|
103 TInt CheckAPSecurityL(TInt aAccessPoint); |
|
104 |
|
105 /** |
|
106 * Displays message query |
|
107 * @since S60 3.1 |
|
108 * @param aHeaderResourceId, resource id of the title |
|
109 * @param aMessageResourceId, resource id of the message |
|
110 * @param TIaDialogResourceIdnt, resource id of the dialog |
|
111 */ |
|
112 void DisplayInfoL(TInt aHeaderResourceId, |
|
113 TInt aMessageResourceId, |
|
114 TInt aDialogResourceId); |
|
115 |
|
116 |
|
117 /** |
|
118 * Adds static items to the list |
|
119 * @since S60 3.1 |
|
120 * @param aArray, list array |
|
121 */ |
|
122 void AddStaticItemsL(CDesCArray* aArray); |
|
123 |
|
124 /** |
|
125 * Use previous iap |
|
126 * @since S60 5.1 |
|
127 * @param aOldIap, previous iap id |
|
128 */ |
|
129 void UsePreviousIapL( TInt aOldIap ); |
|
130 |
|
131 /** |
|
132 * Get iap index |
|
133 * @since S60 5.1 |
|
134 * @param aStaticCount the number of static items |
|
135 * @return Index of iap |
|
136 */ |
|
137 TInt GetIAPIndex( TInt aStaticCount ); |
|
138 |
|
139 private: |
|
140 |
|
141 // pointer to home network IAP text |
|
142 HBufC* iItemText; |
|
143 |
|
144 // pointer to home network IAP name |
|
145 HBufC* iIAPName; |
|
146 |
|
147 // home network IAP ui selection (always ask, user defined or none) |
|
148 TInt& iIAPSetting; |
|
149 |
|
150 // home network IAP id |
|
151 TInt& iIAPId; |
|
152 |
|
153 // home network IAP wap id |
|
154 TInt& iWAPId; |
|
155 |
|
156 // iap ids |
|
157 RArray<TInt64> iIAPIdArray; |
|
158 |
|
159 // Control environment |
|
160 CCoeEnv* iCoeEnv; |
|
161 |
|
162 // sharing status |
|
163 TBool& iSharingState; |
|
164 }; |
|
165 |
|
166 #endif |
|
167 |
|
168 // End of File |
|