/cpw/tomkiewicz/gg11: 5f1451cb3162: Enable support for updates/n...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Tue Dec 18 07:57:12 EST 2012


Changeset: 5f1451cb316279e5b23d67e726c25a3e2c5e789b
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-12-18 13:57 +0100
Branch:	 default
URL: http://hg.pidgin.im/cpw/tomkiewicz/gg11/rev/5f1451cb3162

Description:

Enable support for updates/new-version events

diffstat:

 libpurple/protocols/gg/libgadu-events.c |  12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (29 lines):

diff --git a/libpurple/protocols/gg/libgadu-events.c b/libpurple/protocols/gg/libgadu-events.c
--- a/libpurple/protocols/gg/libgadu-events.c
+++ b/libpurple/protocols/gg/libgadu-events.c
@@ -83,6 +83,13 @@ void ggp_events_user_data(PurpleConnecti
 	}
 }
 
+static void ggp_events_new_version(const gchar *data)
+{
+	/* data = {"severity":"download"} */
+	purple_debug_info("gg", "Gadu-Gadu server reports new client version."
+		" %s", data);
+}
+
 void ggp_events_json(PurpleConnection *gc, struct gg_event_json_event *ev)
 {
 	static const gchar *ignored_events[] = {
@@ -98,6 +105,11 @@ void ggp_events_json(PurpleConnection *g
 		return;
 	}
 
+	if (g_strcmp0("updates/new-version", ev->type) == 0) {
+		ggp_events_new_version(ev->data);
+		return;
+	}
+
 	for (it = ignored_events; *it != NULL; it++) {
 		if (g_strcmp0(*it, ev->type) == 0)
 			return;



More information about the Commits mailing list