comparison src/blist.h @ 9285:7a8aa87164ae

[gaim-migrate @ 10088] Ok I'm done. This started out as shx's patch to make add/remove buddy/buddies take GaimBuddy and GaimGroup's in various places. I think his diff was like 2000 lines and mine is like 5000. I tried to clean up blist.c a bit and make it more uniform. There are some more g_return_if_fail() checks. Removed some code that was deprecated--it's probably been long enough. Removed some #include <multi.h>'s. Make blist.xml saving happen on a timer, like prefs.xml and accounts.xml. Sorry if this doesn't merge cleanly with whatever you're doing. People should really test this a lot. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 15 Jun 2004 02:37:27 +0000
parents 7ab20f829190
children eae7e049d639
comparison
equal deleted inserted replaced
9284:fe0291162312 9285:7a8aa87164ae
567 */ 567 */
568 GaimBuddy *gaim_find_buddy_in_group(GaimAccount *account, const char *name, 568 GaimBuddy *gaim_find_buddy_in_group(GaimAccount *account, const char *name,
569 GaimGroup *group); 569 GaimGroup *group);
570 570
571 /** 571 /**
572 * Finds all buddies struct given a screenname and an account 572 * Finds all GaimBuddy structs given a screenname and an account
573 * 573 *
574 * @param name The buddy's screenname 574 * @param name The buddy's screenname
575 * @param account The account this buddy belongs to 575 * @param account The account this buddy belongs to
576 * 576 *
577 * @return A GSList of buddies (which must be freed), or NULL if the buddy doesn't exist 577 * @return A GSList of buddies (which must be freed), or NULL if the buddy doesn't exist
675 /** @name Buddy list file management API */ 675 /** @name Buddy list file management API */
676 /****************************************************************************************/ 676 /****************************************************************************************/
677 677
678 /*@{*/ 678 /*@{*/
679 /** 679 /**
680 * Saves the buddy list to file 680 * Force an immediate write of the buddy list. Normally the buddy list is
681 */ 681 * saved automatically a few seconds after a change is made.
682 void gaim_blist_save(); 682 */
683 void gaim_blist_sync();
683 684
684 /** 685 /**
685 * Parses the toc-style buddy list used in older versions of Gaim and for SSI in toc.c 686 * Parses the toc-style buddy list used in older versions of Gaim and for SSI in toc.c
686 * 687 *
687 * @param account This is the account that the buddies and groups from config will get added to 688 * @param account This is the account that the buddies and groups from config will get added to
787 * 788 *
788 * @param node The node from which to remove the setting 789 * @param node The node from which to remove the setting
789 * @param key The name of the setting 790 * @param key The name of the setting
790 */ 791 */
791 void gaim_blist_node_remove_setting(GaimBlistNode *node, const char *key); 792 void gaim_blist_node_remove_setting(GaimBlistNode *node, const char *key);
792
793 /**
794 * Associates some data with the group in the xml buddy list
795 *
796 * @param g The group the data is associated with
797 * @param key The key used to retrieve the data
798 * @param value The data to set
799 * @deprecated Replaced by gaim_blist_node_set_bool(), gaim_blist_node_set_int()
800 * and gaim_blist_node_set_string() to enable types and consolidate functionality.
801 * This function is scheduled to be removed in the near future.
802 */
803 void gaim_group_set_setting(GaimGroup *g, const char *key, const char *value);
804
805 /**
806 * Retrieves data from the XML buddy list set by gaim_group_set_setting())
807 *
808 * @param g The group to retrieve data from
809 * @param key The key to retrieve the data with
810 * @return The associated data or NULL if no data is associated
811 * @deprecated Replaced by gaim_blist_node_get_bool(), gaim_blist_node_get_int()
812 * and gaim_blist_node_get_string() to enable types and consolidate functionality.
813 * This function is scheduled to be removed in the near future.
814 */
815 const char *gaim_group_get_setting(GaimGroup *g, const char *key);
816
817 /**
818 * Associates some data with the chat in the xml buddy list
819 *
820 * @param c The chat the data is associated with
821 * @param key The key used to retrieve the data
822 * @param value The data to set
823 * @deprecated Replaced by gaim_blist_node_set_bool(), gaim_blist_node_set_int()
824 * and gaim_blist_node_set_string() to enable types and consolidate functionality.
825 * This function is scheduled to be removed in the near future.
826 */
827 void gaim_chat_set_setting(GaimChat *c, const char *key, const char *value);
828
829 /**
830 * Retrieves data from the XML buddy list set by gaim_chat_set_setting())
831 *
832 * @param c The chat to retrieve data from
833 * @param key The key to retrieve the data with
834 *
835 * @return The associated data or NULL if no data is associated
836 * @deprecated Replaced by gaim_blist_node_get_bool(), gaim_blist_node_get_int()
837 * and gaim_blist_node_get_string() to enable types and consolidate functionality.
838 * This function is scheduled to be removed in the near future.
839 */
840 const char *gaim_chat_get_setting(GaimChat *c, const char *key);
841
842 /**
843 * Associates some data with the buddy in the xml buddy list
844 *
845 * @param b The buddy the data is associated with
846 * @param key The key used to retrieve the data
847 * @param value The data to set
848 * @deprecated Replaced by gaim_blist_node_set_bool(), gaim_blist_node_set_int()
849 * and gaim_blist_node_set_string() to enable types and consolidate functionality.
850 * This function is scheduled to be removed in the near future.
851 */
852 void gaim_buddy_set_setting(GaimBuddy *b, const char *key, const char *value);
853
854 /**
855 * Retrieves data from the XML buddy list set by gaim_buddy_set_setting())
856 *
857 * @param b The buddy to retrieve data from
858 * @param key The key to retrieve the data with
859 * @return The associated data or NULL if no data is associated
860 * @deprecated Replaced by gaim_blist_node_get_bool(), gaim_blist_node_get_int()
861 * and gaim_blist_node_get_string() to enable types and consolidate functionality.
862 * This function is scheduled to be removed in the near future.
863 */
864 const char *gaim_buddy_get_setting(GaimBuddy *b, const char *key);
865 793
866 /*@}*/ 794 /*@}*/
867 795
868 796
869 /** 797 /**