|
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 // INCLUDES |
|
20 #include "CreateVoIPSessionDialog.h" |
|
21 #include "mcetestuiengineconstants.h" |
|
22 |
|
23 // CONSTANTS |
|
24 const TInt KBufLength = 300; |
|
25 |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS ============================== |
|
28 |
|
29 // ---------------------------------------------------------------------------- |
|
30 // CCreateVoIPSessionDialog::CCreateVoIPSessionDialog( CRtpEngine::TSessionType* ) |
|
31 // . |
|
32 // ---------------------------------------------------------------------------- |
|
33 // |
|
34 CCreateVoIPSessionDialog::CCreateVoIPSessionDialog( TSessionParams* aParams ) : |
|
35 iParams( aParams ) |
|
36 { |
|
37 // No implementation required |
|
38 } |
|
39 |
|
40 // ---------------------------------------------------------------------------- |
|
41 // CCreateVoIPSessionDialog::PreLayoutDynInitL() |
|
42 // . |
|
43 // ---------------------------------------------------------------------------- |
|
44 // |
|
45 void CCreateVoIPSessionDialog::PreLayoutDynInitL() |
|
46 { |
|
47 |
|
48 CEikEdwin* edwinVoIPAddress = static_cast<CEikEdwin*>( |
|
49 Control( ESessionVoIPDialogVoIPAddress ) ); |
|
50 |
|
51 TBuf<KBufLength> defaultAddress; |
|
52 defaultAddress.Copy(iParams->iRecipentAddress); |
|
53 edwinVoIPAddress->SetTextL(&defaultAddress); |
|
54 edwinVoIPAddress->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
55 |
|
56 iParams->originator.Copy(KNone); |
|
57 CEikEdwin* OriginaterAddress = static_cast<CEikEdwin*>( |
|
58 Control( ESessionVoIPOriginaterAddress ) ); |
|
59 defaultAddress.Copy(iParams->originator); |
|
60 OriginaterAddress->SetTextL(&defaultAddress); |
|
61 CAknForm::PreLayoutDynInitL(); |
|
62 } |
|
63 |
|
64 // ---------------------------------------------------------------------------- |
|
65 // CCreateVoIPSessionDialog::OkToExitL( TInt ) |
|
66 // . |
|
67 // ---------------------------------------------------------------------------- |
|
68 // |
|
69 |
|
70 TBool CCreateVoIPSessionDialog::OkToExitL( TInt aKey ) |
|
71 { |
|
72 if ( aKey == EEikCmdCanceled ) |
|
73 { |
|
74 // Cancel pressed. Just exit. |
|
75 return ETrue; |
|
76 } |
|
77 CEikEdwin* edwinVoIPAddress = static_cast<CEikEdwin*>( |
|
78 Control( ESessionVoIPDialogVoIPAddress ) ); |
|
79 TBuf<KBufLength> buffer; |
|
80 edwinVoIPAddress->GetText(buffer); |
|
81 iParams->iRecipentAddress = buffer; |
|
82 |
|
83 CEikEdwin* OriginaterAddress = static_cast<CEikEdwin*>( |
|
84 Control( ESessionVoIPOriginaterAddress ) ); |
|
85 OriginaterAddress->GetText(buffer); |
|
86 iParams->originator = buffer; |
|
87 |
|
88 return ETrue; |
|
89 } |
|
90 |
|
91 // ---------------------------------------------------------------------------- |
|
92 // CCreateVoIPSessionDialog::~CCreateVoIPSessionDialog() |
|
93 // . |
|
94 // ---------------------------------------------------------------------------- |
|
95 // |
|
96 CCreateVoIPSessionDialog::~CCreateVoIPSessionDialog() |
|
97 { |
|
98 return; |
|
99 } |
|
100 |
|
101 // End of File |