/soc/2012/michael/android: 06ca9bf08eb1: Added ui_data to txt/sr...
Michael Zangl
michael at soc.pidgin.im
Wed Aug 1 13:03:13 EDT 2012
Changeset: 06ca9bf08eb135698a9c6a915897705d82c03748
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2012-07-31 16:58 +0200
Branch: soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/06ca9bf08eb1
Description:
Added ui_data to txt/srv dns lookup.
diffstat:
libpurple/dnsquery.c | 8 +++++---
libpurple/dnssrv.c | 17 +++++++++++++++++
libpurple/dnssrv.h | 5 +++++
3 files changed, 27 insertions(+), 3 deletions(-)
diffs (73 lines):
diff --git a/libpurple/dnsquery.c b/libpurple/dnsquery.c
--- a/libpurple/dnsquery.c
+++ b/libpurple/dnsquery.c
@@ -1014,15 +1014,17 @@ purple_dnsquery_get_port(PurpleDnsQueryD
}
void *
-purple_dnsquery_get_ui_data(PurpleDnsQueryData *query_data){
+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);
+purple_dnsquery_set_ui_data(PurpleDnsQueryData *query_data, void *ui_data)
+{
+ g_return_if_fail(query_data != NULL);
query_data->ui_data = ui_data;
}
diff --git a/libpurple/dnssrv.c b/libpurple/dnssrv.c
--- a/libpurple/dnssrv.c
+++ b/libpurple/dnssrv.c
@@ -90,6 +90,7 @@ struct _PurpleSrvTxtQueryData {
int fd_in, fd_out;
pid_t pid;
#endif
+ void *ui_data;
};
typedef struct _PurpleSrvInternalQuery {
@@ -1126,6 +1127,22 @@ purple_srv_txt_query_get_ui_ops(void)
}
char *
+purple_srv_txt_query_get_ui_data(PurpleSrvTxtQueryData *query_data)
+{
+ g_return_val_if_fail(query_data != NULL, NULL);
+
+ return query_data->ui_data;
+}
+
+void
+purple_srv_txt_query_set_ui_data(PurpleSrvTxtQueryData *query_data, void *ui_data)
+{
+ g_return_if_fail(query_data != NULL);
+
+ query_data->ui_data = ui_data;
+}
+
+char *
purple_srv_txt_query_get_query(PurpleSrvTxtQueryData *query_data)
{
g_return_val_if_fail(query_data != NULL, NULL);
diff --git a/libpurple/dnssrv.h b/libpurple/dnssrv.h
--- a/libpurple/dnssrv.h
+++ b/libpurple/dnssrv.h
@@ -166,6 +166,11 @@ void purple_srv_txt_query_set_ui_ops(Pur
*/
PurpleSrvTxtQueryUiOps *purple_srv_txt_query_get_ui_ops(void);
+char *purple_srv_txt_query_get_ui_data(PurpleSrvTxtQueryData *query_data);
+
+void purple_srv_txt_query_set_ui_data(PurpleSrvTxtQueryData *query_data, void *ui_data);
+
+
/**
* Get the query from a PurpleSrvTxtQueryData
*
More information about the Commits
mailing list