Loading...
Searching...
No Matches
upnp.h
Go to the documentation of this file.
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_UPNP_H_
#define _PURPLE_UPNP_H_
typedef struct _UPnPMappingAddRemove UPnPMappingAddRemove;
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************/
/**************************************************************************/
/* typedef struct _PurpleUPnPRequestData PurpleUPnPRequestData; */
typedef void (*PurpleUPnPCallback) (gboolean success, gpointer data);
void purple_upnp_init(void);
void purple_upnp_discover(PurpleUPnPCallback cb, gpointer cb_data);
#if 0
const PurpleUPnPControlInfo* purple_upnp_get_control_info(void);
#endif
const gchar* purple_upnp_get_public_ip(void);
void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *mapping_data);
UPnPMappingAddRemove *purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
PurpleUPnPCallback cb, gpointer cb_data);
UPnPMappingAddRemove *purple_upnp_remove_port_mapping(unsigned short portmap,
const gchar* protocol, PurpleUPnPCallback cb, gpointer cb_data);
#ifdef __cplusplus
}
#endif
#endif /* _PURPLE_UPNP_H_ */
purple_upnp_set_port_mapping
UPnPMappingAddRemove * purple_upnp_set_port_mapping(unsigned short portmap, const gchar *protocol, PurpleUPnPCallback cb, gpointer cb_data)
Maps Ports in a UPnP enabled IGD that sits on the local network to this purple client.
purple_upnp_discover
void purple_upnp_discover(PurpleUPnPCallback cb, gpointer cb_data)
Sends a discovery request to search for a UPnP enabled IGD that contains the WANIPConnection service ...
purple_upnp_remove_port_mapping
UPnPMappingAddRemove * purple_upnp_remove_port_mapping(unsigned short portmap, const gchar *protocol, PurpleUPnPCallback cb, gpointer cb_data)
Deletes a port mapping in a UPnP enabled IGD that sits on the local network to this purple client.
purple_upnp_init
void purple_upnp_init(void)
Initialize UPnP.
purple_upnp_cancel_port_mapping
void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *mapping_data)
Cancel a pending port mapping request initiated with either purple_upnp_set_port_mapping() or purple_...
purple_upnp_get_public_ip
const gchar * purple_upnp_get_public_ip(void)
Gets the IP address from a UPnP enabled IGD that sits on the local network, so when getting the netwo...