Commit 508bfd59 508bfd590ed2b146ac356306a4a8c6220fd8d090 by Alain Magloire

new field mu_debug_t in structure,

we reuse the object mu_debug_t for tracing.
1 parent 27fab5ec
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
19 #define _MAILUTILS_POP3_H 19 #define _MAILUTILS_POP3_H
20 20
21 #include <mailutils/list.h> 21 #include <mailutils/list.h>
22 #include <mailutils/debug.h>
22 #include <mailutils/stream.h> 23 #include <mailutils/stream.h>
23 24
24 #ifdef __cplusplus 25 #ifdef __cplusplus
...@@ -40,7 +41,7 @@ extern int mu_pop3_disconnect (mu_pop3_t pop3); ...@@ -40,7 +41,7 @@ extern int mu_pop3_disconnect (mu_pop3_t pop3);
40 extern int mu_pop3_set_timeout (mu_pop3_t pop3, int timeout); 41 extern int mu_pop3_set_timeout (mu_pop3_t pop3, int timeout);
41 extern int mu_pop3_get_timeout (mu_pop3_t pop3, int *timeout); 42 extern int mu_pop3_get_timeout (mu_pop3_t pop3, int *timeout);
42 43
43 extern int mu_pop3_set_debug (mu_pop3_t pop3, void (*print) __P((const char *buffer))); 44 extern int mu_pop3_set_debug (mu_pop3_t pop3, mu_debug_t debug);
44 45
45 extern int mu_pop3_apop (mu_pop3_t pop3, const char *name, const char *digest); 46 extern int mu_pop3_apop (mu_pop3_t pop3, const char *name, const char *digest);
46 47
......
...@@ -82,7 +82,7 @@ struct _mu_pop3 ...@@ -82,7 +82,7 @@ struct _mu_pop3
82 char *timestamp; /* For apop, if supported. */ 82 char *timestamp; /* For apop, if supported. */
83 unsigned timeout; /* Default is 10 minutes. */ 83 unsigned timeout; /* Default is 10 minutes. */
84 84
85 void (*debug)(const char *log); /* function to print debug long. */ 85 mu_debug_t debug; /* debugging trace. */
86 86
87 enum mu_pop3_state state; /* Indicate the state of the running command. */ 87 enum mu_pop3_state state; /* Indicate the state of the running command. */
88 88
......