|
1 /* |
|
2 * Copyright (c) 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: This file contains pure virtual declarations of utility |
|
15 * functions used in the iCal parser implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef MAgnImpUtil_H |
|
20 #define MAgnImpUtil_H |
|
21 |
|
22 //System includes |
|
23 #include <caltime.h> |
|
24 |
|
25 //User includes |
|
26 #include <agnimportobserver.h> // for MAgnImportObserver::TImpResponse |
|
27 |
|
28 #include "ICalRuleSegment.h" // For CICalRuleSegment |
|
29 |
|
30 //Forward declarations |
|
31 class CICalProperty; |
|
32 class CTzRules; |
|
33 class CTzNamedRules; |
|
34 |
|
35 // Constants. |
|
36 const TInt KSecondsInOneMinute = 60; |
|
37 const TInt KMinutesInOneHour = 60; |
|
38 const TInt KMaxWeekDayNum = 4; |
|
39 const TInt KDaysPerWeek = 7; |
|
40 |
|
41 //Class declarations |
|
42 class MAgnImpUtil |
|
43 { |
|
44 public: // Enumerations |
|
45 enum TValueType |
|
46 { |
|
47 EDefault, |
|
48 EDate, |
|
49 EDateTime, |
|
50 ETime, |
|
51 EDuration, |
|
52 EPeriod |
|
53 }; |
|
54 |
|
55 public: //Helper functions |
|
56 virtual void GetCalTimeL(const CICalProperty& aProperty, TCalTime& aTime, TValueType aValueType, TInt aValue = 0) = 0; |
|
57 virtual TInt FindRuleSegment(const RPointerArray<CICalRuleSegment>& aRules, CICalRuleSegment::TSegmentType aType) const = 0; |
|
58 virtual const CTzRules* FindTzRule(const TDesC& aName) const = 0; |
|
59 |
|
60 public: //Report errors |
|
61 virtual void ReportErrorL(MAgnImportObserver::TImpError aType, const TDesC8& aUid, const TDesC& aContext, TBool aCanContinue = ETrue) = 0; |
|
62 }; |
|
63 |
|
64 #endif // MAgnImpUtil_H |