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 XETPAN_H 00021 #define XETPAN_H 00022 00023 #include "xetpan-types.h" 00024 #include "conf.h" 00025 #include "ui-types.h" 00026 00027 #define UNIX_PATH_MAX 108 00028 00030 #define REMOTE_MSG_SIZE 4096 00031 00033 struct XetPan_s { 00034 char *config_path; 00035 XePConf *config; 00036 XePUI *ui; 00037 char lock_socket[UNIX_PATH_MAX]; 00039 unsigned int server_watch_id; 00040 int server_fd; 00041 int log_fd; 00042 XePManager manager; 00043 }; 00044 00046 struct XePRemote_s 00047 { 00048 int fd; 00049 unsigned int watch_id; 00050 char *msg; 00051 XetPan *xetpan; 00052 ssize_t msg_size; 00053 ssize_t msg_len; 00054 ssize_t msg_idx; 00055 }; 00056 00064 int 00065 a_XetPan_execute_remote_cmd(XePRemote *remote, char cmd, char *option); 00066 00070 int 00071 a_XetPan_should_end(XetPan *xetpan); 00072 00074 void 00075 a_XetPan_quit(XetPan *xetpan); 00076 00077 #endif