From 48cd878e5a0cfaedae93fc515148e784e1534fbd Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Fri, 24 Feb 2012 17:17:27 +0100 Subject: Removed message parsing code to msgparser. --- src/task.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/task.cc') diff --git a/src/task.cc b/src/task.cc index 0b948c5..24e94a1 100644 --- a/src/task.cc +++ b/src/task.cc @@ -28,3 +28,21 @@ #include "task.h" TaskList tasklist; +static int id_count = 0; + +int current_id_count() { + return id_count; +} + +task_t create_task(std::string title, std::string desc, + int x, int y) { + + task_t t; + t.x = x; + t.y = y; + t.title = title; + t.desc = desc; + t.id = id_count; id_count++; + + return t; +} -- cgit v1.2.3