+/* append a fav with an existing key (from xml file only) */
+gboolean
+da_archive_append(Archive *item)
+{
+ GLOBALS->arc_list = g_list_append(GLOBALS->arc_list, item);
+ return TRUE;
+}
+
+
+gboolean
+da_archive_append_new(Archive *item)
+{
+ item->key = da_archive_get_max_key() + 1;
+ GLOBALS->arc_list = g_list_append(GLOBALS->arc_list, item);
+ return TRUE;
+}
+
+
+guint32
+da_archive_get_max_key(void)
+{
+GList *tmplist = g_list_first(GLOBALS->arc_list);
+guint32 max_key = 0;
+
+ while (tmplist != NULL)
+ {
+ Archive *item = tmplist->data;
+
+ max_key = MAX(item->key, max_key);
+ tmplist = g_list_next(tmplist);
+ }
+
+ return max_key;
+}
+
+
+Archive *
+da_archive_get(guint32 key)
+{
+GList *tmplist;
+Archive *retval = NULL;
+
+ tmplist = g_list_first(GLOBALS->arc_list);
+ while (tmplist != NULL)
+ {
+ Archive *item = tmplist->data;
+
+ if(item->key == key)
+ {
+ retval = item;
+ break;
+ }
+ tmplist = g_list_next(tmplist);
+ }
+ return retval;
+}
+
+