calendarengines/agnversit2/src/AgnParseRRuleDaily.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:   This file contains implementation of iCal parser which parses 
       
    15 *                the daily recurring event specific information.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #include "AgnParseRRuleDaily.h"
       
    22 
       
    23 #include "calendarengines_debug.h"
       
    24 
       
    25 /**
       
    26 Constructor
       
    27 @param aAgnImpUtil AgnVersit2Importer utility functions
       
    28 */
       
    29 CAgnParseRRuleDaily::CAgnParseRRuleDaily( MAgnImpUtil& aAgnImpUtil ):
       
    30                         CAgnParseRRule( aAgnImpUtil )
       
    31     {
       
    32     TRACE_ENTRY_POINT;
       
    33     TRACE_EXIT_POINT;
       
    34     }
       
    35 
       
    36 
       
    37 /**
       
    38 Destructor
       
    39 */
       
    40 CAgnParseRRuleDaily::~CAgnParseRRuleDaily()
       
    41     {
       
    42     TRACE_ENTRY_POINT;
       
    43     TRACE_EXIT_POINT;
       
    44     }
       
    45 
       
    46 
       
    47 /**
       
    48 Constructs a new CAgnParseRRuleDaily and returns it. The object is left on the
       
    49 cleanup stack.
       
    50 @param aAgnImpUtil AgnVersit2Importer utility functions
       
    51 @return a new CAgnParseRRuleDaily.
       
    52 */
       
    53 CAgnParseRRule* CAgnParseRRuleDaily::NewLC( MAgnImpUtil& aAgnImpUtil )
       
    54     {
       
    55     TRACE_ENTRY_POINT;
       
    56     
       
    57     CAgnParseRRule *self = new (ELeave) CAgnParseRRuleDaily( aAgnImpUtil );
       
    58     CleanupStack::PushL( self );
       
    59     
       
    60     TRACE_EXIT_POINT;
       
    61     return self;
       
    62     }
       
    63 
       
    64 
       
    65 /**
       
    66 Parse the keywords and update RRule
       
    67 @param aSegment recurrence rule value segment.
       
    68 @param aRule recurrence rules 
       
    69 @return True if parsed the keyword successfully
       
    70 */
       
    71 TBool CAgnParseRRuleDaily::DoParseL( CICalRuleSegment& aSegment, TCalRRule& /*aRule*/ ) 
       
    72     {
       
    73     TRACE_ENTRY_POINT;
       
    74     
       
    75     TBool parsed;
       
    76     
       
    77     switch( aSegment.Type() )
       
    78         {
       
    79         default:
       
    80             {
       
    81             parsed = EFalse;
       
    82             }
       
    83         }
       
    84 
       
    85     TRACE_EXIT_POINT;
       
    86     return parsed;
       
    87     }
       
    88 
       
    89 /**
       
    90 Finalize the parsing
       
    91 @param aRule recurrence rules 
       
    92 @param aStartTime The DTSTART of the parent component.
       
    93 @return True if finalized parsing successfully
       
    94 */
       
    95 TBool CAgnParseRRuleDaily::FinalizeParsingL( TCalRRule& aRule, const TCalTime& aStartTime )
       
    96     {
       
    97     TRACE_ENTRY_POINT;
       
    98     
       
    99     //Call the parent, to set some common values
       
   100     TBool finalized = CAgnParseRRule::FinalizeParsingL( aRule, aStartTime );
       
   101     
       
   102     TRACE_EXIT_POINT;
       
   103     return finalized;
       
   104     }