williamr@2: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __CALUSER_H__ williamr@2: #define __CALUSER_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class CCalUserImpl; williamr@2: williamr@2: /** Class representing a calendar user. williamr@2: williamr@2: A calendar user is the base class representation of a meeting participant. williamr@2: It contains attributes common to all calendar users. williamr@2: williamr@2: Contains methods to store and retrieve a user's ADDRESS, SENT-BY and CN williamr@2: fields. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: NONSHARABLE_CLASS(CCalUser) : public CBase williamr@2: { williamr@2: public: williamr@2: IMPORT_C static CCalUser* NewL(const TDesC& aAddress); williamr@2: IMPORT_C static CCalUser* NewL(const TDesC& aAddress, const TDesC& aSentBy); williamr@2: IMPORT_C ~CCalUser(); williamr@2: williamr@2: IMPORT_C void SetCommonNameL(const TDesC& aCommonName); williamr@2: IMPORT_C const TDesC& Address() const; williamr@2: IMPORT_C const TDesC& CommonName() const; williamr@2: IMPORT_C const TDesC& SentBy() const; williamr@2: public: williamr@2: static CCalUser* NewL(CCalUserImpl* aImpl); williamr@2: williamr@2: CCalUserImpl* Impl() const; williamr@2: protected: williamr@2: CCalUser(); williamr@2: CCalUser(CCalUserImpl* aImpl); williamr@2: void ConstructL(const TDesC& aAddress); williamr@2: void ConstructL(const TDesC& aAddress, const TDesC& aSentBy); williamr@2: protected: williamr@2: /** Handle to CCalUser implementation */ williamr@2: CCalUserImpl* iImpl; williamr@2: }; williamr@2: williamr@2: williamr@2: /** Class representing an attendee of an event. williamr@2: williamr@2: CCalAttendee is a specialization of the CCalUser class. williamr@2: williamr@2: This class contains extra methods to store and retrieve an Attendee's williamr@2: ROLE, PART-STAT, and RSVP fields. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: NONSHARABLE_CLASS(CCalAttendee) : public CCalUser williamr@2: { williamr@2: public: williamr@2: /** Attendee's role. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TCalRole williamr@2: { williamr@2: /** A required participant of the event. */ williamr@2: EReqParticipant=0, williamr@2: /** An optional participant of the event. */ williamr@2: EOptParticipant, williamr@2: /** A non-participant of the event. */ williamr@2: ENonParticipant, williamr@2: /** This participant will chair the event. */ williamr@2: EChair, williamr@2: williamr@2: /** Indicates an attendee at the event or todo. This value is supported in vCalendar only. */ williamr@2: EVCalAttendee, williamr@2: /** Indicates a delegate of another attendee. This value is supported in vCalendar only. */ williamr@2: EVCalDelegate, williamr@2: /** Indicates owner of the event or todo (not the same as phone owner). This value is supported in vCalendar only. */ williamr@2: EVCalOwner, williamr@2: }; williamr@2: williamr@2: /** Attendee's status williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TCalStatus williamr@2: { williamr@2: /** Action is required by attendee. */ williamr@2: ENeedsAction=0, williamr@2: /** Attendee has accepted request. */ williamr@2: EAccepted, williamr@2: /** Attendee has tentatively accepted the request. */ williamr@2: ETentative, williamr@2: /** Attendee's presence is confirmed. */ williamr@2: EConfirmed, williamr@2: /** Attendee has declined request. */ williamr@2: EDeclined, williamr@2: /** The required action has been completed by attendee. */ williamr@2: ECompleted, williamr@2: /** Attendee has delegated the request to another person. */ williamr@2: EDelegated, williamr@2: /** A to-do action in the process of being completed. */ williamr@2: EInProcess, williamr@2: williamr@2: /** An entry has been sent. This value is supported in vCalendar only. */ williamr@2: EVCalSent, williamr@2: /** An entry has been received. This value is supported in vCalendar only. */ williamr@2: EVCalXReceived, williamr@2: }; williamr@2: williamr@2: /** Attendee's expected participation response. williamr@2: This property is supported in vCalendar only. It is not a property of iCalendar. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TVCalExpect williamr@2: { williamr@2: /** Indicates request is for your information. */ williamr@2: EVCalFyi, williamr@2: /** Indicates presence is definitely required. */ williamr@2: EVCalRequire, williamr@2: /** Indicates presence is being requested. */ williamr@2: EVCalRequest, williamr@2: /** Indicates an immediate response needed. */ williamr@2: EVCalImmediate williamr@2: }; williamr@2: williamr@2: public: williamr@2: IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress); williamr@2: IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress, const TDesC& aSentBy); williamr@2: williamr@2: IMPORT_C void SetRoleL(TCalRole aRole); williamr@2: IMPORT_C void SetStatusL(TCalStatus aStatus); williamr@2: IMPORT_C void SetResponseRequested(TBool aRsvp); williamr@2: IMPORT_C void SetVCalExpect(TVCalExpect aExpected); williamr@2: williamr@2: IMPORT_C TCalRole RoleL() const; williamr@2: IMPORT_C TCalStatus StatusL() const; williamr@2: IMPORT_C TBool ResponseRequested() const; williamr@2: IMPORT_C TVCalExpect VCalExpect() const; williamr@2: public: williamr@2: static CCalAttendee* NewL(CCalUserImpl* aImpl); williamr@2: private: williamr@2: CCalAttendee(); williamr@2: CCalAttendee(CCalUserImpl* aImpl); williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __CALUSER_H__ williamr@4: