int irc_upgrade_save () { int rc; struct t_upgrade_file *upgrade_file; upgrade_file = weechat_upgrade_new (IRC_UPGRADE_FILENAME, 1); if (!upgrade_file) return 0; rc = irc_upgrade_save_all_data (upgrade_file); weechat_upgrade_close (upgrade_file); return rc; }
int xfer_upgrade_save () { int rc; struct t_upgrade_file *upgrade_file; upgrade_file = weechat_upgrade_new (XFER_UPGRADE_FILENAME, 1); if (!upgrade_file) return 0; rc = xfer_upgrade_save_xfers (upgrade_file); weechat_upgrade_close (upgrade_file); return rc; }
int xfer_upgrade_load () { int rc; struct t_upgrade_file *upgrade_file; xfer_upgrade_set_buffer_callbacks (); upgrade_file = weechat_upgrade_new (XFER_UPGRADE_FILENAME, 0); if (!upgrade_file) return 0; rc = weechat_upgrade_read (upgrade_file, &xfer_upgrade_read_cb, NULL); weechat_upgrade_close (upgrade_file); return rc; }
int relay_upgrade_save () { int rc; struct t_upgrade_file *upgrade_file; upgrade_file = weechat_upgrade_new (RELAY_UPGRADE_FILENAME, NULL, NULL, NULL); if (!upgrade_file) return 0; rc = relay_upgrade_save_all_data (upgrade_file); weechat_upgrade_close (upgrade_file); return rc; }
int irc_upgrade_load () { int rc; struct t_upgrade_file *upgrade_file; irc_upgrade_set_buffer_callbacks (); upgrade_file = weechat_upgrade_new (IRC_UPGRADE_FILENAME, &irc_upgrade_read_cb, NULL, NULL); if (!upgrade_file) return 0; rc = weechat_upgrade_read (upgrade_file); weechat_upgrade_close (upgrade_file); return rc; }