1 /* 2 * net.h: network funcs 3 * Copyright (C) 2002-2004 Saulius Menkevicius 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * 19 * $Id: net.h,v 1.7 2004/12/17 02:04:29 bobas Exp $ 20 */ 21 22 #ifndef NET_H__ 23 #define NET_H__ 24 25 /* preferences registered in the `net' module */ 26 #define PREFS_NET_TYPE "net/type" 27 #define PREFS_NET_PORT "net/port" 28 #define PREFS_NET_IS_CONFIGURED "net/is_configured" 29 #define PREFS_NET_BROADCAST_MASK "net/broadcast_mask" 30 #define PREFS_NET_USE_MULTICAST "net/use_multicast" 31 #define PREFS_NET_MULTICAST_ADDR "net/multicast_addr" 32 #define PREFS_NET_VERBOSE "net/verbose" 33 #define PREFS_NET_CHANNEL_NOTIFY "net/channel_greet" 34 #define PREFS_NET_IGNORE_MASS_MSG "net/ignore_mass_msg" 35 #define PREFS_NET_ENCODING "net/encoding" 36 #define PREFS_NET_REPLY_INFO_REQ "net/reply_info_req" 37 #define PREFS_NET_MOTD "net/motd" 38 #define PREFS_NET_MOTD_WHEN_AWAY "net/motd_when_away" 39 #define PREFS_NET_IGNORED_USERS "net/ignored_users" 40 41 #define my_motd() (\ 42 (prefs_int(PREFS_MAIN_MODE)==UMODE_AWAY || prefs_int(PREFS_MAIN_MODE)==UMODE_OFFLINE) \ 43 ? prefs_str(PREFS_NET_MOTD_WHEN_AWAY) : prefs_str(PREFS_NET_MOTD) ) 44 45 enum net_type_enum { 46 NET_TYPE_QCHAT, 47 NET_TYPE_VYPRESS, 48 NET_TYPE_NUM, 49 NET_TYPE_FIRST = NET_TYPE_QCHAT, 50 NET_TYPE_LAST = NET_TYPE_VYPRESS 51 }; 52 53 void net_register(); 54 gboolean net_connected(); 55 const gchar * net_name_of_type(enum net_type_enum); 56 57 #endif /* #ifndef NET_H__ */ 58 59