]> git.saurik.com Git - apt.git/blame - cmdline/apt-extracttemplates.h
merge with lp:~mvo/apt/debian-sid to get 0.7.25.1 and my changes back
[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
17class DebFile : public pkgDirStream
18{
3fc8f685
AL
19 FileFd File;
20 unsigned long Size;
21 char *Control;
22 unsigned long ControlLen;
23
24public:
25 DebFile(const char *FileName);
26 ~DebFile();
27 bool DoItem(Item &I, int &fd);
28 bool Process(pkgDirStream::Item &I, const unsigned char *data,
29 unsigned long size, unsigned long pos);
30
31 bool Go();
32 bool ParseInfo();
33
7e726255 34 static string GetInstalledVer(const string &package);
3fc8f685 35
234edfd0
AL
36 string Package;
37 string Version;
38 string DepVer, PreDepVer;
3fc8f685
AL
39 unsigned int DepOp, PreDepOp;
40
41 char *Config;
42 char *Template;
43
44 static pkgCache *Cache;
45 enum { None, IsControl, IsConfig, IsTemplate } Which;
46};
47
48#endif