1
/* rpackagecache.h - package cache wrapper
3
* Copyright (c) 2000, 2001 Conectiva S/A
5
* Author: Alfredo K. Kojima <kojima@conectiva.com.br>
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 2 of the
10
* License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24
#ifndef _RPACKAGECACHE_H_
25
#define _RPACKAGECACHE_H_
29
#include <apt-pkg/depcache.h>
30
#include <apt-pkg/sourcelist.h>
31
#include <apt-pkg/pkgsystem.h>
32
#include <apt-pkg/policy.h>
48
// speed up IsTrusted()
49
std::map<pkgCache::PkgFileIterator, pkgIndexFile*> _trust_cache;
54
inline pkgDepCache *deps() {
57
inline pkgSourceList *list() {
60
inline std::map<pkgCache::PkgFileIterator, pkgIndexFile*>& trust_cache() {
64
bool open(OpProgress &progress, bool lock=true);
66
vector<string> getPolicyArchives(bool filenames_only);
72
: _map(0), _cache(0), _policy(0), _dcache(0), _locked(false)
74
_list = new pkgSourceList();