upnp.h

Go to the documentation of this file.
00001 
00006 /* purple
00007  *
00008  * Purple is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 
00027 #ifndef _PURPLE_UPNP_H_
00028 #define _PURPLE_UPNP_H_
00029 
00030 typedef struct _UPnPMappingAddRemove UPnPMappingAddRemove;
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 /**************************************************************************/
00038 /**************************************************************************/
00041 /* typedef struct _PurpleUPnPRequestData PurpleUPnPRequestData; */
00042 
00043 typedef void (*PurpleUPnPCallback) (gboolean success, gpointer data);
00044 
00045 
00049 void purple_upnp_init(void);
00050 
00051 
00062 void purple_upnp_discover(PurpleUPnPCallback cb, gpointer cb_data);
00063 
00064 #if 0
00065 
00072 const PurpleUPnPControlInfo* purple_upnp_get_control_info(void);
00073 #endif
00074 
00083 const gchar* purple_upnp_get_public_ip(void);
00084 
00091 void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *mapping_data);
00092 
00106 UPnPMappingAddRemove *purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
00107         PurpleUPnPCallback cb, gpointer cb_data);
00108 
00123 UPnPMappingAddRemove *purple_upnp_remove_port_mapping(unsigned short portmap,
00124         const gchar* protocol, PurpleUPnPCallback cb, gpointer cb_data);
00125 
00128 #ifdef __cplusplus
00129 }
00130 #endif
00131 
00132 #endif /* _PURPLE_UPNP_H_ */