meetingrequest/mrgui/src/cesmrvalidatorfactory.cpp
changeset 0 8466d47a6819
child 16 4ce476e64c59
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  ESMR ui base class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "emailtrace.h"
       
    20 #include "cesmrvalidatorfactory.h"
       
    21 #include "cesmrmeetingtimevalidator.h"
       
    22 #include "cesmrtodotimevalidator.h"
       
    23 #include "cesmrmemotimevalidator.h"
       
    24 #include "cesmrannivtimevalidator.h"
       
    25 
       
    26 // ======== MEMBER FUNCTIONS ========
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // CESMRValidatorFactory::CreateValidatorL
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 MESMRFieldValidator* CESMRValidatorFactory::CreateValidatorL(
       
    33         TESMRCalendarEventType aType )
       
    34     {
       
    35     FUNC_LOG;
       
    36     MESMRFieldValidator* validator=  NULL;
       
    37     switch ( aType )
       
    38         {
       
    39         case EESMREventTypeAppt: // activated by meeting and meeting request
       
    40         	{
       
    41             validator = CESMRMeetingTimeValidator::NewL ( );
       
    42             break;
       
    43         	}
       
    44         case EESMREventTypeETodo: // activated bt To-do
       
    45         	{
       
    46             validator = CESMRTodoTimeValidator::NewL ( );
       
    47             break;
       
    48         	}
       
    49         case EESMREventTypeEEvent: // activated by Memo- Day note
       
    50         	{
       
    51             validator = CESMRMemoTimeValidator::NewL ( );
       
    52             break;
       
    53         	}
       
    54         case EESMREventTypeEAnniv: // Activated by Aniverssary
       
    55         	{
       
    56             validator = CESMRAnnivTimeValidator::NewL ( );
       
    57             break;
       
    58         	}
       
    59         case EESMREventTypeEReminder: // Is meeting
       
    60         default:
       
    61         	{
       
    62         	}
       
    63         }
       
    64     return validator;
       
    65     }
       
    66 // EOF
       
    67