/soc/2013/ankitkv/gobjectification: a81a985c60f4: Merged soc.201...
Ankit Vani
a at nevitus.org
Mon Sep 30 18:05:10 EDT 2013
Changeset: a81a985c60f4b526b568a752428b3b1c561f5278
Author: Ankit Vani <a at nevitus.org>
Date: 2013-10-01 03:24 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/a81a985c60f4
Description:
Merged soc.2013.gobjectification branch
diffstat:
libpurple/account.c | 158 +++++++++++++++++-----------------
libpurple/blistnode.c | 4 +-
libpurple/blistnodetypes.c | 22 ++--
libpurple/buddylist.c | 40 ++++----
libpurple/cipher.c | 2 +-
libpurple/connection.c | 10 +-
libpurple/conversation.c | 28 +++---
libpurple/conversationtypes.c | 47 ++++-----
libpurple/hash.c | 43 +-------
libpurple/hash.h | 12 --
libpurple/plugins/perl/common/Hash.xs | 4 -
libpurple/presence.c | 16 +-
libpurple/roomlist.c | 12 +-
libpurple/status.c | 38 ++++----
libpurple/whiteboard.c | 8 +-
libpurple/xfer.c | 22 ++--
16 files changed, 210 insertions(+), 256 deletions(-)
diffs (truncated from 1847 to 300 lines):
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -146,7 +146,7 @@ purple_account_set_register_callback(Pur
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -158,7 +158,7 @@ static void
purple_account_register_got_password_cb(PurpleAccount *account,
const gchar *password, GError *error, gpointer data)
{
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
_purple_connection_new(account, TRUE, password);
}
@@ -166,7 +166,7 @@ purple_account_register_got_password_cb(
void
purple_account_register(PurpleAccount *account)
{
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
purple_debug_info("account", "Registering account %s\n",
purple_account_get_username(account));
@@ -193,7 +193,7 @@ purple_account_register_completed(Purple
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -206,7 +206,7 @@ purple_account_unregister(PurpleAccount
{
PurpleCallbackBundle *cbb;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
purple_debug_info("account", "Unregistering account %s\n",
purple_account_get_username(account));
@@ -308,7 +308,7 @@ purple_account_connect(PurpleAccount *ac
PurpleProtocol *protocol;
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
username = purple_account_get_username(account);
@@ -350,7 +350,7 @@ purple_account_disconnect(PurpleAccount
PurpleAccountPrivate *priv;
const char *username;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(!purple_account_is_disconnected(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -373,7 +373,7 @@ purple_account_is_disconnecting(const Pu
{
PurpleAccountPrivate *priv;
- g_return_val_if_fail(account != NULL, TRUE);
+ g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), TRUE);
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
return priv->disconnecting;
@@ -386,7 +386,7 @@ purple_account_notify_added(PurpleAccoun
{
PurpleAccountUiOps *ui_ops;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(remote_user != NULL);
ui_ops = purple_accounts_get_ui_ops();
@@ -402,7 +402,7 @@ purple_account_request_add(PurpleAccount
{
PurpleAccountUiOps *ui_ops;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(remote_user != NULL);
ui_ops = purple_accounts_get_ui_ops();
@@ -441,7 +441,7 @@ purple_account_request_close_with_accoun
{
GList *l, *l_next;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
for (l = handles; l != NULL; l = l_next) {
PurpleAccountRequestInfo *info = l->data;
@@ -516,7 +516,7 @@ purple_account_request_authorization(Pur
int plugin_return;
char *response = NULL;
- g_return_val_if_fail(account != NULL, NULL);
+ g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL);
g_return_val_if_fail(remote_user != NULL, NULL);
ui_ops = purple_accounts_get_ui_ops();
@@ -616,7 +616,7 @@ purple_account_request_change_password(P
PurpleProtocol *protocol = NULL;
char primary[256];
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(purple_account_is_connected(account));
gc = purple_account_get_connection(account);
@@ -679,7 +679,7 @@ purple_account_request_change_user_info(
PurpleConnection *gc;
char primary[256];
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(purple_account_is_connected(account));
gc = purple_account_get_connection(account);
@@ -704,7 +704,7 @@ purple_account_set_username(PurpleAccoun
PurpleBlistUiOps *blist_ops;
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -726,7 +726,7 @@ purple_account_set_password(PurpleAccoun
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -752,7 +752,7 @@ purple_account_set_private_alias(PurpleA
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -782,7 +782,7 @@ purple_account_set_user_info(PurpleAccou
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -796,7 +796,7 @@ void purple_account_set_buddy_icon_path(
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -811,7 +811,7 @@ purple_account_set_protocol_id(PurpleAcc
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(protocol_id != NULL);
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -827,7 +827,7 @@ purple_account_set_connection(PurpleAcco
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
priv->gc = gc;
@@ -838,7 +838,7 @@ purple_account_set_remember_password(Pur
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
priv->remember_pass = value;
@@ -849,7 +849,7 @@ purple_account_set_remember_password(Pur
void
purple_account_set_check_mail(PurpleAccount *account, gboolean value)
{
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
purple_account_set_bool(account, "check-mail", value);
}
@@ -862,7 +862,7 @@ purple_account_set_enabled(PurpleAccount
PurpleAccountPrivate *priv;
gboolean was_enabled = FALSE;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(ui != NULL);
was_enabled = purple_account_get_enabled(account, ui);
@@ -891,7 +891,7 @@ purple_account_set_proxy_info(PurpleAcco
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -908,7 +908,7 @@ purple_account_set_privacy_type(PurpleAc
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
priv->privacy_type = privacy_type;
@@ -919,7 +919,7 @@ purple_account_set_status_types(PurpleAc
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
@@ -961,7 +961,7 @@ purple_account_set_status_list(PurpleAcc
{
PurpleStatus *status;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(status_id != NULL);
status = purple_account_get_status(account, status_id);
@@ -1011,7 +1011,7 @@ purple_account_set_public_alias(PurpleAc
PurpleConnection *gc;
PurpleProtocol *protocol = NULL;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(purple_account_is_connected(account));
gc = purple_account_get_connection(account);
@@ -1049,7 +1049,7 @@ purple_account_get_public_alias(PurpleAc
PurpleConnection *gc;
PurpleProtocol *protocol = NULL;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(purple_account_is_connected(account));
gc = purple_account_get_connection(account);
@@ -1075,7 +1075,7 @@ purple_account_get_silence_suppression(c
void
purple_account_set_silence_suppression(PurpleAccount *account, gboolean value)
{
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
purple_account_set_bool(account, "silence-suppression", value);
}
@@ -1096,7 +1096,7 @@ purple_account_clear_settings(PurpleAcco
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
g_hash_table_destroy(priv->settings);
@@ -1110,7 +1110,7 @@ purple_account_remove_setting(PurpleAcco
{
PurpleAccountPrivate *priv;
- g_return_if_fail(account != NULL);
+ g_return_if_fail(PURPLE_IS_ACCOUNT(account));
g_return_if_fail(setting != NULL);
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
More information about the Commits
mailing list