/soc/2012/michael/android: 77559a02b56d: Added purple_dnsquery_[...

Michael Zangl michael at soc.pidgin.im
Sun Jul 29 08:20:08 EDT 2012


Changeset: 77559a02b56d28b945ec404e9bad5c9591ebbe91
Author:	 Michael Zangl <michael at soc.pidgin.im>
Date:	 2012-07-29 14:05 +0200
Branch:	 soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/77559a02b56d

Description:

Added purple_dnsquery_[sg]et_ui_data.

diffstat:

 libpurple/dnsquery.c |  15 +++++++++++++++
 libpurple/dnsquery.h |  19 +++++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)

diffs (61 lines):

diff --git a/libpurple/dnsquery.c b/libpurple/dnsquery.c
--- a/libpurple/dnsquery.c
+++ b/libpurple/dnsquery.c
@@ -64,6 +64,7 @@ struct _PurpleDnsQueryData {
 	GSList *hosts;
 	gchar *error_message;
 #endif
+	void *ui_data;
 };
 
 #if defined(PURPLE_DNSQUERY_USE_FORK)
@@ -1012,6 +1013,20 @@ purple_dnsquery_get_port(PurpleDnsQueryD
 	return query_data->port;
 }
 
+void *
+purple_dnsquery_get_ui_data(PurpleDnsQueryData *query_data){
+        g_return_val_if_fail(query_data != NULL, 0);
+
+        return query_data->ui_data;
+}
+
+void
+purple_dnsquery_set_ui_data(PurpleDnsQueryData *query_data, void *ui_data){
+        g_return_val_if_fail(query_data != NULL, 0);
+
+        query_data->ui_data = ui_data;
+}
+
 void
 purple_dnsquery_set_ui_ops(PurpleDnsQueryUiOps *ops)
 {
diff --git a/libpurple/dnsquery.h b/libpurple/dnsquery.h
--- a/libpurple/dnsquery.h
+++ b/libpurple/dnsquery.h
@@ -141,6 +141,25 @@ char *purple_dnsquery_get_host(PurpleDns
 unsigned short purple_dnsquery_get_port(PurpleDnsQueryData *query_data);
 
 /**
+ * Get the ui data associated with a PurpleDnsQueryData
+ *
+ * @param query_data The DNS query
+ * @return The ui data
+ */
+void *
+purple_dnsquery_get_ui_data(PurpleDnsQueryData *query_data);
+
+/**
+ * Sets the ui data for the PurpleDnsQueryData
+ *
+ * @param query_data The DNS query
+ * @param ui_data The UI data
+ */
+void
+purple_dnsquery_set_ui_data(PurpleDnsQueryData *query_data, void *ui_data);
+
+
+/**
  * Initializes the DNS query subsystem.
  */
 void purple_dnsquery_init(void);



More information about the Commits mailing list