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: Settings list definition for Settings dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef UPNPAPPSETTINGSLIST_H |
|
25 #define UPNPAPPSETTINGSLIST_H |
|
26 |
|
27 // INCLUDES |
|
28 #include <aknsettingitemlist.h> |
|
29 #include "upnpfilesharingengineobserver.h" |
|
30 |
|
31 // CLASS DECLARATION |
|
32 class CUPnPSettingsEngine; |
|
33 class CUPnPFileSharingEngine; |
|
34 |
|
35 // DATA TYPES |
|
36 enum TWLanSecurityMode |
|
37 { |
|
38 EWLanUnsecured = 1 |
|
39 }; |
|
40 |
|
41 /** |
|
42 * Settings list class declaration |
|
43 * @since S60 3.1 |
|
44 */ |
|
45 class CUPnPAppSettingsList : public CAknSettingItemList |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CUPnPAppSettingsList* NewL( TBool& aSharingState, |
|
53 TInt aResourceId ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CUPnPAppSettingsList(); |
|
59 |
|
60 public: // New functions |
|
61 |
|
62 /** |
|
63 * Reads data from storage to member variables |
|
64 * @since S60 3.1 |
|
65 */ |
|
66 void LoadDataFromEngineL(); |
|
67 |
|
68 public: // Functions from base classes |
|
69 |
|
70 /** |
|
71 * From CAknSettingItemList, this launches the setting page. |
|
72 * @since S60 3.1 |
|
73 * @param aIndex, index of selected list item |
|
74 * @param aCalledFromMenu, indicates if editing is called |
|
75 * trough menu or from keyboard |
|
76 */ |
|
77 void EditItemL ( TInt aIndex, TBool aCalledFromMenu ); |
|
78 |
|
79 protected: |
|
80 |
|
81 /** |
|
82 * From CAknSettingItemList |
|
83 */ |
|
84 void HandleResourceChange( TInt aType ); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * C++ default constructor. |
|
90 */ |
|
91 CUPnPAppSettingsList( TBool& aSharingState ); |
|
92 |
|
93 /** |
|
94 * By default Symbian 2nd phase constructor is private. |
|
95 */ |
|
96 void ConstructL( TInt aResourceId ); |
|
97 |
|
98 /** |
|
99 * From CAknSettingItemList, Framework method to create a setting item. |
|
100 * @since S60 3.1 |
|
101 * @param aIdentifier, list item id to be created |
|
102 * @return CAknSettingItem, pointer to list item |
|
103 */ |
|
104 CAknSettingItem* CreateSettingItemL( TInt aIdentifier ); |
|
105 |
|
106 |
|
107 private: // Data |
|
108 |
|
109 // friendly name of my device |
|
110 TBuf<KMaxFileName> iFriendlyName; |
|
111 // access point ID |
|
112 TInt iIapId; |
|
113 // wap id |
|
114 TInt iWapId; |
|
115 // my device name |
|
116 HBufC8* iName; |
|
117 // Settings engine for saving and reading data |
|
118 CUPnPSettingsEngine* iSettingsEngine; |
|
119 |
|
120 // IAP ui selection (always ask, user defined or none) |
|
121 TInt iIapSetting; |
|
122 |
|
123 // The drive to store copied files |
|
124 TDriveNumber iCopyLocationDrive; |
|
125 |
|
126 // The status of the sharing (on/off) |
|
127 TBool& iSharingState; |
|
128 }; |
|
129 |
|
130 #endif // UPNPAPPSETTINGSLIST_H |
|
131 |
|
132 // End of File |
|