changeset 24341:b27908701f66

For some reason the slpmsg and slplink functions don't have underscores in the names, but the slpcall functions do. So rename msn_slp_call_blah to msn_slpcall_blah
author Mark Doliner <mark@kingant.net>
date Thu, 13 Nov 2008 08:01:36 +0000
parents 33697964e62b
children 9bdaf273c0ff
files libpurple/protocols/msn/slp.c libpurple/protocols/msn/slpcall.c libpurple/protocols/msn/slpcall.h libpurple/protocols/msn/slplink.c
diffstat 4 files changed, 34 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c	Thu Nov 13 07:57:33 2008 +0000
+++ b/libpurple/protocols/msn/slp.c	Thu Nov 13 08:01:36 2008 +0000
@@ -115,7 +115,7 @@
 	{
 		if (slpcall->started)
 		{
-			msn_slp_call_close(slpcall);
+			msn_slpcall_close(slpcall);
 		}
 		else
 		{
@@ -128,7 +128,7 @@
 			g_free(content);
 			msn_slplink_unleash(slpcall->slplink);
 
-			msn_slp_call_destroy(slpcall);
+			msn_slpcall_destroy(slpcall);
 		}
 	}
 }
@@ -219,7 +219,7 @@
 
 	msn_slplink_queue_slpmsg(slplink, slpmsg);
 
-	msn_slp_call_session_init(slpcall);
+	msn_slpcall_session_init(slpcall);
 }
 
 static void
@@ -588,10 +588,10 @@
 		}
 		else
 		{
-			msn_slp_call_session_init(slpcall);
+			msn_slpcall_session_init(slpcall);
 		}
 #else
-		msn_slp_call_session_init(slpcall);
+		msn_slpcall_session_init(slpcall);
 #endif
 	}
 	else if (!strcmp(type, "application/x-msnmsgr-transreqbody"))
@@ -646,7 +646,7 @@
 		char *content;
 		char *content_type;
 
-		slpcall = msn_slp_call_new(slplink);
+		slpcall = msn_slpcall_new(slplink);
 
 		/* From: <msnmsgr:buddy@hotmail.com> */
 #if 0
@@ -711,7 +711,7 @@
 
 			slpcall->wasted = TRUE;
 
-			/* msn_slp_call_destroy(slpcall); */
+			/* msn_slpcall_destroy(slpcall); */
 			return slpcall;
 		}
 
@@ -735,7 +735,7 @@
 		if (slpcall != NULL)
 			slpcall->wasted = TRUE;
 
-		/* msn_slp_call_destroy(slpcall); */
+		/* msn_slpcall_destroy(slpcall); */
 	}
 	else
 		slpcall = NULL;
--- a/libpurple/protocols/msn/slpcall.c	Thu Nov 13 07:57:33 2008 +0000
+++ b/libpurple/protocols/msn/slpcall.c	Thu Nov 13 08:01:36 2008 +0000
@@ -34,7 +34,7 @@
  **************************************************************************/
 
 static gboolean
-msn_slp_call_timeout(gpointer data)
+msn_slpcall_timeout(gpointer data)
 {
 	MsnSlpCall *slpcall;
 
@@ -46,7 +46,7 @@
 
 	if (!slpcall->pending && !slpcall->progress)
 	{
-		msn_slp_call_destroy(slpcall);
+		msn_slpcall_destroy(slpcall);
 		return FALSE;
 	}
 
@@ -56,7 +56,7 @@
 }
 
 MsnSlpCall *
-msn_slp_call_new(MsnSlpLink *slplink)
+msn_slpcall_new(MsnSlpLink *slplink)
 {
 	MsnSlpCall *slpcall;
 
@@ -72,13 +72,13 @@
 
 	msn_slplink_add_slpcall(slplink, slpcall);
 
-	slpcall->timer = purple_timeout_add(MSN_SLPCALL_TIMEOUT, msn_slp_call_timeout, slpcall);
+	slpcall->timer = purple_timeout_add(MSN_SLPCALL_TIMEOUT, msn_slpcall_timeout, slpcall);
 
 	return slpcall;
 }
 
 void
-msn_slp_call_destroy(MsnSlpCall *slpcall)
+msn_slpcall_destroy(MsnSlpCall *slpcall)
 {
 	GList *e;
 
@@ -125,7 +125,7 @@
 }
 
 void
-msn_slp_call_init(MsnSlpCall *slpcall, MsnSlpCallType type)
+msn_slpcall_init(MsnSlpCall *slpcall, MsnSlpCallType type)
 {
 	slpcall->session_id = rand() % 0xFFFFFF00 + 4;
 	slpcall->id = rand_guid();
@@ -133,7 +133,7 @@
 }
 
 void
-msn_slp_call_session_init(MsnSlpCall *slpcall)
+msn_slpcall_session_init(MsnSlpCall *slpcall)
 {
 	if (slpcall->session_init_cb)
 		slpcall->session_init_cb(slpcall);
@@ -142,7 +142,7 @@
 }
 
 void
