Fix the boiler plate codes
[framework/osp/social.git] / inc / FSclCalendar.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  * @file        FSclCalendar.h
18  * @brief       This is the header file for the %Calendar class.
19  *
20  * This header file contains the declarations of the %Calendar class.
21  */
22 #ifndef _FSCL_CALENDAR_H_
23 #define _FSCL_CALENDAR_H_
24
25 #include <FBaseDataType.h>
26 #include <FSclTypes.h>
27 #include <FSclRecord.h>
28
29 namespace Tizen { namespace Base
30 {
31 class Object;
32 class String;
33 }}
34
35 namespace Tizen { namespace Social
36 {
37
38 /**
39  * @class       Calendar
40  * @brief       This class represents calendar information.
41  *
42  * @since       2.0
43  *
44  * @final       This class is not intended for extension.
45  *
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.
48  */
49 class _OSP_EXPORT_ Calendar
50         : public Record
51 {
52 public:
53         /**
54          * This is the default constructor for this class.
55          *
56          * @since       2.0
57          *
58          * @param[in]   itemType                        The calendar item type to specify which kind of item the calendar can contain
59          */
60         explicit Calendar(CalendarItemType itemType);
61
62         /**
63          * Copying of objects using this copy constructor is allowed.
64          *
65          * @since       2.0
66          *
67          * @param[in]   rhs             An instance of %Calendar
68          */
69         Calendar(const Calendar& rhs);
70
71         /**
72          * This destructor overrides Tizen::Social::Record::~Record().
73          *
74          * @since       2.0
75          */
76         virtual ~Calendar(void);
77
78         /**
79          * Compares the input Tizen::Base::Object with the calling %Calendar instance.
80          *
81          * @since       2.0
82          *
83          * @return              @c true if the input object equals the calling %Calendar instance, @n
84          *                              else @c false
85          * @param[in]   rhs     The object instance to compare with the calling object
86          * @see                 GetHashCode()
87          */
88         virtual bool Equals(const Tizen::Base::Object& rhs) const;
89
90         /**
91          * Gets the hash value of the current instance.
92          *
93          * @since       2.0
94          *
95          * @return              The hash value of the current instance
96          */
97         virtual int GetHashCode(void) const;
98
99         /**
100          * Gets the calendar name.
101          *
102          * @since       2.0
103          *
104          * @return              The calendar name
105          */
106         Tizen::Base::String GetName(void) const;
107
108         /**
109          * Gets the calendar item type.
110          *
111          * @since       2.0
112          *
113          * @return              The calendar item type
114          */
115         CalendarItemType GetItemType(void) const;
116
117         /**
118          * Gets the account ID.
119          *
120          * @since       2.0
121          *
122          * @return              The account ID
123          */
124         AccountId GetAccountId(void) const;
125
126         /**
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.
129          *
130          * @since       2.0
131          *
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.
137          */
138         result GetColor(byte& r, byte& g, byte& b) const;
139
140         /**
141          * Sets the calendar name.
142          *
143          * @since       2.0
144          *
145          * @param[in]   name                                    The calendar name
146          */
147         void SetName(const Tizen::Base::String& name);
148
149         /**
150          * Sets the calendar color.
151          *
152          * @since       2.0
153          *
154          * @param[in]           r               The red component
155          * @param[in]           g               The green component
156          * @param[in]           b               The blue component
157          */
158         void SetColor(byte r, byte g, byte b);
159
160         /**
161          * Clears the calendar color.
162          *
163          * @since       2.0
164          */
165         void ClearColor(void);
166
167         /**
168          * Copying of objects using this copy assignment operator is allowed.
169          *
170          * @since       2.0
171          *
172          * @param[in]   rhs             An instance of %Calendar
173          */
174         Calendar& operator =(const Calendar& rhs);
175
176 private:
177         friend class _CalendarImpl;
178         class _CalendarImpl* __pCalendarImpl;
179
180 };      // Calendar
181
182 }}      // Tizen::Social
183
184 #endif // _FSCL_CALENDAR_H_