2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file FSclCalendar.h
18 * @brief This is the header file for the %Calendar class.
20 * This header file contains the declarations of the %Calendar class.
22 #ifndef _FSCL_CALENDAR_H_
23 #define _FSCL_CALENDAR_H_
25 #include <FBaseDataType.h>
26 #include <FSclTypes.h>
27 #include <FSclRecord.h>
29 namespace Tizen { namespace Base
35 namespace Tizen { namespace Social
40 * @brief This class represents calendar information.
44 * @final This class is not intended for extension.
46 * The %Calendar class represents calendar information. @n
47 * 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.
49 class _OSP_EXPORT_ Calendar
54 * This is the default constructor for this class.
58 * @param[in] itemType The calendar item type to specify which kind of item the calendar can contain
60 explicit Calendar(CalendarItemType itemType);
63 * Copying of objects using this copy constructor is allowed.
67 * @param[in] rhs An instance of %Calendar
69 Calendar(const Calendar& rhs);
72 * This destructor overrides Tizen::Social::Record::~Record().
76 virtual ~Calendar(void);
79 * Compares the input Tizen::Base::Object with the calling %Calendar instance.
83 * @return @c true if the input object equals the calling %Calendar instance, @n
85 * @param[in] rhs The object instance to compare with the calling object
88 virtual bool Equals(const Tizen::Base::Object& rhs) const;
91 * Gets the hash value of the current instance.
95 * @return The hash value of the current instance
97 virtual int GetHashCode(void) const;
100 * Gets the calendar name.
104 * @return The calendar name
106 Tizen::Base::String GetName(void) const;
109 * Gets the calendar item type.
113 * @return The calendar item type
115 CalendarItemType GetItemType(void) const;
118 * Gets the account ID.
122 * @return The account ID
124 AccountId GetAccountId(void) const;
127 * Gets the calendar color. @n
128 * If the color has not been set, all color components are set with 0x0 and E_DATE_NOT_FOUND exception is returned.
132 * @param[out] r The red component
133 * @param[out] g The green component
134 * @param[out] b The blue component
135 * @exception E_SUCCESS The method is successful.
136 * @exception E_DATA_NOT_FOUND The color has not been set.
138 result GetColor(byte& r, byte& g, byte& b) const;
141 * Sets the calendar name.
145 * @param[in] name The calendar name
147 void SetName(const Tizen::Base::String& name);
150 * Sets the calendar color.
154 * @param[in] r The red component
155 * @param[in] g The green component
156 * @param[in] b The blue component
158 void SetColor(byte r, byte g, byte b);
161 * Clears the calendar color.
165 void ClearColor(void);
168 * Copying of objects using this copy assignment operator is allowed.
172 * @param[in] rhs An instance of %Calendar
174 Calendar& operator =(const Calendar& rhs);
177 friend class _CalendarImpl;
178 class _CalendarImpl* __pCalendarImpl;
184 #endif // _FSCL_CALENDAR_H_