00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MTA_H
00022 #define MTA_H
00023
00024 #include <clist.h>
00025
00026 #include "server.h"
00027 #include "message-types.h"
00028 #include "manager.h"
00029
00030 typedef enum
00031 {
00032 XEP_MTA_INVALID,
00033 XEP_MTA_COMMAND,
00034 XEP_MTA_SMTP
00035 } XePMTAType;
00036
00037 typedef struct XePMTA_s XePMTA;
00038
00039 struct XePMTA_s
00040 {
00041 char *id;
00042 XePMTAType type;
00043 char *command;
00044 XePServer *server;
00045 XePMessage *message;
00046 int result;
00047 XePManagerThread thread;
00048 };
00049
00050 clist *
00051 a_MTA_list_new(void);
00052
00053 void
00054 a_MTA_list_free(clist *mtas);
00055
00056 clist *
00057 a_MTA_list_get(void);
00058
00059 XePMTA *
00060 a_MTA_new(void);
00061
00062 void
00063 a_MTA_free(XePMTA *mta);
00064
00065 void
00066 a_MTA_set_id(XePMTA *mta, const char *id);
00067
00068 const char *
00069 a_MTA_get_id(XePMTA *mta);
00070
00071 void
00072 a_MTA_set_type(XePMTA *mta, XePMTAType type);
00073
00074 XePMTAType
00075 a_MTA_get_type(XePMTA *mta);
00076
00077 void
00078 a_MTA_set_command(XePMTA *mta, const char *command);
00079
00080 const char *
00081 a_MTA_get_command(XePMTA *mta);
00082
00083 void
00084 a_MTA_set_server(XePMTA *mta, XePServer *server);
00085
00086 XePServer *
00087 a_MTA_get_server(XePMTA *mta);
00088
00099 void
00100 a_MTA_send_message(XePMTA *mta, XePMessage *message,
00101 XePManagerMsgCb sent_cb, void *user_data,
00102 const char *sent_folder_ref);
00103
00114 void
00115 a_MTA_send_message_list(XePMTA *mta, clist *message_list,
00116 XePManagerMsgCb sent_cb, void *user_data);
00117
00125 int
00126 a_MTA_smtp_send_message(XePMTA *mta);
00127
00134 XePMTA *
00135 a_MTA_lookup_by_ref(const char *ref);
00136
00137 #endif