|
1 |
|
2 /* |
|
3 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CSIPEXPROFILEQUERYDLG_H__ |
|
22 #define __CSIPEXPROFILEQUERYDLG_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <eikdialg.h> |
|
26 #include "TSIPProfileData.h" |
|
27 #include <sipmanagedprofileregistry.h> |
|
28 #include <sipprofileregistryobserver.h> |
|
29 #include "sipmanagedprofile.h" |
|
30 |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CSIPAddress; |
|
34 class MSIPProfileRegistryObserver; |
|
35 class CSIPManagedProfileRegistry; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * A recipient's address query dialog for game invitation. |
|
40 */ |
|
41 class CSIPExProfileQueryDlg |
|
42 : public CEikDialog, |
|
43 public MSIPProfileRegistryObserver |
|
44 { |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Static constructor |
|
49 * @param aAddr On return contains the other player's address. |
|
50 */ |
|
51 static CSIPExProfileQueryDlg* NewL(); |
|
52 |
|
53 /** |
|
54 * Static constructor. On return the instance is left to the |
|
55 * CleanupStack. |
|
56 * @param aAddr On return contains the other player's address. |
|
57 */ |
|
58 static CSIPExProfileQueryDlg* NewLC( ); |
|
59 |
|
60 /** |
|
61 * Destructor |
|
62 */ |
|
63 ~CSIPExProfileQueryDlg(); |
|
64 |
|
65 public: //Functions from base classes |
|
66 |
|
67 /** |
|
68 * from MSIPProfileRegistryObserver |
|
69 * SIP profile creation event |
|
70 * @since 1.0 |
|
71 * @param aSIPProfileId id of new SIP Profile |
|
72 */ |
|
73 void ProfileRegistryEventOccurred(TUint32 aProfileId, TEvent aEvent); |
|
74 |
|
75 |
|
76 /** |
|
77 * from MSIPProfileRegistryObserver |
|
78 * An asynchronous error has occurred related to SIP profile |
|
79 * @since 1.0 |
|
80 * @param aSIPProfileId the id of failed profile |
|
81 * @param aError a error code |
|
82 */ |
|
83 void ProfileRegistryErrorOccurred( TUint32 aSIPProfileId, |
|
84 TInt aError); |
|
85 |
|
86 /** |
|
87 * SIP profile creation event |
|
88 * @param aSIPProfileId id of new SIP Profile |
|
89 */ |
|
90 void ProfileCreated( TUint32 aSIPProfileId ); |
|
91 |
|
92 |
|
93 private: |
|
94 |
|
95 /** |
|
96 * C++ default constructor |
|
97 * @param aAddr On return contains the other player's address. |
|
98 */ |
|
99 CSIPExProfileQueryDlg( ); |
|
100 |
|
101 /** |
|
102 * Symbian 2nd phase constructor |
|
103 */ |
|
104 void ConstructL(); |
|
105 |
|
106 /** |
|
107 * from MProfileHandler |
|
108 * Saves profile's changes or returns EFalse if no changes are present. |
|
109 */ |
|
110 void SaveProfileL(); |
|
111 |
|
112 /** |
|
113 * Copies data from iProfileData to the actual CSIPManagedProfile |
|
114 * @return Profile where the stuff was copied to. |
|
115 */ |
|
116 CSIPManagedProfile* CopyDataToProfileL(); |
|
117 |
|
118 private: // From base classes |
|
119 |
|
120 /** |
|
121 * From CEikDialog |
|
122 */ |
|
123 TBool OkToExitL(TInt aKeyCode); |
|
124 |
|
125 /** |
|
126 * From CEikDialog |
|
127 */ |
|
128 virtual void PreLayoutDynInitL(); |
|
129 |
|
130 private: // New functions |
|
131 |
|
132 /** |
|
133 * Fills the data structure with default values |
|
134 */ |
|
135 void FillDataStructWithDefaultValsL(); |
|
136 |
|
137 TBool SetProfileUserNameL(); |
|
138 TBool SetProfileCompressionL(); |
|
139 TBool SetProfileIAPIdL(); |
|
140 TBool SetProfileSecurityL(); |
|
141 TBool SetProfileProxyAddressL(); |
|
142 TBool SetProfileProxyRealmL(); |
|
143 TBool SetProfileProxyUNameL(); |
|
144 TBool SetProfileProxyPwL(); |
|
145 TBool SetProfileRegistrarAddressL(); |
|
146 TBool SetProfileRegistrarRealmL(); |
|
147 TBool SetProfileRegistrarUNameL(); |
|
148 TBool SetProfileRegistrarPwL(); |
|
149 |
|
150 void ShowErrorInfoL(TProfileSettingItemListItems aItem); |
|
151 |
|
152 /** |
|
153 * Checks if user typed address is valid address. |
|
154 * @param aAddr address which validity is checked |
|
155 * Returns true if valid address, otherwise returns false |
|
156 */ |
|
157 TBool AddressValid( const TDesC8& aAddr ); |
|
158 |
|
159 void GetAPListL(); |
|
160 |
|
161 private: |
|
162 // Member variables |
|
163 |
|
164 // The profile's data, which is manipulated |
|
165 TSIPProfileData iProfileData; |
|
166 CSIPManagedProfileRegistry* iMProfileRegistry; |
|
167 |
|
168 // Temporary pointer storage for a new profile before |
|
169 // placing it to the permanent storage |
|
170 CSIPManagedProfile* iNewProfile; |
|
171 |
|
172 CDesCArraySeg* iAccesspointids; |
|
173 |
|
174 // Array stores the mapping between |
|
175 // the APs index and the UID of the APs |
|
176 RArray<TUint32> iAPsUIDs; |
|
177 |
|
178 |
|
179 }; |
|
180 |
|
181 #endif // __CSIPEXPROFILEQUERYDLG_H__ |
|
182 |
|
183 // End of file |