1 /* |
|
2 * Copyright (c) 2007-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: ESMR calendar entry conflict checker |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRCONFLICTCHECKER_H |
|
20 #define CESMRCONFLICTCHECKER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CCalEntry; |
|
25 class MESMRCalDbMgr; |
|
26 |
|
27 /** |
|
28 * CESMRConflictChecker is responsible for finding |
|
29 * conflicting entries from symbian calendar database. |
|
30 * |
|
31 * @lib esmrentry.lib |
|
32 */ |
|
33 NONSHARABLE_CLASS(CESMRConflictChecker) : |
|
34 public CBase |
|
35 { |
|
36 public: // Construction and destruction |
|
37 /** |
|
38 * Two-phased constructor. Creates and initializes |
|
39 * CESMRConflictChecker object. |
|
40 * @param aDbMgr Reference to cal db manager. |
|
41 * @return Pointer to esmr policy checker object. |
|
42 */ |
|
43 static CESMRConflictChecker* NewL( |
|
44 MESMRCalDbMgr& aDbMgr ); |
|
45 |
|
46 /** |
|
47 * C++ destructor. |
|
48 */ |
|
49 ~CESMRConflictChecker(); |
|
50 |
|
51 public: // Interface |
|
52 /** |
|
53 * Finds conflicting entries. Conflicting entries are |
|
54 * stored to table given as parameter. Ownership of the |
|
55 * conflicting entries are transferred to caller. |
|
56 * |
|
57 * @param aEntry Reference to calendar entry |
|
58 * @param aConflicts Reference to calendar entry table |
|
59 */ |
|
60 void FindConflictsL( |
|
61 const CCalEntry& aEntry, |
|
62 RPointerArray<CCalEntry>& aConflicts ); |
|
63 |
|
64 /** |
|
65 * Finds instances for this entry occuring between specified |
|
66 * time range. |
|
67 * @param aStart Start time |
|
68 * @param aEnd End time |
|
69 * @param aEntry Reference to entry |
|
70 * @param aInstances On return contains the instances |
|
71 * |
|
72 */ |
|
73 void FindInstancesForEntryL( |
|
74 TTime aStart, |
|
75 TTime aEnd, |
|
76 const CCalEntry& aEntry, |
|
77 RPointerArray<CCalEntry>& aInstances ); |
|
78 |
|
79 private: // Implementation |
|
80 CESMRConflictChecker( |
|
81 MESMRCalDbMgr& aDbMgr ); |
|
82 |
|
83 private: // Data |
|
84 /// Ref: Reference to cal db manager |
|
85 MESMRCalDbMgr& iDbMgr; |
|
86 }; |
|
87 |
|
88 #endif // CESMRCONFLICTCHECKER_H |
|
89 |
|
90 // EOF |
|