-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskmanager.h
More file actions
44 lines (33 loc) · 878 Bytes
/
taskmanager.h
File metadata and controls
44 lines (33 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __TASKMANAGER__
#define __TASKMANAGER__
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdint.h>
#include <ctype.h>
#define NOT_ARCHIVE 0
#define ARCHIVE 1
enum RemindFreq{
ONCE,
DAILY,
WEEKLY,
MONTHLY,
YEARLY
};
static const char *REMINDER_FREQ_STR[] = { "Once","Daily","Weekly","Monthly","Yearly"};
typedef struct task{
long id;
char *todo;
struct tm reminder_time;
struct tm creation_time;
struct tm finished_time;
uint8_t archive;
uint8_t has_reminder;
enum RemindFreq remind_freq;
}task;
task * create_task(const char *todo,size_t n,struct tm reminder, enum RemindFreq remind_freq, uint8_t set_reminder);
int get_reminder_format(char *,struct tm *);
int get_frequent_reminder(char *,enum RemindFreq *);
char * get_formated_timestamp(struct tm *);
#endif