-
Notifications
You must be signed in to change notification settings - Fork 0
/
inbound.h
80 lines (73 loc) · 2.17 KB
/
inbound.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* $Id: inbound.h,v 2.9 2013/02/03 21:37:44 gul Exp $
*
* $Log: inbound.h,v $
* Revision 2.9 2013/02/03 21:37:44 gul
* New option "rename-style [postfix|extension]"
*
* Revision 2.8 2005/07/04 18:24:43 gul
* Move events checking and running to inb_test() for reducing repeated code;
* do not run immediate events twice;
* fixed argus-style freqs (not tested).
*
* Revision 2.7 2004/10/19 16:28:19 gul
* Do not remove complete received but not renamed partial files
* for prevent data loss in ND-mode.
* Remove all partial files for node after successfull session.
*
* Revision 2.6 2003/10/30 10:57:46 gul
* Change inb_done arguments, optimize a bit
*
* Revision 2.5 2003/10/30 10:36:59 gul
* Do not append file partially received from busy remote aka,
* non-destructive skip it.
*
* Revision 2.4 2003/08/26 16:06:26 stream
* Reload configuration on-the fly.
*
* Warning! Lot of code can be broken (Perl for sure).
* Compilation checked only under OS/2-Watcom and NT-MSVC (without Perl)
*
* Revision 2.3 2003/06/20 10:37:02 val
* Perl hooks for binkd - initial revision
*
* Revision 2.2 2003/03/01 18:29:52 gul
* Change size_t to off_t for file sizes and offsets
*
* Revision 2.1 2002/11/22 14:40:42 gul
* Check free space on inbox if defined
*
* Revision 2.0 2001/01/10 12:12:38 gul
* Binkd is under CVS again
*
*
*/
#ifndef _inbound_h
#define _inbound_h
#include "protoco2.h"
/*
* Checks if the file already exists in our inbound. !0=ok, 0=failed.
* Sets realname[MAXPATHLEN]
*/
int inb_test (char *filename, off_t size, time_t t,
char *inbound, char *realname,
enum renamestyletype ren_style);
/*
* Open a partial file in the inbound directory for appending.
* Creates it if the file does not exist
*/
FILE *inb_fopen (STATE *state, BINKD_CONFIG *config);
/*
* File is complete, rename it to it's realname. 1=ok, 0=failed.
* Sets realname[MAXPATHLEN]
*/
int inb_done (TFILE *file, STATE *state, BINKD_CONFIG *config);
/*
* Remove partial file
*/
int inb_reject (STATE *state, BINKD_CONFIG *config);
/*
* Remove all partial files for remote
*/
void inb_remove_partial (STATE *state, BINKD_CONFIG *config);
#endif