epoc32/include/app/calinstanceview.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     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
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    16 #ifndef __CALINSTANCEVIEW_H__
    16 #ifndef __CALINSTANCEVIEW_H__
    17 #define __CALINSTANCEVIEW_H__
    17 #define __CALINSTANCEVIEW_H__
    18 
    18 
    19 #include <calentry.h>
    19 #include <calentry.h>
    20 #include <calentryview.h>
    20 #include <calentryview.h>
    21 #include <calinstanceiterator.h>
    21 #include <calinstance.h>
       
    22 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    23 #include <calinstanceiterator.h> //this is publishedPartner so should not be included here in the SF version.
       
    24 #endif
    22 
    25 
    23 class CCalFindInstanceSettings;
    26 class CCalFindInstanceSettings;
    24 class CCalInstance;
    27 class CCalInstance;
    25 class CCalInstanceIterator;
    28 class CCalInstanceIterator;
    26 class CCalInstanceViewImpl;
    29 class CCalInstanceViewImpl;
    27 class CCalSession;
    30 class CCalSession;
    28 class MCalProgressCallBack;
    31 class MCalProgressCallBack;
    29 class TCalTime;
    32 class TCalTime;
    30 class CCalLiteEntry;
    33 class CCalLiteEntry;
    31 class TAgnInstanceId;
    34 class TAgnInstanceId;
       
    35 #ifdef SYMBIAN_SKIPPED_CALENDAR_ALARMS
    32 struct TASShdAlarmedInstanceParams;
    36 struct TASShdAlarmedInstanceParams;
       
    37 #endif
       
    38 
       
    39 #ifdef SYMBIAN_CALENDAR_ENHANCEDSEARCHANDSORT
       
    40 class CCalSortCriteria;
       
    41 class CCalSortCriterion;
       
    42 class RWriteStream;
       
    43 class CAgnSortCriteria;
       
    44 class TAgnSortCriterion;
       
    45 #endif
    33 
    46 
    34 /** View class for accessing instances of calendar entries.
    47 /** View class for accessing instances of calendar entries.
    35 
    48 
    36 Once a session to a calendar file has been created, a view to the session
    49 Once a session to a calendar file has been created, a view to the session
    37 can be created.
    50 can be created.
    66 		CalCommon::TCalSearchBehaviour iSearchBehaviour;
    79 		CalCommon::TCalSearchBehaviour iSearchBehaviour;
    67 		};
    80 		};
    68 		
    81 		
    69 	IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack);
    82 	IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack);
    70 	IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession);
    83 	IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession);
       
    84 	IMPORT_C static CCalInstanceView* NewL(RPointerArray<CCalSession>& aSessions);
       
    85 	IMPORT_C static CCalInstanceView* NewL(RPointerArray<CCalSession>& aSessions, MCalProgressCallBack& aProgressCallBack);
    71 	IMPORT_C ~CCalInstanceView();
    86 	IMPORT_C ~CCalInstanceView();
    72 	
    87 	
    73 	IMPORT_C void FindInstanceL(RPointerArray<CCalInstance>& aInstanceList, 
    88 	IMPORT_C void FindInstanceL(RPointerArray<CCalInstance>& aInstanceList, 
    74 					   			CalCommon::TCalViewFilter aCalViewFilter, 
    89 					   			CalCommon::TCalViewFilter aCalViewFilter, 
    75 					   			const CalCommon::TCalTimeRange& aTimeRange) const;
    90 					   			const CalCommon::TCalTimeRange& aTimeRange) const;
    78 								CalCommon::TCalViewFilter aCalViewFilter, 
    93 								CalCommon::TCalViewFilter aCalViewFilter, 
    79 								const CalCommon::TCalTimeRange& aTimeRange, 
    94 								const CalCommon::TCalTimeRange& aTimeRange, 
    80 								const TCalSearchParams& aSearchParams) const;
    95 								const TCalSearchParams& aSearchParams) const;
    81 					   
    96 					   
    82 	IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings) const;
    97 	IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings) const;
    83 
    98 	
       
    99 	IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings, TCalLocalUid  aLocalId, const TCalTime& aInstanceTime) const;
       
   100 	IMPORT_C CCalInstanceIterator* FindInstanceByUidL(const TDesC8& aUid, const TCalTime& aInstanceTime) const;
       
   101 	
       
   102 	IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings, TCalInstanceId& aInstanceId) const;
       
   103 	IMPORT_C CCalInstanceIterator* FindInstanceByUidL(TCalCollectionId aCollectionId, const TDesC8& aUid, const TCalTime& aInstanceTime) const;
       
   104 	
       
   105 	IMPORT_C CCalInstance* FindInstanceL(TCalLocalUid aLocalId, const TCalTime& aInstanceTime) const;
       
   106 	IMPORT_C CCalInstance* FindInstanceL(TCalInstanceId& aInstanceId) const;
       
   107 
       
   108 #ifdef SYMBIAN_SKIPPED_CALENDAR_ALARMS	
    84     IMPORT_C void FindAlarmedInstanceL(RPointerArray<CCalInstance>& aAlarmedInstanceList,    
   109     IMPORT_C void FindAlarmedInstanceL(RPointerArray<CCalInstance>& aAlarmedInstanceList,    
    85     								   TASShdAlarmedInstanceParams aAlarmedInstanceParams) const;	
   110     								   TASShdAlarmedInstanceParams aAlarmedInstanceParams) const;	
       
   111 #endif    
    86 	
   112 	
    87 	IMPORT_C void DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances);
   113 	IMPORT_C void DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances);
    88 								
   114 								
    89 	IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const;
   115 	IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const;
    90 	IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const;
   116 	IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const;
    91 	
   117 	
    92 private:
   118 private:
    93 	CCalInstanceView();
   119 	CCalInstanceView();
    94 	void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack);
   120 	void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack);
       
   121 	void ConstructL(RPointerArray<CCalSession>& aSessions, MCalProgressCallBack* aProgressCallBack);
    95 	
   122 	
    96 private: 
   123 private: 
    97 	CCalInstanceViewImpl* iImpl;
   124 	CCalInstanceViewImpl* iImpl;
    98 	};
   125 	};
    99 
   126 	
   100 /** Class for specifying the search criteria for use in @see CCalInstanceView::FindInstanceL.
   127 	
   101 
   128 /** Class for specifying the search criteria for use in CCalInstanceView::FindInstanceL.
   102 @publishedPartner
   129 
       
   130 @publishedAll
   103 @released
   131 @released
   104 */
   132 */
   105 NONSHARABLE_CLASS(CCalFindInstanceSettings) : public CBase
   133 NONSHARABLE_CLASS(CCalFindInstanceSettings) : public CBase
   106 	{
   134 	{
   107 public:
   135 public:
   112 	IMPORT_C void SetTimeRange(const CalCommon::TCalTimeRange& aTimeRange);
   140 	IMPORT_C void SetTimeRange(const CalCommon::TCalTimeRange& aTimeRange);
   113 	IMPORT_C void SetTextSearchL(const CCalInstanceView::TCalSearchParams& aSearchParams);
   141 	IMPORT_C void SetTextSearchL(const CCalInstanceView::TCalSearchParams& aSearchParams);
   114 	
   142 	
   115 	CalCommon::TCalSearchBehaviour Behaviour() const;
   143 	CalCommon::TCalSearchBehaviour Behaviour() const;
   116 	CalCommon::TCalViewFilter Filter() const;
   144 	CalCommon::TCalViewFilter Filter() const;
   117 	const CalCommon::TCalTimeRange TimeRange() const;
   145 	const CalCommon::TCalTimeRange& TimeRange() const;
   118 	const TDesC& Text() const;
   146 	const TDesC& Text() const;
       
   147 
       
   148 #ifdef SYMBIAN_CALENDAR_ENHANCEDSEARCHANDSORT
       
   149 	IMPORT_C void SetPriorityRange(const CalCommon::TCalPriorityRange& aPriorityRange);
       
   150 	
       
   151 	IMPORT_C CCalSortCriteria& SortCriteria();
       
   152 	IMPORT_C const CCalSortCriteria& SortCriteria() const;
       
   153 #endif
       
   154 	
       
   155 	const CalCommon::TCalPriorityRange& PriorityRange() const;
       
   156 	
   119 private:
   157 private:
   120 	CCalFindInstanceSettings(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange);
   158 	CCalFindInstanceSettings(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange);
       
   159 	void ConstructL();
   121 
   160 
   122 private:
   161 private:
   123 	CalCommon::TCalTimeRange		iTimeRange;
   162 	CalCommon::TCalTimeRange		iTimeRange;
   124 	CalCommon::TCalViewFilter		iFilter;
   163 	CalCommon::TCalViewFilter		iFilter;
   125 	HBufC*							iSearchText;
   164 	HBufC*							iSearchText;
   126 	CalCommon::TCalSearchBehaviour	iSearchBehaviour;
   165 	CalCommon::TCalSearchBehaviour	iSearchBehaviour;
   127 	};
   166 	CalCommon::TCalPriorityRange	iPriorityRange; 
   128 	
   167 #ifdef SYMBIAN_CALENDAR_ENHANCEDSEARCHANDSORT
       
   168 	CCalSortCriteria*  				iSortCriteria;
       
   169 #endif
       
   170 	};
       
   171 
       
   172 #ifdef SYMBIAN_CALENDAR_ENHANCEDSEARCHANDSORT
       
   173 /** Class for specifying the sort criteria for use in CCalInstanceView::FindInstanceL.
       
   174 
       
   175 @publishedAll
       
   176 @prototype
       
   177 */
       
   178 NONSHARABLE_CLASS(CCalSortCriteria) : public CBase
       
   179 	{
       
   180 public:
       
   181 	IMPORT_C static CCalSortCriteria* NewL();
       
   182 	IMPORT_C ~CCalSortCriteria();
       
   183 
       
   184 	IMPORT_C void AppendCriterionL(CalCommon::TCalSortAttribute aAttr, CalCommon::TCalSortDirection aDir);
       
   185 	IMPORT_C TInt Count() const;
       
   186 	IMPORT_C const CCalSortCriterion& AtL(TInt aIndex) const;
       
   187 	IMPORT_C void SetEntryTypeOrderL(const RArray<CCalEntry::TType>& aTypeOrder);
       
   188 	IMPORT_C const RArray<CCalEntry::TType>& EntryTypeOrder() const;
       
   189 
       
   190 	const CAgnSortCriteria& SortCriteria() const;
       
   191 	
       
   192 private:
       
   193 	CCalSortCriteria();
       
   194 	void ConstructL();
       
   195 	
       
   196 private:
       
   197 	CAgnSortCriteria* iSortCriteria;
       
   198     RPointerArray<CCalSortCriterion> iSortCriterionList;
       
   199 	};
       
   200 
       
   201 NONSHARABLE_CLASS(CCalSortCriterion) : public CBase
       
   202 	{
       
   203 public:
       
   204 	static CCalSortCriterion* NewL(const TAgnSortCriterion& aSortCriterion);
       
   205 	~CCalSortCriterion();
       
   206 	
       
   207 	IMPORT_C CalCommon::TCalSortAttribute SortAttribute() const;
       
   208 	IMPORT_C CalCommon::TCalSortDirection SortDirection() const;
       
   209 	
       
   210 private:
       
   211 	CCalSortCriterion(const TAgnSortCriterion& aSortCriterion);
       
   212 
       
   213 private:
       
   214 	const TAgnSortCriterion& iSortCriterion;
       
   215 	};
       
   216 #endif
       
   217 
   129 #endif // __CALINSTANCEVIEW_H__
   218 #endif // __CALINSTANCEVIEW_H__