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