epoc32/include/calentry.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- a/epoc32/include/calentry.h	Tue Mar 16 16:12:26 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,349 +0,0 @@
     1.4 -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#ifndef __CALENTRY_H__
    1.20 -#define __CALENTRY_H__
    1.21 -
    1.22 -#include <calcommon.h>
    1.23 -
    1.24 -const TReal KCalGEOMinLatitude = -90;
    1.25 -const TReal KCalGEOMaxLatitude  = 90;
    1.26 -const TReal KCalGEOMinLongitude = -180;
    1.27 -const TReal KCalGEOMaxLongitude  = 180;
    1.28 -
    1.29 -const TUint KCalGEOMaxDecimalPlaces = 6;
    1.30 -
    1.31 -class CCalAlarm;
    1.32 -class CCalAttachment;
    1.33 -class CCalAttendee;
    1.34 -class CCalCategory;
    1.35 -class CCalEntryImpl;
    1.36 -class CCalGeoValue;
    1.37 -class CCalUser;
    1.38 -class CTzRules;
    1.39 -class TCalRRule;
    1.40 -class CCalEntryIdImpl;
    1.41 -
    1.42 -/** Class representing a calendar entry. This can be an appointment, to-do
    1.43 -item, reminder, event or anniversary.
    1.44 -
    1.45 -CCalEntry contains information about a calendar entry, including
    1.46 -a repeat definition, synchronisation information, and group scheduling data.
    1.47 -
    1.48 -A repeating calendar entry has more than one occurrence. Instances are
    1.49 -represented by the CCalInstance class.
    1.50 -
    1.51 -Synchronisation information includes a record of the date/time the entry was
    1.52 -last modified. This can be found by calling the LastModifiedDateL() function.
    1.53 -
    1.54 -@publishedAll
    1.55 -@released
    1.56 -*/
    1.57 -NONSHARABLE_CLASS(CCalEntry) : public CBase
    1.58 -	{
    1.59 -public:
    1.60 -	/** Defines the type of the calendar entry.
    1.61 -	@publishedAll
    1.62 -	@released
    1.63 -	*/
    1.64 -	enum TType
    1.65 -		{
    1.66 -		/** An appointment, which has a start time and end time. */
    1.67 -		EAppt,
    1.68 -		/** A to-do, which can have a start time and end time (the end time is the due date), or can be undated. */
    1.69 -		ETodo,
    1.70 -		/** An event, which has a start time and end time. */
    1.71 -		EEvent,
    1.72 -		/** A reminder, which has a start time only. */
    1.73 -		EReminder,
    1.74 -		/** An anniversary, which has a start time and end time. */
    1.75 -		EAnniv
    1.76 -		};
    1.77 -
    1.78 -	/** Defines the possible status values of the entry.
    1.79 -	There are values here to support both iCalendar (RFC 2445) and vCalendar v1.0 STATUS properties.
    1.80 -	Enumerated values for vCalendar v1.0 contain the prefix 'EVCal'.
    1.81 -	@publishedAll
    1.82 -	@released
    1.83 -	*/
    1.84 -	enum TStatus
    1.85 -		{
    1.86 -		/** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The event is tentative. */
    1.87 -		ETentative,
    1.88 -		/** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The event has been confirmed. */
    1.89 -		EConfirmed,
    1.90 -		/** Used to support iCalendar (RFC 2445). The event has been cancelled. */
    1.91 -		ECancelled,
    1.92 -		/** Used to support iCalendar (RFC 2445). The to-do entry needs action. */
    1.93 -		ETodoNeedsAction,
    1.94 -		/** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The to-do entry has been completed. */
    1.95 -		ETodoCompleted,
    1.96 -		/** Used to support iCalendar (RFC 2445). The to-do entry is in progress. */
    1.97 -		ETodoInProcess,
    1.98 -		/** No status is set. */
    1.99 -		ENullStatus,
   1.100 -		
   1.101 -		/** Used to support vCalendar 1.0. The entry has been accepted. */
   1.102 -		EVCalAccepted,
   1.103 -		/** Used to support vCalendar 1.0. The entry needs action. */
   1.104 -		EVCalNeedsAction, 
   1.105 -		/** Used to support vCalendar 1.0. The entry has been sent. */
   1.106 -		EVCalSent, 
   1.107 -		/** Used to support vCalendar 1.0. The entry has been declined. */
   1.108 -		EVCalDeclined,
   1.109 -		/** Used to support vCalendar 1.0. The entry has been delegated. */
   1.110 -		EVCalDelegated,
   1.111 -		};
   1.112 -
   1.113 -	/** Replication status.
   1.114 -	@publishedAll
   1.115 -	@released
   1.116 -	*/
   1.117 -	enum TReplicationStatus
   1.118 -		{
   1.119 -		/** No restriction on access. */
   1.120 -		EOpen,
   1.121 -		/** Data is private (no access). */
   1.122 -		EPrivate,
   1.123 -		/** Data is confidential (restricted access). */
   1.124 -		ERestricted
   1.125 -		};
   1.126 -
   1.127 -	/** The method property of a Group Scheduling entry.
   1.128 -	@publishedAll
   1.129 -	@released
   1.130 -	*/
   1.131 -	enum TMethod
   1.132 -		{
   1.133 -		/** The RFC2445-defined method value 'None'. */
   1.134 -		EMethodNone,
   1.135 -		/** The RFC2445-defined method value 'Publish'. */
   1.136 -		EMethodPublish,
   1.137 -		/** The RFC2445-defined method value 'Request'. */
   1.138 -		EMethodRequest,
   1.139 -		/** The RFC2445-defined method value 'Reply'. */
   1.140 -		EMethodReply,
   1.141 -		/** The RFC2445-defined method value 'Add'. */
   1.142 -		EMethodAdd,
   1.143 -		/** The RFC2445-defined method value 'Cancel'. */
   1.144 -		EMethodCancel,
   1.145 -		/** The RFC2445-defined method value 'Refresh'. */
   1.146 -		EMethodRefresh,
   1.147 -		/** The RFC2445-defined method value 'Counter'. */
   1.148 -		EMethodCounter,
   1.149 -		/** The RFC2445-defined method value 'DeclineCounter'. */
   1.150 -		EMethodDeclineCounter
   1.151 -		};
   1.152 -
   1.153 -	/** Specify which entry details are to be copied in CCalEntry::CopyFromL functions.
   1.154 -	@publishedAll
   1.155 -	@released
   1.156 -	*/
   1.157 -	enum TCopyType
   1.158 -		{
   1.159 -		/** Copy the ID of the entry */
   1.160 -		ECopyAll,
   1.161 -		/** Dont copy ID of the entry */
   1.162 -		EDontCopyId
   1.163 -		};
   1.164 -
   1.165 -	/** The busy status of an entry and corresponds to the TRANSP property in the iCalendar (RFC 2445) and vCalendar specifications.
   1.166 -	In the vCalendar specification, the TRANSP property can be any positive integer value. 0 is opaque and blocks time, 1 
   1.167 -	is transparent and doesn't block time. Any higher values have an implementation-specific meaning.
   1.168 -	In the iCalendar specification (RFC 2445), the TRANSP property can be either OPAQUE (blocks time) or TRANSPARENT (doesn't block time).
   1.169 -	@publishedPartner
   1.170 -	@prototype
   1.171 -	*/
   1.172 -	enum TTransp
   1.173 -		{
   1.174 -		/** The entry blocks time. */
   1.175 -		ETranspBusy,
   1.176 -		/** The entry doesn't block time. */
   1.177 -		ETranspFree,
   1.178 -		/** The entry is tentative and blocks time. */
   1.179 -		ETranspTentative,
   1.180 -		/** The entry is an out-of-office calendar event and blocks time. */
   1.181 -		ETranspOutOfOffice,
   1.182 -		};
   1.183 -
   1.184 -	// Construction / Destruction
   1.185 -	IMPORT_C static CCalEntry* NewL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum);
   1.186 -	IMPORT_C static CCalEntry* NewL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum,
   1.187 -					const TCalTime& aRecurrenceId, CalCommon::TRecurrenceRange aRange);
   1.188 -
   1.189 -	IMPORT_C ~CCalEntry();
   1.190 -
   1.191 -	// Date and Time
   1.192 -	IMPORT_C TCalTime StartTimeL() const;
   1.193 -	IMPORT_C TCalTime EndTimeL() const;
   1.194 -	IMPORT_C void SetStartAndEndTimeL(const TCalTime& aStartTime, const TCalTime& aEndTime);
   1.195 -
   1.196 -	IMPORT_C void SetLastModifiedDateL();
   1.197 -	IMPORT_C void SetLastModifiedDateL(const TCalTime& aModifiedTime);
   1.198 -	IMPORT_C TCalTime LastModifiedDateL() const;
   1.199 -
   1.200 -	IMPORT_C void SetDTStampL(const TCalTime& aTime);
   1.201 -	IMPORT_C TCalTime DTStampL() const;
   1.202 -
   1.203 -	IMPORT_C TCalTime CompletedTimeL() const;
   1.204 -	IMPORT_C void SetCompletedL(TBool aCompleted, const TCalTime& aTime);
   1.205 -
   1.206 -	// Repeat rules / RDate / ExDate Methods
   1.207 -	IMPORT_C void SetRRuleL(const TCalRRule& aRule);
   1.208 -	IMPORT_C TBool GetRRuleL(TCalRRule& aRule) const;
   1.209 -
   1.210 -	IMPORT_C void SetRDatesL(const RArray<TCalTime>& aRDateList);
   1.211 -	IMPORT_C void GetRDatesL(RArray<TCalTime>& aRDateList) const;
   1.212 -
   1.213 -	IMPORT_C void SetExceptionDatesL(const RArray<TCalTime>& aExDateList);
   1.214 -	IMPORT_C void GetExceptionDatesL(RArray<TCalTime>& aExDateList) const;
   1.215 -
   1.216 -	IMPORT_C void ClearRepeatingPropertiesL();
   1.217 -	
   1.218 -	// Entry alarm
   1.219 -	IMPORT_C void SetAlarmL(CCalAlarm* aAlarm);
   1.220 -	IMPORT_C CCalAlarm* AlarmL() const;
   1.221 -
   1.222 -	// Comparison
   1.223 -	IMPORT_C TBool CompareL(const CCalEntry& aEntry) const;
   1.224 -
   1.225 - 	// Copy
   1.226 - 	IMPORT_C void CopyFromL(const CCalEntry& aOther);
   1.227 -	IMPORT_C void CopyFromL(const CCalEntry& aOther, TCopyType aCopyType);
   1.228 -
   1.229 -	// Text Fields
   1.230 -	IMPORT_C void SetSummaryL(const TDesC& aSummary);
   1.231 -	IMPORT_C const TDesC& SummaryL() const;
   1.232 -	IMPORT_C void SetDescriptionL(const TDesC& aDescription);
   1.233 -	IMPORT_C const TDesC& DescriptionL() const;
   1.234 -	IMPORT_C void SetLocationL(const TDesC& aLocation);
   1.235 -	IMPORT_C const TDesC& LocationL() const;
   1.236 -
   1.237 -	// Category list
   1.238 -	IMPORT_C void AddCategoryL(CCalCategory* aCategory);
   1.239 -	IMPORT_C void DeleteCategoryL(TInt aIndex);
   1.240 -	IMPORT_C const RPointerArray<CCalCategory>& CategoryListL();
   1.241 -
   1.242 -	//	Attendee Methods
   1.243 -	IMPORT_C void AddAttendeeL(CCalAttendee* aAttendee);
   1.244 -	IMPORT_C void DeleteAttendeeL(TInt aIndex);
   1.245 -	IMPORT_C RPointerArray<CCalAttendee>& AttendeesL() const;
   1.246 -	IMPORT_C void SetOrganizerL(CCalUser* aUser);
   1.247 -	IMPORT_C CCalUser* OrganizerL() const;
   1.248 -	IMPORT_C void SetPhoneOwnerL(const CCalUser* aOwner);
   1.249 -	IMPORT_C CCalUser* PhoneOwnerL() const;
   1.250 -
   1.251 -	// Attachments
   1.252 -	IMPORT_C void AddAttachmentL(CCalAttachment& aAttachment);
   1.253 -	IMPORT_C void DeleteAttachmentL(const CCalAttachment& aAttachment);
   1.254 -	IMPORT_C CCalAttachment* AttachmentL(TInt aIndex) const;
   1.255 -	IMPORT_C TInt AttachmentCountL() const;
   1.256 -	// Other Attributes
   1.257 -	IMPORT_C TType EntryTypeL() const;
   1.258 -	IMPORT_C void SetStatusL(TStatus aStatus);
   1.259 -	IMPORT_C TStatus StatusL() const;
   1.260 -
   1.261 -	IMPORT_C void SetReplicationStatusL(TReplicationStatus aReplicationStatus);
   1.262 -	IMPORT_C TReplicationStatus ReplicationStatusL() const;
   1.263 -
   1.264 -	IMPORT_C void SetPriorityL(TUint aPriority);
   1.265 -	IMPORT_C TUint PriorityL() const;
   1.266 -
   1.267 -	IMPORT_C void SetMethodL(TMethod aMethod);
   1.268 -	IMPORT_C TMethod MethodL() const;
   1.269 -	IMPORT_C void SetSequenceNumberL(TInt aSeq);
   1.270 -	IMPORT_C TInt SequenceNumberL() const;
   1.271 -	IMPORT_C const TDesC8& UidL() const;
   1.272 -	IMPORT_C TCalTime RecurrenceIdL() const;
   1.273 -	IMPORT_C CalCommon::TRecurrenceRange RecurrenceRangeL() const;
   1.274 -
   1.275 -	IMPORT_C CTzRules* TzRulesL() const;
   1.276 -	IMPORT_C void SetTzRulesL(const CTzRules& aTzRule);
   1.277 -	IMPORT_C void SetTzRulesL();
   1.278 -
   1.279 -	IMPORT_C void SetLocalUidL(TCalLocalUid aLocalId);
   1.280 -	IMPORT_C TCalLocalUid LocalUidL() const;
   1.281 -
   1.282 -	IMPORT_C TTransp TimeTransparencyL() const;
   1.283 -	IMPORT_C void SetTimeTransparencyL(TTransp aBusyStatus);
   1.284 -
   1.285 -	IMPORT_C CCalGeoValue* GeoValueL() const;
   1.286 -	IMPORT_C void SetGeoValueL(const CCalGeoValue& aGeoValue);
   1.287 -	IMPORT_C void ClearGeoValueL();
   1.288 -
   1.289 -	// Internal APIs (Used by Java)
   1.290 -	IMPORT_C TCalTime NextInstanceForLocalUIDL(const TCalTime& aTime) const;
   1.291 -	IMPORT_C TCalTime PreviousInstanceForLocalUIDL(const TCalTime& aTime) const;
   1.292 -	
   1.293 -	IMPORT_C TCalTime FindRptUntilTimeL(TInt aCount);
   1.294 -
   1.295 -	
   1.296 -public:
   1.297 -	// Internal APIs
   1.298 -	static CCalEntry* NewL(CCalEntryImpl* aImpl);
   1.299 -	CCalEntryImpl* Impl() const;
   1.300 -	
   1.301 -private:
   1.302 -	void ConstructL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum, const TCalTime& aRecurrenceId, CalCommon::TRecurrenceRange aRange);
   1.303 -	void ConstructL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum);
   1.304 -	void ConstructL(CCalEntryImpl* aImpl);
   1.305 -
   1.306 -private: // member data
   1.307 -	CCalEntryImpl* iImpl;
   1.308 -	};
   1.309 -
   1.310 -
   1.311 -/** Class representing a uniquely identifiable calendar entry in a calendar file.
   1.312 -
   1.313 -@publishedAll
   1.314 -@released
   1.315 -*/
   1.316 -NONSHARABLE_CLASS(CCalEntryId) : public CBase
   1.317 -	{
   1.318 -public:
   1.319 -	IMPORT_C static CCalEntryId* NewL(TDesC8* aFlatData);
   1.320 -	IMPORT_C ~CCalEntryId();
   1.321 -	IMPORT_C TPtrC8 IdL();
   1.322 -	IMPORT_C TPtrC StoreFileNameL();
   1.323 -	IMPORT_C TCalTime RecurrenceIdL();
   1.324 -	IMPORT_C TCalTime InstanceTimeL() const;
   1.325 -	IMPORT_C TCalLocalUid LocalUidL() const;
   1.326 -private:
   1.327 -	CCalEntryId();
   1.328 -private:
   1.329 -	CCalEntryIdImpl* iImpl;
   1.330 -	};
   1.331 -
   1.332 -
   1.333 -/** Class representing the geographical location of a calendar entry.
   1.334 -This corresponds to the GEO property as defined in vCalendar / iCalendar (RFC 2445). It contains a latitude and a longitude.
   1.335 -@publishedPartner
   1.336 -@prototype
   1.337 -*/
   1.338 -NONSHARABLE_CLASS(CCalGeoValue) : public CBase
   1.339 -	{
   1.340 -public:
   1.341 -	IMPORT_C static CCalGeoValue* NewL();
   1.342 -	IMPORT_C ~CCalGeoValue();
   1.343 -	IMPORT_C void SetLatLongL(const TReal& aLatitude, const TReal& aLongitude);
   1.344 -	IMPORT_C TBool GetLatLong(TReal& aLatitude, TReal& aLongitude) const;
   1.345 -private:
   1.346 -	CCalGeoValue();
   1.347 -private:
   1.348 -	TReal iLatitude;
   1.349 -	TReal iLongitude;
   1.350 -	};
   1.351 -
   1.352 -#endif // __CALENTRY_H__