pimappservices/calendar/inc/calinstance.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CALINSTANCE_H__
       
    17 #define __CALINSTANCE_H__
       
    18 
       
    19 #include <caltime.h>
       
    20 #include <calcommon.h>
       
    21 
       
    22 class CCalEntry;
       
    23 class CCalInstanceImpl;
       
    24 
       
    25 /** Instance ID to identify an instance uniquely
       
    26 
       
    27 @publishedAll
       
    28 @released
       
    29  */
       
    30 struct TCalInstanceId
       
    31 	{
       
    32 	/* Entry Local ID */
       
    33 	TCalLocalUid		iEntryLocalId;
       
    34 	/* Instance time */
       
    35 	TCalTime 	 		iInstanceTime;
       
    36 	/* Collection Id that the instance belongs to */
       
    37 	TCalCollectionId 	iCollectionId;	
       
    38 	};
       
    39 
       
    40 /** Class representing an instance of a calendar entry.
       
    41 
       
    42 A calendar entry (CCalEntry) can have any number of instances. 
       
    43 A non-repeating entry will only have one instance.
       
    44 Any further instances will appear if the entry has recurrence data.
       
    45 
       
    46 The time of an instance is the start time of that instance of the entry.
       
    47 
       
    48 @publishedAll
       
    49 @released
       
    50 */
       
    51 NONSHARABLE_CLASS(CCalInstance) : public CBase
       
    52 	{
       
    53 public:
       
    54 	static CCalInstance* NewL(CCalEntry* aEntry, const TCalTime& iTime);
       
    55 	IMPORT_C ~CCalInstance();
       
    56 	
       
    57 	IMPORT_C CCalEntry& Entry() const;
       
    58 	IMPORT_C TCalTime Time() const;
       
    59 	IMPORT_C TCalTime StartTimeL() const;
       
    60 	IMPORT_C TCalTime EndTimeL() const;
       
    61 	IMPORT_C TCalInstanceId InstanceIdL() const;
       
    62 
       
    63 private:
       
    64 	CCalInstance();
       
    65 	void ConstructL(CCalEntry* aEntry, const TCalTime& aTime);
       
    66 	
       
    67 private:
       
    68 	CCalInstanceImpl* iImpl;
       
    69 	};
       
    70 
       
    71 #endif // __CALINSTANCE_H__