Sat, 15 Dec 2018 06:25:41 +0000
Merged in default (pull request #459)
Fix GIR warnings for proxy.h and sslconn.h
Approved-by: Gary Kramlich
Approved-by: Eion Robb
--- a/libpurple/proxy.c Sat Dec 15 06:00:16 2018 +0000 +++ b/libpurple/proxy.c Sat Dec 15 06:25:41 2018 +0000 @@ -78,6 +78,23 @@ return g_new0(PurpleProxyInfo, 1); } +static PurpleProxyInfo * +purple_proxy_info_copy(PurpleProxyInfo *info) +{ + PurpleProxyInfo *copy; + + g_return_val_if_fail(info != NULL, NULL); + + copy = purple_proxy_info_new(); + copy->type = info->type; + copy->host = g_strdup(info->host); + copy->port = info->port; + copy->username = g_strdup(info->username); + copy->password = g_strdup(info->password); + + return info; +} + void purple_proxy_info_destroy(PurpleProxyInfo *info) { @@ -173,6 +190,9 @@ return info->password; } +G_DEFINE_BOXED_TYPE(PurpleProxyInfo, purple_proxy_info, + purple_proxy_info_copy, purple_proxy_info_destroy); + /************************************************************************** * Global Proxy API **************************************************************************/
--- a/libpurple/proxy.h Sat Dec 15 06:00:16 2018 +0000 +++ b/libpurple/proxy.h Sat Dec 15 06:25:41 2018 +0000 @@ -77,6 +77,13 @@ /**************************************************************************/ /** + * purple_proxy_info_get_type: + * + * Returns: The #GType for proxy information. + */ +GType purple_proxy_info_get_type(void); + +/** * purple_proxy_info_new: * * Creates a proxy information structure. @@ -247,7 +254,7 @@ PurpleProxyInfo *purple_proxy_get_setup(PurpleAccount *account); /** - * purple_proxy_connect: + * purple_proxy_connect: (skip) * @handle: A handle that should be associated with this * connection attempt. The handle can be used * to cancel the connection attempt using the @@ -277,7 +284,7 @@ PurpleProxyConnectFunction connect_cb, gpointer data); /** - * purple_proxy_connect_socks5_account: + * purple_proxy_connect_socks5_account: (skip) * @handle: A handle that should be associated with this * connection attempt. The handle can be used * to cancel the connection attempt using the @@ -308,7 +315,7 @@ PurpleProxyConnectFunction connect_cb, gpointer data); /** - * purple_proxy_connect_cancel: + * purple_proxy_connect_cancel: (skip) * @connect_data: The #PurpleProxyConnectData to cancel. * * Cancel an in-progress connection attempt. This should be called @@ -322,7 +329,7 @@ void purple_proxy_connect_cancel(PurpleProxyConnectData *connect_data); /** - * purple_proxy_connect_cancel_with_handle: + * purple_proxy_connect_cancel_with_handle: (skip) * @handle: The handle. * * Closes all proxy connections registered with the specified handle.
--- a/libpurple/sslconn.h Sat Dec 15 06:00:16 2018 +0000 +++ b/libpurple/sslconn.h Sat Dec 15 06:25:41 2018 +0000 @@ -111,7 +111,7 @@ const gchar * purple_ssl_strerror(PurpleSslErrorType error); /** - * purple_ssl_connect: + * purple_ssl_connect: (skip) * @account: The account making the connection. * @host: The destination host. * @port: The destination port. @@ -134,7 +134,7 @@ void *data); /** - * purple_ssl_connect_with_ssl_cn: + * purple_ssl_connect_with_ssl_cn: (skip) * @account: The account making the connection. * @host: The destination host. * @port: The destination port. @@ -159,7 +159,7 @@ void *data); /** - * purple_ssl_connect_with_host_fd: + * purple_ssl_connect_with_host_fd: (skip) * @account: The account making the connection. * @fd: The file descriptor. * @func: The SSL input handler function. @@ -178,7 +178,7 @@ void *data); /** - * purple_ssl_input_add: + * purple_ssl_input_add: (skip) * @gsc: The SSL connection handle. * @func: The callback function. * @data: User-defined data. @@ -190,7 +190,7 @@ void *data); /** - * purple_ssl_input_remove: + * purple_ssl_input_remove: (skip) * @gsc: The SSL connection handle. * * Removes an input watcher, added with purple_ssl_input_add(). @@ -201,7 +201,7 @@ purple_ssl_input_remove(PurpleSslConnection *gsc); /** - * purple_ssl_close: + * purple_ssl_close: (skip) * @gsc: The SSL connection to close. * * Closes a SSL connection. @@ -209,7 +209,7 @@ void purple_ssl_close(PurpleSslConnection *gsc); /** - * purple_ssl_read: + * purple_ssl_read: (skip) * @gsc: The SSL connection handle. * @buffer: The destination buffer. * @len: The maximum number of bytes to read. @@ -221,7 +221,7 @@ size_t purple_ssl_read(PurpleSslConnection *gsc, void *buffer, size_t len); /** - * purple_ssl_write: + * purple_ssl_write: (skip) * @gsc: The SSL connection handle. * @buffer: The buffer to write. * @len: The length of the data to write. @@ -233,7 +233,7 @@ size_t purple_ssl_write(PurpleSslConnection *gsc, const void *buffer, size_t len); /** - * purple_ssl_get_peer_certificates: + * purple_ssl_get_peer_certificates: (skip) * @gsc: The SSL connection handle * * Obtains the peer's presented certificates