/pidgin/main: 720a07f05cae: Hide purple_conversation_write, use ...

Tomasz Wasilczyk twasilczyk at pidgin.im
Fri May 23 04:31:02 EDT 2014


Changeset: 720a07f05cae9f2abbe3aa5378f2148855430971
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-23 10:30 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/720a07f05cae

Description:

Hide purple_conversation_write, use purple_conversation_write_message or purple_conversation_write_system_message instead

diffstat:

 libpurple/conversation.c      |   4 ++--
 libpurple/conversation.h      |  25 -------------------------
 libpurple/conversationtypes.c |   4 ++--
 libpurple/internal.h          |  25 +++++++++++++++++++++++++
 4 files changed, 29 insertions(+), 29 deletions(-)

diffs (110 lines):

diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -578,7 +578,7 @@ purple_conversation_close_logs(PurpleCon
 }
 
 void
-purple_conversation_write(PurpleConversation *conv, const char *who,
+_purple_conversation_write_common(PurpleConversation *conv, const char *who,
 						const char *message, PurpleMessageFlags flags,
 						time_t mtime)
 {
@@ -698,7 +698,7 @@ purple_conversation_write_message(Purple
 void purple_conversation_write_system_message(PurpleConversation *conv,
 	const gchar *message, PurpleMessageFlags flags)
 {
-	purple_conversation_write(conv, NULL, message,
+	_purple_conversation_write_common(conv, NULL, message,
 		flags | PURPLE_MESSAGE_SYSTEM, time(NULL));
 }
 
diff --git a/libpurple/conversation.h b/libpurple/conversation.h
--- a/libpurple/conversation.h
+++ b/libpurple/conversation.h
@@ -472,31 +472,6 @@ gboolean purple_conversation_is_logging(
 void purple_conversation_close_logs(PurpleConversation *conv);
 
 /**
- * purple_conversation_write:
- * @conv:    The conversation.
- * @who:     The user who sent the message.
- * @message: The message.
- * @flags:   The message flags.
- * @mtime:   The time the message was sent.
- *
- * Writes to a conversation window.
- *
- * This function should not be used to write IM or chat messages. Use
- * purple_conversation_write_message() instead. This function will
- * most likely call this anyway, but it may do it's own formatting,
- * sound playback, etc. depending on whether the conversation is a chat or an
- * IM.
- *
- * This can be used to write generic messages, such as "so and so closed
- * the conversation window."
- *
- * See purple_conversation_write_message().
- */
-void purple_conversation_write(PurpleConversation *conv, const char *who,
-		const char *message, PurpleMessageFlags flags,
-		time_t mtime);
-
-/**
  * purple_conversation_write_message:
  * @conv:    The conversation.
  * @who:     The user who sent the message.
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -372,7 +372,7 @@ im_conversation_write_message(PurpleConv
 	if (ops != NULL && ops->write_im != NULL)
 		ops->write_im(im, msg);
 	else {
-		purple_conversation_write(conv,
+		_purple_conversation_write_common(conv,
 			purple_message_get_author(msg),
 			purple_message_get_contents(msg),
 			purple_message_get_flags(msg),
@@ -841,7 +841,7 @@ chat_conversation_write_message(PurpleCo
 	if (ops != NULL && ops->write_chat != NULL)
 		ops->write_chat(PURPLE_CHAT_CONVERSATION(conv), msg);
 	else {
-		purple_conversation_write(conv,
+		_purple_conversation_write_common(conv,
 			purple_message_get_author(msg),
 			purple_message_get_contents(msg),
 			purple_message_get_flags(msg),
diff --git a/libpurple/internal.h b/libpurple/internal.h
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -399,4 +399,29 @@ void
 _purple_assert_connection_is_valid(PurpleConnection *gc,
 	const gchar *file, int line);
 
+/**
+ * _purple_conversation_write_common:
+ * @conv:    The conversation.
+ * @who:     The user who sent the message.
+ * @message: The message.
+ * @flags:   The message flags.
+ * @mtime:   The time the message was sent.
+ *
+ * Writes to a conversation window.
+ *
+ * This function should not be used to write IM or chat messages. Use
+ * purple_conversation_write_message() instead. This function will
+ * most likely call this anyway, but it may do it's own formatting,
+ * sound playback, etc. depending on whether the conversation is a chat or an
+ * IM.
+ *
+ * This can be used to write generic messages, such as "so and so closed
+ * the conversation window."
+ *
+ * See purple_conversation_write_message().
+ */
+void
+_purple_conversation_write_common(PurpleConversation *conv, const gchar *who,
+	const gchar *message, PurpleMessageFlags flags, time_t mtime);
+
 #endif /* _PURPLE_INTERNAL_H_ */



More information about the Commits mailing list