diff -r 000000000000 -r 1bce908db942 multimediacommsengine/tsrc/MCETestUI/src/createVoIPsessiondialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multimediacommsengine/tsrc/MCETestUI/src/createVoIPsessiondialog.cpp Tue Feb 02 01:04:58 2010 +0200 @@ -0,0 +1,101 @@ +/* +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +// INCLUDES +#include "CreateVoIPSessionDialog.h" +#include "mcetestuiengineconstants.h" + +// CONSTANTS +const TInt KBufLength = 300; + + +// ============================ MEMBER FUNCTIONS ============================== + +// ---------------------------------------------------------------------------- +// CCreateVoIPSessionDialog::CCreateVoIPSessionDialog( CRtpEngine::TSessionType* ) +// . +// ---------------------------------------------------------------------------- +// +CCreateVoIPSessionDialog::CCreateVoIPSessionDialog( TSessionParams* aParams ) : + iParams( aParams ) + { + // No implementation required + } + +// ---------------------------------------------------------------------------- +// CCreateVoIPSessionDialog::PreLayoutDynInitL() +// . +// ---------------------------------------------------------------------------- +// +void CCreateVoIPSessionDialog::PreLayoutDynInitL() + { + + CEikEdwin* edwinVoIPAddress = static_cast( + Control( ESessionVoIPDialogVoIPAddress ) ); + + TBuf defaultAddress; + defaultAddress.Copy(iParams->iRecipentAddress); + edwinVoIPAddress->SetTextL(&defaultAddress); + edwinVoIPAddress->SetCursorPosL(defaultAddress.Length(),EFalse); + + iParams->originator.Copy(KNone); + CEikEdwin* OriginaterAddress = static_cast( + Control( ESessionVoIPOriginaterAddress ) ); + defaultAddress.Copy(iParams->originator); + OriginaterAddress->SetTextL(&defaultAddress); + CAknForm::PreLayoutDynInitL(); + } + +// ---------------------------------------------------------------------------- +// CCreateVoIPSessionDialog::OkToExitL( TInt ) +// . +// ---------------------------------------------------------------------------- +// + +TBool CCreateVoIPSessionDialog::OkToExitL( TInt aKey ) + { + if ( aKey == EEikCmdCanceled ) + { + // Cancel pressed. Just exit. + return ETrue; + } + CEikEdwin* edwinVoIPAddress = static_cast( + Control( ESessionVoIPDialogVoIPAddress ) ); + TBuf buffer; + edwinVoIPAddress->GetText(buffer); + iParams->iRecipentAddress = buffer; + + CEikEdwin* OriginaterAddress = static_cast( + Control( ESessionVoIPOriginaterAddress ) ); + OriginaterAddress->GetText(buffer); + iParams->originator = buffer; + + return ETrue; + } + +// ---------------------------------------------------------------------------- +// CCreateVoIPSessionDialog::~CCreateVoIPSessionDialog() +// . +// ---------------------------------------------------------------------------- +// +CCreateVoIPSessionDialog::~CCreateVoIPSessionDialog() + { + return; + } + +// End of File