2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 * @file FSclAttendee.h
18 * @brief This is the header file for the %Attendee class.
20 * This header file contains the declarations of the %Attendee class.
22 #ifndef _FSCL_ATTENDEE_H_
23 #define _FSCL_ATTENDEE_H_
25 #include <FBaseDataType.h>
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28 #include <FSclTypes.h>
30 namespace Tizen { namespace Social
35 * @brief This class represents the information of an attendee.
39 * @final This class is not intended for extension.
41 * The %Attendee class represents the information of an attendee. The attendee details include a mandatory
42 * email and an optional name. In addition, the attendee has a role and status information.
44 class _OSP_EXPORT_ Attendee
45 : public Tizen::Base::Object
49 * Initializes this instance of %Attendee with the specified email address.
53 * @param[in] email The email address
55 Attendee(const Tizen::Base::String& email);
58 * Copying of objects using this copy constructor is allowed.
62 * @param[in] rhs An instance of %Attendee to copy
64 Attendee(const Attendee& rhs);
67 * This destructor overrides Tizen::Base::Object::~Object().
71 virtual ~Attendee(void);
74 * Compares the specified Tizen::Base::Object with the current %Attendee instance.
78 * @return @c true if the specified object equals the current %Attendee instance, @n
80 * @param[in] rhs The object instance to compare with the current object
83 virtual bool Equals(const Tizen::Base::Object& rhs) const;
86 * Gets the hash value of the current instance.
90 * @return The hash value of the current instance
92 virtual int GetHashCode(void) const;
95 * Gets the name of the attendee.
101 Tizen::Base::String GetName(void) const;
104 * Gets the email address of the attendee.
108 * @return The email address
110 Tizen::Base::String GetEmail(void) const;
113 * Gets the role of the attendee. @n
114 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
118 * @return The role of the attendee
120 AttendeeRole GetRole(void) const;
123 * Gets the status of the attendee. @n
124 * The default value is @c #ATTENDEE_STATUS_NONE.
128 * @return The attendee status
130 AttendeeStatus GetStatus(void) const;
136 * @brief <i> [Compatibility] </i>
140 * @compatibility This method has compatibility issues with OSP compatible applications. @n
141 * For more information, see @ref CompAttendeeSetNamePage "here".
144 * @return An error code
145 * @param[in] name The common name of the attendee
146 * @exception E_SUCCESS The method is successful.
147 * @exception E_INVALID_ARG The specified @c name is an empty string.
149 result SetName(const Tizen::Base::String& name);
153 * @page CompAttendeeSetNamePage Compatibility for SetName()
154 * @section CompAttendeeSetNamePageIssueSection Issues
155 * Implementing this method in OSP compatible applications has the following issues: @n
156 * -# If the length of the name to be set is greater than @c 100 characters, @c E_INVALID_ARG is returned.
158 * @section CompAttendeeSetNamePageSolutionSection Resolutions
159 * This issue has been resolved in Tizen. @n
160 * -# There is no limit for the length of the name.
166 * Sets the email address of the attendee. @n
167 * This is the identifier of the attendee.
170 * @brief <i> [Compatibility] </i>
174 * @compatibility This method has compatibility issues with OSP compatible applications. @n
175 * For more information, see @ref CompAttendeeSetEmailPage "here".
178 * @return An error code
179 * @param[in] email The email address
180 * @exception E_SUCCESS The method is successful.
181 * @exception E_INVALID_ARG The specified @c email is an empty string.
183 result SetEmail(const Tizen::Base::String& email);
187 * @page CompAttendeeSetEmailPage Compatibility for SetEmail()
188 * @section CompAttendeeSetEmailPageIssueSection Issues
189 * Implementing this method in OSP compatible applications has the following issues: @n
190 * -# If the length of the email to be set is greater than @c 320 characters, @c E_INVALID_ARG is returned.
192 * @section CompAttendeeSetEmailPageSolutionSection Resolutions
193 * This issue has been resolved in Tizen. @n
194 * -# There is no limit for the length of the email.
199 * Sets the role of the attendee. @n
200 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
204 * @param[in] role The role of the attendee @n
205 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
207 void SetRole(AttendeeRole role);
210 * Sets the status of the attendee. @n
211 * The default value is @c #ATTENDEE_STATUS_NONE.
215 * @param[in] status The status of the attendee @n
216 * The default value is @c #ATTENDEE_STATUS_NONE.
218 void SetStatus(AttendeeStatus status);
221 * Sets the phone number.
225 * @param[in] phoneNumber The phone number
227 void SetPhoneNumber(const Tizen::Base::String& phoneNumber);
230 * Gets the phone number.
234 * @return The phone number
236 Tizen::Base::String GetPhoneNumber(void) const;
239 * Sets the person ID that is an identifier used for Addressbook APIs.
243 * @param[in] personId The person ID
245 void SetPersonId(PersonId personId);
248 * Gets the person ID that is an identifier used for Addressbook APIs.
252 * @return The person ID
254 PersonId GetPersonId(void) const;
257 * Copying of objects using this copy assignment operator is allowed.
261 * @param[in] rhs An instance of %Attendee to copy
263 Attendee& operator =(const Attendee& rhs);
266 * Checks whether the data in the specified instance of %Attendee is equal to the data in the current instance.
270 * @return @c true if the data in the specified instance equals the data in the current instance, @n
272 * @param[in] rhs An instance of %Attendee
274 bool operator ==(const Attendee& rhs) const;
277 * Compares the specified instance of %Attendee with the current instance for inequality.
281 * @return @c true if the data in the specified instance is not equal to the data in the current instance, @n
283 * @param[in] rhs An instance of %Attendee
285 bool operator !=(const Attendee& rhs) const;
288 Tizen::Base::String __name;
289 Tizen::Base::String __email;
290 Tizen::Base::String __phoneNumber;
291 AttendeeRole __attendeeRole;
292 AttendeeStatus __attendeeStatus;
295 friend class _AttendeeImpl;
296 class _AttendeeImpl* __pAttendeeImpl;
301 #endif //_FSCL_ATTENDEE_H_