1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include <stdio.h>
23
24 #define GETLINE_MIN 1024
25
26 #define GETLINE_INCR 1024
27
28
29 extern char pop_error[];
30 extern bool pop_debug;
31
32 struct _popserver
33 {
34 int file, data;
35 char *buffer;
36 int buffer_size, buffer_index;
37 bool_bf in_multi : 1;
38 bool_bf trash_started : 1;
39 };
40
41 typedef struct _popserver *popserver;
42
43
44
45
46
47 #define POP_NO_KERBEROS (1<<0)
48 #define POP_NO_HESIOD (1<<1)
49 #define POP_NO_GETPASS (1<<2)
50
51 extern popserver pop_open (char *host, char *username, char *password,
52 int flags);
53 extern int pop_stat (popserver server, int *count, int *size);
54 extern int pop_list (popserver server, int message, int **IDs,
55 int **size);
56 extern int pop_retrieve (popserver server, int message, int markfrom,
57 char **);
58 extern int pop_retrieve_first (popserver server, int message,
59 char **response);
60 extern int pop_retrieve_next (popserver server, char **line);
61 extern int pop_retrieve_flush (popserver server);
62 extern int pop_top_first (popserver server, int message, int lines,
63 char **response);
64 extern int pop_top_next (popserver server, char **line);
65 extern int pop_top_flush (popserver server);
66 extern int pop_multi_first (popserver server, const char *command,
67 char **response);
68 extern int pop_multi_next (popserver server, char **line);
69 extern int pop_multi_flush (popserver server);
70 extern int pop_delete (popserver server, int message);
71 extern int pop_noop (popserver server);
72 extern int pop_last (popserver server);
73 extern int pop_reset (popserver server);
74 extern int pop_quit (popserver server);
75 extern void pop_close (popserver);