deps.h

Go to the documentation of this file.
00001 /*
00002  *  deps.h
00003  *
00004  *  Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
00005  *  Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
00006  *  Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
00007  *
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; either version 2 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU General Public License
00019  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 #ifndef _ALPM_DEPS_H
00022 #define _ALPM_DEPS_H
00023 
00024 #include "db.h"
00025 #include "sync.h"
00026 #include "package.h"
00027 #include "alpm.h"
00028 
00029 /* Dependency */
00030 struct __pmdepend_t {
00031     pmdepmod_t mod;
00032     char *name;
00033     char *version;
00034 };
00035 
00036 /* Missing dependency */
00037 struct __pmdepmissing_t {
00038     char *target;
00039     pmdepend_t *depend;
00040 };
00041 
00042 /* Graphs */
00043 struct __pmgraph_t {
00044     int state; /* 0: untouched, -1: entered, other: leaving time */
00045     void *data;
00046     struct __pmgraph_t *parent; /* where did we come from? */
00047     alpm_list_t *children;
00048     alpm_list_t *childptr; /* points to a child in children list */
00049 };
00050 
00051 
00052 void _alpm_dep_free(pmdepend_t *dep);
00053 pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep);
00054 pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepend_t *dep);
00055 void _alpm_depmiss_free(pmdepmissing_t *miss);
00056 alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
00057 void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);
00058 int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
00059                       alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t **data);
00060 
00061 #endif /* _ALPM_DEPS_H */
00062 
00063 /* vim: set ts=2 sw=2 noet: */

Generated on Mon Jan 14 23:53:40 2008 for libalpm by  doxygen 1.5.4