1 calinstanceview.h |
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CALINSTANCEVIEW_H__ |
|
17 #define __CALINSTANCEVIEW_H__ |
|
18 |
|
19 #include <calentry.h> |
|
20 #include <calentryview.h> |
|
21 #include <calinstanceiterator.h> |
|
22 |
|
23 class CCalFindInstanceSettings; |
|
24 class CCalInstance; |
|
25 class CCalInstanceIterator; |
|
26 class CCalInstanceViewImpl; |
|
27 class CCalSession; |
|
28 class MCalProgressCallBack; |
|
29 class TCalTime; |
|
30 class CCalLiteEntry; |
|
31 class TAgnInstanceId; |
|
32 struct TASShdAlarmedInstanceParams; |
|
33 |
|
34 /** View class for accessing instances of calendar entries. |
|
35 |
|
36 Once a session to a calendar file has been created, a view to the session |
|
37 can be created. |
|
38 |
|
39 An instance is a calendar entry, a repeated instance of a calendar entry, |
|
40 or an RDate added to an entry. |
|
41 |
|
42 This view can be used to search for instances and also to delete instances. |
|
43 |
|
44 @publishedAll |
|
45 @released |
|
46 */ |
|
47 NONSHARABLE_CLASS(CCalInstanceView) : public CBase |
|
48 { |
|
49 public: |
|
50 |
|
51 /** Parameter struct for storing search data. |
|
52 This contains a descriptor to store search text and an enum to describe the text search behaviour. |
|
53 |
|
54 @publishedAll |
|
55 @released |
|
56 */ |
|
57 class TCalSearchParams |
|
58 { |
|
59 public: |
|
60 IMPORT_C TCalSearchParams(const TDesC& aText, CalCommon::TCalSearchBehaviour aBehaviour); |
|
61 IMPORT_C const TDesC& Text() const; |
|
62 IMPORT_C CalCommon::TCalSearchBehaviour Behaviour() const; |
|
63 |
|
64 private: |
|
65 TPtrC iSearchText; |
|
66 CalCommon::TCalSearchBehaviour iSearchBehaviour; |
|
67 }; |
|
68 |
|
69 IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack); |
|
70 IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession); |
|
71 IMPORT_C ~CCalInstanceView(); |
|
72 |
|
73 IMPORT_C void FindInstanceL(RPointerArray<CCalInstance>& aInstanceList, |
|
74 CalCommon::TCalViewFilter aCalViewFilter, |
|
75 const CalCommon::TCalTimeRange& aTimeRange) const; |
|
76 |
|
77 IMPORT_C void FindInstanceL(RPointerArray<CCalInstance>& aMatchedInstanceList, |
|
78 CalCommon::TCalViewFilter aCalViewFilter, |
|
79 const CalCommon::TCalTimeRange& aTimeRange, |
|
80 const TCalSearchParams& aSearchParams) const; |
|
81 |
|
82 IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings) const; |
|
83 |
|
84 IMPORT_C void FindAlarmedInstanceL(RPointerArray<CCalInstance>& aAlarmedInstanceList, |
|
85 TASShdAlarmedInstanceParams aAlarmedInstanceParams) const; |
|
86 |
|
87 IMPORT_C void DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances); |
|
88 |
|
89 IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const; |
|
90 IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const; |
|
91 |
|
92 private: |
|
93 CCalInstanceView(); |
|
94 void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack); |
|
95 |
|
96 private: |
|
97 CCalInstanceViewImpl* iImpl; |
|
98 }; |
|
99 |
|
100 /** Class for specifying the search criteria for use in @see CCalInstanceView::FindInstanceL. |
|
101 |
|
102 @publishedPartner |
|
103 @released |
|
104 */ |
|
105 NONSHARABLE_CLASS(CCalFindInstanceSettings) : public CBase |
|
106 { |
|
107 public: |
|
108 IMPORT_C static CCalFindInstanceSettings* NewL(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange); |
|
109 IMPORT_C ~CCalFindInstanceSettings(); |
|
110 |
|
111 IMPORT_C void SetFilter(CalCommon::TCalViewFilter aFilter); |
|
112 IMPORT_C void SetTimeRange(const CalCommon::TCalTimeRange& aTimeRange); |
|
113 IMPORT_C void SetTextSearchL(const CCalInstanceView::TCalSearchParams& aSearchParams); |
|
114 |
|
115 CalCommon::TCalSearchBehaviour Behaviour() const; |
|
116 CalCommon::TCalViewFilter Filter() const; |
|
117 const CalCommon::TCalTimeRange TimeRange() const; |
|
118 const TDesC& Text() const; |
|
119 private: |
|
120 CCalFindInstanceSettings(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange); |
|
121 |
|
122 private: |
|
123 CalCommon::TCalTimeRange iTimeRange; |
|
124 CalCommon::TCalViewFilter iFilter; |
|
125 HBufC* iSearchText; |
|
126 CalCommon::TCalSearchBehaviour iSearchBehaviour; |
|
127 }; |
|
128 |
|
129 #endif // __CALINSTANCEVIEW_H__ |