multimediacommsengine/tsrc/MCETestUI/src/createNotifyDialog.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 // INCLUDES
       
    20 #include "createNotifyDialog.h"
       
    21 #include <AknPopupFieldText.h>
       
    22 
       
    23 #include "mcetestuiengineconstants.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( TNotifyValues* aParams ) :
       
    37     iParams( aParams )
       
    38     {
       
    39     // No implementation required
       
    40     }
       
    41 
       
    42 // ----------------------------------------------------------------------------
       
    43 // CSessionEstablishValuesDialog::PreLayoutDynInitL()
       
    44 // .
       
    45 // ----------------------------------------------------------------------------
       
    46 //
       
    47 void CNotifyDialog::PreLayoutDynInitL()
       
    48     {
       
    49     TBuf<KBufLength> defaultValue;
       
    50     iParams->headers.Copy(KDefaultAcceptContactValue);
       
    51  	CEikEdwin* headers = static_cast<CEikEdwin*>(
       
    52                                Control( ENotifyHeaders ) );
       
    53     defaultValue.Copy(iParams->headers);
       
    54     headers->SetTextL(&defaultValue);
       
    55     headers->SetCursorPosL(defaultValue.Length(),EFalse);
       
    56     
       
    57   /*  iParams->contentType.Copy( KNotifyContentType );
       
    58  	CEikEdwin* contentType = static_cast<CEikEdwin*>(
       
    59                                Control( ENotifyContentType ) );
       
    60     defaultValue.Copy(iParams->contentType);
       
    61     contentType->SetTextL(&defaultValue);
       
    62     contentType->SetCursorPosL(defaultValue.Length(),EFalse);
       
    63     
       
    64     iParams->content.Copy( KNotifyContent );
       
    65  	CEikEdwin* content = static_cast<CEikEdwin*>(
       
    66                                Control( ENotifyContent ) );
       
    67     defaultValue.Copy(iParams->content);
       
    68     content->SetTextL(&defaultValue);
       
    69     content->SetCursorPosL(defaultValue.Length(),EFalse);
       
    70   */ 
       
    71  
       
    72    	
       
    73     CAknForm::PreLayoutDynInitL();
       
    74     }
       
    75 
       
    76 // ----------------------------------------------------------------------------
       
    77 // CNotifyDialog::OkToExitL( TInt )
       
    78 // .
       
    79 // ----------------------------------------------------------------------------
       
    80 //
       
    81 
       
    82 TBool CNotifyDialog::OkToExitL( TInt aKey )
       
    83     {
       
    84     if ( aKey == EEikCmdCanceled )
       
    85         {
       
    86         // Cancel pressed. Just exit.
       
    87         return ETrue;
       
    88         }
       
    89     TBuf<KBufLength> buffer; 
       
    90     
       
    91     CEikEdwin* headers = static_cast<CEikEdwin*>(
       
    92                                Control( ENotifyHeaders ) );
       
    93     headers->GetText(buffer);
       
    94     iParams->headers = buffer;                             
       
    95 
       
    96  /*   CEikEdwin* contentType = static_cast<CEikEdwin*>(
       
    97                                Control( ENotifyContentType ) );
       
    98     contentType->GetText(buffer);
       
    99     iParams->contentType = buffer;   
       
   100     
       
   101     CEikEdwin* content = static_cast<CEikEdwin*>(
       
   102                                Control( ENotifyContent ) );
       
   103     content->GetText(buffer);
       
   104     iParams->content = buffer;  */ 
       
   105     
       
   106 
       
   107         
       
   108     return ETrue;
       
   109     }
       
   110 
       
   111 // ----------------------------------------------------------------------------
       
   112 // CNotifyDialog::~CNotifyDialog()
       
   113 // .
       
   114 // ----------------------------------------------------------------------------
       
   115 //
       
   116 CNotifyDialog::~CNotifyDialog()
       
   117     {
       
   118     return;
       
   119     }