2 * Copyright (c) 2001, Robert Collins.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
16 #ifndef SETUP_PACKAGE_DB_H
17 #define SETUP_PACKAGE_DB_H
19 /* required to parse this file */
25 class PackageSpecification
;
32 extern PackageDBActions chosen_db_task
;
35 typedef std::vector
<packagemeta
*>::iterator PackageDBConnectedIterator
;
44 packagemeta
* findBinary (PackageSpecification
const &) const;
45 packagemeta
* findSource (PackageSpecification
const &) const;
46 PackageDBConnectedIterator
connectedBegin();
47 PackageDBConnectedIterator
connectedEnd();
48 void fillMissingCategory();
51 /* all seen binary packages */
52 static std::vector
< packagemeta
*> packages
;
53 /* all seen source packages */
54 static std::vector
<packagemeta
*> sourcePackages
;
55 /* all seen categories */
56 typedef std::map
<std::string
, std::vector
<packagemeta
*>, casecompare_lt_op
> categoriesType
;
57 static categoriesType categories
;
58 static PackageDBActions task
;
60 static int installeddbread
; /* do we have to reread this */
61 friend class ConnectedLoopFinder
;
62 static std::vector
<packagemeta
*> dependencyOrderedPackages
;
65 #endif /* SETUP_PACKAGE_DB_H */