summaryrefslogtreecommitdiff
path: root/libpurple
diff options
context:
space:
mode:
authorWill Thompson <resiak@pidgin.im>2007-10-28 16:32:37 +0000
committerWill Thompson <resiak@pidgin.im>2007-10-28 16:32:37 +0000
commitc4bceaf81973b0cfe063a146d47c81dd540268ec (patch)
treedb4ce39399ae33c32d89642cd8da240851062513 /libpurple
parent7394fa38207fb64939d725d4b4773e4c104fe14c (diff)
downloadpidgin-c4bceaf81973b0cfe063a146d47c81dd540268ec.tar.gz
PurpleConnectionErrorPair is a better name for struct { PurpleConnectionError;
const char *desc } than PurpleAccountCurrentError.
Diffstat (limited to 'libpurple')
-rw-r--r--libpurple/account.c12
-rw-r--r--libpurple/account.h11
-rw-r--r--libpurple/connection.h9
3 files changed, 16 insertions, 16 deletions
diff --git a/libpurple/account.c b/libpurple/account.c
index 488a2441bf..3e1beb6749 100644
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -43,7 +43,7 @@
typedef struct
{
- PurpleAccountCurrentError *current_error;
+ PurpleConnectionErrorPair *current_error;
} PurpleAccountPrivate;
#define PURPLE_ACCOUNT_GET_PRIVATE(account) \
@@ -2236,7 +2236,7 @@ static void
clear_current_error(PurpleAccount *account)
{
PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
- PurpleAccountCurrentError *old;
+ PurpleConnectionErrorPair *old;
if (priv->current_error)
{
@@ -2266,10 +2266,10 @@ connection_error_cb(PurpleConnection *gc,
{
PurpleAccount *account = purple_connection_get_account(gc);
PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
- PurpleAccountCurrentError *old = priv->current_error;
+ PurpleConnectionErrorPair *old = priv->current_error;
- priv->current_error = g_new0(PurpleAccountCurrentError, 1);
- priv->current_error->reason = err;
+ priv->current_error = g_new0(PurpleConnectionErrorPair, 1);
+ priv->current_error->type = err;
priv->current_error->description = desc;
purple_signal_emit(purple_accounts_get_handle(),
@@ -2278,7 +2278,7 @@ connection_error_cb(PurpleConnection *gc,
g_free(old);
}
-const PurpleAccountCurrentError *
+const PurpleConnectionErrorPair *
purple_account_get_current_error(PurpleAccount *account)
{
PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
diff --git a/libpurple/account.h b/libpurple/account.h
index 32ebcefc63..e6448dc7d6 100644
--- a/libpurple/account.h
+++ b/libpurple/account.h
@@ -144,15 +144,6 @@ struct _PurpleAccount
gpointer priv; /**< Pointer to opaque private data. */
};
-/** The error most recently encountered on an account. */
-typedef struct
-{
- /** The type of error. */
- PurpleConnectionError reason;
- /** A localised, human-readable description of the error. */
- const char *description;
-} PurpleAccountCurrentError;
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -912,7 +903,7 @@ gboolean purple_account_supports_offline_message(PurpleAccount *account, PurpleB
* @constreturn The type of error and a human-readable description of the
* current error, or @c NULL if there is no current error.
*/
-const PurpleAccountCurrentError *purple_account_get_current_error(PurpleAccount *account);
+const PurpleConnectionErrorPair *purple_account_get_current_error(PurpleAccount *account);
/*@}*/
diff --git a/libpurple/connection.h b/libpurple/connection.h
index 831789d014..7f8436acb2 100644
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -126,6 +126,15 @@ typedef enum
PURPLE_CONNECTION_ERROR_OTHER_ERROR = 15
} PurpleConnectionError;
+/** Holds the type of an error along with its description. */
+typedef struct
+{
+ /** The type of error. */
+ PurpleConnectionError type;
+ /** A localised, human-readable description of the error. */
+ const char *description;
+} PurpleConnectionErrorPair;
+
#include <time.h>
#include "account.h"