Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

mta.h

Go to the documentation of this file.
00001 /*
00002  * XetPan: a libEtPan! based Mail User Agent
00003  * Copyright (C) 2002-2003 Melvin Hadasht
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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

Generated on Wed Oct 22 15:50:42 2003 for XetPan by doxygen 1.3.2