summaryrefslogtreecommitdiff
path: root/core.h
blob: 83b84866c756a42f8d8a4acbfd89b21b66dbf337 (plain)
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
#ifndef GITROLEX_CORE_H
#define GITROLEX_CORE_H

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include "database.h"

int gitrolex_core();

enum Task_t {
  ERROR = -1,
  STATUS = 0,
  EXPORT,
  TRACK,
  PAUSE,
  PLAY
};

struct State_t {
  enum Task_t task;
  char taskArgs[1024];
};

enum Error_t {
  OK = 0,
  DB_ERROR
};

void gitrolex_parseArgs(struct State_t *s, int argc, const char *argv[]);
long gitrolex_calculateWorkingTime(struct TimeEnty_t *t, int size);

#endif