|
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: The modified list item for the destinations |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SIP_SETT_LIST_SIP_PROF_SET_DEST_LIST_ITEM_H |
|
20 #define SIP_SETT_LIST_SIP_PROF_SET_DEST_LIST_ITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <aknsettingitemlist.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 class CSIPSettListSIPProfSetModel; |
|
29 class CAknTitlePane; |
|
30 |
|
31 const TInt KUnknownAPUID = -1; |
|
32 const TInt KNullTextArray = 1; |
|
33 const TInt KTextArray = 5; |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CSIPSettListSIPProfSetDestListItem listitem class |
|
38 * @since 3.0 |
|
39 * listitem class for SIP Profile settings destinations |
|
40 */ |
|
41 class CSIPSettListSIPProfSetDestListItem : |
|
42 public CAknEnumeratedTextPopupSettingItem |
|
43 { |
|
44 |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Constructor. No two-phased construction due |
|
49 * the nature of this object |
|
50 * @param aResourceId Resource ID for the list item |
|
51 * @param aValue The currently selected item |
|
52 * @param aModel Model for fetching the destinations list |
|
53 */ |
|
54 CSIPSettListSIPProfSetDestListItem( TInt aResourceId, TInt& aIndex, |
|
55 CSIPSettListSIPProfSetModel* aModel ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CSIPSettListSIPProfSetDestListItem(); |
|
61 |
|
62 protected: // New functions |
|
63 |
|
64 /** |
|
65 * Checks that selected destination exists on the list |
|
66 * @param aArray Array containing all the destinationss |
|
67 * @return Boolean value indicating if the selected destination is found |
|
68 */ |
|
69 TBool ValueMatches( CArrayPtr<CAknEnumeratedText>* aArray ); |
|
70 |
|
71 /** |
|
72 * Initializes the enumeration list |
|
73 * @param aTextArray enumeration value/txt values are stored here |
|
74 * @param aNullTextArray created, but not used (made for framework) |
|
75 */ |
|
76 void InitializeListL( CArrayPtr<CAknEnumeratedText>*& aTextArray, |
|
77 CArrayPtr<HBufC>*& aNullTextArray ); |
|
78 |
|
79 protected: // Functions from base classes |
|
80 |
|
81 /** |
|
82 * From CAknSettingItem, dynamically initializes the list |
|
83 * after base construction |
|
84 */ |
|
85 void CompleteConstructionL(); |
|
86 |
|
87 /** |
|
88 * To set the list, if the AP is not selected |
|
89 */ |
|
90 void EditItemL( TBool aCalledFromMenu ); |
|
91 |
|
92 /* |
|
93 * From MAknSettingPageObserver |
|
94 * @see MAknSettingPageObserver |
|
95 */ |
|
96 void HandleSettingPageEventL( |
|
97 CAknSettingPage* aSettingPage, |
|
98 TAknSettingPageEvent aEventType ); |
|
99 |
|
100 private: |
|
101 |
|
102 /** |
|
103 * For deleting array in case of leave |
|
104 */ |
|
105 static void ResetAndDestroy( TAny* aPointerArray ); |
|
106 |
|
107 private: // Data |
|
108 |
|
109 // Model |
|
110 CSIPSettListSIPProfSetModel* iModel; |
|
111 |
|
112 // Currently selected AP Index |
|
113 TInt& iEnumValue; |
|
114 |
|
115 // Backup value for AP index |
|
116 TInt iBackupValue; |
|
117 }; |
|
118 |
|
119 #endif // SIP_SETT_LIST_SIP_PROF_SET_DEST_LIST_ITEM_H |
|
120 |
|
121 // End of File |