summaryrefslogtreecommitdiff
path: root/apt-inst/deb/dpkgdb.h
blob: f28563a934133af66a4b542b44285bbb464c74ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: dpkgdb.h,v 1.2 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################

   DPKGv1 Data Base Implemenation
   
   The DPKGv1 database is typically stored in /var/lib/dpkg/. For 
   DPKGv1 the 'meta' information is the contents of the .deb control.tar.gz
   member prepended by the package name. The meta information is unpacked
   in its temporary directory and then migrated into the main list dir
   at a checkpoint.
   
   Journaling is providing by syncronized file writes to the updates sub
   directory.

   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_DPKGDB_H
#define PKGLIB_DPKGDB_H


#include <apt-pkg/database.h>

#include <string>

class DynamicMMap;
class OpProgress;

class debDpkgDB : public pkgDataBase
{
   protected:

   std::string AdminDir;
   DynamicMMap *CacheMap;
   DynamicMMap *FileMap;
   unsigned long DiverInode;
   signed long DiverTime;

   virtual bool InitMetaTmp(std::string &Dir);
   bool ReadFList(OpProgress &Progress);
   bool ReadDiversions();
   bool ReadConfFiles();
      
   public:

   virtual bool ReadyFileList(OpProgress &Progress);
   virtual bool ReadyPkgCache(OpProgress &Progress);
   virtual bool LoadChanges();
   
   debDpkgDB();
   virtual ~debDpkgDB();
};

#endif