Mercurial > pidgin
changeset 10548:1596ade00664
[gaim-migrate @ 11918]
Add functions for getting and setting the flags on a blist node.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 27 Jan 2005 05:24:26 +0000 |
parents | 82d6760ba000 |
children | 8bc7ba019e96 |
files | src/blist.c src/blist.h |
diffstat | 2 files changed, 35 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blist.c Thu Jan 27 03:48:25 2005 +0000 +++ b/src/blist.c Thu Jan 27 05:24:26 2005 +0000 @@ -2348,6 +2348,22 @@ } void +gaim_blist_node_set_flags(GaimBlistNode *node, GaimBlistNodeFlags flags) +{ + g_return_if_fail(node != NULL); + + node->flags = flags; +} + +GaimBlistNodeFlags +gaim_blist_node_get_flags(GaimBlistNode *node) +{ + g_return_val_if_fail(node != NULL, 0); + + return node->flags; +} + +void gaim_blist_node_set_bool(GaimBlistNode* node, const char *key, gboolean data) { GaimValue *value;
--- a/src/blist.h Thu Jan 27 03:48:25 2005 +0000 +++ b/src/blist.h Thu Jan 27 05:24:26 2005 +0000 @@ -842,6 +842,25 @@ */ void gaim_blist_node_remove_setting(GaimBlistNode *node, const char *key); +/** + * Set the flags for the given node. Setting a node's flags will overwrite + * the old flags, so if you want to save them, you must first call + * gaim_blist_node_get_flags and modify that appropriately. + * + * @param node The node on which to set the flags. + * @param flags The flags to set. This is a bitmask. + */ +void gaim_blist_node_set_flags(GaimBlistNode *node, GaimBlistNodeFlags flags); + +/** + * Get the current flags on a given node. + * + * @param node The node from which to get the flags. + * + * @return The flags on the node. This is a bitmask. + */ +GaimBlistNodeFlags gaim_blist_node_get_flags(GaimBlistNode *node); + /*@}*/