Merge "Merge reviewed headers" into tizen_2.1
[framework/osp/social.git] / inc / FSclAttendee.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file        FSclAttendee.h
19  * @brief       This is the header file for the %Attendee class.
20  *
21  * This header file contains the declarations of the %Attendee class.
22  */
23 #ifndef _FSCL_ATTENDEE_H_
24 #define _FSCL_ATTENDEE_H_
25
26 #include <FBaseDataType.h>
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29 #include <FSclTypes.h>
30
31 namespace Tizen { namespace Social
32 {
33
34 /**
35  * @class       Attendee
36  * @brief       This class represents the information of an attendee.
37  *
38  * @since       2.0
39  *
40  * @final       This class is not intended for extension.
41  *
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.
44  */
45 class _OSP_EXPORT_ Attendee
46         : public Tizen::Base::Object
47 {
48 public:
49         /**
50          * Initializes this instance of %Attendee with the specified email address.
51          *
52          * @since       2.0
53          *
54          * @param[in]   email   The email address
55          */
56         Attendee(const Tizen::Base::String& email);
57
58         /**
59          * Copying of objects using this copy constructor is allowed.
60          *
61          * @since       2.0
62          *
63          * @param[in]   rhs             An instance of %Attendee
64          */
65         Attendee(const Attendee& rhs);
66
67         /**
68          * This destructor overrides Tizen::Base::Object::~Object().
69          *
70          * @since       2.0
71          */
72         virtual ~Attendee(void);
73
74         /**
75          * Compares the input Tizen::Base::Object with the calling %Attendee instance.
76          *
77          * @since       2.0
78          *
79          * @return              @c true if the input object equals the calling %Attendee instance, @n
80          *                              else @c false
81          * @param[in]   rhs     The object instance to compare with the calling object
82          * @see                 GetHashCode()
83          */
84         virtual bool Equals(const Tizen::Base::Object& rhs) const;
85
86         /**
87          * Gets the hash value of the current instance.
88          *
89          * @since       2.0
90          *
91          * @return              The hash value of the current instance
92          */
93         virtual int GetHashCode(void) const;
94
95         /**
96          * Gets the name of the attendee.
97          *
98          * @since       2.0
99          *
100          * @return              The name
101          */
102         Tizen::Base::String GetName(void) const;
103
104         /**
105          * Gets the email address of the attendee.
106          *
107          * @since       2.0
108          *
109          * @return              The email address
110          */
111         Tizen::Base::String GetEmail(void) const;
112
113         /**
114          * Gets the role of the attendee. @n
115          * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
116          *
117          * @since       2.0
118          *
119          * @return              The role of the attendee
120          */
121         AttendeeRole GetRole(void) const;
122
123         /**
124          * Gets the status of the attendee. @n
125          * The default value is @c #ATTENDEE_STATUS_NONE.
126          *
127          * @since       2.0
128          *
129          * @return              The attendee status
130          */
131         AttendeeStatus GetStatus(void) const;
132
133         /**
134          * Sets the name.
135          *
136          * @if OSPCOMPAT
137          * @brief <i> [Compatibility] </i>
138          * @endif
139          * @since       2.0
140          * @if OSPCOMPAT
141          * @compatibility       This method has compatibility issues with OSP compatible applications. @n
142      *                                  For more information, see @ref CompAttendeeSetNamePage "here".
143      * @endif
144          *
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.
149          */
150         result SetName(const Tizen::Base::String& name);
151
152         /**
153          * @if OSPCOMPAT
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.
158          *
159          * @section     CompAttendeeSetNamePageSolutionSection Resolutions
160          *                      This issue has been resolved in Tizen. @n
161          *                      -# There is no limit for the length of the name.
162          *
163          * @endif
164          */
165
166         /**
167          * Sets the email address of the attendee. @n
168          * This is the identifier of an attendee.
169          *
170          * @if OSPCOMPAT
171          * @brief <i> [Compatibility] </i>
172          * @endif
173          * @since       2.0
174          * @if OSPCOMPAT
175          * @compatibility       This method has compatibility issues with OSP compatible applications. @n
176      *                                  For more information, see @ref CompAttendeeSetEmailPage "here".
177          * @endif
178          *
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.
183          */
184         result SetEmail(const Tizen::Base::String& email);
185
186         /**
187          * @if OSPCOMPAT
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.
192          *
193          * @section     CompAttendeeSetEmailPageSolutionSection Resolutions
194          *                      This issue has been resolved in Tizen. @n
195          *                      -# There is no limit for the length of the email.
196          * @endif
197          */
198
199         /**
200          * Sets the role of the attendee. @n
201          * The default value is @c #ATTENDEE_ROLE_ATTENDEE.
202          *
203          * @since       2.0
204          *
205          * @param[in]   role    The role of the attendee @n
206          *                                              The default value is @c #ATTENDEE_ROLE_ATTENDEE.
207          */
208         void SetRole(AttendeeRole role);
209
210         /**
211          * Sets the status of the attendee. @n
212          * The default value is @c #ATTENDEE_STATUS_NONE.
213          *
214          * @since       2.0
215          *
216          * @param[in]   status  The status of the attendee @n
217          *                                              The default value is @c #ATTENDEE_STATUS_NONE.
218          */
219         void SetStatus(AttendeeStatus status);
220
221         /**
222          * Sets the phone number.
223          *
224          * @since       2.0
225          *
226          * @param[in]   phoneNumber             The phone number
227          */
228         void SetPhoneNumber(const Tizen::Base::String& phoneNumber);
229
230         /**
231          * Gets the phone number.
232          *
233          * @since       2.0
234          *
235          * @return              The phone number
236          */
237         Tizen::Base::String GetPhoneNumber(void) const;
238
239         /*
240          * Sets the person ID that is an identifier used for Addressbook APIs.
241          *
242          * @since       2.0
243          *
244          * @param[in]   personId                The person ID
245          */
246         void SetPersonId(PersonId personId);
247
248         /*
249          * Gets the person ID that is an identifier used for Addressbook APIs.
250          *
251          * @since       2.0
252          *
253          * @return              The person ID
254          */
255         PersonId GetPersonId(void) const;
256
257         /**
258          * Copying of objects using this copy assignment operator is allowed.
259          *
260          * @since       2.0
261          *
262          * @param[in]   rhs             An instance of %Attendee
263          */
264         Attendee& operator =(const Attendee& rhs);
265
266         /**
267          * Checks whether the data in the specified instance of %Attendee is equal to the data in the current instance.
268          *
269          * @since       2.0
270          *
271          * @return              @c true if the data in the specified instance equals the data in the current instance, @n
272          *                              else @c false
273          * @param[in]   rhs             An instance of %Attendee
274          */
275         bool operator ==(const Attendee& rhs) const;
276
277         /**
278          * Compares the specified instance of %Attendee with the calling instance for inequality.
279          *
280          * @since       2.0
281          *
282          * @return              @c true if the data in the specified instance is not equal to the data in the current instance, @n
283          *                              else @c false
284          * @param[in]   rhs             An instance of %Attendee
285          */
286         bool operator !=(const Attendee& rhs) const;
287
288 private:
289         Tizen::Base::String     __name;
290         Tizen::Base::String     __email;
291         Tizen::Base::String     __phoneNumber;
292         AttendeeRole    __attendeeRole;
293         AttendeeStatus  __attendeeStatus;
294         PersonId __personId;
295
296         friend class _AttendeeImpl;
297         class _AttendeeImpl* __pAttendeeImpl;
298 };      // Attendee
299
300 }}      // Tizen::Social
301
302 #endif //_FSCL_ATTENDEE_H_