# HG changeset patch # User Mark Doliner # Date 1106803466 0 # Node ID 1596ade006641625ab885fad8d885171b802c409 # Parent 82d6760ba0007c8453b3086339f1abfcf60caa78 [gaim-migrate @ 11918] Add functions for getting and setting the flags on a blist node. committer: Tailor Script diff -r 82d6760ba000 -r 1596ade00664 src/blist.c --- 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; diff -r 82d6760ba000 -r 1596ade00664 src/blist.h --- 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); + /*@}*/