File indexing completed on 2024-11-17 04:54:27
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Kevin Ottens <ervin@kde.org> 0003 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 0007 #ifndef DOMAIN_TASKREPOSITORY_H 0008 #define DOMAIN_TASKREPOSITORY_H 0009 0010 #include "context.h" 0011 #include "datasource.h" 0012 #include "project.h" 0013 #include "task.h" 0014 0015 class KJob; 0016 0017 namespace Domain { 0018 0019 class TaskRepository 0020 { 0021 public: 0022 typedef QSharedPointer<TaskRepository> Ptr; 0023 0024 TaskRepository(); 0025 virtual ~TaskRepository(); 0026 0027 virtual KJob *create(Task::Ptr task) = 0; 0028 virtual KJob *createChild(Domain::Task::Ptr task, Domain::Task::Ptr parent) = 0; 0029 virtual KJob *createInProject(Task::Ptr task, Project::Ptr project) = 0; 0030 virtual KJob *createInContext(Task::Ptr task, Context::Ptr context) = 0; 0031 0032 virtual KJob *update(Task::Ptr task) = 0; 0033 virtual KJob *remove(Task::Ptr task) = 0; 0034 0035 virtual KJob *promoteToProject(Task::Ptr task) = 0; 0036 0037 virtual KJob *associate(Task::Ptr parent, Task::Ptr child) = 0; 0038 virtual KJob *dissociate(Task::Ptr child) = 0; 0039 virtual KJob *dissociateAll(Task::Ptr child) = 0; 0040 }; 0041 0042 } 0043 0044 #endif // DOMAIN_TASKREPOSITORY_H