diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-09 19:05:55 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-09 19:05:55 +0100 |
commit | 7aadd714313ba3e966720e7565f72118b97bd551 (patch) | |
tree | e9ae885742564d381504b0c05f5f8a702b53ac56 /protocols/bee.h | |
parent | 9ac3ed11de72046c318398481603c6680af37cf2 (diff) |
Keep track of contact groups in a slightly more efficient way.
Diffstat (limited to 'protocols/bee.h')
-rw-r--r-- | protocols/bee.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/protocols/bee.h b/protocols/bee.h index b8fee2ae..100593f9 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -34,6 +34,7 @@ typedef struct bee struct set *set; GSList *users; + GSList *groups; struct account *accounts; /* TODO(wilmer): Use GSList here too? */ /* Symbolic, to refer to the local user (who has no real bee_user @@ -59,7 +60,7 @@ typedef struct bee_user struct im_connection *ic; char *handle; char *fullname; - char *group; + struct bee_group *group; bee_user_flags_t flags; char *status; @@ -69,6 +70,12 @@ typedef struct bee_user void *ui_data; } bee_user_t; +typedef struct bee_group +{ + char *key; + char *name; +} bee_group_t; + typedef struct bee_ui_funcs { gboolean (*user_new)( bee_t *bee, struct bee_user *bu ); @@ -103,6 +110,8 @@ bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *hand int bee_user_free( bee_t *bee, bee_user_t *bu ); bee_user_t *bee_user_by_handle( bee_t *bee, struct im_connection *ic, const char *handle ); int bee_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, int flags ); +bee_group_t *bee_group_by_name( bee_t *bee, const char *name, gboolean creat ); +void bee_group_free( bee_t *bee ); /* Callbacks from IM modules to core: */ /* Buddy activity */ |