|
1 /* |
|
2 * Copyright (c) 2005 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: Implements the import functionality of RRule |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CESMRAGNPARSERRULE_H |
|
21 #define CESMRAGNPARSERRULE_H |
|
22 |
|
23 |
|
24 // System includes. |
|
25 #include <e32base.h> |
|
26 |
|
27 //User includes |
|
28 #include "mesmragnimputil.h" |
|
29 |
|
30 // Forward class declarations. |
|
31 class TCalRRule; |
|
32 class CESMRICalRuleSegment; |
|
33 |
|
34 class CESMRAgnParseRRule : public CBase |
|
35 { |
|
36 public: |
|
37 virtual ~CESMRAgnParseRRule(); |
|
38 |
|
39 protected://Constructor |
|
40 CESMRAgnParseRRule( MESMRAgnImpUtil& aAgnImpUtil ); |
|
41 |
|
42 public: |
|
43 //template method calls the real parser |
|
44 TBool ParseL( TCalRRule& aRule, |
|
45 RPointerArray<CESMRICalRuleSegment>& aRecRules, |
|
46 const TCalTime& aStartTime, |
|
47 const TDesC8& aUid, |
|
48 const RPointerArray<CESMRICalValue>& aRulevalues ); |
|
49 |
|
50 protected://parsing functions |
|
51 virtual TBool DoParseL( CESMRICalRuleSegment& aSegment, TCalRRule& aRule ); |
|
52 virtual TBool FinalizeParsingL( TCalRRule& aRule, const TCalTime& aStartTime ); |
|
53 |
|
54 protected://update TCalRRule |
|
55 virtual TBool SetRRuleUntilL( const CESMRICalRuleSegment& aSegment, TCalRRule& aRule ); |
|
56 virtual TBool SetRRuleWkStL( const CESMRICalRuleSegment& aSegment, TCalRRule& aRule ); |
|
57 virtual TBool SetRRuleByDayL( const CESMRICalRuleSegment& aSegment, TCalRRule& aRule ); |
|
58 virtual TBool SetRRuleByMonthL( const CESMRICalRuleSegment& aSegment, TCalRRule& aRule ); |
|
59 virtual TBool SetRRuleByMonthDayL( const CESMRICalRuleSegment& aSegment, TCalRRule& aRule ); |
|
60 |
|
61 protected: |
|
62 enum TSegFlags |
|
63 { |
|
64 ESegFlagByDay = 1 << CESMRICalRuleSegment::ESegByDay, |
|
65 ESegFlagByMonthDay = 1 << CESMRICalRuleSegment::ESegByMonthDay, |
|
66 ESegFlagByMonth = 1 << CESMRICalRuleSegment::ESegByMonth |
|
67 }; |
|
68 |
|
69 protected: |
|
70 MESMRAgnImpUtil& iAgnImpUtil; |
|
71 TInt iSetSegs; |
|
72 }; |
|
73 |
|
74 #endif // CESMRAGNPARSERRULE_H |