Enable build with iniparser v 3.1
[platform/framework/native/appfw.git] / inc / FLclCalendar.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 /**
18  * @file                FLclCalendar.h
19  * @brief               This is the header file for the %Calendar class.
20  *
21  * This header file contains the declarations of the %Calendar class.
22  *
23  */
24 #ifndef _FLCL_CALENDAR_H_
25 #define _FLCL_CALENDAR_H_
26
27 #include <FBase.h>
28 #include <FLclLocale.h>
29 #include <FLclTimeZone.h>
30
31 namespace Tizen { namespace Locales
32 {
33 /**
34  * @class               Calendar
35  * @brief               This class provides methods for displaying a calendar.
36  *
37  * @since               2.0
38  *
39  * The %Calendar class is an abstract base class for displaying a calendar. It is used to convert between the Tizen::Base::DateTime instance and a set of time fields, such as TIME_FIELD_YEAR, TIME_FIELD_MONTH, and TIME_FIELD_DAY_OF_MONTH.
40  * Subclasses of %Calendar interpret %Tizen::Base::DateTime according to the rules of a specific calendar system. GregorianCalendar is commonly used.
41  *
42  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/locales/calendar.htm">Calendar</a>.
43  *
44  * @see                 Tizen::Locales::TimeZone
45  *
46  * The following example demonstrates how to use the %Calendar class to set or add the time field.
47  *
48  @code
49  *
50  #include <FBase.h>
51  #include <FLocales.h>
52
53  using namespace Tizen::Base;
54  using namespace Tizen::Locales;
55
56  void
57  MyClass::CalendarExample(void)
58  {
59         int offset = 60;
60         String timeZoneName(L"Europe/Paris");
61         TimeZone timeZone(offset, timeZoneName);
62
63         Calendar* pCalendar = Calendar::CreateInstanceN(timeZone, CALENDAR_GREGORIAN);
64         pCalendar->SetTime(2012,7,18);
65
66         // Increase one day. The date will be 2012/7/19
67         pCalendar->AddTimeField(TIME_FIELD_DAY_OF_MONTH, 1);
68
69         // Decrease two months. The date will be 2012/5/19
70         pCalendar->AddTimeField(TIME_FIELD_MONTH, -2);
71
72         delete pCalendar;
73  }
74  @endcode
75  */
76 #define GET_TIME_FIELD_MASK(X)  (static_cast<int>(1 << (X)))
77 /**
78 * @enum TimeField
79 *
80 * Defines the time fields for date and time. @n
81 * This enum is used in %Calendar.
82 *
83 * @since                2.0
84 */
85 enum TimeField
86 {
87         TIME_FIELD_ERA,                                                 /**< Era : 0 - BC, 1 - AD */
88         TIME_FIELD_YEAR,                                                /**< Year : 1-based */
89         TIME_FIELD_MONTH,                                               /**< Month : 1-based (1~13)*/
90         TIME_FIELD_WEEK_OF_YEAR,                                /**< Week of Year : 1-based (1~53) */
91         TIME_FIELD_WEEK_OF_MONTH,                               /**< Week of Month : 1-based (1~6, may be specified as 0) */
92         TIME_FIELD_DAY_OF_MONTH,                                /**< Date : 1-based (1~31) */
93         TIME_FIELD_DAY_OF_YEAR,                                 /**< Day of Year : 1-based (1~366) */
94         TIME_FIELD_DAY_OF_WEEK,                                 /**< Day of Week : 1-based (1~7) */
95         TIME_FIELD_DAY_OF_WEEK_IN_MONTH,                /**< Day of Week in Month : 1-based (1~5, may be specified as -1) */
96         TIME_FIELD_AM_PM,                                               /**< AmPm : 0 - AM, 1 - PM */
97         TIME_FIELD_HOUR,                                                /**< Hour : 0-based (0~11) */
98         TIME_FIELD_HOUR_OF_DAY,                                 /**< Hour of Day : 0-based (0~23) */
99         TIME_FIELD_MINUTE,                                              /**< Minute : 0-based (0~59) */
100         TIME_FIELD_SECOND,                                              /**< Second : 0-based (0~59) */
101         TIME_FIELD_MILLISECOND,                                 /**< Millisecond : 0-based (0~999) */
102         TIME_FIELD_ZONE_OFFSET,                                 /**< Time Zone Offset : 0-based (-43200000~54000000 in milliseconds) */ 
103         TIME_FIELD_DST_OFFSET,                                  /**< Daylight Saving Offset : 0-based (0~3600000 in milliseconds)*/
104         TIME_FIELD_FIELD_COUNT                                  /**< The number of time fields */
105 };
106
107 class _OSP_EXPORT_ Calendar
108         : public Tizen::Base::Object
109 {
110 public:
111         /**
112          * This is the destructor for this class. @n 
113          * This destructor overrides Tizen::Base::Object::~Object().
114          *
115          * @since               2.0
116          */
117         virtual ~Calendar(void);
118
119         /**
120         * Adds the specified amount to the specified time field, based on the calendar rules. @n
121         * It is equivalent to calling SetTimeField(field, GetTimeField(field)+amount) with the following two adjustments: @n
122         *
123         * @b Add @b Rule1: The value of the time field @c field after the call minus the value of the field
124         * before the call is delta modulo any overflow that has occurred in the field.
125         * Overflow occurs when a time field value exceeds its range and, as a result, the next larger field
126         * is incremented or decremented and the field value is adjusted back into its range. @n
127         *
128         * @b Add @b Rule2: If a smaller field is expected to be invariant, but it is impossible for it to be
129         * equal to its prior value because of changes in its minimum or maximum value after the time field @c field
130         * is changed, then its value is adjusted to be as close as possible to its expected value. @n
131         *
132         * A smaller field represents a smaller unit of time. @c TIME_FIELD_HOUR is a smaller field than @c TIME_FIELD_DAY_OF_MONTH.
133         * No adjustment is made to smaller fields that are not expected to be invariant.
134         * The calendar system determines the fields that are expected to be invariant.
135         *
136         * In addition, this method forces re-computation of the calendar's milliseconds and
137         * all time fields immediately. @n
138         *
139         * For example, consider a GregorianCalendar set to Oct 31, 2004.
140         * Calling AddTimeField(@c TIME_FIELD_MONTH, 13) sets the calendar to Nov 30, 2005. @n
141         * The @c TIME_FIELD_MONTH field is set to NOVEMBER by @b Rule1, since adding 13 months to October sets the month as
142         * November of the next year.
143         * Since, the @c TIME_FIELD_DAY_OF_MONTH cannot be 31 in November in a %GregorianCalendar, the @c TIME_FIELD_DAY_OF_MONTH is set to 30 by @b Rule2.
144         *
145         * @if OSPCOMPAT
146         * @brief <i> [Compatibility] </i>
147         * @endif
148         * @since                        2.0
149         * @if OSPCOMPAT
150         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
151         *                                       For more information, see @ref CompCalendarAddTimeFieldPage "here".
152         * @endif
153         *
154         * @return                       An error code
155         * @param[in]            field                                           The time field
156         * @param[in]            amount                                          The amount to add
157         * @exception            E_SUCCESS                                       The method is successful.
158         * @exception            E_INVALID_ARG                           The specified @c field is invalid.
159         */
160         virtual result AddTimeField(TimeField field, int amount) = 0;
161
162         /**
163         * @if OSPCOMPAT
164         * @page                                 CompCalendarAddTimeFieldPage Compatibility for AddTimeField()
165         * @section                              CompCalendarAddTimeFieldIssueSection Issues
166         * Implementation of this method in OSP compatible applications has the following issue: @n
167         * -# The method returns @c E_INVALID_STATE if the time field is invalid.
168         *
169         * @section                              CompCalendarAddTimeFieldSolutionSection Resolutions
170         * This issue has been resolved in Tizen.
171         *
172         * @par When working in Tizen:
173         * -# The method returns @c E_INVALID_ARG if the time field is invalid.
174         * @endif
175         */
176
177         /**
178         * Compares the current instance of %Calendar with the specified instance.
179         *
180         * @if OSPCOMPAT
181         * @brief <i> [Compatibility] </i>
182         * @endif
183         * @since                        2.0
184         * @if OSPCOMPAT
185         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
186         *                                       For more information, see @ref CompCalendarAfterPage "here".
187         * @endif
188         *
189         * @return                       An error code
190         * @param[in]            otherCalendar           The instance of %Calendar to compare
191         * @param[out]           after                           Set to @c true if the current instance of %Calendar is after the specified instance of %Calendar, @n
192         *                                                                               else @c false
193         * @exception            E_SUCCESS                       The method is successful.
194         * @exception            E_INVALID_ARG           The specified @c otherCalendar is invalid.
195         * @exception            E_INVALID_STATE         In this method, the time fields of this instance are calculated. @n
196         *                                                                               If any time field value previously set is invalid, this exception is returned. 
197         * @exception            E_OUT_OF_RANGE          In this method, the time fields of this instance are calculated. @n
198         *                                                                               If the value of the time fields goes out of range, this exception is returned.
199         */
200         result After(const Calendar& otherCalendar, bool& after);
201
202         /**
203         * @if OSPCOMPAT
204         * @page                                 CompCalendarAfterPage Compatibility for After()
205         * @section                              CompCalendarAfterIssueSection Issues
206         * Implementation of this method in OSP compatible applications has the following issue: @n
207         * -# The method returns @c E_INVALID_STATE and @c E_OUT_OF_RANGE if the instance of %Calendar to be compared is invalid.
208         *
209         * @section                              CompCalendarAfterSolutionSection Resolutions
210         * This issue has been resolved in Tizen.
211         *
212         * @par When working in Tizen: 
213         * -# The method returns @c E_INVALID_ARG if the instance of %Calendar to be compared is invalid.
214         * -# The method returns @c E_INVALID_STATE if any time field value previously set is invalid.
215         * -# The method returns @c E_OUT_OF_RANGE if the value of the time fields goes out of range.
216         * @endif
217         */
218
219         /**
220         * Compares the current instance of %Calendar with the specified instance.
221         *
222         * @if OSPCOMPAT
223         * @brief <i> [Compatibility] </i>
224         * @endif
225         * @since                        2.0
226         * @if OSPCOMPAT
227         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
228         *                                       For more information, see @ref CompCalendarBeforePage "here".
229         * @endif
230         *
231         * @return                       An error code
232         * @param[in]            otherCalendar                   The instance of %Calendar to compare
233         * @param[out]           before                                  Set to @c true if the current instance of %Calendar is before the specified instance of %Calendar, @n
234         *                                                                                       else @c false
235         * @exception            E_SUCCESS                               The method is successful.
236         * @exception            E_INVALID_ARG                   The specified @c otherCalendar is invalid.
237         * @exception            E_INVALID_STATE                 In this method, the time fields of this instance are calculated. @n
238         *                                                                                       If any time field value previously set is invalid, this exception is returned.
239         * @exception            E_OUT_OF_RANGE                  In this method, the time fields of this instance are calculated. @n
240         *                                                                                       If the value of the time fields goes out of range, this exception is returned.
241         */
242         result Before(const Calendar& otherCalendar, bool& before);
243
244         /**
245         * @if OSPCOMPAT
246         * @page                                 CompCalendarBeforePage Compatibility for Before()
247         * @section                              CompCalendarBeforeIssueSection Issues
248         * Implementation of this method in OSP compatible applications has the following issue: @n
249         * -# The method returns @c E_INVALID_STATE and @c E_OUT_OF_RANGE if the instance of %Calendar to be compared is invalid.
250         *
251         * @section                              CompCalendarBeforeSolutionSection Resolutions
252         * This issue has been resolved in Tizen.
253         *
254         * @par When working in Tizen: 
255         * -# The method returns @c E_INVALID_ARG if the instance of %Calendar to be compared is invalid.
256         * -# The method returns @c E_INVALID_STATE if any time field value previously set is invalid.
257         * -# The method returns @c E_OUT_OF_RANGE if the value of the time fields goes out of range.
258         * @endif
259         */
260
261         /**
262         * Clears all the time fields and sets it to @c 0. @n
263         * Zero is not the default value for each field. It means that the field is cleared.
264         *
265         * @since                                2.0
266         *
267         * @return                               An error code
268         * @exception                    E_SUCCESS                                       The method is successful.
269         */
270         result Clear(void);
271
272         /**
273         * Clears the specified time field and sets it to @c 0. @n
274         * Zero is not the default value for each field. It means that the field is cleared.
275         *
276         * @since                                2.0
277         *
278         * @return                               An error code
279         * @param[in]                    field                                           The time field to clear
280         * @exception                    E_SUCCESS                                       The method is successful.
281         */
282         result Clear(TimeField field);
283
284         /**
285         * Checks whether the value of the specified instance of Tizen::Base::Object is equal to the value of the current instance of %Calendar.
286         *
287         * @since                        2.0
288         *
289         * @return                       @c true if the value of the specified instance of Tizen::Base::Object is equal to the value of the current instance of %Calendar, @n
290         *                                       else @c false
291         * @param[in]            obj                     An instance of Tizen::Base::Object to compare
292         */
293         virtual bool Equals(const Tizen::Base::Object& obj) const;
294
295         /**
296         * Gets the hash value of the current instance.
297         *
298         * @since                        2.0
299         *
300         * @return                       The hash value of the current instance
301         */
302         virtual int GetHashCode(void) const;
303
304         /**
305         * Rolls up or down as per the specified @c amount in the specified time field without changing the larger fields 
306         * (for example, @c TIME_FIELD_YEAR field cannot be changed when the input field is @c TIME_FIELD_MONTH). @n
307         * If the specified @c amount is negative, the amount value is deducted from the specified time field value.
308         * In this method, the time field of this instance is operated upon. If the value of the specified @c field goes out of range, 
309         * @c E_OUT_OF_RANGE is returned.
310         *
311         * @if OSPCOMPAT
312         * @brief <i> [Compatibility] </i>
313         * @endif
314         * @since                                2.0
315         * @if OSPCOMPAT
316         * @compatibility                This method has compatibility issues with OSP compatible applications. @n
317         *                                               For more information, see @ref CompCalendarRollPage "here".
318         * @endif
319         *
320         * @return                               An error code
321         * @param[in]                    field                           The time field to roll
322         * @param[in]                    amount                          The amount to add to the time field
323         * @exception                    E_SUCCESS                       The method is successful.
324         * @exception                    E_INVALID_ARG           The specified @c field is invalid (for example, @c TIME_FIELD_DST_OFFSET, @c TIME_FIELD_ZONE_OFFSET).
325         * @exception                    E_OUT_OF_RANGE          In this method, the time fields of this instance are calculated. @n
326         *                                                                                       If the value of the time fields goes out of range, this exception is returned.
327         */
328         virtual result Roll(TimeField field, int amount);
329
330         /**
331         * @if OSPCOMPAT
332         * @page                                 CompCalendarRollPage Compatibility for Roll()
333         * @section                              CompCalendarRollIssueSection Issues
334         * Implementation of this method in OSP compatible applications has the following issue: @n
335         * -# The method returns @c E_INVALID_STATE if the time field is invalid.
336         *
337         * @section                              CompCalendarRollSolutionSection Resolutions
338         * This issue has been resolved in Tizen.
339         *
340         * @par When working in Tizen: 
341         * -# The method returns @c E_INVALID_ARG if the time field is invalid.
342         * @endif
343         */
344
345         /**
346         * Sets the specified time field with the specified @c value. @n
347         * This sets an internal member variable to indicate that the field has been changed.
348         * Although the time field is changed, the milliseconds of %Calendar are not recomputed
349         * until GetTimeField(), GetTime(), or GetTimeInMillisec() is called.
350         * Thus, even if you call this method several times, unnecessary multiple computations are not triggered. @n
351         *
352         * When a field is changed using SetTimeField(), other fields may also change
353         * depending on the field, the field value, and the calendar system. @n
354         *
355         * For example, consider a GregorianCalendar set to Oct. 31, 2004.
356         * Calling SetTimeField(@c TIME_FIELD_MONTH, NOVEMBER) sets the calendar to Nov 31, 2004. @n
357         * But, if you call GetTime(), then Dec 1, 2004 is returned because Nov 31, 2004 does not exist.
358         * However, a call to SetTimeField(@c TIME_FIELD_MONTH, SEPTEMBER) before a call to GetTime() sets the calendar
359         * to Sep 30, 2004, since no re-computation has occurred after the first call to SetTimeField().
360         *
361         * The value of field is not affected by it being local time or UTC time.
362         * The value is only overwritten.
363         *
364         * @since                                2.0
365         *
366         * @return                               An error code
367         * @param[in]                    field                                   The time field to set
368         * @param[in]                    value                                   The value to set
369         * @exception                    E_SUCCESS                               The method is successful.
370         * @exception                    E_OUT_OF_RANGE                  The value is out of range in lenient mode.
371         * @exception                    E_INVALID_ARG                   The specified @c field is invalid.
372         */
373         result SetTimeField(TimeField field, int value);
374
375         /**
376         * Sets the first day of the week.
377         *
378         * @since                                2.0
379         *
380         * @return                               An error code
381         * @param[in]                    dayOfWeek                               The value to set as the first day of the week
382         * @exception                    E_SUCCESS                               The method is successful.
383         * @exception                    E_INVALID_ARG                   The specified @c dayOfWeek is invalid.
384         */
385         result SetFirstDayOfWeek(DayOfWeek dayOfWeek);
386
387         /**
388         * Sets the leniency of date and time interpretations.
389         *
390         * @since                                2.0
391         *
392         * @return                               An error code
393         * @param[in]                    lenient                                 Set to @c true if the date and time interpretation is set to lenient, @n
394         *                                                                                               else @c false
395         * @exception                    E_SUCCESS                               The method is successful.
396         */
397         result SetLenient(bool lenient);
398
399         /**
400         * Sets the minimal days required in the first week.
401         *
402         * @since                                2.0
403         *
404         * @return                               An error code
405         * @param[in]                    value                                   The minimal days required in the first week
406         * @exception                    E_SUCCESS                               The method is successful.
407         */
408         result SetMinDaysInFirstWeek(short value);
409
410         /**
411         * Sets the value of year, month, day, hour, minute, and seconds. @n
412         * The date and time are the local date and time.
413         *
414         * @since                                2.0
415         *
416         * @return                               An error code
417         * @param[in]                    year                                    The year to set
418         * @param[in]                    month                                   The month to set @n
419         *                                                                                               The indexing is 1-based. Therefore, 1 means January.
420         * @param[in]                    day                                             The day to set
421         * @param[in]                    hour                                    The hour to set
422         * @param[in]                    minute                                  The minute to set
423         * @param[in]                    second                                  The second to set
424         * @exception                    E_SUCCESS                               The method is successful.
425         * @exception                    E_OUT_OF_RANGE                  A time field or its value is out of range in lenient mode.
426         */
427         result SetTime(int year, int month, int day, int hour = 0, int minute = 0, int second = 0);
428
429         /**
430         * Sets the current time of this %Calendar instance with the specified Tizen::Base::DateTime.
431         *
432         * @since                                2.0
433         *
434         * @return                               An error code
435         * @param[in]                    dateTime                                The Tizen::Base::DateTime instance to set
436         * @exception                    E_SUCCESS                               The method is successful.
437         * @remarks                              The time specified is the local time.
438         */
439         result SetTime(const Tizen::Base::DateTime& dateTime);
440
441         /**
442         * Sets the current time of this %Calendar instance with the specified value.
443         *
444         * @since                                2.0
445         *
446         * @return                               An error code
447         * @param[in]                    millisec                                The new time in milliseconds from the starting day (Jan 1, 1.)
448         * @exception                    E_SUCCESS                               The method is successful.
449         * @exception                    E_OUT_OF_RANGE                  A time field or its value is out of range.
450         */
451         result SetTimeInMillisec(long long millisec);
452
453         /**
454         * Sets the time zone of the calendar to the specified time zone.
455         *
456         * @since                        2.0
457         *
458         * @return                       An error code
459         * @param[in]            timeZone                                The time zone to set
460         * @exception            E_SUCCESS                               The method is successful.
461         */
462         result SetTimeZone(const TimeZone& timeZone);
463
464         /**
465          * Gets the actual maximum value that the specified field can have, given the current date. @n
466          * For example, if the current date is "Feb 10, 2004" and the time field specified is @c TIME_FIELD_DAY_OF_MONTH, then the actual
467          * maximum value for this time field is @c 29.
468          *
469          * @since                                       2.0
470          *
471          * @return                                      An integer value indicating the actual maximum value
472          * @param[in]                           field                           The time field
473          * @exception                           E_SUCCESS                       The method is successful.
474          * @exception                           E_INVALID_ARG           The specified @c field is invalid.
475          * @remarks                                     The specific error code can be accessed using the GetLastResult() method.
476          */
477         virtual int GetActualMaxTimeField(TimeField field) const;
478
479         /**
480          * Gets the actual minimum value that the specified time field can have, given the current date. @n
481          * For the Gregorian calendar, this is the same as GetMinTimeField() and GetGreatestMinTimeField().
482          *
483          * @since                                       2.0
484          *
485          * @return                                      An integer value indicating the actual minimum value 
486          * @param[in]                           field                           The time field
487          * @exception                           E_SUCCESS                       The method is successful.
488          * @exception                           E_INVALID_ARG           The specified @c field is invalid.
489          * @exception                           E_SYSTEM                        A system error has occurred.
490          * @remarks                                     The specific error code can be accessed using the GetLastResult() method.
491          */
492         virtual int GetActualMinTimeField(TimeField field) const;
493
494         /**
495         * Gets the value of the first day of the week. @n
496         * For example, in USA, the first day of the week is SUNDAY. But, in France, it is MONDAY.
497         *
498         * @since                                2.0
499         *
500         * @return                               An integer value indicating the first day of the week, @n
501         *                                               else @c -1 if it fails
502         */
503         int GetFirstDayOfWeek(void) const;
504
505         /**
506         * Gets the greatest minimum value that the specified time field can have.
507         *
508         * @since                                        2.0
509         *
510         * @return                                       An integer value indicating the greatest minimum value for the specified time field
511         * @param[in]                            field                           The time field
512         * @exception                            E_SUCCESS                       The method is successful.
513         * @exception                            E_INVALID_ARG           The specified @c field is invalid.
514         * @exception                            E_SYSTEM                        A system error has occurred.
515         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
516         */
517         virtual int GetGreatestMinTimeField(TimeField field) const;
518
519         /**
520         * Gets the least maximum value that the specified time field can have.
521         *
522         * @since                                        2.0
523         *
524         * @return                                       An integer value indicating the least maximum value for the specified time field
525         * @param[in]                            field                           The time field
526         * @exception                            E_SUCCESS                       The method is successful.
527         * @exception                            E_INVALID_ARG           The specified @c field is invalid.
528         * @exception                            E_SYSTEM                        A system error has occurred.
529         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
530         */
531         virtual int GetLeastMaxTimeField(TimeField field) const;
532
533         /**
534         * Gets the maximum value that the specified time field can have.
535         *
536         * @since                                        2.0
537         *
538         * @return                                       An integer value indicating the maximum value for the specified time field
539         * @param[in]                            field                           The time field
540         * @exception                            E_SUCCESS                       The method is successful.
541         * @exception                            E_INVALID_ARG           The specified @c field is invalid.
542         * @exception                            E_SYSTEM                        A system error has occurred.
543         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
544         */
545         virtual int GetMaxTimeField(TimeField field) const;
546
547         /**
548         * Gets the minimum value that the specified time field can have.
549         *
550         * @since                                        2.0
551         *
552         * @return                                       An integer value indicating the minimum value for the specified time field
553         * @param[in]                            field                           The time field
554         * @exception                            E_SUCCESS                       The method is successful.
555         * @exception                            E_INVALID_ARG           The specified @c field is invalid.
556         * @exception                            E_SYSTEM                        A system error has occurred.
557         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
558         */
559         virtual int GetMinTimeField(TimeField field) const;
560
561         /**
562         * Gets the minimum number of days required in the first week of the year. @n
563         * For example, if the first week is defined as the one that contains the first day of
564         * the first month of a year, this method returns @c 1.
565         *
566         * @since                                        2.0
567         *
568         * @return                                       An integer value indicating the minimum number of days required in the first week
569         */
570         int GetMinDaysInFirstWeek(void) const;
571
572         /**
573         * Gets the date and time of the current instance of %Calendar.
574         *
575         * @since                                        2.0
576         *
577         * @return                                       An instance of Tizen::Base::DateTime with the current time in local time
578         * @remarks                                      The time specified is the local time.
579         */
580         Tizen::Base::DateTime GetTime(void) const;
581
582         /**
583         * Gets the value of the specified time field.
584         *
585         * @since                                        2.0
586         *
587         * @return                                       An integer value indicating the value of the specified time field
588         *                                                       
589         * @param[in]                            field                           The given time field
590         * @exception                            E_SUCCESS                       The method is successful.
591         * @exception                            E_INVALID_ARG           The specified @c field is invalid.
592         * @exception                            E_SYSTEM                        A system error has occurred.
593         * @remarks                                      
594         *                                               - This method is semantically const, but may alter the instance in memory.
595         *                                               - All fields are re-computed if any field is invalid.
596         *                                               - The specific error code can be accessed using the GetLastResult() method.
597         */
598         int GetTimeField(TimeField field) const;
599
600         /**
601         * Gets the current time of the instance in the @c long format.
602         *
603         * @since                                        2.0
604         *
605         * @return                                       An error code
606         * @param[out]                           millisec                                The current time in milliseconds from starting day (Jan 1, 1.)
607         * @exception                            E_SUCCESS                               The method is successful.
608         * @exception                            E_INVALID_STATE                 In this method, the time fields of this instance are calculated. @n
609         *                                                                                               If any time field value previously set is invalid, this exception is returned.
610         * @exception                            E_OUT_OF_RANGE                  The value of the argument is out of the valid range defined by the method.
611         */
612         result GetTimeInMillisec(long long& millisec) const;
613
614         /**
615         * Gets a reference to the time zone owned by this instance of %Calendar.
616         *
617         * @since                                        2.0
618         *
619         * @return                                       The TimeZone instance associated with the current instance of %Calendar
620         * @remarks                                      The returned reference is valid only until the SetTimeZone() method is called or 
621         *                                                       this instance of %Calendar is destroyed.
622         * @see                                          SetTimeZone()
623         */
624         TimeZone GetTimeZone(void) const;
625
626         /**
627         * Gets the calendar type of the current instance of %Calendar.
628         *
629         * @since                                        2.0
630         *
631         * @return                                       An instance of CalendarType representing the calendar type of the current instance of %Calendar @n
632         *                                                       For example, @c CALENDAR_GREGORIAN.
633         */
634         virtual CalendarType GetType(void) const = 0;
635
636         /**
637         * Checks whether the current date for the instance of %Calendar is in Daylight Saving Time (DST).
638         *
639         * @since                                        2.0
640         *
641         * @return                                       An error code
642         * @param[out]                           isInDst                         Set to @c true if the current date is in DST, @n
643         *                                                                                               else @c false
644         * @exception                            E_SUCCESS                       The method is successful.
645         * @exception                            E_INVALID_STATE         In this method, the time fields of this instance are calculated. @n
646         *                                                                                               If any time field value previously set is invalid, this exception is returned.
647         * @exception                            E_OUT_OF_RANGE          A time field or its value is out of range. @n
648         *                                                                                               In this method, the time fields of this instance are calculated. 
649         *                                                                                               If the value of the time fields goes out of range, this exception is returned.
650         */
651         virtual result IsInDst(bool& isInDst) const = 0;
652
653         /**
654         * Checks whether the date and time interpretation is lenient.
655         *
656         * @since                                        2.0
657         *
658         * @return                                       @c true if the date and time interpretation is set to lenient, @n
659         *                                                       else @c false
660         */
661         bool IsLenient(void) const;
662
663         /**
664         * Checks whether the specified time field has a value.
665         *
666         * @since                                        2.0
667         *
668         * @return                                       @c true if the specified time field has a value, @n
669         *                                                       else @c false
670         * @param[in]                            field           The time field
671         */
672         bool IsSet(TimeField field) const;
673
674         /**
675         * Creates an instance of %Calendar of the specified type with the GMT time zone and the system locale. @n
676         * The instance has weekdata which is the first of week, minimal days in the first week, weekend on set, and weekend cease.
677         * The weekdata is set to default values by the locale.
678         *
679         * @since                                        2.0
680         *
681         * @return                                       A pointer to the created %Calendar instance, @n
682         *                                                       else @c null if it fails
683         * @param[in]                            calendarType            The type of calendar @n
684         *                                                                                               The default calendar is the Gregorian calendar (@c CALENDAR_GREGORIAN).
685         * @exception                            E_SUCCESS                       The method is successful.
686         * @exception                            E_OUT_OF_MEMORY         The memory is insufficient.
687         * @exception                            E_SYSTEM                        A system error has occurred.
688         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
689         */
690         static Calendar* CreateInstanceN(CalendarType calendarType = CALENDAR_GREGORIAN);
691
692         /**
693         * Creates an instance of %Calendar of the specified type with the specified time zone and the system locale. @n
694         * The @c timeZone is used for the zone offset and the DST offset.
695         * The instance has weekdata which is the first of week, minimal days in the first week, weekend on set, and weekend cease.
696         * The weekdata is set to default values by the locale.
697         *
698         * @since                                        2.0
699         *
700         * @return                                       A pointer to the created %Calendar instance, @n
701         *                                                       else @c null if it fails
702         * @param[in]                            timeZone                        An instance of TimeZone
703         * @param[in]                            calendarType            The type of calendar @n
704         *                                                                                               The default calendar is the Gregorian calendar (@c CALENDAR_GREGORIAN).
705         * @exception                            E_SUCCESS                       The method is successful.
706         * @exception                            E_OUT_OF_MEMORY         The memory is insufficient.
707         * @exception                            E_SYSTEM                        A system error has occurred.
708         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
709         */
710         static Calendar* CreateInstanceN(const TimeZone& timeZone, CalendarType calendarType = CALENDAR_GREGORIAN);
711
712         /**
713         * Creates an instance of %Calendar of the specified type with the specified @c locale and the GMT time zone. @n
714         * The instance has weekdata which is the first of week, minimal days in the first week, weekend on set, and weekend cease.
715         * The weekdata is set to default values by the specified @c locale.
716         *
717         * @if OSPCOMPAT
718         * @brief <i> [Compatibility] </i>
719         * @endif
720         * @since                                        2.0
721         * @if OSPCOMPAT
722         * @compatibility                        This method has compatibility issues with OSP compatible applications. @n
723         *                                                       For more information, see @ref CompCalendarCreateInstanceNPage "here".
724         * @endif
725         *
726         * @return                                       A pointer to the created %Calendar instance, @n
727         *                                                       else @c null if it fails
728         * @param[in]                            locale                          The locale for whose country the %Calendar instance is needed
729         * @param[in]                            calendarType            The type of calendar @n
730         *                                                                                               The default calendar is the Gregorian calendar (@c CALENDAR_GREGORIAN).
731         * @exception                            E_SUCCESS                       The method is successful.
732         * @exception                            E_SYSTEM                        A system error has occurred.
733         * @exception                            E_OUT_OF_MEMORY         The memory is insufficient.
734         * @exception                            E_INVALID_ARG           The specified @c locale is invalid.
735         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
736         */
737         static Calendar* CreateInstanceN(const Locale& locale, CalendarType calendarType = CALENDAR_GREGORIAN);
738
739         /**
740         * Creates an instance of %Calendar of the specified type with the specified time zone and @c locale. @n
741         * The @c timeZone is used for the zone offset and the DST offset.
742         * The instance has weekdata which is the first of week, minimal days in the first week, weekend on set, and weekend cease.
743         * The weekdata is set to default values by the specified @c locale.
744         *
745         * @if OSPCOMPAT
746         * @brief <i> [Compatibility] </i>
747         * @endif
748         * @since                                        2.0
749         * @if OSPCOMPAT
750         * @compatibility                This method has compatibility issues with OSP compatible applications. @n
751         *                                                       For more information, see @ref CompCalendarCreateInstanceNPage "here".
752         * @endif        
753         *
754         * @return                                       A pointer to the created %Calendar instance, @n
755         *                                                       else @c null if it fails
756         * @param[in]                            timeZone                        An instance of TimeZone
757         * @param[in]                            locale                          The locale for the country the %Calendar instance is created
758         * @param[in]                            calendarType            The calendar type @n
759         *                                                                                               The default calendar is the Gregorian calendar (@c CALENDAR_GREGORIAN).
760         * @exception                            E_SUCCESS                       The method is successful.
761         * @exception                            E_SYSTEM                        A system error has occurred.
762         * @exception                            E_OUT_OF_MEMORY         The memory is insufficient.
763         * @exception                            E_INVALID_ARG           The specified @c locale is invalid.
764         * @remarks                                      The specific error code can be accessed using the GetLastResult() method.
765         */
766         static Calendar* CreateInstanceN(const TimeZone& timeZone, const Locale& locale, CalendarType calendarType = CALENDAR_GREGORIAN);
767
768         /**
769         * @if OSPCOMPAT
770         * @page                                         CompCalendarCreateInstanceNPage Compatibility for CreateInstanceN()
771         * @section                                      CompCalendarCreateInstanceNIssueSection Issues
772         * Implementation of this method in OSP compatible applications has the following issue: @n
773         * -# The method returns @c E_UNSUPPORTED_OPERATION if the locale is invalid.
774         *
775         * @section                                      CompCalendarCreateInstanceNSolutionSection Resolutions
776         * This issue has been resolved in Tizen.
777         * @par When working in Tizen:
778         * -# The method returns @c E_INVALID_ARG if the locale is invalid.
779         * @endif
780         */
781
782 protected:
783         /**
784         * @enum AmPm
785         *
786         * Defines the AM/PM mode. @n
787         * The indexing is 0-based.
788         *
789         * @since                                        2.0
790         */
791         enum AmPm
792         {
793                 AM, /**< The time is in A.M */
794                 PM  /**< The time is in P.M */
795         };
796
797         /**
798         * @enum CalendarLimitType
799         *
800         * Defines the calendar limits.
801         *
802         * @since                                        2.0
803         */
804         enum CalendarLimitType
805         {
806                 CALENDAR_LIMIT_MINIMUM = 0,             /**< The minimum limit */
807                 CALENDAR_LIMIT_GREATEST_MINIMUM,        /**< The greatest minimum limit */
808                 CALENDAR_LIMIT_LEAST_MAXIMUM,           /**< The least maximum limit */
809                 CALENDAR_LIMIT_MAXIMUM,                 /**< The maximum limit */
810                 CALENDAR_LIMIT_COUNT                    /**< The number of limit type */
811         };
812
813         /**
814         * @enum StampValue
815         *
816         * Defines the stamp value.
817         *
818         * @since                                        2.0
819         */
820         enum StampValue
821         {
822                 UNSET = 0,              /**< The stamp is unset */
823                 COMPUTED,               /**< The stamp is computed */
824                 MINIMUM_USER_STAMP      /**< The minimum user stamp */
825         };
826
827         /**
828         * This is the default constructor for this class. @n
829         * The object is not fully constructed after this constructor is called. For full construction, 
830         * the Construct() method must be called right after calling this constructor.
831         *
832         * @since                                        2.0
833         */
834         Calendar(void);
835
836         /**
837         * Initializes this instance of %Calendar.
838         *
839         * @since                                        2.0
840         *
841         * @return                                       An error code
842         * @exception                            E_SUCCESS                                       The method is successful.
843         */
844         result Construct(void);
845
846         /**
847         * Initializes this instance of %Calendar with the specified %Calendar instance.
848         *
849         * @since                                        2.0
850         *
851         * @return                                       An error code
852         * @param[in]                            calendar                                        The %Calendar instance to copy
853         * @exception                            E_SUCCESS                                       The method is successful.
854         * @exception                            E_SYSTEM                                        A system error has occurred.
855         *
856         */
857         result Construct(const Calendar& calendar);
858
859         /**
860         * Initializes this instance of %Calendar with the specified time zone and @c locale. @n
861         * The @c timeZone is used for the zone offset and the DST offset.
862         * The instance has weekdata which is the first of week, minimal days in the first week, weekend on set, and weekend cease.
863         * The weekdata is set to default values by the specified @c locale.
864         *
865         * @if OSPCOMPAT
866         * @brief <i> [Compatibility] </i>
867         * @endif
868         * @since                                        2.0
869         * @if OSPCOMPAT
870         * @compatibility                        This method has compatibility issues with OSP compatible applications. @n
871         *                                                       For more information, see @ref CompCalendarConstructPage "here".
872         * @endif
873         *
874         * @return                                       An error code
875         * @param[in]                            timeZone                                        An instance of TimeZone
876         * @param[in]                            locale                                          An instance of Locale
877         * @exception                            E_SUCCESS                                       The method is successful.
878         * @exception                            E_INVALID_ARG                           The specified @c locale is invalid.
879         */
880         result Construct(const Tizen::Locales::TimeZone& timeZone, const Locale& locale);
881
882         /**
883         * @if OSPCOMPAT
884         * @page                                         CompCalendarConstructPage Compatibility for Construct()
885         * @section                                      CompCalendarConstructIssueSection Issues
886         * Implementation of this method in OSP compatible applications has the following issue: @n
887         * -# The method returns @c E_UNSUPPORTED_OPERATION if the locale is invalid.
888         *
889         * @section                                      CompCalendarConstructSolutionSection Resolutions
890         * This issue has been resolved in Tizen.
891         * @par When working in Tizen:
892         * -# The method returns @c E_INVALID_ARG if the locale is invalid.
893         * @endif
894         */
895
896         /**
897         * Rolls up or down with a single unit of time on the specified time field without changing the larger fields. @n
898         * When rolling on the MONTH field, other fields such as DATE field might conflict and need to be changed.
899         *
900         * @since                                        2.0
901         *
902         * @return                                       An error code
903         * @param[in]                            field                                   The time field to change
904         * @param[in]                            up                                              Set to @c true if the time field must be rolled upwards, @n
905         *                                                                                                       else @c false
906         * @exception                            E_SUCCESS                               The method is successful.
907         * @exception                            E_INVALID_STATE                 In this method, the time fields of this instance are calculated. @n
908         *                                                                                                       If any time field value previously set is invalid, this exception is returned.
909         * @exception                            E_INVALID_ARG                   The specified @c field is invalid (for example, @c TIME_FIELD_DST_OFFSET, @c TIME_FIELD_ZONE_OFFSET).
910         * @exception                            E_OUT_OF_RANGE                  A time field or its value is out of range. @n
911         *                                                                                                       In this method, the time fields of this instance are calculated.
912         *                                                                                                       If the value of the time fields goes out of range, this exception is returned.
913         */
914         virtual result RollWithSingleUnit(TimeField field, bool up) = 0;
915
916         /**
917          * Checks whether the current instance of %Calendar is equivalent to the specified instance of %Calendar.
918          *
919          * @since                                       2.0
920          *
921          * @return                                      @c true if the current instance of %Calendar is equivalent to the specified %Calendar instance, @n
922          *                                                      else @c false
923          * @param[in]                           calendar                        The instance of %Calendar to compare
924          * @remarks                                     If the specified %Calendar instance is equivalent to the current instance, the two instances behave
925          *                                                      exactly the same, but they may be set to different times.
926          */
927         virtual bool IsEquivalentTo(const Calendar& calendar) const;
928
929         /**
930         * Computes the time field value. @n
931         * Converts the current millisecond time value to TimeField. @n
932         * This allows syncing up the time field values with a new time that is set for the calendar.
933         *
934         * @since                                                2.0
935         *
936         * @return                                               An error code
937         * @exception                                    E_SUCCESS                               The method is successful.
938         * @exception                                    E_OUT_OF_RANGE                  The time fields contain an invalid value. @n
939         *                                                                                                               In this method, the time fields of this instance are calculated. 
940         *                                                                                                               If the value of the time fields goes out of range, this exception is returned.
941         */
942         virtual result ComputeTimeFields(void) = 0;
943
944         /**
945         * Computes the time value. @n
946         * Converts the current values of time field to the millisecond time value.
947         *
948         * @since                                                2.0
949         *
950         * @return                                               An error code
951         * @exception                                    E_SUCCESS                                       The method is successful.
952         * @exception                                    E_INVALID_STATE                         A value of the internal time field is invalid.
953         */
954         virtual result ComputeTime(void) = 0;
955
956         /**
957         * Gets the length of the specified month.
958         *
959         * @since                                                2.0
960         *
961         * @return                                               An integer value indicating the number of days in the specified month
962         * @param[in]                                    extendedYear                            An extended year
963         * @param[in]                                    month                                           A month
964         */
965         virtual int GetMonthLength(int extendedYear, int month) const = 0;
966
967         /**
968         * Handle the limits of the specified time field that depend on the type of limit. @n
969         * Derived classes must implement this method for the following fields:
970         * @c TIME_FIELD_ERA, @c TIME_FIELD_YEAR, @c TIME_FIELD_MONTH, @c TIME_FIELD_WEEK_OF_YEAR, @c TIME_FIELD_WEEK_OF_MONTH,
971         * @c TIME_FIELD_DAY_OF_MONTH, @c TIME_FIELD_DAY_OF_YEAR, @c TIME_FIELD_DAY_OF_WEEK_IN_MONTH, @c TIME_FIELD_YEAR_WOY,
972         * @c TIME_FIELD_EXTENDED_YEAR.
973         *
974         * @since                                                2.0
975         *
976         * @return                                               The limit of the specified field
977         * @param[in]                                    field                                           The time field
978         * @param[in]                                    limitType                                       The type of limit
979         */
980         virtual int HandleGetLimit(TimeField field, CalendarLimitType limitType) const = 0;
981
982         /**
983         * Creates and returns a polymorphic copy of this calendar.
984         *
985         * @since                                                2.0
986         *
987         * @return                                       A polymorphic copy of this calendar
988         */
989         virtual Tizen::Locales::Calendar* CloneN(void) const = 0;
990
991         //
992         // This method is for internal use only. Using this method can cause behavioral, security-related,
993         // and consistency-related issues in the application.
994         //
995         // This method is reserved and may change its name at any time without prior notice.
996         //
997         // @since       2.0
998         //
999         virtual void Calendar_Reserved1(void) { }
1000
1001         //
1002         // This method is for internal use only. Using this method can cause behavioral, security-related,
1003         // and consistency-related issues in the application.
1004         //
1005         // This method is reserved and may change its name at any time without prior notice.
1006         //
1007         // @since       2.0
1008         //
1009         virtual void Calendar_Reserved2(void) { }
1010
1011         //
1012         // This method is for internal use only. Using this method can cause behavioral, security-related,
1013         // and consistency-related issues in the application.
1014         //
1015         // This method is reserved and may change its name at any time without prior notice.
1016         //
1017         // @since       2.0
1018         //
1019         virtual void Calendar_Reserved3(void) { }
1020
1021         //
1022         // This method is for internal use only. Using this method can cause behavioral, security-related,
1023         // and consistency-related issues in the application.
1024         //
1025         // This method is reserved and may change its name at any time without prior notice.
1026         //
1027         // @since       2.0
1028         //
1029         virtual void Calendar_Reserved4(void) { }
1030
1031         //
1032         // This method is for internal use only. Using this method can cause behavioral, security-related,
1033         // and consistency-related issues in the application.
1034         //
1035         // This method is reserved and may change its name at any time without prior notice.
1036         //
1037         // @since       2.0
1038         //
1039         virtual void Calendar_Reserved5(void) { }
1040
1041 private:
1042         /**
1043          * The implementation of this copy constructor is intentionally blank and declared as private to
1044          * prohibit copying of objects. Use CloneN() to get an exact copy of the instance.
1045          */
1046         Calendar(const Calendar& calendar);
1047
1048         /**
1049          * The implementation of this copy assignment operator is intentionally blank and declared as private
1050          * to prohibit copying of objects. Use CloneN() to get an exact copy of the instance.
1051          */
1052         Calendar& operator =(const Calendar& calendar);
1053
1054 public:
1055         /**
1056          * One day in milliseconds.
1057          *
1058          * @since       2.0
1059          */
1060         static const int ONE_DAY_IN_MILLISEC = 86400000;
1061
1062         /**
1063          * One hour in milliseconds.
1064          *
1065          * @since       2.0
1066          */
1067         static const int ONE_HOUR_IN_MILLISEC = 60 * 60 * 1000;
1068
1069         /**
1070          * One minute in milliseconds.
1071          *
1072          * @since       2.0
1073          */
1074         static const int ONE_MINUTE_IN_MILLISEC = 60000;
1075
1076         /**
1077          * One second in milliseconds.
1078          *
1079          * @since       2.0
1080          */
1081         static const int ONE_SECOND_IN_MILLISEC = 1000;
1082
1083         /**
1084          * One week in milliseconds.
1085          *
1086          * @since       2.0
1087          */
1088         static const long long ONE_WEEK_IN_MILLISEC = 7 * ONE_DAY_IN_MILLISEC;
1089
1090 protected:
1091         /*
1092          * The field values for the currently set time for this calendar.
1093          */
1094         int _timeFields[TIME_FIELD_FIELD_COUNT];
1095
1096         /*
1097          * Pseudo-time-stamps which specify when each field is set.
1098          * There are two special values - UNSET and INTERNALLY_SET.
1099          */
1100         int _stamp[TIME_FIELD_FIELD_COUNT];
1101
1102         /*
1103          * The flags which tell if a specified time field for the calendar is set.
1104          */
1105         bool _isSet[TIME_FIELD_FIELD_COUNT];
1106
1107         long long _time; // UTC time
1108         Tizen::Locales::TimeZone _timeZone;
1109
1110         bool _isTimeSet;
1111         bool _areFieldsSet;
1112         bool _areAllFieldsSet;
1113         int _nextStamp;
1114         bool _isLenient;
1115         bool _isConstructed;
1116
1117         // Mask values for calendar fields
1118         static const int ERA_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_ERA);
1119         static const int YEAR_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_YEAR);
1120         static const int MONTH_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_MONTH);
1121         static const int WEEK_OF_YEAR_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_WEEK_OF_YEAR);
1122         static const int WEEK_OF_MONTH_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_WEEK_OF_MONTH);
1123         static const int DAY_OF_MONTH_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_DAY_OF_MONTH);
1124         static const int DAY_OF_YEAR_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_DAY_OF_YEAR);
1125         static const int DAY_OF_WEEK_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_DAY_OF_WEEK);
1126         static const int DAY_OF_WEEK_IN_MONTH_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_DAY_OF_WEEK_IN_MONTH);
1127         static const int AM_PM_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_AM_PM);
1128         static const int HOUR_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_HOUR);
1129         static const int HOUR_OF_DAY_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_HOUR_OF_DAY);
1130         static const int MINUTE_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_MINUTE);
1131         static const int SECOND_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_SECOND);
1132         static const int MILLISECOND_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_MILLISECOND);
1133         static const int ZONE_OFFSET_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_ZONE_OFFSET);
1134         static const int DST_OFFSET_MASK = GET_TIME_FIELD_MASK(TIME_FIELD_DST_OFFSET);
1135         static const int ALL_FIELDS = GET_TIME_FIELD_MASK(TIME_FIELD_FIELD_COUNT) - 1;
1136
1137 //private:
1138         friend class _CalendarImpl;
1139         class _CalendarImpl* _pCalendarImpl;
1140
1141 }; // Calendar
1142
1143 }} // Tizen::Locales
1144
1145 #endif //_FLCL_CALENDAR_H_