-msn_slp_call_invite(MsnSlpCall *slpcall, const char *euf_guid,
+msn_slpcall_invite(MsnSlpCall *slpcall, const char *euf_guid,
 					int app_id, const char *context)
 {
 	MsnSlpLink *slplink;
@@ -185,14 +185,14 @@
 }
 
 void
-msn_slp_call_close(MsnSlpCall *slpcall)
+msn_slpcall_close(MsnSlpCall *slpcall)
 {
 	g_return_if_fail(slpcall != NULL);
 	g_return_if_fail(slpcall->slplink != NULL);
 
 	send_bye(slpcall, "application/x-msnmsgr-sessionclosebody");
 	msn_slplink_unleash(slpcall->slplink);
-	msn_slp_call_destroy(slpcall);
+	msn_slpcall_destroy(slpcall);
 }
 
 MsnSlpCall *
@@ -234,7 +234,7 @@
 		slpcall = slplink->directconn->initial_call;
 
 		if (slpcall != NULL)
-			msn_slp_call_session_init(slpcall);
+			msn_slpcall_session_init(slpcall);
 	}
 #endif
 
--- a/libpurple/protocols/msn/slpcall.h	Thu Nov 13 07:57:33 2008 +0000
+++ b/libpurple/protocols/msn/slpcall.h	Thu Nov 13 08:01:36 2008 +0000
@@ -43,6 +43,7 @@
 
 struct _MsnSlpCall
 {
+	/* Our parent slplink */
 	MsnSlpLink *slplink;
 
 	MsnSlpCallType type;
@@ -78,12 +79,12 @@
 	guint timer;
 };
 
-MsnSlpCall *msn_slp_call_new(MsnSlpLink *slplink);
-void msn_slp_call_init(MsnSlpCall *slpcall, MsnSlpCallType type);
-void msn_slp_call_session_init(MsnSlpCall *slpcall);
-void msn_slp_call_destroy(MsnSlpCall *slpcall);
-void msn_slp_call_invite(MsnSlpCall *slpcall, const char *euf_guid,
+MsnSlpCall *msn_slpcall_new(MsnSlpLink *slplink);
+void msn_slpcall_init(MsnSlpCall *slpcall, MsnSlpCallType type);
+void msn_slpcall_session_init(MsnSlpCall *slpcall);
+void msn_slpcall_destroy(MsnSlpCall *slpcall);
+void msn_slpcall_invite(MsnSlpCall *slpcall, const char *euf_guid,
 						 int app_id, const char *context);
-void msn_slp_call_close(MsnSlpCall *slpcall);
+void msn_slpcall_close(MsnSlpCall *slpcall);
 
 #endif /* _MSN_SLPCALL_H_ */
--- a/libpurple/protocols/msn/slplink.c	Thu Nov 13 07:57:33 2008 +0000
+++ b/libpurple/protocols/msn/slplink.c	Thu Nov 13 08:01:36 2008 +0000
@@ -104,7 +104,7 @@
 #endif
 
 	while (slplink->slp_calls != NULL)
-		msn_slp_call_destroy(slplink->slp_calls->data);
+		msn_slpcall_destroy(slplink->slp_calls->data);
 
 	g_queue_free(slplink->slp_msg_queue);
 
@@ -641,7 +641,7 @@
 		msn_slpmsg_destroy(slpmsg);
 
 		if (slpcall != NULL && slpcall->wasted)
-			msn_slp_call_destroy(slpcall);
+			msn_slpcall_destroy(slpcall);
 	}
 }
 
@@ -730,8 +730,8 @@
 	g_return_if_fail(slplink != NULL);
 	g_return_if_fail(fp != NULL);
 
-	slpcall = msn_slp_call_new(slplink);
-	msn_slp_call_init(slpcall, MSN_SLPCALL_DC);
+	slpcall = msn_slpcall_new(slplink);
+	msn_slpcall_init(slpcall, MSN_SLPCALL_DC);
 
 	slpcall->session_init_cb = send_file_cb;
 	slpcall->end_cb = msn_xfer_end_cb;
@@ -748,7 +748,7 @@
 
 	context = gen_context(fn, fp);
 
-	msn_slp_call_invite(slpcall, MSN_FT_GUID, 2, context);
+	msn_slpcall_invite(slpcall, MSN_FT_GUID, 2, context);
 
 	g_free(context);
 }
@@ -771,14 +771,14 @@
 	msnobj_base64 = purple_base64_encode((const guchar *)msnobj_data, strlen(msnobj_data));
 	g_free(msnobj_data);
 
-	slpcall = msn_slp_call_new(slplink);
-	msn_slp_call_init(slpcall, MSN_SLPCALL_ANY);
+	slpcall = msn_slpcall_new(slplink);
+	msn_slpcall_init(slpcall, MSN_SLPCALL_ANY);
 
 	slpcall->data_info = g_strdup(info);
 	slpcall->cb = cb;
 	slpcall->end_cb = end_cb;
 
-	msn_slp_call_invite(slpcall, MSN_OBJ_GUID, 1, msnobj_base64);
+	msn_slpcall_invite(slpcall, MSN_OBJ_GUID, 1, msnobj_base64);
 
 	g_free(msnobj_base64);
 }