672dd6779089cf1454f1df32dd4979e2222b382d
[citadel.git] / citadel / modules / nntp / serv_nntp.h
1 //
2 // Header file for NNTP server module
3 //
4 // Copyright (c) 2014 by the citadel.org team
5 //
6 // This program is open source software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License version 3.
8 //  
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 //
14
15
16 // data returned by a message list fetch
17 struct nntp_msglist {
18         int num_msgs;
19         long *msgnums;
20 };
21
22
23 // data passed by the LIST commands to its helper function
24 struct nntp_list_data {
25         int list_format;
26         char *wildmat_pattern;
27 };
28
29
30 //
31 // data passed between nntp_listgroup() and nntp_listgroup_backend()
32 //
33 struct listgroup_range {
34         long lo;
35         long hi;
36 };
37
38
39 typedef struct _citnntp {               // Information about the current session
40         long current_article_number;
41 } citnntp;
42
43
44 //
45 // Various output formats for the LIST commands
46 //
47 enum {
48         NNTP_LIST_ACTIVE,
49         NNTP_LIST_ACTIVE_TIMES,
50         NNTP_LIST_DISTRIB_PATS,
51         NNTP_LIST_HEADERS,
52         NNTP_LIST_NEWSGROUPS,
53         NNTP_LIST_OVERVIEW_FMT
54 };
55
56
57 int wildmat(const char *text, const char *p);
58