/soc/2013/ankitkv/gobjectification: 5f7212d27557: Removed send f...
Ankit Vani
a at nevitus.org
Sat Jun 22 17:08:28 EDT 2013
Changeset: 5f7212d27557e21844e91f73bc07568e8ea94670
Author: Ankit Vani <a at nevitus.org>
Date: 2013-06-23 02:38 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/5f7212d27557
Description:
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
* Renamed send_with_flags() to send_message(). purple_conversation_send() redirects to send_message() with no flags.
* Renamed write() to write_message(). purple_conversation_write() will do generic messages.
diffstat:
libpurple/conversation.h | 51 ++++++++++++++++++++++++++----------------
libpurple/conversationtypes.h | 4 +-
2 files changed, 34 insertions(+), 21 deletions(-)
diffs (126 lines):
diff --git a/libpurple/conversation.h b/libpurple/conversation.h
--- a/libpurple/conversation.h
+++ b/libpurple/conversation.h
@@ -131,16 +131,17 @@ struct _PurpleConversationClass {
/*< private >*/
GObjectClass parent_class;
- /** @copydoc purple_conversation_write() TODO */
- void (*write)(PurpleConversation *conv, const char *who,
+ /** Writes a message to a chat or IM conversation. TODO
+ * @see purple_conversation_write_message()
+ */
+ void (*write_message)(PurpleConversation *conv, const char *who,
const char *message, PurpleConversationMessageFlags flags,
time_t mtime);
- /** @copydoc purple_conversation_send() TODO */
- void (*send)(PurpleConversation *conv, const char *message);
-
- /** @copydoc purple_conversation_send_with_flags() TODO */
- void (*send_with_flags)(PurpleConversation *conv,
+ /** Sends a message to a chat or IM conversation. TODO
+ * @see purple_conversation_send_message()
+ */
+ void (*send_message)(PurpleConversation *conv,
const char *message, PurpleConversationMessageFlags flags);
void (*_purple_reserved1)(void);
@@ -152,7 +153,7 @@ struct _PurpleConversationClass {
/**************************************************************************/
/** PurpleConversationUiOps */
/**************************************************************************/
-/**
+/** TODO decide if this is to be split up
* Conversation operations and events.
*
* Any UI representing a conversation must assign a filled-out
@@ -428,13 +429,14 @@ void purple_conversation_set_data(Purple
*/
gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key);
-/** TODO virtual and chainback
+/**
* Writes to a conversation window.
*
* This function should not be used to write IM or chat messages. Use
- * purple_im_conversation_write() and purple_chat_conversation_write() instead. Those functions will
- * most likely call this anyway, but they may do their own formatting,
- * sound playback, etc.
+ * 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."
@@ -445,20 +447,32 @@ gpointer purple_conversation_get_data(Pu
* @param flags The message flags.
* @param mtime The time the message was sent.
*
- * @see purple_im_conversation_write() TODO rectify this
- * @see purple_chat_conversation_write()
+ * @see purple_conversation_write_message()
*/
void purple_conversation_write(PurpleConversation *conv, const char *who,
const char *message, PurpleConversationMessageFlags flags,
time_t mtime);
/** TODO pure virtual
- * Sends a message to this conversation.
+ * Writes to a chat or an IM.
+ *
+ * @param conv The conversation.
+ * @param who The user who sent the message.
+ * @param message The message to write.
+ * @param flags The message flags.
+ * @param mtime The time the message was sent.
+ */
+void purple_conversation_write_message(PurpleConversation *conv,
+ const char *who, const char *message,
+ PurpleConversationMessageFlags flags, time_t mtime);
+
+/** TODO forward to send_message
+ * Sends a message to this conversation. This function calls
+ * purple_conversation_send_message() with no additional flags.
*
* @param conv The conversation.
* @param message The message to send.
*/
-/** @copydoc purple_conversation_send() TODO */
void purple_conversation_send(PurpleConversation *conv, const char *message);
/** TODO pure virtual
@@ -469,9 +483,8 @@ void purple_conversation_send(PurpleConv
* @param flags The PurpleConversationMessageFlags flags to use in addition to
* PURPLE_CONVERSATION_MESSAGE_SEND.
*/
-/** @copydoc purple_conversation_send_with_flags() TODO */
-void purple_conversation_send_with_flags(PurpleConversation *conv,
- const char *message, PurpleConversationMessageFlags flags);
+void purple_conversation_send_message(PurpleConversation *conv, const char *message,
+ PurpleConversationMessageFlags flags);
/**
Set the features as supported for the given conversation.
diff --git a/libpurple/conversationtypes.h b/libpurple/conversationtypes.h
--- a/libpurple/conversationtypes.h
+++ b/libpurple/conversationtypes.h
@@ -349,7 +349,7 @@ void purple_im_conversation_update_typin
const char *message, PurpleConversationMessageFlags flags,
time_t mtime);*/
-/** TODO override
+/** TODO write forward
* Sends a message to this IM conversation.
*
* @param im The IM.
@@ -514,7 +514,7 @@ int purple_chat_conversation_get_id(cons
const char *message, PurpleConversationMessageFlags flags,
time_t mtime);*/
-/** TODO override
+/** TODO write forward
* Sends a message to this chat conversation.
*
* @param chat The chat.
More information about the Commits
mailing list