/soc/2013/ankitkv/gobjectification: 7cf0bf5b9a40: Removed protoc...
Ankit Vani
a at nevitus.org
Sat Sep 7 12:16:18 EDT 2013
Changeset: 7cf0bf5b9a408b0adf241fc5359a31fc2d9216fc
Author: Ankit Vani <a at nevitus.org>
Date: 2013-09-07 18:07 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/7cf0bf5b9a40
Description:
Removed protocol data member from connection, roomlist, whiteboard and xfer
diffstat:
libpurple/connection.c | 23 -----------------------
libpurple/connection.h | 17 -----------------
libpurple/roomlist.c | 21 ---------------------
libpurple/roomlist.h | 19 -------------------
libpurple/whiteboard.c | 21 ---------------------
libpurple/whiteboard.h | 17 -----------------
libpurple/xfer.c | 24 ------------------------
libpurple/xfer.h | 17 -----------------
8 files changed, 0 insertions(+), 159 deletions(-)
diffs (281 lines):
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -63,9 +63,6 @@ struct _PurpleConnectionPrivate
GSList *active_chats; /**< A list of active chats
(#PurpleChatConversation structs). */
- void *proto_data; /**< Protocol-specific data.
- TODO Remove this, and use
- protocol-specific subclasses */
char *display_name; /**< How you appear to other people. */
guint keepalive; /**< Keep-alive. */
@@ -275,16 +272,6 @@ purple_connection_set_display_name(Purpl
priv->display_name = g_strdup(name);
}
-void
-purple_connection_set_protocol_data(PurpleConnection *gc, void *proto_data)
-{
- PurpleConnectionPrivate *priv = PURPLE_CONNECTION_GET_PRIVATE(gc);
-
- g_return_if_fail(priv != NULL);
-
- priv->proto_data = proto_data;
-}
-
PurpleConnectionState
purple_connection_get_state(const PurpleConnection *gc)
{
@@ -355,16 +342,6 @@ purple_connection_get_display_name(const
return priv->display_name;
}
-void *
-purple_connection_get_protocol_data(const PurpleConnection *gc)
-{
- PurpleConnectionPrivate *priv = PURPLE_CONNECTION_GET_PRIVATE(gc);
-
- g_return_val_if_fail(priv != NULL, NULL);
-
- return priv->proto_data;
-}
-
void
_purple_connection_add_active_chat(PurpleConnection *gc, PurpleChatConversation *chat)
{
diff --git a/libpurple/connection.h b/libpurple/connection.h
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -309,14 +309,6 @@ void purple_connection_set_account(Purpl
void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
/**
- * Sets the protocol data for a connection.
- *
- * @param connection The PurpleConnection.
- * @param proto_data The protocol data to set for the connection.
- */
-void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data);
-
-/**
* Returns the connection state.
*
* @param gc The connection.
@@ -388,15 +380,6 @@ GSList *purple_connection_get_active_cha
const char *purple_connection_get_display_name(const PurpleConnection *gc);
/**
- * Gets the protocol data from a connection.
- *
- * @param connection The PurpleConnection.
- *
- * @return The protocol data for the connection.
- */
-void *purple_connection_get_protocol_data(const PurpleConnection *connection);
-
-/**
* Updates the connection progress.
*
* @param gc The connection.
diff --git a/libpurple/roomlist.c b/libpurple/roomlist.c
--- a/libpurple/roomlist.c
+++ b/libpurple/roomlist.c
@@ -45,9 +45,6 @@ struct _PurpleRoomlistPrivate {
GList *fields; /**< The fields. */
GList *rooms; /**< The list of rooms. */
gboolean in_progress; /**< The listing is in progress. */
- gpointer proto_data; /** Protocol private data.
- TODO Remove this, and use
- protocol-specific subclasses */
};
/**
@@ -216,24 +213,6 @@ GList * purple_roomlist_get_fields(Purpl
return priv->fields;
}
-gpointer purple_roomlist_get_proto_data(PurpleRoomlist *list)
-{
- PurpleRoomlistPrivate *priv = PURPLE_ROOMLIST_GET_PRIVATE(list);
-
- g_return_val_if_fail(priv != NULL, NULL);
-
- return priv->proto_data;
-}
-
-void purple_roomlist_set_proto_data(PurpleRoomlist *list, gpointer proto_data)
-{
- PurpleRoomlistPrivate *priv = PURPLE_ROOMLIST_GET_PRIVATE(list);
-
- g_return_if_fail(priv != NULL);
-
- priv->proto_data = proto_data;
-}
-
gpointer purple_roomlist_get_ui_data(PurpleRoomlist *list)
{
g_return_val_if_fail(list != NULL, NULL);
diff --git a/libpurple/roomlist.h b/libpurple/roomlist.h
--- a/libpurple/roomlist.h
+++ b/libpurple/roomlist.h
@@ -245,25 +245,6 @@ void purple_roomlist_expand_category(Pur
GList *purple_roomlist_get_fields(PurpleRoomlist *roomlist);
/**
- * Get the protocol data associated with this room list.
- *
- * @param list The roomlist, which must not be @c NULL.
- *
- * @return The protocol data associated with this room list. This is a
- * convenience field provided to the protocol -- it is not
- * used the libpurple core.
- */
-gpointer purple_roomlist_get_proto_data(PurpleRoomlist *list);
-
-/**
- * Set the protocol data associated with this room list.
- *
- * @param list The roomlist, which must not be @c NULL.
- * @param proto_data A pointer to associate with this room list.
- */
-void purple_roomlist_set_proto_data(PurpleRoomlist *list, gpointer proto_data);
-
-/**
* Get the UI data associated with this room list.
*
* @param list The roomlist, which must not be @c NULL.
diff --git a/libpurple/whiteboard.c b/libpurple/whiteboard.c
--- a/libpurple/whiteboard.c
+++ b/libpurple/whiteboard.c
@@ -37,9 +37,6 @@ struct _PurpleWhiteboardPrivate
PurpleAccount *account; /**< Account associated with this session */
char *who; /**< Name of the remote user */
- void *proto_data; /**< Protocol specific data
- TODO Remove this, and use
- protocol-specific subclasses */
PurpleWhiteboardOps *protocol_ops; /**< Protocol operations */
GList *draw_list; /**< List of drawing elements/deltas to
@@ -264,24 +261,6 @@ void purple_whiteboard_set_draw_list(Pur
priv->draw_list = draw_list;
}
-void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data)
-{
- PurpleWhiteboardPrivate *priv = PURPLE_WHITEBOARD_GET_PRIVATE(wb);
-
- g_return_if_fail(priv != NULL);
-
- priv->proto_data = proto_data;
-}
-
-gpointer purple_whiteboard_get_protocol_data(const PurpleWhiteboard *wb)
-{
- PurpleWhiteboardPrivate *priv = PURPLE_WHITEBOARD_GET_PRIVATE(wb);
-
- g_return_val_if_fail(priv != NULL, NULL);
-
- return priv->proto_data;
-}
-
void purple_whiteboard_set_ui_data(PurpleWhiteboard *wb, gpointer ui_data)
{
g_return_if_fail(wb != NULL);
diff --git a/libpurple/whiteboard.h b/libpurple/whiteboard.h
--- a/libpurple/whiteboard.h
+++ b/libpurple/whiteboard.h
@@ -303,23 +303,6 @@ GList *purple_whiteboard_get_draw_list(c
void purple_whiteboard_set_draw_list(PurpleWhiteboard *wb, GList* draw_list);
/**
- * Sets the protocol data for a whiteboard.
- *
- * @param wb The whiteboard.
- * @param proto_data The protocol data to set for the whiteboard.
- */
-void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data);
-
-/**
- * Gets the protocol data for a whiteboard.
- *
- * @param wb The whiteboard.
- *
- * @return The protocol data for the whiteboard.
- */
-gpointer purple_whiteboard_get_protocol_data(const PurpleWhiteboard *wb);
-
-/**
* Set the UI data associated with this whiteboard.
*
* @param wb The whiteboard.
diff --git a/libpurple/xfer.c b/libpurple/xfer.c
--- a/libpurple/xfer.c
+++ b/libpurple/xfer.c
@@ -98,10 +98,6 @@ struct _PurpleXferPrivate {
PurpleXferUiOps *ui_ops; /**< UI-specific operations. */
- void *proto_data; /**< prpl-specific data.
- TODO Remove this, and use
- protocol-specific subclasses */
-
/*
* Used to moderate the file transfer when either the read/write ui_ops are
* set or fd is not set. In those cases, the UI/protocol call the respective
@@ -1885,26 +1881,6 @@ purple_xfer_prepare_thumbnail(PurpleXfer
}
}
-void
-purple_xfer_set_protocol_data(PurpleXfer *xfer, gpointer proto_data)
-{
- PurpleXferPrivate *priv = PURPLE_XFER_GET_PRIVATE(xfer);
-
- g_return_if_fail(priv != NULL);
-
- priv->proto_data = proto_data;
-}
-
-gpointer
-purple_xfer_get_protocol_data(const PurpleXfer *xfer)
-{
- PurpleXferPrivate *priv = PURPLE_XFER_GET_PRIVATE(xfer);
-
- g_return_val_if_fail(priv != NULL, NULL);
-
- return priv->proto_data;
-}
-
void purple_xfer_set_ui_data(PurpleXfer *xfer, gpointer ui_data)
{
g_return_if_fail(xfer != NULL);
diff --git a/libpurple/xfer.h b/libpurple/xfer.h
--- a/libpurple/xfer.h
+++ b/libpurple/xfer.h
@@ -760,23 +760,6 @@ void purple_xfer_set_thumbnail(PurpleXfe
void purple_xfer_prepare_thumbnail(PurpleXfer *xfer, const gchar *formats);
/**
- * Sets the protocol data for a file transfer.
- *
- * @param xfer The file transfer.
- * @param proto_data The protocol data to set for the file transfer.
- */
-void purple_xfer_set_protocol_data(PurpleXfer *xfer, gpointer proto_data);
-
-/**
- * Gets the protocol data for a file transfer.
- *
- * @param xfer The file transfer.
- *
- * @return The protocol data for the file transfer.
- */
-gpointer purple_xfer_get_protocol_data(const PurpleXfer *xfer);
-
-/**
* Set the UI data associated with this file transfer.
*
* @param xfer The file transfer.
More information about the Commits
mailing list