Removing old svn keywords.
[monky] / src / eve.h
1 /* Conky, a system monitor, based on torsmo
2  *
3  * Copyright (c) 2008 Asbjørn Zweidorff Kjær
4  * Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al.
5  *      (see AUTHORS)
6  * All rights reserved.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
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  */
21
22 #define _GNU_SOURCE
23 #define MAXCHARS 4
24 #define EVE_UPDATE_DELAY 60
25
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <unistd.h>
29 #include <string.h>
30
31 #include <time.h>
32
33 typedef struct {
34         char *charid;
35         char *skillname;
36         char *time;
37         char *lastOutput;
38
39         struct tm ends;
40         struct tm cache;
41
42         time_t delay;
43
44         int level;
45         int skill;
46 } Character;
47
48 struct xmlData {
49         char *data;
50         size_t size;
51 };
52
53 char *eve(char *, char *, char *);
54 char *getXmlFromAPI(const char *, const char *, const char *, const char *);
55 char *getSkillname(const char *, int);
56 char *formatTime(struct tm *);
57 int parseTrainingXml(char *, Character *);
58 int parseSkilltreeXml(char *, char *);
59 int isCacheValid(struct tm);
60 int file_exists(const char *);
61 void writeSkilltree(char *, const char *);
62 void init_eve(void);