2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FSclAttendee.h
19 * @brief This is the header file for the %Attendee class.
21 * This header file contains the declarations of the %Attendee class.
23 #ifndef _FSCL_ATTENDEE_H_
24 #define _FSCL_ATTENDEE_H_
26 #include <FBaseDataType.h>
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29 #include <FSclTypes.h>
31 namespace Tizen { namespace Social
36 * @brief This class represents the information of an attendee.
40 * @final This class is not intended for extension.
42 * The %Attendee class represents the information of an attendee. The attendee details include a mandatory
43 * email and an optional name. In addition, the attendee has a role and status information.
45 class _OSP_EXPORT_ Attendee
46 : public Tizen::Base::Object
50 * Initializes this instance of %Attendee with the specified email address.
54 * @param[in] email The email address
56 Attendee(const Tizen::Base::String& email);
59 * Copying of objects using this copy constructor is allowed.
63 * @param[in] rhs An instance of %Attendee
65 Attendee(const Attendee& rhs);
68 * This destructor overrides Tizen::Base::Object::~Object().
72 virtual ~Attendee(void);
75 * Compares the input Tizen::Base::Object with the calling %Attendee instance.
79 * @return @c true if the input object equals the calling %Attendee instance, @n
81 * @param[in] rhs The object instance to compare with the calling object
84 virtual bool Equals(const Tizen::Base::Object& rhs) const;
87 * Gets the hash value of the current instance.
91 * @return The hash value of the current instance
93 virtual int GetHashCode(void) const;
96 * Gets the name of the attendee.
102 Tizen::Base::String GetName(void) const;
105 * Gets the email address of the attendee.
109 * @return The email address
111 Tizen::Base::String GetEmail(void) const;
114 * Gets the role of the attendee. @n
115 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
119 * @return The role of the attendee
121 AttendeeRole GetRole(void) const;
124 * Gets the status of the attendee. @n
125 * The default value is @c #ATTENDEE_STATUS_NONE.
129 * @return The attendee status
131 AttendeeStatus GetStatus(void) const;
137 * @brief <i> [Compatibility] </i>
141 * @compatibility This method has compatibility issues with OSP compatible applications. @n
142 * For more information, see @ref CompAttendeeSetNamePage "here".
145 * @return An error code
146 * @param[in] name The common name of the attendee
147 * @exception E_SUCCESS The method is successful.
148 * @exception E_INVALID_ARG The specified @c name is an empty string.
150 result SetName(const Tizen::Base::String& name);
154 * @page CompAttendeeSetNamePage Compatibility for SetName()
155 * @section CompAttendeeSetNamePageIssueSection Issues
156 * Implementing this method in OSP compatible applications has the following issues: @n
157 * -# If the length of the name to be set is greater than 100 characters, E_INVALID_ARG is returned.
159 * @section CompAttendeeSetNamePageSolutionSection Resolutions
160 * This issue has been resolved in Tizen. @n
161 * -# There is no limit for the length of the name.
167 * Sets the email address of the attendee. @n
168 * This is the identifier of an attendee.
171 * @brief <i> [Compatibility] </i>
175 * @compatibility This method has compatibility issues with OSP compatible applications. @n
176 * For more information, see @ref CompAttendeeSetEmailPage "here".
179 * @return An error code
180 * @param[in] email The email address
181 * @exception E_SUCCESS The method is successful.
182 * @exception E_INVALID_ARG The specified @c email is an empty string.
184 result SetEmail(const Tizen::Base::String& email);
188 * @page CompAttendeeSetEmailPage Compatibility for SetEmail()
189 * @section CompAttendeeSetEmailPageIssueSection Issues
190 * Implementing this method in OSP compatible applications has the following issues: @n
191 * -# If the length of the email to be set is greater than 320 characters, E_INVALID_ARG is returned.
193 * @section CompAttendeeSetEmailPageSolutionSection Resolutions
194 * This issue has been resolved in Tizen. @n
195 * -# There is no limit for the length of the email.
200 * Sets the role of the attendee. @n
201 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
205 * @param[in] role The role of the attendee @n
206 * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
208 void SetRole(AttendeeRole role);
211 * Sets the status of the attendee. @n
212 * The default value is @c #ATTENDEE_STATUS_NONE.
216 * @param[in] status The status of the attendee @n
217 * The default value is @c #ATTENDEE_STATUS_NONE.
219 void SetStatus(AttendeeStatus status);
222 * Sets the phone number.
226 * @param[in] phoneNumber The phone number
228 void SetPhoneNumber(const Tizen::Base::String& phoneNumber);
231 * Gets the phone number.
235 * @return The phone number
237 Tizen::Base::String GetPhoneNumber(void) const;
240 * Sets the person ID that is an identifier used for Addressbook APIs.
244 * @param[in] personId The person ID
246 void SetPersonId(PersonId personId);
249 * Gets the person ID that is an identifier used for Addressbook APIs.
253 * @return The person ID
255 PersonId GetPersonId(void) const;
258 * Copying of objects using this copy assignment operator is allowed.
262 * @param[in] rhs An instance of %Attendee
264 Attendee& operator =(const Attendee& rhs);
267 * Checks whether the data in the specified instance of %Attendee is equal to the data in the current instance.
271 * @return @c true if the data in the specified instance equals the data in the current instance, @n
273 * @param[in] rhs An instance of %Attendee
275 bool operator ==(const Attendee& rhs) const;
278 * Compares the specified instance of %Attendee with the calling instance for inequality.
282 * @return @c true if the data in the specified instance is not equal to the data in the current instance, @n
284 * @param[in] rhs An instance of %Attendee
286 bool operator !=(const Attendee& rhs) const;
289 Tizen::Base::String __name;
290 Tizen::Base::String __email;
291 Tizen::Base::String __phoneNumber;
292 AttendeeRole __attendeeRole;
293 AttendeeStatus __attendeeStatus;
296 friend class _AttendeeImpl;
297 class _AttendeeImpl* __pAttendeeImpl;
302 #endif //_FSCL_ATTENDEE_H_