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 FScl_CalendarImpl.h
18 * @brief This is the header file for the _CalendarImpl class.
20 * This header file contains the declarations of the _CalendarImpl class.
23 #ifndef _FSCL_INTERNAL_CALENDAR_IMPL_H_
24 #define _FSCL_INTERNAL_CALENDAR_IMPL_H_
26 #include <unique_ptr.h>
27 #include <calendar2.h>
28 #include <FBaseObject.h>
29 #include <FBaseDataType.h>
30 #include <FSclTypes.h>
31 #include "FScl_CalendarbookUtil.h"
33 namespace Tizen { namespace Base
38 namespace Tizen { namespace Social
44 * @class _CalendarImpl
47 : public Tizen::Base::Object
51 * This is the default constructor for this class.
53 * @param[in] itemType The calendar item type
55 _CalendarImpl(CalendarItemType itemType);
58 * Copying of objects using this copy constructor is allowed.
60 * @param[in] rhs An instance of _CalendarImpl
62 _CalendarImpl(const _CalendarImpl& rhs);
65 * This destructor overrides Tizen::Base::Object::~Object().
67 virtual ~_CalendarImpl(void);
70 * Gets the calendar name.
72 * @return The calendar name
74 Tizen::Base::String GetName(void) const;
77 * Gets the calendar item type.
79 * @return The calendar item type
81 CalendarItemType GetItemType(void) const;
84 * Gets the account ID.
86 * @return The account ID
88 AccountId GetAccountId(void) const;
91 * Gets the calendar color.
92 * If the color is unset, the color components will be set to 0x0.
94 * @param[out] red The red component
95 * @param[out] green The green component
96 * @param[out] blue The blue component
97 * @exception E_SUCCESS The method is successful.
98 * @exception E_DATA_NOT_FOUND The color is unset.
100 result GetColor(byte& red, byte& green, byte& blue) const;
103 * Sets the calendar name.
105 * @param[in] name The calendar name
107 void SetName(const Tizen::Base::String& name);
110 * Sets the calendar color.
112 * @param[in] red The red component
113 * @param[in] green The green component
114 * @param[in] blue The blue component
116 void SetColor(byte red, byte green, byte blue);
119 * Clears the calendar color.
121 void ClearColor(void);
124 * Sets the account ID.
126 * @param[in] accountId The account ID
128 void SetAccountId(AccountId accountId);
131 // Sets the record handle
133 void SetRecordHandle(calendar_record_h calendarHandle);
136 // Gets the record handle
138 calendar_record_h GetRecordHandle(void) const;
140 static Calendar* CreateDefaultInstanceN(void);
143 * Gets the Impl instance.
145 * @return The pointer to const _CalendarImpl
146 * @param[in] calendar A const instance of %Calendar class
148 static _CalendarImpl* GetInstance(Calendar& calendar);
151 * Gets the Impl instance.
153 * @return The pointer to const _CalendarImpl
154 * @param[in] calendar A const instance of %Calendar class
156 static const _CalendarImpl* GetInstance(const Calendar& calendar);
159 * Copying of objects using this copy assignment operator is allowed.
161 * @param[in] rhs An instance of _CalendarImpl
163 _CalendarImpl& operator =(const _CalendarImpl& rhs);
167 _CalendarRecord __calendarRecord;
173 #endif //_FSCL_INTERNAL_CALENDAR_IMPL_H_