libalpm
Arch Linux Package Manager Library
|
00001 /* 00002 * graph.h - helpful graph structure and setup/teardown methods 00003 * 00004 * Copyright (c) 2007-2011 Pacman Development Team <pacman-dev@archlinux.org> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 #ifndef _ALPM_GRAPH_H 00020 #define _ALPM_GRAPH_H 00021 00022 #include <sys/types.h> /* off_t */ 00023 00024 #include "alpm_list.h" 00025 00026 typedef struct __alpm_graph_t { 00027 char state; /* 0: untouched, -1: entered, other: leaving time */ 00028 off_t weight; /* weight of the node */ 00029 void *data; 00030 struct __alpm_graph_t *parent; /* where did we come from? */ 00031 alpm_list_t *children; 00032 alpm_list_t *childptr; /* points to a child in children list */ 00033 } alpm_graph_t; 00034 00035 alpm_graph_t *_alpm_graph_new(void); 00036 void _alpm_graph_free(void *data); 00037 00038 #endif /* _ALPM_GRAPH_H */ 00039 00040 /* vim: set ts=2 sw=2 noet: */