|
1 /* |
|
2 * Copyright (c) 2005-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: Implements the import functionality of RRule |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CESMRAGNRRULEIMPORTER_H |
|
20 #define CESMRAGNRRULEIMPORTER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 //System includes. |
|
25 #include <calentry.h> // for CCalEntry |
|
26 |
|
27 //User includes |
|
28 #include "mesmragnimputil.h" // for MESMRAgnImpUtil |
|
29 |
|
30 //Forward class declarations. |
|
31 class CESMRICal; |
|
32 class CESMRICalComponent; |
|
33 class CESMRICalProperty; |
|
34 class CCalEntry; |
|
35 class CESMRAgnParseRRule; |
|
36 |
|
37 //Class declaration |
|
38 /** |
|
39 * A base class for all CESMRAgnRRuleImporter rules |
|
40 */ |
|
41 class CESMRAgnRRuleImporter : public CBase |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * Constructs a new CESMRAgnRRuleImporter and returns it. |
|
46 * The object is left on the cleanup stack. |
|
47 * @param aAgnImpUtil AgnVersit2Importer utility functions |
|
48 * @return a new CESMRAgnParseRRuleYearly. |
|
49 */ |
|
50 static CESMRAgnRRuleImporter* NewLC( MESMRAgnImpUtil& aAgnImpUtil ); |
|
51 /** |
|
52 * Constructs a new CESMRAgnRRuleImporter and returns it. |
|
53 * @param aAgnImpUtil AgnVersit2Importer utility functions |
|
54 * @return a new CESMRAgnParseRRuleYearly. |
|
55 */ |
|
56 static CESMRAgnRRuleImporter* NewL( MESMRAgnImpUtil& aAgnImpUtil ); |
|
57 |
|
58 /** |
|
59 * C++ Destructor. |
|
60 */ |
|
61 virtual ~CESMRAgnRRuleImporter(); |
|
62 |
|
63 private: |
|
64 CESMRAgnRRuleImporter( MESMRAgnImpUtil& aAgnErrorReporter ); |
|
65 void ConstructL(); |
|
66 |
|
67 private: |
|
68 CESMRAgnParseRRule* CreateParserLC( const CESMRICalRuleSegment::TFreq aFreq, TCalRRule& rule ); |
|
69 |
|
70 public: |
|
71 /** |
|
72 * A function to translate an RRULE property into a TCalRRule for Agenda. |
|
73 * @param aProperty The RRULE property to translate. |
|
74 * @param aEntry The entry to add the rules to. |
|
75 * @param aStartTime The DTSTART of the parent component. |
|
76 * @return ETrue if the rule is imported, else EFalse. |
|
77 */ |
|
78 TBool ImportL( const CESMRICalProperty& aProperty, CCalEntry& aEntry, const TCalTime& aStartTime ); |
|
79 |
|
80 MESMRAgnImpUtil& iAgnImpUtil; |
|
81 }; |
|
82 |
|
83 #endif |