Add camel_tcp_stream_set/get_socks_proxy()
authorFederico Mena Quintero <federico@novell.com>
Wed, 12 May 2010 20:00:09 +0000 (15:00 -0500)
committerFederico Mena Quintero <federico@novell.com>
Wed, 2 Jun 2010 20:42:13 +0000 (15:42 -0500)
This will be the low-level function to set a SOCKS proxy for TCP streams.
In subsequent commits we'll add the machinery to CamelSession et al
to pass down the client's specified proxy into TCP streams.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
camel/camel-tcp-stream.c

index 171f427..a033254 100644 (file)
@@ -170,3 +170,23 @@ camel_tcp_stream_get_remote_address (CamelTcpStream *stream,
 
        return class->get_remote_address (stream, len);
 }
+
+/**
+ * camel_tcp_stream_set_socks_proxy:
+ * @stream: a #CamelTcpStream object
+ * @socks_host: hostname to use for the SOCKS proxy
+ * @socks_port: port number to use for the SOCKS proxy
+ *
+ * Configures a SOCKS proxy for the specified @stream.  Instead of direct connections,
+ * this @stream will instead go through the proxy.
+ *
+ * Since: 2.32
+ */
+void
+camel_tcp_stream_set_socks_proxy (CamelTcpStream *stream, const char *socks_host, int socks_port)
+{
+       g_return_if_fail (CAMEL_IS_TCP_STREAM (stream));
+
+       /* FIXME */
+}
+