00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef SU_OS_NW_H 00026 00027 #define SU_OS_NW_H 00028 00041 /* ---------------------------------------------------------------------- */ 00042 /* Includes */ 00043 00044 #ifndef SU_H 00045 #include "sofia-sip/su.h" 00046 #endif 00047 00048 #ifndef SU_TIME_H 00049 #include "sofia-sip/su_time.h" 00050 #endif 00051 00052 #ifndef SU_ALLOC_H 00053 #include "sofia-sip/su_alloc.h" 00054 #endif 00055 00056 #ifndef SU_WAIT_H 00057 #include "sofia-sip/su_wait.h" 00058 #endif 00059 00060 #if SU_HAVE_POLL 00061 #include <sys/poll.h> 00062 #endif 00063 00064 SOFIA_BEGIN_DECLS 00065 00066 /* ---------------------------------------------------------------------- */ 00067 /* network-changed callback */ 00068 00069 #ifndef SU_NETWORK_CHANGED_MAGIC_T 00070 00082 #define SU_NETWORK_CHANGED_MAGIC_T void 00083 #endif 00084 00097 typedef SU_NETWORK_CHANGED_MAGIC_T su_network_changed_magic_t; 00098 00099 typedef struct su_network_changed_s su_network_changed_t; 00100 00106 typedef void (su_network_changed_f)(su_network_changed_magic_t *, su_root_t *); 00107 00108 00109 /* ---------------------------------------------------------------------- */ 00110 /* Functions */ 00111 00112 /* Network-changed */ 00113 SOFIAPUBFUN su_network_changed_t * 00114 su_root_add_network_changed(su_home_t *home, 00115 su_root_t *root, 00116 su_network_changed_f *, 00117 su_network_changed_magic_t *); 00118 SOFIAPUBFUN int su_root_remove_network_changed(su_network_changed_t *); 00119 00120 SOFIA_END_DECLS 00121 00122 #endif /* SU_OS_NW_H */