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 FSclCalendar.h
19 * @brief This is the header file for the %Calendar class.
21 * This header file contains the declarations of the %Calendar class.
23 #ifndef _FSCL_CALENDAR_H_
24 #define _FSCL_CALENDAR_H_
26 #include <FBaseDataType.h>
27 #include <FSclTypes.h>
28 #include <FSclRecord.h>
30 namespace Tizen { namespace Base
36 namespace Tizen { namespace Social
41 * @brief This class represents calendar information.
45 * @final This class is not intended for extension.
47 * The %Calendar class represents calendar information. @n
48 * Multiple calendars can be created, each of which can have its own events and to-dos. An event or to-do can be retrieved using the respective calendar ID.
50 class _OSP_EXPORT_ Calendar
55 * This is the default constructor for this class.
59 * @param[in] itemType The calendar item type to specify which kind of item the calendar can contain
61 explicit Calendar(CalendarItemType itemType);
64 * Copying of objects using this copy constructor is allowed.
68 * @param[in] rhs An instance of %Calendar
70 Calendar(const Calendar& rhs);
73 * This destructor overrides Tizen::Social::Record::~Record().
77 virtual ~Calendar(void);
80 * Compares the input Tizen::Base::Object with the calling %Calendar instance.
84 * @return @c true if the input object equals the calling %Calendar instance, @n
86 * @param[in] rhs The object instance to compare with the calling object
89 virtual bool Equals(const Tizen::Base::Object& rhs) const;
92 * Gets the hash value of the current instance.
96 * @return The hash value of the current instance
98 virtual int GetHashCode(void) const;
101 * Gets the calendar name.
105 * @return The calendar name
107 Tizen::Base::String GetName(void) const;
110 * Gets the calendar item type.
114 * @return The calendar item type
116 CalendarItemType GetItemType(void) const;
119 * Gets the account ID.
123 * @return The account ID
125 AccountId GetAccountId(void) const;
128 * Gets the calendar color. @n
129 * If the color has not been set, all color components are set with 0x0 and E_DATE_NOT_FOUND exception is returned.
133 * @param[out] r The red component
134 * @param[out] g The green component
135 * @param[out] b The blue component
136 * @exception E_SUCCESS The method is successful.
137 * @exception E_DATA_NOT_FOUND The color has not been set.
139 result GetColor(byte& r, byte& g, byte& b) const;
142 * Sets the calendar name.
146 * @param[in] name The calendar name
148 void SetName(const Tizen::Base::String& name);
151 * Sets the calendar color.
155 * @param[in] r The red component
156 * @param[in] g The green component
157 * @param[in] b The blue component
159 void SetColor(byte r, byte g, byte b);
162 * Clears the calendar color.
166 void ClearColor(void);
169 * Copying of objects using this copy assignment operator is allowed.
173 * @param[in] rhs An instance of %Calendar
175 Calendar& operator =(const Calendar& rhs);
178 friend class _CalendarImpl;
179 class _CalendarImpl* __pCalendarImpl;
185 #endif // _FSCL_CALENDAR_H_