]> code.citadel.org Git - citadel.git/blob - rss2ctdl/config.h
Initial revision
[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 "netio.h"
27
28 /* Set your charset here. ISO-8859-1 is default. */
29 #ifndef TARGET_CHARSET
30 #define TARGET_CHARSET "ISO-8859-1"
31 #endif
32
33 struct feed {
34         char *feedurl;                                                  /* Non hashified URL */
35         char *feed;                                                     /* Raw XML */
36         int content_length;
37         char *title;
38         char *link;
39         char *description;
40         char *lastmodified;                                             /* Content of header as sent by the server. */
41         int lasthttpstatus;
42         char *content_type;
43         netio_error_type netio_error;                                   /* See netio.h */
44         int connectresult;                                              /* Socket errno */
45         char *cookies;                                                  /* Login cookies for this feed. */
46         char *authinfo;                                                 /* HTTP authinfo string. */
47         char *servauth;                                                 /* Server supplied authorization header. */
48         struct newsitem *items;
49         int problem;                                                    /* Set if there was a problem 
50                                                                          * downloading the feed. */
51         char *original;                                                 /* Original feed title. */
52 };
53
54 struct newsitem {
55         struct newsdata *data;
56         struct newsitem *next_ptr, *prev_ptr;   /* Pointer to next/prev item in double linked list */
57 };
58
59 struct newsdata {
60         struct feed *parent;
61         int readstatus;                                                 /* 0: unread, 1: read */
62         char *title;
63         char *link;
64         char *guid;                                                     /* Not always present */
65         char *description;
66 };
67
68 extern struct feed *first_ptr;
69
70 #ifdef LOCALEPATH
71 #       include <libintl.h>
72 #       include <locale.h>
73 #endif
74
75 #ifdef LOCALEPATH
76 #       define _(String) gettext (String)
77 #else
78 #       define _(String) (String)s
79 #       define ngettext(Singular, Plural, n) (Plural)
80 #endif
81
82 #endif