|
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CALUSER_H__ |
|
17 #define __CALUSER_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 class CCalUserImpl; |
|
22 |
|
23 /** Class representing a calendar user. |
|
24 |
|
25 A calendar user is the base class representation of a meeting participant. |
|
26 It contains attributes common to all calendar users. |
|
27 |
|
28 Contains methods to store and retrieve a user's ADDRESS, SENT-BY and CN |
|
29 fields. |
|
30 |
|
31 @publishedAll |
|
32 @released |
|
33 */ |
|
34 NONSHARABLE_CLASS(CCalUser) : public CBase |
|
35 { |
|
36 public: |
|
37 IMPORT_C static CCalUser* NewL(const TDesC& aAddress); |
|
38 IMPORT_C static CCalUser* NewL(const TDesC& aAddress, const TDesC& aSentBy); |
|
39 IMPORT_C ~CCalUser(); |
|
40 |
|
41 IMPORT_C void SetCommonNameL(const TDesC& aCommonName); |
|
42 IMPORT_C const TDesC& Address() const; |
|
43 IMPORT_C const TDesC& CommonName() const; |
|
44 IMPORT_C const TDesC& SentBy() const; |
|
45 public: |
|
46 static CCalUser* NewL(CCalUserImpl* aImpl); |
|
47 |
|
48 CCalUserImpl* Impl() const; |
|
49 protected: |
|
50 CCalUser(); |
|
51 CCalUser(CCalUserImpl* aImpl); |
|
52 void ConstructL(const TDesC& aAddress); |
|
53 void ConstructL(const TDesC& aAddress, const TDesC& aSentBy); |
|
54 protected: |
|
55 /** Handle to CCalUser implementation */ |
|
56 CCalUserImpl* iImpl; |
|
57 }; |
|
58 |
|
59 |
|
60 /** Class representing an attendee of an event. |
|
61 |
|
62 CCalAttendee is a specialization of the CCalUser class. |
|
63 |
|
64 This class contains extra methods to store and retrieve an Attendee's |
|
65 ROLE, PART-STAT, and RSVP fields. |
|
66 |
|
67 @publishedAll |
|
68 @released |
|
69 */ |
|
70 NONSHARABLE_CLASS(CCalAttendee) : public CCalUser |
|
71 { |
|
72 public: |
|
73 /** Attendee's role. |
|
74 @publishedAll |
|
75 @released |
|
76 */ |
|
77 enum TCalRole |
|
78 { |
|
79 /** A required participant of the event. */ |
|
80 EReqParticipant=0, |
|
81 /** An optional participant of the event. */ |
|
82 EOptParticipant, |
|
83 /** A non-participant of the event. */ |
|
84 ENonParticipant, |
|
85 /** This participant will chair the event. */ |
|
86 EChair, |
|
87 |
|
88 /** Indicates an attendee at the event or todo. This value is supported in vCalendar only. */ |
|
89 EVCalAttendee, |
|
90 /** Indicates a delegate of another attendee. This value is supported in vCalendar only. */ |
|
91 EVCalDelegate, |
|
92 /** Indicates owner of the event or todo (not the same as phone owner). This value is supported in vCalendar only. */ |
|
93 EVCalOwner, |
|
94 }; |
|
95 |
|
96 /** Attendee's status |
|
97 @publishedAll |
|
98 @released |
|
99 */ |
|
100 enum TCalStatus |
|
101 { |
|
102 /** Action is required by attendee. */ |
|
103 ENeedsAction=0, |
|
104 /** Attendee has accepted request. */ |
|
105 EAccepted, |
|
106 /** Attendee has tentatively accepted the request. */ |
|
107 ETentative, |
|
108 /** Attendee's presence is confirmed. */ |
|
109 EConfirmed, |
|
110 /** Attendee has declined request. */ |
|
111 EDeclined, |
|
112 /** The required action has been completed by attendee. */ |
|
113 ECompleted, |
|
114 /** Attendee has delegated the request to another person. */ |
|
115 EDelegated, |
|
116 /** A to-do action in the process of being completed. */ |
|
117 EInProcess, |
|
118 |
|
119 /** An entry has been sent. This value is supported in vCalendar only. */ |
|
120 EVCalSent, |
|
121 /** An entry has been received. This value is supported in vCalendar only. */ |
|
122 EVCalXReceived, |
|
123 }; |
|
124 |
|
125 /** Attendee's expected participation response. |
|
126 This property is supported in vCalendar only. It is not a property of iCalendar. |
|
127 @publishedAll |
|
128 @released |
|
129 */ |
|
130 enum TVCalExpect |
|
131 { |
|
132 /** Indicates request is for your information. */ |
|
133 EVCalFyi, |
|
134 /** Indicates presence is definitely required. */ |
|
135 EVCalRequire, |
|
136 /** Indicates presence is being requested. */ |
|
137 EVCalRequest, |
|
138 /** Indicates an immediate response needed. */ |
|
139 EVCalImmediate |
|
140 }; |
|
141 |
|
142 public: |
|
143 IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress); |
|
144 IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress, const TDesC& aSentBy); |
|
145 |
|
146 IMPORT_C void SetRoleL(TCalRole aRole); |
|
147 IMPORT_C void SetStatusL(TCalStatus aStatus); |
|
148 IMPORT_C void SetResponseRequested(TBool aRsvp); |
|
149 IMPORT_C void SetVCalExpect(TVCalExpect aExpected); |
|
150 |
|
151 IMPORT_C TCalRole RoleL() const; |
|
152 IMPORT_C TCalStatus StatusL() const; |
|
153 IMPORT_C TBool ResponseRequested() const; |
|
154 IMPORT_C TVCalExpect VCalExpect() const; |
|
155 public: |
|
156 static CCalAttendee* NewL(CCalUserImpl* aImpl); |
|
157 private: |
|
158 CCalAttendee(); |
|
159 CCalAttendee(CCalUserImpl* aImpl); |
|
160 }; |
|
161 |
|
162 |
|
163 #endif // __CALUSER_H__ |