|
1 /* |
|
2 * Copyright (c) 2005 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 (common) View part for the proxy & registrar views |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SIP_SETT_LIST_SIP_SRV_SET_CONTAINER_H |
|
20 #define SIP_SETT_LIST_SIP_SRV_SET_CONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <coecntrl.h> |
|
25 #include <aknlongtapdetector.h> |
|
26 #include <aknstyluspopupmenu.h> |
|
27 #include <eikmobs.h> |
|
28 #include "gssiptimer.h" |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CSIPSettListSIPSrvSetItemList; |
|
32 class CAknView; |
|
33 class CSIPSettListSIPSrvSetModel; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CSIPSettListSIPSrvSetContainer container class |
|
39 * @since 3.0 |
|
40 * container class for SIP Server view |
|
41 */ |
|
42 class CSIPSettListSIPSrvSetContainer : public CCoeControl |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * @param aRect Client rectangle |
|
49 * @param aProvider Object provider for displaying scroll bar |
|
50 * @param aModel Reference to the Model |
|
51 * @param aResourceID Resource ID of the item list |
|
52 */ |
|
53 static CSIPSettListSIPSrvSetContainer* NewL( |
|
54 const TRect& aRect, |
|
55 MObjectProvider* aProvider, |
|
56 CSIPSettListSIPSrvSetModel& aModel, |
|
57 TInt aResourceID ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CSIPSettListSIPSrvSetContainer(); |
|
63 |
|
64 public: // New functions |
|
65 |
|
66 /** |
|
67 * Handle pointer event |
|
68 */ |
|
69 virtual void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
70 |
|
71 /** |
|
72 * Judge whether it is a pointer event |
|
73 */ |
|
74 TBool IfPointerEvent(); |
|
75 |
|
76 /** |
|
77 * Opens the pop-up list to modify the selected list items |
|
78 * @param aCommand ID of the command to respond to |
|
79 */ |
|
80 void EditCurrentListItemL( TInt aCommand ); |
|
81 |
|
82 /** |
|
83 * Stores settings from item list to variables |
|
84 */ |
|
85 void StoreSettingsL(); |
|
86 |
|
87 protected: // Functions from base classes |
|
88 |
|
89 /** |
|
90 * From CoeControl returns the amount of controls |
|
91 */ |
|
92 TInt CountComponentControls() const; |
|
93 |
|
94 /** |
|
95 * From CCoeControl returns controls for CONE actions |
|
96 */ |
|
97 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
98 |
|
99 /** |
|
100 * From CCoeControl changes the size of the list box |
|
101 */ |
|
102 void SizeChanged(); |
|
103 |
|
104 /** |
|
105 * From CCoeControl, receives key events and passes them |
|
106 * to list box |
|
107 */ |
|
108 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
109 TEventCode aType ); |
|
110 |
|
111 /** |
|
112 * From CCoeControl, responds to a change in focus |
|
113 */ |
|
114 void FocusChanged( TDrawNow aDrawNow ); |
|
115 |
|
116 /** |
|
117 * From CoeControl, resource change handling |
|
118 */ |
|
119 void HandleResourceChange( TInt aType ); |
|
120 |
|
121 private: |
|
122 |
|
123 /** |
|
124 * C++ default constructor. |
|
125 */ |
|
126 CSIPSettListSIPSrvSetContainer(); |
|
127 |
|
128 /** |
|
129 * By default Symbian 2nd phase constructor is private. |
|
130 * @param aRect Client rectangle |
|
131 * @param aModel Reference to the (list box) model |
|
132 * @param aResourceID Resource ID of the item list |
|
133 */ |
|
134 void ConstructL( |
|
135 const TRect& aRect, |
|
136 CSIPSettListSIPSrvSetModel& aModel, |
|
137 TInt aResourceID ); |
|
138 |
|
139 private: |
|
140 /** |
|
141 * Required for help. |
|
142 * |
|
143 */ |
|
144 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
145 |
|
146 private: // Data |
|
147 |
|
148 // The item list for changing the attributes of a profile |
|
149 CSIPSettListSIPSrvSetItemList* iItemList; |
|
150 |
|
151 // Type of server view. |
|
152 TBool iProxyServerView; |
|
153 |
|
154 CGSSIPTimer* iTimer; |
|
155 |
|
156 }; |
|
157 |
|
158 #endif // SIP_SETT_LIST_SIP_SRV_SET_CONTAINER_H |
|
159 |
|
160 // End of File |