/soc/2013/ashmew2/filetransferX: 420e76fa4c28: cb_nice_component...

Ashish Gupta ashmew2 at gmail.com
Sun Aug 18 07:53:45 EDT 2013


Changeset: 420e76fa4c284831cd859c77b1c6a666149c99c9
Author:	 Ashish Gupta <ashmew2 at gmail.com>
Date:	 2013-08-17 04:00 +0530
Branch:	 filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/420e76fa4c28

Description:

cb_nice_component_state_changed

diffstat:

 libpurple/protocols/jabber/google/google_session.c |  18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diffs (49 lines):

diff --git a/libpurple/protocols/jabber/google/google_session.c b/libpurple/protocols/jabber/google/google_session.c
--- a/libpurple/protocols/jabber/google/google_session.c
+++ b/libpurple/protocols/jabber/google/google_session.c
@@ -39,7 +39,7 @@ typedef struct {
 	gchar *name;
 	gboolean agent_attached;
 	guint share_channel_id;
-	HttpStatus http_status;
+/*	HttpStatus http_status; */ /*TODO: Add enum later for current status*/
 	gchar *status_line;
 	gboolean is_chunked;
 	guint64 content_length;
@@ -898,7 +898,7 @@ google_session_handle_info(JabberStream 
 	if(channel) {
 		GoogleAVSessionData *session_data = (GoogleAVSessionData *)session->session_data;
 		GoogleXferSessionData *share_session = session_data->share_session;
-		gboolean is_initiator = !strcmp(session->id.initiator, me);
+/*		gboolean is_initiator = !strcmp(session->id.initiator, me); TODO*/
 		share_session->share_channel = g_new0(ShareChannel, 1);
 		/*TODO: Make sure the NiceAgent exists here?*/
 		share_session->share_channel->stream_id = share_session->stream_id;
@@ -1349,6 +1349,13 @@ cb_nice_recv(NiceAgent *agent, guint str
 //dummy function
 }
 
+void cb_nice_component_state_changed((NiceAgent *agent,guint stream_id, guint component_id,
+				      guint state, gpointer user_data)
+{
+	purple_debug_info("google_session", "State of NiceAgent Changed...Current State : %u\n", state);
+/*TODO: Add more stuff related to state changes here*/
+}
+
 void
 gtalk_xfer_prepare_candidates(GoogleSession *session)
 {	
@@ -1423,6 +1430,13 @@ This will most probably end in successfu
 	g_signal_connect (G_OBJECT (agent), "candidate-gathering-done",
 			  G_CALLBACK (cb_candidate_gathering_done),  session);
 
+	g_signal_connect  (G_OBJECT (agent), "component-state-changed",
+				    G_CALLBACK (cb_nice_component_state_changed), NULL);
+	
+/*TODO: Uncomment and use me.
+	g_signal_connect (G_OBJECT (agent), "reliable-transport-writable",
+				    G_CALLBACK (nice_component_writable), G_OBJECT (self));
+*/
 	if(!nice_agent_gather_candidates (agent, stream_id))
 		purple_debug_info("google_session", "Gather candidates returned FALSE\n");
 	else



More information about the Commits mailing list