move defines for version to macros.h
[ntk/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>
14#include <apt-pkg/pkgcache.h>
15#include <apt-pkg/dirstream.h>
16
73688d27
DK
17#include <string>
18
3fc8f685
AL
19class DebFile : public pkgDirStream
20{
3fc8f685
AL
21 FileFd File;
22 unsigned long Size;
23 char *Control;
24 unsigned long ControlLen;
25
26public:
27 DebFile(const char *FileName);
28 ~DebFile();
29 bool DoItem(Item &I, int &fd);
30 bool Process(pkgDirStream::Item &I, const unsigned char *data,
31 unsigned long size, unsigned long pos);
32
33 bool Go();
34 bool ParseInfo();
35
73688d27 36 static std::string GetInstalledVer(const std::string &package);
3fc8f685 37
73688d27
DK
38 std::string Package;
39 std::string Version;
40 std::string DepVer, PreDepVer;
3fc8f685
AL
41 unsigned int DepOp, PreDepOp;
42
43 char *Config;
44 char *Template;
45
46 static pkgCache *Cache;
47 enum { None, IsControl, IsConfig, IsTemplate } Which;
48};
49
50#endif