merged lp:~donkult/apt/experimental
[ntk/apt.git] / apt-inst / deb / dpkgdb.h
CommitLineData
b2e465d6
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3// $Id: dpkgdb.h,v 1.2 2001/02/20 07:03:17 jgg Exp $
4/* ######################################################################
5
6 DPKGv1 Data Base Implemenation
7
8 The DPKGv1 database is typically stored in /var/lib/dpkg/. For
9 DPKGv1 the 'meta' information is the contents of the .deb control.tar.gz
10 member prepended by the package name. The meta information is unpacked
11 in its temporary directory and then migrated into the main list dir
12 at a checkpoint.
13
14 Journaling is providing by syncronized file writes to the updates sub
15 directory.
16
17 ##################################################################### */
18 /*}}}*/
19#ifndef PKGLIB_DPKGDB_H
20#define PKGLIB_DPKGDB_H
21
b2e465d6
AL
22
23#include <apt-pkg/database.h>
24
472ff00e
DK
25#include <string>
26
27class DynamicMMap;
28class OpProgress;
29
b2e465d6
AL
30class debDpkgDB : public pkgDataBase
31{
32 protected:
8f3ba4e8
DK
33
34 std::string AdminDir;
b2e465d6
AL
35 DynamicMMap *CacheMap;
36 DynamicMMap *FileMap;
37 unsigned long DiverInode;
38 signed long DiverTime;
8f3ba4e8
DK
39
40 virtual bool InitMetaTmp(std::string &Dir);
b2e465d6
AL
41 bool ReadFList(OpProgress &Progress);
42 bool ReadDiversions();
43 bool ReadConfFiles();
44
45 public:
46
47 virtual bool ReadyFileList(OpProgress &Progress);
48 virtual bool ReadyPkgCache(OpProgress &Progress);
49 virtual bool LoadChanges();
50
51 debDpkgDB();
52 virtual ~debDpkgDB();
53};
54
55#endif