pidgin: upnp.h Source File

pidgin 2.14.4

Loading...
Searching...
No Matches
upnp.h
Go to the documentation of this file.
1
6/* purple
7 *
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26
27#ifndef _PURPLE_UPNP_H_
28#define _PURPLE_UPNP_H_
29
30typedef struct _UPnPMappingAddRemove UPnPMappingAddRemove;
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/**************************************************************************/
38/**************************************************************************/
41/* typedef struct _PurpleUPnPRequestData PurpleUPnPRequestData; */
42
43typedef void (*PurpleUPnPCallback) (gboolean success, gpointer data);
44
45
49 void purple_upnp_init(void);
50
51
62 void purple_upnp_discover(PurpleUPnPCallback cb, gpointer cb_data);
63
64#if 0
72const PurpleUPnPControlInfo* purple_upnp_get_control_info(void);
73#endif
74
83 const gchar* purple_upnp_get_public_ip(void);
84
91 void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *mapping_data);
92
106UPnPMappingAddRemove *purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
107 PurpleUPnPCallback cb, gpointer cb_data);
108
123UPnPMappingAddRemove *purple_upnp_remove_port_mapping(unsigned short portmap,
124 const gchar* protocol, PurpleUPnPCallback cb, gpointer cb_data);
125
128#ifdef __cplusplus
129}
130#endif
131
132#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...