summaryrefslogtreecommitdiff
path: root/libpurple/network.h
diff options
context:
space:
mode:
authorElliott Sales de Andrade <qulogic@pidgin.im>2019-11-01 02:38:50 -0400
committerElliott Sales de Andrade <qulogic@pidgin.im>2019-11-01 02:38:50 -0400
commit7828cf31e06ed0a90b1ee5af83ac3b0ee526df33 (patch)
tree8d215e9914049c6fe398d8457c5dc39ec681e8b8 /libpurple/network.h
parentc246ebe15b19f27d0f61aeae281a26720386be5b (diff)
downloadpidgin-7828cf31e06ed0a90b1ee5af83ac3b0ee526df33.tar.gz
xmpp: Convert unencrypted connections to pure GIO.
Diffstat (limited to 'libpurple/network.h')
-rw-r--r--libpurple/network.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libpurple/network.h b/libpurple/network.h
index 6c93ab71ce..48f526615c 100644
--- a/libpurple/network.h
+++ b/libpurple/network.h
@@ -29,6 +29,7 @@
*/
#include <glib.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
@@ -113,6 +114,27 @@ GList *purple_network_get_all_local_system_ips(void);
const char *purple_network_get_my_ip(int fd);
/**
+ * purple_network_get_my_ip_from_gio:
+ * @sockconn: The socket connection to use to help figure out the IP, or %NULL.
+ *
+ * Returns the IP address that should be used anywhere a
+ * public IP addresses is needed (listening for an incoming
+ * file transfer, etc).
+ *
+ * If the user has manually specified an IP address via
+ * preferences, then this IP is returned. Otherwise the
+ * IP address returned by purple_network_get_local_system_ip_from_gio()
+ * is returned.
+ *
+ * Note: The returned string is a pointer to a static buffer. If this
+ * function is called twice, it may be important to make a copy
+ * of the returned string.
+ *
+ * Returns: The local IP address to be used.
+ */
+const char *purple_network_get_my_ip_from_gio(GSocketConnection *sockconn);
+
+/**
* purple_network_listen:
* @port: The port number to bind to. Must be greater than 0.
* @socket_family: The protocol family of the socket. This should be