# HG changeset patch
# Node ID 655f07105c3e1f12599ac406e3f2fdf5e0e24c75
# Parent  bd76f53bd582563562ba2def7b77c2aed51a6d54
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -75,9 +75,6 @@
 
 static GParamSpec *properties[N_PROPERTIES] = {NULL, };
 
-static GList *connections = NULL;
-static GList *connections_connected = NULL;
-
 static int connections_handle;
 
 G_DEFINE_TYPE_WITH_PRIVATE(PurpleConnection, purple_connection, G_TYPE_OBJECT)
@@ -115,8 +112,6 @@
 	if(priv->state == PURPLE_CONNECTION_STATE_CONNECTED) {
 		PurplePresence *presence;
 		GDateTime *timestamp = NULL;
-		gboolean emit_online = FALSE;
-		gpointer handle = NULL;
 
 		presence = purple_account_get_presence(priv->account);
 
@@ -124,23 +119,6 @@
 		timestamp = g_date_time_new_now_utc();
 		purple_presence_set_login_time(presence, timestamp);
 		g_date_time_unref(timestamp);
-
-		handle = purple_connections_get_handle();
-		purple_signal_emit(handle, "signed-on", connection);
-
-		/* check if connections_connected is NULL, if so we need to emit the
-		 * online signal.
-		 */
-		if(connections_connected == NULL) {
-			emit_online = TRUE;
-		}
-
-		connections_connected = g_list_append(connections_connected,
-		                                      connection);
-
-		if(emit_online) {
-			purple_signal_emit(handle, "online");
-		}
 	}
 
 	g_object_notify_by_pspec(G_OBJECT(connection), properties[PROP_STATE]);
@@ -509,7 +487,6 @@
 	priv->cancellable = g_cancellable_new();
 
 	purple_connection_set_state(connection, PURPLE_CONNECTION_STATE_CONNECTING);
-	connections = g_list_append(connections, connection);
 }
 
 static void
@@ -528,9 +505,6 @@
 
 		g_free(uuid);
 	}
-
-	purple_signal_emit(purple_connections_get_handle(), "signing-on",
-	                   connection);
 }
 
 static void
@@ -702,7 +676,6 @@
 	PurpleConnectionClass *klass = NULL;
 	PurpleConnectionPrivate *priv = NULL;
 	gboolean ret = TRUE;
-	gpointer handle = NULL;
 
 	g_return_val_if_fail(PURPLE_IS_CONNECTION(connection), FALSE);
 
@@ -712,12 +685,9 @@
 
 	priv = purple_connection_get_instance_private(connection);
 
-	handle = purple_connections_get_handle();
-
 	purple_debug_info("connection", "Disconnecting connection %p", connection);
 	purple_connection_set_state(connection,
 	                            PURPLE_CONNECTION_STATE_DISCONNECTING);
-	purple_signal_emit(handle, "signing-off", connection);
 
 	/* Dispatch to the connection's disconnect method. */
 	klass = PURPLE_CONNECTION_GET_CLASS(connection);
@@ -725,22 +695,12 @@
 		ret = klass->disconnect(connection, error);
 	}
 
-	/* Do the rest of our cleanup. */
-	connections = g_list_remove(connections, connection);
-
 	purple_connection_set_state(connection,
 	                            PURPLE_CONNECTION_STATE_DISCONNECTED);
 
-	purple_signal_emit(handle, "signed-off", connection);
-
 	purple_account_request_close_with_account(priv->account);
 	purple_request_close_with_handle(connection);
 
-	connections_connected = g_list_remove(connections_connected, connection);
-	if(connections_connected == NULL) {
-		purple_signal_emit(handle, "offline");
-	}
-
 	purple_debug_info("connection", "Destroying connection %p", connection);
 
 	return ret;
@@ -760,59 +720,10 @@
 /**************************************************************************
  * Connections API
  **************************************************************************/
