multimediacommsengine/tsrc/MCETestUI/src/notifyDialog.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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 "notifyDialog.h"
       
    23 #include <AknPopupFieldText.h>
       
    24 
       
    25 // CONSTANTS
       
    26 const TInt KBufLength = 100;
       
    27 
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ==============================
       
    30 
       
    31 // ----------------------------------------------------------------------------
       
    32 // CSessionEstablishValuesDialog::CSessionEstablishValuesDialog( CRtpEngine::TSessionType* )
       
    33 // .
       
    34 // ----------------------------------------------------------------------------
       
    35 //
       
    36 CNotifyDialog::CNotifyDialog( TSessionEstablishValues* aParams ) :
       
    37     iParams( aParams )
       
    38     {
       
    39     // No implementation required
       
    40     }
       
    41 
       
    42 // ----------------------------------------------------------------------------
       
    43 // CSessionEstablishValuesDialog::PreLayoutDynInitL()
       
    44 // .
       
    45 // ----------------------------------------------------------------------------
       
    46 //
       
    47 void CNotifyDialog::PreLayoutDynInitL()
       
    48     {
       
    49     
       
    50     CEikNumberEditor* timeOut = static_cast<CEikNumberEditor*>(
       
    51                                   Control( ESessionTimeOut ) );
       
    52     TInt num = 36000;
       
    53     timeOut->SetNumber(num); 
       
    54      TBuf<KBufLength> defaultValue;
       
    55   
       
    56     iParams->headers.Copy(KDefaultAcceptContactValue);
       
    57  	CEikEdwin* headers = static_cast<CEikEdwin*>(
       
    58                                Control( ESessionHeaders ) );
       
    59     defaultValue.Copy(iParams->headers);
       
    60     headers->SetTextL(&defaultValue);
       
    61     headers->SetCursorPosL(defaultValue.Length(),EFalse);
       
    62     
       
    63       
       
    64     /*
       
    65     iParams->contentType.Copy(KContentType);
       
    66  	CEikEdwin* contentType = static_cast<CEikEdwin*>(
       
    67                                Control( EEstablishContentType ) );
       
    68     defaultValue.Copy(iParams->contentType);
       
    69     contentType->SetTextL(&defaultValue);
       
    70     contentType->SetCursorPosL(defaultValue.Length(),EFalse);
       
    71     
       
    72     iParams->content.Copy(KNone);
       
    73  	CEikEdwin* content = static_cast<CEikEdwin*>(
       
    74                                Control( EEstablishContent ) );
       
    75     defaultValue.Copy(iParams->content);
       
    76     content->SetTextL(&defaultValue);
       
    77     content->SetCursorPosL(defaultValue.Length(),EFalse);
       
    78     
       
    79     iParams->contentHeaders.Copy(KNone);
       
    80  	CEikEdwin* contentHeaders = static_cast<CEikEdwin*>(
       
    81                                Control( EEstablishContentHeaders ) );
       
    82     defaultValue.Copy(iParams->contentHeaders);
       
    83     contentHeaders->SetTextL(&defaultValue);
       
    84     contentHeaders->SetCursorPosL(defaultValue.Length(),EFalse);
       
    85    */
       
    86    	
       
    87     CAknForm::PreLayoutDynInitL();
       
    88     }
       
    89 
       
    90 // ----------------------------------------------------------------------------
       
    91 // CNotifyDialog::OkToExitL( TInt )
       
    92 // .
       
    93 // ----------------------------------------------------------------------------
       
    94 //
       
    95 
       
    96 TBool CNotifyDialog::OkToExitL( TInt aKey )
       
    97     {
       
    98     if ( aKey == EEikCmdCanceled )
       
    99         {
       
   100         // Cancel pressed. Just exit.
       
   101         return ETrue;
       
   102         }
       
   103    CEikNumberEditor* timeOut = static_cast<CEikNumberEditor*>(
       
   104                                   Control( ESessionTimeOut ) );
       
   105     iParams->timeOut = timeOut->Number();
       
   106     
       
   107    TBuf<KBufLength> buffer; 
       
   108     
       
   109     CEikEdwin* headers = static_cast<CEikEdwin*>(
       
   110                                Control( ESessionHeaders ) );
       
   111     headers->GetText(buffer);
       
   112     iParams->headers = buffer;                             
       
   113  
       
   114    
       
   115  
       
   116  /*
       
   117 	CEikEdwin* contentType = static_cast<CEikEdwin*>(
       
   118                                Control( EEstablishContentType ) );
       
   119     contentType->GetText(buffer);
       
   120     iParams->contentType = buffer;   
       
   121     
       
   122     CEikEdwin* content = static_cast<CEikEdwin*>(
       
   123                                Control( EEstablishContent ) );
       
   124     content->GetText(buffer);
       
   125     iParams->content = buffer;   
       
   126     
       
   127     CEikEdwin* contentHeaders = static_cast<CEikEdwin*>(
       
   128                                Control( EEstablishContentHeaders ) );
       
   129     contentHeaders->GetText(buffer);
       
   130     iParams->contentHeaders = buffer;   
       
   131     
       
   132     */
       
   133         
       
   134      return ETrue;
       
   135     }
       
   136 
       
   137 // ----------------------------------------------------------------------------
       
   138 // CNotifyDialog::~CNotifyDialog()
       
   139 // .
       
   140 // ----------------------------------------------------------------------------
       
   141 //
       
   142 CNotifyDialog::~CNotifyDialog()
       
   143     {
       
   144     return;
       
   145     }