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.
18 * @author Shi Hezhang (hezhang.shi@samsung.com)
19 * @author Pan Rui (r.pan@samsung.com)
23 #ifndef WRTDEVICEAPIS_TASK_ITASK_H_
24 #define WRTDEVICEAPIS_TASK_ITASK_H_
27 #include <dpl/log/log.h>
28 #include <dpl/shared_ptr.h>
29 #include <Task/CalendarTask.h>
30 #include <Task/TaskFilter.h>
31 #include <Task/IEventAddTask.h>
32 #include <Task/IEventCreateTask.h>
33 #include <Task/IEventDeleteTask.h>
34 #include <Task/IEventFindTasks.h>
35 #include <Task/IEventUpdateTask.h>
37 namespace WrtDeviceApis {
41 class ITask : public Commons::EventRequestReceiver< IEventAddTask >,
42 public Commons::EventRequestReceiver< IEventDeleteTask>,
43 public Commons::EventRequestReceiver< IEventUpdateTask>,
44 public Commons::EventRequestReceiver< IEventFindTasks>,
45 public Commons::EventRequestReceiver< IEventCreateTask>
57 virtual void createTask(IEventCreateTaskPtr &event);
58 virtual void addTask(IEventAddTaskPtr &event);
59 virtual void updateTask(IEventUpdateTaskPtr &event);
60 virtual void deleteTask(IEventDeleteTaskPtr &event);
61 virtual void findTasks(IEventFindTasksPtr &event);
63 virtual std::string getName() const
67 virtual void setName(const std::string &value)
71 virtual TaskType getType() const
75 virtual void setType(const TaskType value)
79 virtual int getId() const
83 virtual void setId(const int value)
87 virtual int getAccountId() const
91 virtual void setAccountId(const int value)
101 virtual void OnRequestReceived(const IEventAddTaskPtr &event) = 0;
102 virtual void OnRequestReceived(const IEventDeleteTaskPtr &event) = 0;
103 virtual void OnRequestReceived(const IEventUpdateTaskPtr &event) = 0;
104 virtual void OnRequestReceived(const IEventFindTasksPtr &event) = 0;
105 virtual void OnRequestReceived(const IEventCreateTaskPtr &event) = 0;
108 typedef DPL::SharedPtr<ITask> ITaskPtr;
114 #endif //WRTDEVICEAPIS_TASK_ITASK_H_