active_list.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* active_list.h - the opkg package management system
  2. Tick Chen <tick@openmoko.com>
  3. Copyright (C) 2008 Openmoko Inc.
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2, or (at
  7. your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. */
  13. #ifndef ACTIVE_LIST_H
  14. #define ACTIVE_LIST_H
  15. #include "list.h"
  16. #include "pkg.h"
  17. struct active_list {
  18. struct list_head node;
  19. struct list_head depend;
  20. struct active_list *depended;
  21. pkg_t *pkg;
  22. };
  23. struct active_list *active_list_head_new(void);
  24. void active_list_head_delete(struct active_list *);
  25. void active_list_init(struct active_list *ptr);
  26. void active_list_clear(struct active_list *head);
  27. void active_list_add(struct active_list *head, struct active_list *node);
  28. struct active_list *active_list_move_node(struct active_list *old_head,
  29. struct active_list *new_head,
  30. struct active_list *node);
  31. struct active_list *active_list_next(struct active_list *head,
  32. struct active_list *ptr);
  33. struct active_list *active_list_prev(struct active_list *head,
  34. struct active_list *ptr);
  35. #endif