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