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 #ifndef SERVER_H 00021 #define SERVER_H 00022 00023 typedef struct XePServer_s XePServer; 00024 00025 struct XePServer_s 00026 { 00027 char *host; 00028 int port; 00029 char *login; 00030 char *password; 00031 int auth_flags; 00032 }; 00033 00034 XePServer * 00035 a_Server_new(void); 00036 00037 XePServer * 00038 a_Server_new_copy(XePServer *server); 00039 00040 void 00041 a_Server_copy(XePServer *source, XePServer *target); 00042 00043 void 00044 a_Server_free(XePServer *server); 00045 00046 void 00047 a_Server_set_host(XePServer *server, const char *host); 00048 00049 const char * 00050 a_Server_get_host(XePServer *server); 00051 00052 void 00053 a_Server_set_port(XePServer *server, int port); 00054 00055 int 00056 a_Server_get_port(XePServer *server); 00057 00058 void 00059 a_Server_set_login(XePServer *server, const char *login); 00060 00061 const char * 00062 a_Server_get_login(XePServer *server); 00063 00064 void 00065 a_Server_set_password(XePServer *server, const char *password); 00066 00067 const char * 00068 a_Server_get_password(XePServer *server); 00069 00070 void 00071 a_Server_set_starttls(XePServer *server, int use_starttls); 00072 00073 int 00074 a_Server_get_starttls(XePServer *server); 00075 00076 void 00077 a_Server_set_ssl(XePServer *server, int use_ssl); 00078 00079 int 00080 a_Server_get_ssl(XePServer *server); 00081 00082 void 00083 a_Server_set_apop(XePServer *server, int use_apop); 00084 00085 int 00086 a_Server_get_apop(XePServer *server); 00087 00088 #endif