Mercurial > noffle
comparison src/database.h @ 43:2842f50feb55 noffle
[svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
control.c, control.h, database.c, database.h, dynamicstring.c,
dynamicstring.h, fetch.c, fetch.h, fetchlist.c, fetchlist.h, group.c,
group.h, itemlist.c, itemlist.h, lock.c, lock.h, log.c, log.h, noffle.c,
online.c, online.h, outgoing.c, outgoing.h, over.c, over.h, post.c, post.h,
protocol.c, protocol.h, pseudo.c, pseudo.h, request.c, request.h, server.c,
server.h, util.c, util.h, wildmat.c, wildmat.h: Moved files to the
subdirectory src/
* Makefile.am, acconfig.h, configure.in, docs/Makefile.am, src/Makefile.am,
Makefile.in, aclocal.m4, config.h.in, configure, install-sh, missing,
mkinstalldirs, stamp-h.in, docs/Makefile.in, src/Makefile.in: Added files.
They are used by aclocal, autoheader, autoconf and automake.
* src/config.c, src/config.h: Renamed to configfile.c and configfile.h,
because configure will generate a config.h file itself.
* src/client.c, src/content.c, src/database.c, src/fetch.c, src/fetchlist.c,
src/group.c, src/lock.c, src/noffle.c, src/online.c, src/outgoing.c,
src/over.c, src/pseudo.c, src/request.c, src/server.c, src/util.c:
Changed '#include "config.h"' to '#include "configfile.h"'.
* src/client.c, src/content.c, src/database.c, src/fetch.c, src/fetchlist.c,
src/group.c, src/lock.c, src/online.c, src/outgoing.c, src/post.c,
src/protocol.c, src/request.c, src/server.c: Files now #include <config.h>.
Added missing <stdio.h>. This removes the warnings about snprintf() not
being declared.
* Makefile: Removed. This is now generated by configure.
author | uh1763 |
---|---|
date | Fri, 05 May 2000 22:45:56 +0100 |
parents | |
children | 32ba1198c6fa |
comparison
equal
deleted
inserted
replaced
42:2467ff423c15 | 43:2842f50feb55 |
---|---|
1 /* | |
2 database.h | |
3 | |
4 Article database. | |
5 | |
6 $Id: database.h 49 2000-05-05 21:45:56Z uh1763 $ | |
7 */ | |
8 | |
9 #ifndef DB_H | |
10 #define DB_H | |
11 | |
12 #include <time.h> | |
13 #include "common.h" | |
14 #include "dynamicstring.h" | |
15 #include "over.h" | |
16 | |
17 /* Article status flags: */ | |
18 #define DB_INTERESTING 0x01 /* Was article ever tried to read? */ | |
19 #define DB_NOT_DOWNLOADED 0x02 /* Not fully downloaded */ | |
20 #define DB_RETRIEVING_FAILED 0x04 /* Retrieving of article failed */ | |
21 | |
22 /* Open database for r/w. Locking must be done by the caller! */ | |
23 Bool | |
24 Db_open( void ); | |
25 | |
26 void | |
27 Db_close( void ); | |
28 | |
29 /* | |
30 Creates an database entry for the article from the overview | |
31 information. Xref is replaced by grp:numb. | |
32 */ | |
33 Bool | |
34 Db_prepareEntry( const Over *ov, const char *grp, int numb ); | |
35 | |
36 /* Store full article. Can only be used after Db_prepareEntry. */ | |
37 Bool | |
38 Db_storeArt( const char *msgId, const char *artTxt ); | |
39 | |
40 void | |
41 Db_setStat( const char *msgId, int stat ); | |
42 | |
43 void | |
44 Db_updateLastAccess( const char *msgId ); | |
45 | |
46 /* Xref header line without hostname */ | |
47 void | |
48 Db_setXref( const char *msgId, const char *xref ); | |
49 | |
50 const char * | |
51 Db_header( const char *msgId ); | |
52 | |
53 const char * | |
54 Db_body( const char *msgId ); | |
55 | |
56 int | |
57 Db_stat( const char *msgId ); | |
58 | |
59 /* Get last modification time of entry. Returns -1, if msgId non-existing. */ | |
60 time_t | |
61 Db_lastAccess( const char *msgId ); | |
62 | |
63 /* Value of the References header line */ | |
64 const char * | |
65 Db_ref( const char *msgId ); | |
66 | |
67 /* Value of the From header line */ | |
68 const char * | |
69 Db_from( const char *msgId ); | |
70 | |
71 /* Value of the Date header line */ | |
72 const char * | |
73 Db_date( const char *msgId ); | |
74 | |
75 /* Xref header line without hostname */ | |
76 const char * | |
77 Db_xref( const char *msgId ); | |
78 | |
79 Bool | |
80 Db_contains( const char *msgId ); | |
81 | |
82 /* Delete entry from database */ | |
83 void | |
84 Db_delete( const char *msgId ); | |
85 | |
86 Bool | |
87 Db_first( const char** msgId ); | |
88 | |
89 Bool | |
90 Db_next( const char** msgId ); | |
91 | |
92 /* | |
93 Expire all articles that have not been accessed for a number of | |
94 days determined by their group membership and noffle configuration. | |
95 */ | |
96 Bool | |
97 Db_expire( void ); | |
98 | |
99 #endif |