1.1 --- a/epoc32/include/calinstanceview.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/calinstanceview.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,129 @@
1.4 -calinstanceview.h
1.5 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __CALINSTANCEVIEW_H__
1.21 +#define __CALINSTANCEVIEW_H__
1.22 +
1.23 +#include <calentry.h>
1.24 +#include <calentryview.h>
1.25 +#include <calinstanceiterator.h>
1.26 +
1.27 +class CCalFindInstanceSettings;
1.28 +class CCalInstance;
1.29 +class CCalInstanceIterator;
1.30 +class CCalInstanceViewImpl;
1.31 +class CCalSession;
1.32 +class MCalProgressCallBack;
1.33 +class TCalTime;
1.34 +class CCalLiteEntry;
1.35 +class TAgnInstanceId;
1.36 +struct TASShdAlarmedInstanceParams;
1.37 +
1.38 +/** View class for accessing instances of calendar entries.
1.39 +
1.40 +Once a session to a calendar file has been created, a view to the session
1.41 +can be created.
1.42 +
1.43 +An instance is a calendar entry, a repeated instance of a calendar entry,
1.44 +or an RDate added to an entry.
1.45 +
1.46 +This view can be used to search for instances and also to delete instances.
1.47 +
1.48 +@publishedAll
1.49 +@released
1.50 +*/
1.51 +NONSHARABLE_CLASS(CCalInstanceView) : public CBase
1.52 + {
1.53 +public:
1.54 +
1.55 + /** Parameter struct for storing search data.
1.56 + This contains a descriptor to store search text and an enum to describe the text search behaviour.
1.57 +
1.58 + @publishedAll
1.59 + @released
1.60 + */
1.61 + class TCalSearchParams
1.62 + {
1.63 + public:
1.64 + IMPORT_C TCalSearchParams(const TDesC& aText, CalCommon::TCalSearchBehaviour aBehaviour);
1.65 + IMPORT_C const TDesC& Text() const;
1.66 + IMPORT_C CalCommon::TCalSearchBehaviour Behaviour() const;
1.67 +
1.68 + private:
1.69 + TPtrC iSearchText;
1.70 + CalCommon::TCalSearchBehaviour iSearchBehaviour;
1.71 + };
1.72 +
1.73 + IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack);
1.74 + IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession);
1.75 + IMPORT_C ~CCalInstanceView();
1.76 +
1.77 + IMPORT_C void FindInstanceL(RPointerArray<CCalInstance>& aInstanceList,
1.78 + CalCommon::TCalViewFilter aCalViewFilter,
1.79 + const CalCommon::TCalTimeRange& aTimeRange) const;
1.80 +
1.81 + IMPORT_C void FindInstanceL(RPointerArray<CCalInstance>& aMatchedInstanceList,
1.82 + CalCommon::TCalViewFilter aCalViewFilter,
1.83 + const CalCommon::TCalTimeRange& aTimeRange,
1.84 + const TCalSearchParams& aSearchParams) const;
1.85 +
1.86 + IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings) const;
1.87 +
1.88 + IMPORT_C void FindAlarmedInstanceL(RPointerArray<CCalInstance>& aAlarmedInstanceList,
1.89 + TASShdAlarmedInstanceParams aAlarmedInstanceParams) const;
1.90 +
1.91 + IMPORT_C void DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances);
1.92 +
1.93 + IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const;
1.94 + IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const;
1.95 +
1.96 +private:
1.97 + CCalInstanceView();
1.98 + void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack);
1.99 +
1.100 +private:
1.101 + CCalInstanceViewImpl* iImpl;
1.102 + };
1.103 +
1.104 +/** Class for specifying the search criteria for use in @see CCalInstanceView::FindInstanceL.
1.105 +
1.106 +@publishedPartner
1.107 +@released
1.108 +*/
1.109 +NONSHARABLE_CLASS(CCalFindInstanceSettings) : public CBase
1.110 + {
1.111 +public:
1.112 + IMPORT_C static CCalFindInstanceSettings* NewL(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange);
1.113 + IMPORT_C ~CCalFindInstanceSettings();
1.114 +
1.115 + IMPORT_C void SetFilter(CalCommon::TCalViewFilter aFilter);
1.116 + IMPORT_C void SetTimeRange(const CalCommon::TCalTimeRange& aTimeRange);
1.117 + IMPORT_C void SetTextSearchL(const CCalInstanceView::TCalSearchParams& aSearchParams);
1.118 +
1.119 + CalCommon::TCalSearchBehaviour Behaviour() const;
1.120 + CalCommon::TCalViewFilter Filter() const;
1.121 + const CalCommon::TCalTimeRange TimeRange() const;
1.122 + const TDesC& Text() const;
1.123 +private:
1.124 + CCalFindInstanceSettings(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange);
1.125 +
1.126 +private:
1.127 + CalCommon::TCalTimeRange iTimeRange;
1.128 + CalCommon::TCalViewFilter iFilter;
1.129 + HBufC* iSearchText;
1.130 + CalCommon::TCalSearchBehaviour iSearchBehaviour;
1.131 + };
1.132 +
1.133 +#endif // __CALINSTANCEVIEW_H__