]> git.saurik.com Git - apt.git/blame - cmdline/apt-extracttemplates.h
Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into debian/sid
[apt.git] / cmdline / apt-extracttemplates.h
CommitLineData
234edfd0
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
7e726255 3// $Id: apt-extracttemplates.h,v 1.2 2001/02/27 04:26:03 jgg Exp $
234edfd0
AL
4/* ######################################################################
5
6 apt-extracttemplate - tool to extract template and config data
7
8 ##################################################################### */
9 /*}}}*/
10#ifndef _APTEXTRACTTEMPLATE_H_
11#define _APTEXTRACTTEMPLATE_H_
3fc8f685
AL
12
13#include <apt-pkg/fileutl.h>
3fc8f685
AL
14#include <apt-pkg/dirstream.h>
15
73688d27
DK
16#include <string>
17
453b82a3
DK
18class pkgCache;
19
3fc8f685
AL
20class DebFile : public pkgDirStream
21{
3fc8f685
AL
22 FileFd File;
23 unsigned long Size;
24 char *Control;
25 unsigned long ControlLen;
26
27public:
28 DebFile(const char *FileName);
29 ~DebFile();
30 bool DoItem(Item &I, int &fd);
31 bool Process(pkgDirStream::Item &I, const unsigned char *data,
32 unsigned long size, unsigned long pos);
33
34 bool Go();
35 bool ParseInfo();
36
73688d27 37 static std::string GetInstalledVer(const std::string &package);
3fc8f685 38
73688d27
DK
39 std::string Package;
40 std::string Version;
41 std::string DepVer, PreDepVer;
3fc8f685
AL
42 unsigned int DepOp, PreDepOp;
43
44 char *Config;
45 char *Template;
46
47 static pkgCache *Cache;
48 enum { None, IsControl, IsConfig, IsTemplate } Which;
49};
50
51#endif