summaryrefslogtreecommitdiff
path: root/inc/FSclAttendee.h
blob: d1fa6fa418ff66efd76c583ad4562c0490991c11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
 * @file	FSclAttendee.h
 * @brief	This is the header file for the %Attendee class.
 *
 * This header file contains the declarations of the %Attendee class.
 */
#ifndef _FSCL_ATTENDEE_H_
#define _FSCL_ATTENDEE_H_

#include <FBaseDataType.h>
#include <FBaseObject.h>
#include <FBaseString.h>
#include <FSclTypes.h>

namespace Tizen { namespace Social
{

/**
 * @class	Attendee
 * @brief	This class represents the information of an attendee.
 *
 * @since	2.0
 *
 * @final	This class is not intended for extension.
 *
 * The %Attendee class represents the information of an attendee. The attendee details include a mandatory
 * email and an optional name. In addition, the attendee has a role and status information.
 */
class _OSP_EXPORT_ Attendee
	: public Tizen::Base::Object
{
public:
	/**
	 * Initializes this instance of %Attendee with the specified email address.
	 *
	 * @since	2.0
	 *
	 * @param[in]	email	The email address
	 */
	Attendee(const Tizen::Base::String& email);

	/**
	 * Copying of objects using this copy constructor is allowed.
	 *
	 * @since	2.0
	 *
	 * @param[in]	rhs		An instance of %Attendee to copy
	 */
	Attendee(const Attendee& rhs);

	/**
	 * This destructor overrides Tizen::Base::Object::~Object().
	 *
	 * @since	2.0
	 */
	virtual ~Attendee(void);

	/**
	 * Compares the specified Tizen::Base::Object with the current %Attendee instance.
	 *
	 * @since	2.0
	 *
	 * @return		@c true if the specified object equals the current %Attendee instance, @n
	 *				else @c false
	 * @param[in]	rhs	The object instance to compare with the current object
	 * @see			GetHashCode()
	 */
	virtual bool Equals(const Tizen::Base::Object& rhs) const;

	/**
	 * Gets the hash value of the current instance.
	 *
	 * @since	2.0
	 *
	 * @return		The hash value of the current instance
	 */
	virtual int GetHashCode(void) const;

	/**
	 * Gets the name of the attendee.
	 *
	 * @since	2.0
	 *
	 * @return		The name
	 */
	Tizen::Base::String GetName(void) const;

	/**
	 * Gets the email address of the attendee.
	 *
	 * @since	2.0
	 *
	 * @return		The email address
	 */
	Tizen::Base::String GetEmail(void) const;

	/**
	 * Gets the role of the attendee. @n
	 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
	 *
	 * @since	2.0
	 *
	 * @return		The role of the attendee
	 */
	AttendeeRole GetRole(void) const;

	/**
	 * Gets the status of the attendee. @n
	 * The default value is @c #ATTENDEE_STATUS_NONE.
	 *
	 * @since	2.0
	 *
	 * @return		The attendee status
	 */
	AttendeeStatus GetStatus(void) const;

	/**
	 * Sets the name.
	 *
	 * @if OSPCOMPAT
	 * @brief <i> [Compatibility] </i>
	 * @endif
	 * @since	2.0
	 * @if OSPCOMPAT
	 * @compatibility	This method has compatibility issues with OSP compatible applications. @n
     *					For more information, see @ref CompAttendeeSetNamePage "here".
     * @endif
	 *
	 * @return		An error code
	 * @param[in]	name			The common name of the attendee
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG	The specified @c name is an empty string.
	 */
	result SetName(const Tizen::Base::String& name);

	/**
	 * @if OSPCOMPAT
	 * @page	CompAttendeeSetNamePage Compatibility for SetName()
	 * @section	CompAttendeeSetNamePageIssueSection Issues
	 *          Implementing this method in OSP compatible applications has the following issues: @n
	 *			-# If the length of the name to be set is greater than @c 100 characters, @c E_INVALID_ARG is returned.
	 *
	 * @section	CompAttendeeSetNamePageSolutionSection Resolutions
	 * 			This issue has been resolved in Tizen. @n
	 * 			-# There is no limit for the length of the name.
	 *
	 * @endif
	 */

	/**
	 * Sets the email address of the attendee. @n
	 * This is the identifier of the attendee.
	 *
	 * @if OSPCOMPAT
	 * @brief <i> [Compatibility] </i>
	 * @endif
	 * @since	2.0
	 * @if OSPCOMPAT
	 * @compatibility	This method has compatibility issues with OSP compatible applications. @n
     *					For more information, see @ref CompAttendeeSetEmailPage "here".
	 * @endif
	 *
	 * @return		An error code
	 * @param[in]	email			The email address
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG	The specified @c email is an empty string.
	 */
	result SetEmail(const Tizen::Base::String& email);

	/**
	 * @if OSPCOMPAT
	 * @page	CompAttendeeSetEmailPage Compatibility for SetEmail()
	 * @section	CompAttendeeSetEmailPageIssueSection Issues
	 *          Implementing this method in OSP compatible applications has the following issues: @n
	 *			-# If the length of the email to be set is greater than @c 320 characters, @c E_INVALID_ARG is returned.
	 *
	 * @section	CompAttendeeSetEmailPageSolutionSection Resolutions
	 * 			This issue has been resolved in Tizen. @n
	 * 			-# There is no limit for the length of the email.
	 * @endif
	 */

	/**
	 * Sets the role of the attendee. @n
	 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
	 *
	 * @since	2.0
	 *
	 * @param[in]	role	The role of the attendee @n
	 *						The default value is @c #ATTENDEE_ROLE_ATTENDEE.
	 */
	void SetRole(AttendeeRole role);

	/**
	 * Sets the status of the attendee. @n
	 * The default value is @c #ATTENDEE_STATUS_NONE.
	 *
	 * @since	2.0
	 *
	 * @param[in]	status	The status of the attendee @n
	 *						The default value is @c #ATTENDEE_STATUS_NONE.
	 */
	void SetStatus(AttendeeStatus status);

	/**
	 * Sets the phone number.
	 *
	 * @since	2.0
	 *
	 * @param[in]	phoneNumber		The phone number
	 */
	void SetPhoneNumber(const Tizen::Base::String& phoneNumber);

	/**
	 * Gets the phone number.
	 *
	 * @since	2.0
	 *
	 * @return		The phone number
	 */
	Tizen::Base::String GetPhoneNumber(void) const;

	/**
	 * Sets the person ID that is an identifier used for Addressbook APIs.
	 *
	 * @since	2.0
	 *
	 * @param[in]	personId		The person ID
	 */
	void SetPersonId(PersonId personId);

	/**
	 * Gets the person ID that is an identifier used for Addressbook APIs.
	 *
	 * @since	2.0
	 *
	 * @return		The person ID
	 */
	PersonId GetPersonId(void) const;

	/**
	 * Copying of objects using this copy assignment operator is allowed.
	 *
	 * @since	2.0
	 *
	 * @param[in]	rhs		An instance of %Attendee to copy
	 */
	Attendee& operator =(const Attendee& rhs);

	/**
	 * Checks whether the data in the specified instance of %Attendee is equal to the data in the current instance.
	 *
	 * @since	2.0
	 *
	 * @return		@c true if the data in the specified instance equals the data in the current instance, @n
	 *				else @c false
	 * @param[in]	rhs		An instance of %Attendee
	 */
	bool operator ==(const Attendee& rhs) const;

	/**
	 * Compares the specified instance of %Attendee with the current instance for inequality.
	 *
	 * @since	2.0
	 *
	 * @return		@c true if the data in the specified instance is not equal to the data in the current instance, @n
	 *				else @c false
	 * @param[in]	rhs		An instance of %Attendee
	 */
	bool operator !=(const Attendee& rhs) const;

private:
	Tizen::Base::String	__name;
	Tizen::Base::String	__email;
	Tizen::Base::String	__phoneNumber;
	AttendeeRole	__attendeeRole;
	AttendeeStatus	__attendeeStatus;
	PersonId __personId;

	friend class _AttendeeImpl;
	class _AttendeeImpl* __pAttendeeImpl;
};	// Attendee

}}	// Tizen::Social

#endif //_FSCL_ATTENDEE_H_