pidgin.next.minor: 4adceb08: Added purple_connection_set_protocol_dat...
grim at pidgin.im
grim at pidgin.im
Thu Oct 30 23:45:37 EDT 2008
-----------------------------------------------------------------
Revision: 4adceb089924503f9d143beefb3ca54898ec3cb2
Ancestor: c1a36ccb468ab97133b39665ce505c0dd9d00dd9
Author: grim at pidgin.im
Date: 2008-10-31T01:05:33
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/4adceb089924503f9d143beefb3ca54898ec3cb2
Modified files:
ChangeLog.API libpurple/connection.c libpurple/connection.h
ChangeLog:
Added purple_connection_set_protocol_data and purple_connection_get_protocol_data
Also update libpurple/connection.c to actually compile with the structs hidden
-------------- next part --------------
============================================================
--- ChangeLog.API 50fbd3c343e00830f00c01f45a079ec38718cc5d
+++ ChangeLog.API 4c7fb944f7777dd2d688d4f59b309e7b7aa2eb57
@@ -5,6 +5,8 @@ version 2.6.0 (??/??/????):
Added:
* purple_buddy_get_protocol_data
* purple_buddy_set_protocol_data
+ * purple_connection_get_protocol_data
+ * purple_connection_set_protocol_data
version 2.5.0 (08/18/2008):
libpurple:
============================================================
--- libpurple/connection.c 99d100199ff71455d6a80af4dbfb7226e5ae2fb1
+++ libpurple/connection.c 669666ca9463a2738fd7fee8e14951e781eeb555
@@ -266,7 +266,7 @@ purple_connection_destroy(PurpleConnecti
buddies = purple_find_buddies(account, NULL);
while (buddies != NULL) {
PurpleBuddy *buddy = buddies->data;
- buddy->proto_data = NULL;
+ purple_buddy_set_protocol_data(buddy, NULL);
buddies = g_slist_delete_link(buddies, buddies);
}
@@ -408,6 +408,13 @@ purple_connection_set_display_name(Purpl
gc->display_name = g_strdup(name);
}
+void
+purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data) {
+ g_return_if_fail(connection != NULL);
+
+ connection->proto_data = proto_data;
+}
+
PurpleConnectionState
purple_connection_get_state(const PurpleConnection *gc)
{
@@ -448,6 +455,13 @@ purple_connection_get_display_name(const
return gc->display_name;
}
+void *
+purple_connection_get_protocol_data(const PurpleConnection *connection) {
+ g_return_val_if_fail(connection != NULL, NULL);
+
+ return connection->proto_data;
+}
+
void
purple_connection_update_progress(PurpleConnection *gc, const char *text,
size_t step, size_t count)
============================================================
--- libpurple/connection.h 1bedab3e80682d43f51c28e7c6893169e597662a
+++ libpurple/connection.h 71f07ec8d8e9a3cc392545a7fe8cc3b9623dbb42
@@ -354,6 +354,14 @@ void purple_connection_set_display_name(
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.
@@ -408,6 +416,15 @@ const char *purple_connection_get_displa
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.
More information about the Commits
mailing list