Commit 8e60b05b 8e60b05ba86a8ea43c394838695937398531b4ef by Sergey Poznyakoff

Interface declarations for libmu_scm.h

1 parent 7d59c95f
1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3
4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 GNU Mailutils 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 You should have received a copy of the GNU General Public License
15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17
18 #ifndef _MU_SCM_H
19 #define _MU_SCM_H
20
21 #include <libguile.h>
22
23 #if GUILE_VERSION == 14
24
25 # define SCM_STRING_CHARS SCM_CHARS
26 # define scm_list_1 SCM_LIST1
27 # define scm_list_2 SCM_LIST2
28 # define scm_list_3 SCM_LIST3
29 # define scm_list_4 SCM_LIST4
30 # define scm_list_5 SCM_LIST5
31 # define scm_list_n SCM_LISTN
32 # define scm_c_define scm_sysintern
33 # define scm_primitive_eval_x scm_eval_x
34 # define scm_i_big2dbl scm_big2dbl
35
36 extern SCM scm_long2num (long val);
37
38 #endif
39
40 typedef struct
41 {
42 int debug_guile;
43 mailbox_t mbox;
44 char *user_name;
45 int (*init) __PMT ((void *data));
46 SCM (*catch_body) __PMT ((void *data, mailbox_t mbox));
47 SCM (*catch_handler) __PMT ((void *data, SCM tag, SCM throw_args));
48 int (*next) __PMT ((void *data, mailbox_t mbox));
49 int (*exit) __PMT ((void *data, mailbox_t mbox));
50 void *data;
51 } guimb_param_t;
52
53 extern SCM _mu_scm_mailer;
54 extern SCM _mu_scm_debug;
55
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 extern SCM scm_makenum __P((unsigned long val));
61 extern void mu_set_variable __P((const char *name, SCM value));
62 extern void mu_scm_init __P((void));
63
64 extern void mu_scm_mailbox_init __P((void));
65 extern SCM mu_scm_mailbox_create __P((mailbox_t mbox));
66 extern int mu_scm_is_mailbox __P((SCM scm));
67
68 extern void mu_scm_message_init __P((void));
69 extern SCM mu_scm_message_create __P((SCM owner, message_t msg));
70 extern int mu_scm_is_message __P((SCM scm));
71 extern const message_t mu_scm_message_get __P((SCM MESG));
72
73 extern int mu_scm_is_body __P((SCM scm));
74 extern void mu_scm_body_init __P((void));
75 extern SCM mu_scm_body_create __P((SCM mesg, body_t body));
76
77 extern void mu_scm_address_init __P((void));
78 extern void mu_scm_logger_init __P((void));
79
80 extern void mu_scm_port_init __P((void));
81 extern SCM mu_port_make_from_stream __P((SCM msg, stream_t stream, long mode));
82
83 extern void mu_scm_mime_init __P((void));
84 extern void mu_scm_message_add_owner __P((SCM MESG, SCM owner));
85
86 extern void mu_process_mailbox __P((int argc, char *argv[], guimb_param_t *param));
87
88 extern void mu_scm_mutil_init __P((void));
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif