pidgin/pidgin

Parents a4eb488f88ae
Children c90f13e375a8
Hide purple_conversation_write, use purple_conversation_write_message or purple_conversation_write_system_message instead
--- a/libpurple/conversation.c Fri May 23 09:44:04 2014 +0200
+++ b/libpurple/conversation.c Fri May 23 10:30:53 2014 +0200
@@ -578,7 +578,7 @@
}
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 @@
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));
}
--- a/libpurple/conversation.h Fri May 23 09:44:04 2014 +0200
+++ b/libpurple/conversation.h Fri May 23 10:30:53 2014 +0200
@@ -472,31 +472,6 @@
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.
--- a/libpurple/conversationtypes.c Fri May 23 09:44:04 2014 +0200
+++ b/libpurple/conversationtypes.c Fri May 23 10:30:53 2014 +0200
@@ -372,7 +372,7 @@
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 @@
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),
--- a/libpurple/internal.h Fri May 23 09:44:04 2014 +0200
+++ b/libpurple/internal.h Fri May 23 10:30:53 2014 +0200
@@ -399,4 +399,29 @@
_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_ */