-
-void
-purple_connections_disconnect_all(void) {
-	GList *l;
-
-	while((l = purple_connections_get_all()) != NULL) {
-		PurpleConnection *connection = l->data;
-		PurpleConnectionPrivate *priv = NULL;
-
-		priv = purple_connection_get_instance_private(connection);
-
-		priv->wants_to_die = TRUE;
-
-		purple_account_disconnect(priv->account);
-	}
-}
-
-GList *
-purple_connections_get_all(void) {
-	return connections;
-}
-
-gboolean
-purple_connections_is_online(void) {
-	return (connections_connected != NULL);
-}
-
 void
 purple_connections_init(void) {
 	void *handle = purple_connections_get_handle();
 
-	purple_signal_register(handle, "online", purple_marshal_VOID, G_TYPE_NONE,
-	                       0);
-
-	purple_signal_register(handle, "offline", purple_marshal_VOID, G_TYPE_NONE,
-	                       0);
-
-	purple_signal_register(handle, "signing-on",
-						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
-						 PURPLE_TYPE_CONNECTION);
-
-	purple_signal_register(handle, "signed-on",
-						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
-						 PURPLE_TYPE_CONNECTION);
-
-	purple_signal_register(handle, "signing-off",
-						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
-						 PURPLE_TYPE_CONNECTION);
-
-	purple_signal_register(handle, "signed-off",
-						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
-						 PURPLE_TYPE_CONNECTION);
-
 	purple_signal_register(handle, "connection-error",
 	                       purple_marshal_VOID__POINTER_INT_POINTER,
 	                       G_TYPE_NONE, 3, PURPLE_TYPE_CONNECTION,
diff --git a/libpurple/connection.h b/libpurple/connection.h
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -345,48 +345,6 @@
 gboolean purple_connection_error_is_fatal(PurpleConnectionError reason);
 
 /**************************************************************************/
-/* Connections API                                                        */
-/**************************************************************************/
-
-/**
- * purple_connections_disconnect_all:
- *
- * Disconnects from all connections.
- *
- * Since: 2.0
- *
- * Deprecated: 3.0
- */
-PURPLE_DEPRECATED_FOR(purple_account_manager_set_online)
-void purple_connections_disconnect_all(void);
-
-/**
- * purple_connections_get_all:
- *
- * Returns a list of all active connections.  This does not
- * include connections that are in the process of connecting.
- *
- * Returns: (element-type PurpleConnection) (transfer none): A list of all
- *          active connections.
- *
- * Since: 2.0
- */
-PURPLE_AVAILABLE_IN_ALL
-GList *purple_connections_get_all(void);
-
-/**
- * purple_connections_is_online:
- *
- * Checks if at least one account is online.
- *
- * Returns: %TRUE if at least one account is online.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-gboolean purple_connections_is_online(void);
-
-/**************************************************************************/
 /* Connections Subsystem                                                  */
 /**************************************************************************/
 
diff --git a/libpurple/reference/signals_connection.md b/libpurple/reference/signals_connection.md
--- a/libpurple/reference/signals_connection.md
+++ b/libpurple/reference/signals_connection.md
@@ -5,120 +5,10 @@
 
 ### Signal List
 
-* [online](#online)
-* [offline](#offline)
-* [signing-on](#signing-on)
-* [signed-on](#signed-on)
-* [signing-off](#signing-off)
-* [signed-off](#signed-off)
 * [connection-error](#connection-error)
 
 ### Signal Details
 
-#### online
-
-```c
-void user_function(gpointer user_data);
-```
-
-Emitted when the first connection has connected when all connections were
-previously not connected.
-
-**Parameters:**
-
-**user_data**
-: user data set when the signal handler was connected.
-
-----
-
-#### offline
-
-```c
-void user_function(gpointer user_data);
-```
-
-Emitted when the last connected connection has disconnected.
-
-
-**Parameters:**
-
-**user_data**
-: user data set when the signal handler was connected.
-
-----
-
-#### signing-on
-
-```c
-void user_function(PurpleConnection *gc, gpointer user_data);
-```
-
-Emitted when a connection is about to sign on.
-
-**Parameters:**
-
-**gc**
-: The connection that is about to sign on.
-
-**user_data**
-: user data set when the signal handler was connected.
-
-----
-
-#### signed-on
-
-```c
-void user_function(PurpleConnection *gc, gpointer user_data);
-```
-
-Emitted when a connection has signed on.
-
-**Parameters:**
-
-**gc**
-: The connection that has signed on.
-
-**user_data**
-: user data set when the signal handler was connected.
-
-----
-
-#### signing-off
-
-```c
-void user_function(PurpleConnection *gc, gpointer user_data);
-```
-
-Emitted when a connection is about to sign off.
-
-**Parameters:**
-
-**gc**
-: The connection that is about to sign off.
-
-**user_data**
-: user data set when the signal handler was connected.
-
-----
-
-#### signed-off
-
-```c
-void user_function(PurpleConnection *gc, gpointer user_data);
-```
-
-Emitted when a connection has signed off.
-
-**Parameters:**
-
-**gc**
-: The connection that has signed off.
-
-**user_data**
-: user data set when the signal handler was connected.
-
-----
-
 #### connection-error
 
 ```c
