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 FScl_CalendarImpl.h
19 * @brief This is the header file for the _CalendarImpl class.
21 * This header file contains the declarations of the _CalendarImpl class.
24 #ifndef _FSCL_INTERNAL_CALENDAR_IMPL_H_
25 #define _FSCL_INTERNAL_CALENDAR_IMPL_H_
27 #include <unique_ptr.h>
28 #include <calendar2.h>
29 #include <FBaseObject.h>
30 #include <FBaseDataType.h>
31 #include <FSclTypes.h>
32 #include "FScl_CalendarbookUtil.h"
34 namespace Tizen { namespace Base
39 namespace Tizen { namespace Social
45 * @class _CalendarImpl
48 : public Tizen::Base::Object
52 * This is the default constructor for this class.
54 * @param[in] itemType The calendar item type
56 _CalendarImpl(CalendarItemType itemType);
59 * Copying of objects using this copy constructor is allowed.
61 * @param[in] rhs An instance of _CalendarImpl
63 _CalendarImpl(const _CalendarImpl& rhs);
66 * This destructor overrides Tizen::Base::Object::~Object().
68 virtual ~_CalendarImpl(void);
71 * Gets the calendar name.
73 * @return The calendar name
75 Tizen::Base::String GetName(void) const;
78 * Gets the calendar item type.
80 * @return The calendar item type
82 CalendarItemType GetItemType(void) const;
85 * Gets the account ID.
87 * @return The account ID
89 AccountId GetAccountId(void) const;
92 * Gets the calendar color.
93 * If the color is unset, the color components will be set to 0x0.
95 * @param[out] red The red component
96 * @param[out] green The green component
97 * @param[out] blue The blue component
98 * @exception E_SUCCESS The method is successful.
99 * @exception E_DATA_NOT_FOUND The color is unset.
101 result GetColor(byte& red, byte& green, byte& blue) const;
104 * Sets the calendar name.
106 * @param[in] name The calendar name
108 void SetName(const Tizen::Base::String& name);
111 * Sets the calendar color.
113 * @param[in] red The red component
114 * @param[in] green The green component
115 * @param[in] blue The blue component
117 void SetColor(byte red, byte green, byte blue);
120 * Clears the calendar color.
122 void ClearColor(void);
125 * Sets the account ID.
127 * @param[in] accountId The account ID
129 void SetAccountId(AccountId accountId);
132 // Sets the record handle
134 void SetRecordHandle(calendar_record_h calendarHandle);
137 // Gets the record handle
139 calendar_record_h GetRecordHandle(void) const;
141 static Calendar* CreateDefaultInstanceN(void);
144 * Gets the Impl instance.
146 * @return The pointer to const _CalendarImpl
147 * @param[in] calendar A const instance of %Calendar class
149 static _CalendarImpl* GetInstance(Calendar& calendar);
152 * Gets the Impl instance.
154 * @return The pointer to const _CalendarImpl
155 * @param[in] calendar A const instance of %Calendar class
157 static const _CalendarImpl* GetInstance(const Calendar& calendar);
160 * Copying of objects using this copy assignment operator is allowed.
162 * @param[in] rhs An instance of _CalendarImpl
164 _CalendarImpl& operator =(const _CalendarImpl& rhs);
168 _CalendarRecord __calendarRecord;
174 #endif //_FSCL_INTERNAL_CALENDAR_IMPL_H_