|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDES |
|
22 #include "createCryptoHandlingDialog.h" |
|
23 #include "CMCETestUIEngineAudioStream.h" |
|
24 #include "CMCETestUIEngineSink.h" |
|
25 #include <MCEAudioStream.h> |
|
26 #include <MCERtpSink.h> |
|
27 #include <MCEMediaSink.h> |
|
28 #include <MCESpeakerSink.h> |
|
29 // CONSTANTS |
|
30 |
|
31 const TInt KBufLength = 100; |
|
32 |
|
33 // ============================ MEMBER FUNCTIONS ============================== |
|
34 |
|
35 // ---------------------------------------------------------------------------- |
|
36 // CCurrentCryptoContextsDialog::CCurrentCryptoContextsDialog( ) |
|
37 // . |
|
38 // ---------------------------------------------------------------------------- |
|
39 // |
|
40 CCurrentCryptoContextsDialog::CCurrentCryptoContextsDialog( TBool aCrypto32,TBool aCrypto80) |
|
41 { |
|
42 iCrypto32 = aCrypto32; |
|
43 iCrypto80 = aCrypto80; |
|
44 } |
|
45 |
|
46 // ---------------------------------------------------------------------------- |
|
47 // CCurrentCryptoContextsDialog::PreLayoutDynInitL() |
|
48 // . |
|
49 // ---------------------------------------------------------------------------- |
|
50 // |
|
51 void CCurrentCryptoContextsDialog::PreLayoutDynInitL() |
|
52 { |
|
53 CAknPopupFieldText* popupFieldText = |
|
54 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSecureSessionType)); |
|
55 |
|
56 if( (iCrypto32 ) && ( !iCrypto80)) |
|
57 { |
|
58 popupFieldText->SetCurrentValueIndex(0); |
|
59 } |
|
60 else if( (!iCrypto32 ) && (iCrypto80)) |
|
61 { |
|
62 popupFieldText->SetCurrentValueIndex(1); |
|
63 } |
|
64 else if( (iCrypto32 ) && (iCrypto80)) |
|
65 { |
|
66 popupFieldText->SetCurrentValueIndex(2); |
|
67 } |
|
68 } |
|
69 |
|
70 // ---------------------------------------------------------------------------- |
|
71 // CStartDTMFDialog::OkToExitL( TInt ) |
|
72 // . |
|
73 // ---------------------------------------------------------------------------- |
|
74 // |
|
75 |
|
76 TBool CCurrentCryptoContextsDialog::OkToExitL( TInt aKey ) |
|
77 { |
|
78 if ( aKey == EEikCmdCanceled ) |
|
79 { |
|
80 // Cancel pressed. Just exit. |
|
81 return ETrue; |
|
82 } |
|
83 return ETrue; |
|
84 } |
|
85 |
|
86 // ---------------------------------------------------------------------------- |
|
87 // CCurrentCryptoContextsDialog::~CCurrentCryptoContextsDialog() |
|
88 // . |
|
89 // ---------------------------------------------------------------------------- |
|
90 // |
|
91 CCurrentCryptoContextsDialog::~CCurrentCryptoContextsDialog() |
|
92 { |
|
93 return; |
|
94 } |
|
95 |
|
96 // ============================ MEMBER FUNCTIONS ============================== |
|
97 |
|
98 // ---------------------------------------------------------------------------- |
|
99 // CSupportedCryptoContextsDialog::CSupportedCryptoContextsDialog( ) |
|
100 // . |
|
101 // ---------------------------------------------------------------------------- |
|
102 // |
|
103 CSupportedCryptoContextsDialog::CSupportedCryptoContextsDialog( TBool aCrypto32,TBool aCrypto80) |
|
104 { |
|
105 iCrypto32 = aCrypto32; |
|
106 iCrypto80 = aCrypto80; |
|
107 } |
|
108 |
|
109 // ---------------------------------------------------------------------------- |
|
110 // CSupportedCryptoContextsDialog::PreLayoutDynInitL() |
|
111 // . |
|
112 // ---------------------------------------------------------------------------- |
|
113 // |
|
114 void CSupportedCryptoContextsDialog::PreLayoutDynInitL() |
|
115 { |
|
116 CAknPopupFieldText* popupFieldText = |
|
117 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSecureSessionType)); |
|
118 |
|
119 if( (iCrypto32 ) && ( !iCrypto80)) |
|
120 { |
|
121 popupFieldText->SetCurrentValueIndex(0); |
|
122 } |
|
123 else if( (!iCrypto32 ) && (iCrypto80)) |
|
124 { |
|
125 popupFieldText->SetCurrentValueIndex(1); |
|
126 } |
|
127 else if( (iCrypto32 ) && (iCrypto80)) |
|
128 { |
|
129 popupFieldText->SetCurrentValueIndex(2); |
|
130 } |
|
131 } |
|
132 |
|
133 // ---------------------------------------------------------------------------- |
|
134 // CSupportedCryptoContextsDialog::OkToExitL( TInt ) |
|
135 // . |
|
136 // ---------------------------------------------------------------------------- |
|
137 // |
|
138 |
|
139 TBool CSupportedCryptoContextsDialog::OkToExitL( TInt aKey ) |
|
140 { |
|
141 if ( aKey == EEikCmdCanceled ) |
|
142 { |
|
143 // Cancel pressed. Just exit. |
|
144 return ETrue; |
|
145 } |
|
146 return ETrue; |
|
147 } |
|
148 |
|
149 // ---------------------------------------------------------------------------- |
|
150 // CSupportedCryptoContextsDialog::~CSupportedCryptoContextsDialog() |
|
151 // . |
|
152 // ---------------------------------------------------------------------------- |
|
153 // |
|
154 CSupportedCryptoContextsDialog::~CSupportedCryptoContextsDialog() |
|
155 { |
|
156 return; |
|
157 } |
|
158 // ============================ MEMBER FUNCTIONS ============================== |
|
159 |
|
160 // ---------------------------------------------------------------------------- |
|
161 // CGetCryptoContextsDialog::CGetCryptoContextsDialog( ) |
|
162 // . |
|
163 // ---------------------------------------------------------------------------- |
|
164 // |
|
165 CGetCryptoContextsDialog::CGetCryptoContextsDialog( TBool& aCrypto32,TBool& aCrypto80): |
|
166 iCrypto32(aCrypto32),iCrypto80(aCrypto80) |
|
167 |
|
168 { |
|
169 } |
|
170 |
|
171 // ---------------------------------------------------------------------------- |
|
172 // CGetCryptoContextsDialog::PreLayoutDynInitL() |
|
173 // . |
|
174 // ---------------------------------------------------------------------------- |
|
175 // |
|
176 void CGetCryptoContextsDialog::PreLayoutDynInitL() |
|
177 { |
|
178 CAknPopupFieldText* popupFieldText = |
|
179 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSecureSessionType)); |
|
180 |
|
181 popupFieldText->SetCurrentValueIndex(2); |
|
182 |
|
183 } |
|
184 |
|
185 // ---------------------------------------------------------------------------- |
|
186 // CGetCryptoContextsDialog::OkToExitL( TInt ) |
|
187 // . |
|
188 // ---------------------------------------------------------------------------- |
|
189 // |
|
190 |
|
191 TBool CGetCryptoContextsDialog::OkToExitL( TInt aKey ) |
|
192 { |
|
193 if ( aKey == EEikCmdCanceled ) |
|
194 { |
|
195 // Cancel pressed. Just exit. |
|
196 return ETrue; |
|
197 } |
|
198 CAknPopupFieldText* popupFieldText = |
|
199 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSecureSessionType)); |
|
200 TInt index = popupFieldText->CurrentValueIndex(); |
|
201 if(index == 0) |
|
202 { |
|
203 iCrypto32 = ETrue; |
|
204 } |
|
205 else if(index == 1) |
|
206 { |
|
207 iCrypto80 = ETrue; |
|
208 } |
|
209 else if(index == 2) |
|
210 { |
|
211 iCrypto32 = ETrue; |
|
212 iCrypto80 = ETrue; |
|
213 } |
|
214 return ETrue; |
|
215 } |
|
216 |
|
217 // ---------------------------------------------------------------------------- |
|
218 // CGetCryptoContextsDialog::~CGetCryptoContextsDialog() |
|
219 // . |
|
220 // ---------------------------------------------------------------------------- |
|
221 // |
|
222 CGetCryptoContextsDialog::~CGetCryptoContextsDialog() |
|
223 { |
|
224 return; |
|
225 } |
|
226 |
|
227 // End of File |