1<?php
2/*
3 * Yurii's Gantt Plugin
4 *
5 * Copyright (C) 2020 Yurii K.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program.  If not, see http://www.gnu.org/licenses
19 */
20
21namespace dokuwiki\plugin\yuriigantt\src\Driver;
22
23use dokuwiki\plugin\yuriigantt\src\Entities\Link;
24use dokuwiki\plugin\yuriigantt\src\Entities\Task;
25
26interface DriverInterface
27{
28    /**
29     * Open connection for the page
30     * @param $pageId
31     * @return void
32     */
33    public function open($pageId);
34
35    /**
36     * @param Link $link
37     * @return Link
38     */
39    public function updateLink(Link $link);
40
41    /**
42     * @param $id link ID
43     * @return void
44     */
45    public function deleteLink($id);
46
47    /**
48     * @param Link $link
49     * @return Link
50     */
51    public function addLink(Link $link);
52
53    /**
54     * @param Task $task
55     * @return Task
56     */
57    public function updateTask(Task $task);
58
59    /**
60     * @param $id
61     * @return void
62     */
63    public function deleteTask($id);
64
65    /**
66     * @param Task $task
67     * @return Task
68     */
69    public function addTask(Task $task);
70
71}
72