Mercurial > pidgin
changeset 24333:d81104908a4e
use some additional preproc logic to avoid copying the structs directly into the implementation files
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Thu, 30 Oct 2008 03:34:09 +0000 |
parents | 882a1c4c11b4 |
children | 06a4e268b9f5 be7659f7b4d8 |
files | libpurple/blist.c libpurple/blist.h |
diffstat | 2 files changed, 4 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/blist.c Thu Oct 30 03:03:45 2008 +0000 +++ b/libpurple/blist.c Thu Oct 30 03:34:09 2008 +0000 @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ +#define PURPLE_BLIST_STRUCTS + #include "internal.h" #include "blist.h" #include "conversation.h" @@ -41,60 +43,6 @@ static guint save_timer = 0; static gboolean blist_loaded = FALSE; - -/****************************************************************************** - * Structs - *****************************************************************************/ -#ifdef PURPLE_HIDE_STRUCTS -struct _PurpleBlistNode { - PurpleBlistNodeType type; - PurpleBlistNode *prev; - PurpleBlistNode *next; - PurpleBlistNode *parent; - PurpleBlistNode *child; - GHashTable *settings; - void *ui_data; - PurpleBlistNodeFlags flags; -}; - -struct _PurpleBuddy { - PurpleBlistNode node; - char *name; - char *alias; - char *server_alias; - void *proto_data; - PurpleBuddyIcon *icon; - PurpleAccount *account; - PurplePresence *presence; -}; - -struct _PurpleContact { - PurpleBlistNode node; - char *alias; - int totalsize; - int currentsize; - int online; - PurpleBuddy *priority; - gboolean priority_valid; -}; - -struct _PurpleGroup { - PurpleBlistNode node; - char *name; - int totalsize; - int currentsize; - int online; -}; - -struct _PurpleChat { - PurpleBlistNode node; - char *alias; - GHashTable *components; - PurpleAccount *account; -}; - -#endif /* PURPLE_HIDE_STRUCTS */ - /********************************************************************* * Private utility functions * *********************************************************************/
--- a/libpurple/blist.h Thu Oct 30 03:03:45 2008 +0000 +++ b/libpurple/blist.h Thu Oct 30 03:34:09 2008 +0000 @@ -89,7 +89,7 @@ /* Data Structures */ /**************************************************************************/ -#ifndef PURPLE_HIDE_STRUCTS +#if !(defined PURPLE_HIDE_STRUCTS) || (defined PURPLE_BLIST_STRUCTS) /** * A Buddy list node. This can represent a group, a buddy, or anything else. @@ -156,7 +156,7 @@ PurpleAccount *account; /**< The account this chat is attached to */ }; -#endif /* PURPLE_HIDE_STRUCTS */ +#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */ /**