d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenstruct master_instance_list *master_instance_list_init(const char *path);
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenvoid master_instance_list_deinit(struct master_instance_list **list);
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen/* Add/update last_used timestamp for an instance. Returns 0 if ok,
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen -1 if I/O error. */
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenint master_instance_list_update(struct master_instance_list *list,
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen/* Set instance's name. Returns 1 if ok, 0 if name was already used for
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen another instance (base_dir) or -1 if I/O error. */
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenint master_instance_list_set_name(struct master_instance_list *list,
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen/* Remove instance. Returns 1 if ok, 0 if it didn't exist or -1 if I/O error. */
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenint master_instance_list_remove(struct master_instance_list *list,
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen/* Find instance by its name. */
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenmaster_instance_list_find_by_name(struct master_instance_list *list,
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen const char *name);
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainen/* Iterate through existing instances. */
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenmaster_instance_list_iterate_init(struct master_instance_list *list);
d47a87c927ca77e780480f4eaf575511698d42c8Timo Sirainenmaster_instance_iterate_list_next(struct master_instance_list_iter *iter);