1 /* pop.h: Header file for the "pop.c" client POP3 protocol.
2 Copyright (C) 1991, 1993, 2001-2016 Free Software Foundation, Inc.
4 Author: Jonathan Kamens <jik@security.ov.com>
6 This file is part of GNU Emacs.
8 GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 GNU Emacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24 #define GETLINE_MIN 1024 /* the getline buffer starts out this */
26 #define GETLINE_INCR 1024 /* the getline buffer is grown by this */
27 /* size when it needs to grow */
29 extern char pop_error
[];
30 extern bool pop_debug
;
36 int buffer_size
, buffer_index
;
38 bool_bf trash_started
: 1;
41 typedef struct _popserver
*popserver
;
44 * Valid flags for the pop_open function.
47 #define POP_NO_KERBEROS (1<<0)
48 #define POP_NO_HESIOD (1<<1)
49 #define POP_NO_GETPASS (1<<2)
51 extern popserver
pop_open (char *host
, char *username
, char *password
,
53 extern int pop_stat (popserver server
, int *count
, int *size
);
54 extern int pop_list (popserver server
, int message
, int **IDs
,
56 extern int pop_retrieve (popserver server
, int message
, int markfrom
,
58 extern int pop_retrieve_first (popserver server
, int message
,
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
,
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
,
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
);