]> code.citadel.org Git - citadel.git/blob - rss2ctdl/config.h
e5a0bac1685d443a8ba40df37c0053f67e0efd11
[citadel.git] / rss2ctdl / config.h
1 /*
2  * $Id$
3  * 
4  * Copyright 2003 Oliver Feiler <kiza@kcore.de>
5  *
6  * config.h
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 version 2 as
10  * published by the Free Software Foundation.
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, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  *
21  */
22
23 #ifndef CONFIG_H
24 #define CONFIG_H
25
26 #include <time.h>
27 #include "netio.h"
28
29 /* Set your charset here. ISO-8859-1 is default. */
30 #ifndef TARGET_CHARSET
31 #define TARGET_CHARSET "ISO-8859-1"
32 #endif
33
34 struct feed {
35         char *feedurl;                                                  /* Non hashified URL */
36         char *feed;                                                     /* Raw XML */
37         int content_length;
38         char *title;
39         char *link;
40         char *description;
41         char *lastmodified;                                             /* Content of header as sent by the server. */
42         int lasthttpstatus;
43         char *content_type;
44         netio_error_type netio_error;                                   /* See netio.h */
45         int connectresult;                                              /* Socket errno */
46         char *cookies;                                                  /* Login cookies for this feed. */
47         char *authinfo;                                                 /* HTTP authinfo string. */
48         char *servauth;                                                 /* Server supplied authorization header. */
49         struct newsitem *items;
50         int problem;                                                    /* Set if there was a problem 
51                                                                          * downloading the feed. */
52         char *original;                                                 /* Original feed title. */
53 };
54
55 struct newsitem {
56         struct newsdata *data;
57         struct newsitem *next_ptr, *prev_ptr;   /* Pointer to next/prev item in double linked list */
58 };
59
60 struct newsdata {
61         struct feed *parent;
62         int readstatus;                                                 /* 0: unread, 1: read */
63         char *title;
64         char *link;
65         char *guid;                                                     /* Not always present */
66         char *description;
67         time_t date;                                                    /* not always present */
68 };
69
70 extern struct feed *first_ptr;
71
72 #ifdef LOCALEPATH
73 #       include <libintl.h>
74 #       include <locale.h>
75 #endif
76
77 #ifdef LOCALEPATH
78 #       define _(String) gettext (String)
79 #else
80 #       define _(String) (String)s
81 #       define ngettext(Singular, Plural, n) (Plural)
82 #endif
83
84 #endif