2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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 CalendarTask.h
18 * @author Shi Hezhang (hezhang.shi@samsung.com)
19 * @author Pan Rui (r.pan@samsung.com)
23 #ifndef WRTDEVICEAPIS_TASK_CALENDAR_TASK_H_
24 #define WRTDEVICEAPIS_TASK_CALENDAR_TASK_H_
29 #include <dpl/shared_ptr.h>
31 namespace WrtDeviceApis {
35 //typedef std::vector<std::string> CategoryList;
36 //typedef DPL::SharedPtr<CategoryList> CategoryListPtr;
38 //typedef std::vector<unsigned short> StatusList;
39 //typedef DPL::SharedPtr<CategoryList> StatusListPtr;
40 //typedef std::vector<unsigned short> PriorityList;
41 //typedef DPL::SharedPtr<CategoryList> PriorityListPtr;
43 /* This object represents a single calendar event */
53 INVALID_STATUS = 10000,
54 UNDEFINED_STATUS /* should be used only to mark a fact filter is not set */
62 INVALID_PRIORITY = 10000,
63 UNDEFINED_PRIORITY /* should be used only to mark a fact filter is not set */
68 UNDEFINED_TASK_TIME_T_VALUE = -2,
69 INVALID_TASK_TIME_T_VALUE = -1
74 UNDEFINED_TASK_ID = -1
78 virtual ~CalendarTask();
81 void setId(int value);
83 int getTaskId() const;
84 void setTaskId(int value);
86 std::string getDescription() const;
87 void setDescription(const std::string &value);
89 std::string getSubject() const;
90 void setSubject(const std::string &value);
92 time_t getDueDate() const;
93 void setDueDate(time_t value);
95 TaskStatus getStatus() const;
96 void setStatus(TaskStatus value);
98 TaskPriority getPriority() const;
99 void setPriority(TaskPriority value);
101 void display() const;
102 bool validate() const;
104 bool getIdIsSet() const;
105 bool getTaskIdIsSet() const;
106 bool getDescriptionIsSet() const;
107 bool getSubjectIsSet() const;
108 bool getDueDateIsSet() const;
109 bool getStatusIsSet() const;
110 bool getPriorityIsSet() const;
115 std::string m_description;
116 std::string m_subject;
119 TaskPriority m_priority;
121 bool m_descriptionIsSet;
125 typedef DPL::SharedPtr<CalendarTask> CalendarTaskPtr;
131 #endif // WRTDEVICEAPIS_TASK_CALENDAR_TASK_H_