pimappservices/calendar/client/inc/caluserimpl.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 __CALUSERIMPL_H__
       
    17 #define __CALUSERIMPL_H__
       
    18 
       
    19 #include "caluser.h"
       
    20 
       
    21 class CAgnAttendee;
       
    22 
       
    23 /**
       
    24 @internalComponent
       
    25 */
       
    26 NONSHARABLE_CLASS(CCalUserImpl) : public CBase
       
    27 	{
       
    28 public:	
       
    29 	static CCalUserImpl* NewL(const TDesC& aAddress);
       
    30 	static CCalUserImpl* NewL(const TDesC& aAddress, const TDesC& aSentBy);
       
    31 	/*	This constructor is for internal use only. This is only used to populate 
       
    32 		the CalInterimAPI CalAttendeeList from the agnmodel attendeelist thus it 
       
    33 		never takes ownership of the CAgnAttendees.		*/
       
    34 	static CCalUserImpl* NewL(CAgnAttendee* aAttendee);
       
    35 	~CCalUserImpl();
       
    36 
       
    37 	void SetRoleL(CCalAttendee::TCalRole aRole);
       
    38 	void SetStatusL(CCalAttendee::TCalStatus aStatus);
       
    39 	void SetVCalExpect(CCalAttendee::TVCalExpect aExpected);
       
    40 	void SetResponseRequested(TBool aRsvp);
       
    41 	void SetCommonNameL(const TDesC& aCommonName);	
       
    42 	void SetOwnsCAgnAttendee(TBool aOwnership);
       
    43 	
       
    44 	CCalAttendee::TCalRole RoleL() const;	
       
    45 	CCalAttendee::TCalStatus StatusL() const;
       
    46 	CCalAttendee::TVCalExpect VCalExpect() const;
       
    47 	TBool ResponseRequested() const;
       
    48 	const TDesC& Address() const;
       
    49 	const TDesC& CommonName() const;
       
    50 	const TDesC& SentBy() const;
       
    51 	TBool SelfOwnership() const;
       
    52 
       
    53 	CAgnAttendee* Attendee() const;
       
    54 
       
    55 private:
       
    56 	CCalUserImpl();
       
    57 	CCalUserImpl(CAgnAttendee* aAttendee);
       
    58 
       
    59 	void ConstructL(const TDesC& aAddress, const TDesC& aSentBy);
       
    60 
       
    61 private:	
       
    62 	CAgnAttendee* iAttendee;
       
    63 	//	iOwnsCAgnAttendee is a flag to determine if this CCalAttendee class owns the 
       
    64 	//	iAttendee or not when calling its destructor.
       
    65 	TBool iOwnsCAgnAttendee;
       
    66 	};
       
    67 	
       
    68 #endif