Mercurial > pidgin
comparison libgaim/upnp.h @ 14361:0c3957362c69
[gaim-migrate @ 17067]
If the status box is "away" when we go idle-away, then do nothing
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 27 Aug 2006 23:04:55 +0000 |
parents | 60b1bc8dbf37 |
children |
comparison
equal
deleted
inserted
replaced
14360:c196a30f645f | 14361:0c3957362c69 |
---|---|
34 /**************************************************************************/ | 34 /**************************************************************************/ |
35 /** @name UPnP API */ | 35 /** @name UPnP API */ |
36 /**************************************************************************/ | 36 /**************************************************************************/ |
37 /*@{*/ | 37 /*@{*/ |
38 | 38 |
39 /* typedef struct _GaimUPnPRequestData GaimUPnPRequestData; */ | |
39 | 40 |
40 typedef void (*GaimUPnPCallback) (gboolean success, gpointer data); | 41 typedef void (*GaimUPnPCallback) (gboolean success, gpointer data); |
41 | 42 |
42 /** | 43 /** |
43 * Sends a discovery request to search for a UPnP enabled IGD that | 44 * Sends a discovery request to search for a UPnP enabled IGD that |
54 #if 0 | 55 #if 0 |
55 /** | 56 /** |
56 * Retrieve the current UPnP control info, if there is any available. | 57 * Retrieve the current UPnP control info, if there is any available. |
57 * This will only be filled in if gaim_upnp_discover() had been called, | 58 * This will only be filled in if gaim_upnp_discover() had been called, |
58 * and finished discovering. | 59 * and finished discovering. |
59 * | 60 * |
60 * @return The control URL for the IGD we'll use to use the IGD services | 61 * @return The control URL for the IGD we'll use to use the IGD services |
61 */ | 62 */ |
62 const GaimUPnPControlInfo* gaim_upnp_get_control_info(void); | 63 const GaimUPnPControlInfo* gaim_upnp_get_control_info(void); |
63 #endif | 64 #endif |
64 | |
65 | 65 |
66 /** | 66 /** |
67 * Gets the IP address from a UPnP enabled IGD that sits on the local | 67 * Gets the IP address from a UPnP enabled IGD that sits on the local |
68 * network, so when getting the network IP, instead of returning the | 68 * network, so when getting the network IP, instead of returning the |
69 * local network IP, the public IP is retrieved. This is a cached value from | 69 * local network IP, the public IP is retrieved. This is a cached value from |
70 * the time of the UPnP discovery. | 70 * the time of the UPnP discovery. |
71 * | 71 * |
72 * @return The IP address of the network, or NULL if something went wrong | 72 * @return The IP address of the network, or NULL if something went wrong |
73 */ | 73 */ |
74 const gchar* gaim_upnp_get_public_ip(void); | 74 const gchar* gaim_upnp_get_public_ip(void); |
75 | |
76 | 75 |
77 /** | 76 /** |
78 * Maps Ports in a UPnP enabled IGD that sits on the local network to | 77 * Maps Ports in a UPnP enabled IGD that sits on the local network to |
79 * this gaim client. Essentially, this function takes care of the port | 78 * this gaim client. Essentially, this function takes care of the port |
80 * forwarding so things like file transfers can work behind NAT firewalls | 79 * forwarding so things like file transfers can work behind NAT firewalls |
88 void gaim_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol, | 87 void gaim_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol, |
89 GaimUPnPCallback cb, gpointer cb_data); | 88 GaimUPnPCallback cb, gpointer cb_data); |
90 | 89 |
91 /** | 90 /** |
92 * Deletes a port mapping in a UPnP enabled IGD that sits on the local network | 91 * Deletes a port mapping in a UPnP enabled IGD that sits on the local network |
93 * to this gaim client. Essentially, this function takes care of deleting the | 92 * to this gaim client. Essentially, this function takes care of deleting the |
94 * port forwarding after they have completed a connection so another client on | 93 * port forwarding after they have completed a connection so another client on |
95 * the local network can take advantage of the port forwarding | 94 * the local network can take advantage of the port forwarding |
96 * | 95 * |
97 * @param portmap The port to delete the mapping for | 96 * @param portmap The port to delete the mapping for |
98 * @param protocol The protocol to map to. Either "TCP" or "UDP" | 97 * @param protocol The protocol to map to. Either "TCP" or "UDP" |
100 * removal is complete | 99 * removal is complete |
101 * @param cb_data Extra data to be passed to the callback | 100 * @param cb_data Extra data to be passed to the callback |
102 */ | 101 */ |
103 void gaim_upnp_remove_port_mapping(unsigned short portmap, | 102 void gaim_upnp_remove_port_mapping(unsigned short portmap, |
104 const gchar* protocol, GaimUPnPCallback cb, gpointer cb_data); | 103 const gchar* protocol, GaimUPnPCallback cb, gpointer cb_data); |
104 | |
105 /*@}*/ | 105 /*@}*/ |
106 | 106 |
107 #ifdef __cplusplus | 107 #ifdef __cplusplus |
108 } | 108 } |
109 #endif | 109 #endif |