diff options
author | Gary Kramlich <grim@reaperworld.com> | 2008-10-30 03:34:09 +0000 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2008-10-30 03:34:09 +0000 |
commit | 153940174ebb2754cceef3501e660a83e0723cbc (patch) | |
tree | eb7ead7830789a2b5bfd2b1af85cf618c4667856 | |
parent | b3093d2ef1c1b6c09c854e7b1ca3a22793dde30f (diff) | |
download | pidgin-153940174ebb2754cceef3501e660a83e0723cbc.tar.gz |
use some additional preproc logic to avoid copying the structs directly into the implementation files
-rw-r--r-- | libpurple/blist.c | 56 | ||||
-rw-r--r-- | libpurple/blist.h | 4 |
2 files changed, 4 insertions, 56 deletions
diff --git a/libpurple/blist.c b/libpurple/blist.c index d42cd8db13..74b52e437b 100644 --- a/libpurple/blist.c +++ b/libpurple/blist.c @@ -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 PurpleBuddyList *purplebuddylist = NULL; 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 * *********************************************************************/ diff --git a/libpurple/blist.h b/libpurple/blist.h index 9e7b56bf10..51336d1fb9 100644 --- a/libpurple/blist.h +++ b/libpurple/blist.h @@ -89,7 +89,7 @@ typedef enum /* 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 @@ struct _PurpleChat { PurpleAccount *account; /**< The account this chat is attached to */ }; -#endif /* PURPLE_HIDE_STRUCTS */ +#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */ /** |