/soc/2013/ankitkv/gobjectification: cb6e94789b5a: Moved declaera...
Ankit Vani
a at nevitus.org
Thu Dec 5 14:07:47 EST 2013
Changeset: cb6e94789b5ac67ea8ba48a81bb7416b823df7b0
Author: Ankit Vani <a at nevitus.org>
Date: 2013-12-06 00:36 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/cb6e94789b5a
Description:
Moved declaerations of shared private functions to internal.h
diffstat:
libpurple/account.c | 3 ---
libpurple/accounts.c | 3 ---
libpurple/blistnodetypes.c | 2 --
libpurple/buddylist.c | 2 --
libpurple/internal.h | 27 +++++++++++++++++++++++++++
libpurple/presence.c | 4 +---
libpurple/status.c | 4 +---
7 files changed, 29 insertions(+), 16 deletions(-)
diffs (134 lines):
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -138,9 +138,6 @@ static GObjectClass *parent_class = NUL
static GParamSpec *properties[PROP_LAST];
static GList *handles = NULL;
-void _purple_account_set_current_error(PurpleAccount *account,
- PurpleConnectionErrorInfo *new_err);
-
/***************
* Account API *
***************/
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -38,9 +38,6 @@ static GList *accounts = NULL;
static guint save_timer = 0;
static gboolean accounts_loaded = FALSE;
-void _purple_account_set_current_error(PurpleAccount *account,
- PurpleConnectionErrorInfo *new_err);
-
/*********************************************************************
* Writing to disk *
*********************************************************************/
diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -150,8 +150,6 @@ purple_strings_are_different(const char
((one == NULL || *one == '\0') && (two == NULL || *two == '\0')));
}
-PurpleBlistNode *_purple_blist_get_last_child(PurpleBlistNode *node);
-
/**************************************************************************/
/* Buddy API */
/**************************************************************************/
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -64,8 +64,6 @@ static GHashTable *groups_cache = NULL;
static guint save_timer = 0;
static gboolean blist_loaded = FALSE;
-PurpleBlistNode *_purple_blist_get_last_child(PurpleBlistNode *node);
-
/*********************************************************************
* Private utility functions *
*********************************************************************/
diff --git a/libpurple/internal.h b/libpurple/internal.h
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -159,6 +159,25 @@
#include "accounts.h"
#include "connection.h"
+/**
+ * Sets an error for an account.
+ *
+ * @param account The account to set the error for.
+ * @param new_err The #PurpleConnectionErrorInfo instance representing the
+ * error.
+ */
+void _purple_account_set_current_error(PurpleAccount *account,
+ PurpleConnectionErrorInfo *new_err);
+
+/**
+ * Returns the last child of a particular node.
+ *
+ * @param node The node whose last child is to be retrieved.
+ *
+ * @return The last child of the node.
+ */
+PurpleBlistNode *_purple_blist_get_last_child(PurpleBlistNode *node);
+
/* This is for the accounts code to notify the buddy icon code that
* it's done loading. We may want to replace this with a signal. */
void
@@ -235,4 +254,12 @@ void _purple_connection_add_active_chat(
void _purple_connection_remove_active_chat(PurpleConnection *gc,
PurpleChatConversation *chat);
+/**
+ * Returns the primitive scores array from status.c.
+ *
+ * @note This function should only be called by
+ * purple_buddy_presence_compute_score() in presence.c.
+ */
+int *_purple_statuses_get_primitive_scores(void);
+
#endif /* _PURPLE_INTERNAL_H_ */
diff --git a/libpurple/presence.c b/libpurple/presence.c
--- a/libpurple/presence.c
+++ b/libpurple/presence.c
@@ -102,8 +102,6 @@ static GParamSpec *properties[PRES_PROP_
static GParamSpec *ap_properties[ACPRES_PROP_LAST];
static GParamSpec *bp_properties[BUDPRES_PROP_LAST];
-int *_purple_get_primitive_scores(void);
-
/**************************************************************************
* PurplePresence API
**************************************************************************/
@@ -619,7 +617,7 @@ purple_buddy_presence_compute_score(cons
int score = 0;
PurplePresence *presence = PURPLE_PRESENCE(buddy_presence);
PurpleBuddy *b = purple_buddy_presence_get_buddy(buddy_presence);
- int *primitive_scores = _purple_get_primitive_scores();
+ int *primitive_scores = _purple_statuses_get_primitive_scores();
int offline_score = purple_prefs_get_int("/purple/status/scores/offline_msg");
int idle_score = purple_prefs_get_int("/purple/status/scores/idle");
diff --git a/libpurple/status.c b/libpurple/status.c
--- a/libpurple/status.c
+++ b/libpurple/status.c
@@ -121,8 +121,6 @@ static int primitive_scores[] =
#define SCORE_IDLE_TIME 10
#define SCORE_OFFLINE_MESSAGE 11
-int *_purple_get_primitive_scores(void);
-
/**************************************************************************
* PurpleStatusPrimitive API
**************************************************************************/
@@ -147,7 +145,7 @@ static struct PurpleStatusPrimitiveMap
};
int *
-_purple_get_primitive_scores(void)
+_purple_statuses_get_primitive_scores(void)
{
return primitive_scores;
}
More information about the Commits
mailing list