From 234edfd074bd8a356494d5d8df8774cf1b096fd8 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:56:45 +0000 Subject: apt-extracttemplates cleanup Author: tausq Date: 2001-02-25 04:53:59 GMT apt-extracttemplates cleanup --- cmdline/apt-extracttemplates.h | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 cmdline/apt-extracttemplates.h (limited to 'cmdline/apt-extracttemplates.h') diff --git a/cmdline/apt-extracttemplates.h b/cmdline/apt-extracttemplates.h new file mode 100644 index 000000000..0b581604b --- /dev/null +++ b/cmdline/apt-extracttemplates.h @@ -0,0 +1,48 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: apt-extracttemplates.h,v 1.1 2001/02/25 04:53:59 tausq Exp $ +/* ###################################################################### + + apt-extracttemplate - tool to extract template and config data + + ##################################################################### */ + /*}}}*/ +#ifndef _APTEXTRACTTEMPLATE_H_ +#define _APTEXTRACTTEMPLATE_H_ + +#include +#include +#include + +class DebFile : public pkgDirStream +{ + FileFd File; + unsigned long Size; + char *Control; + unsigned long ControlLen; + +public: + DebFile(const char *FileName); + ~DebFile(); + bool DoItem(Item &I, int &fd); + bool Process(pkgDirStream::Item &I, const unsigned char *data, + unsigned long size, unsigned long pos); + + bool Go(); + bool ParseInfo(); + + static char *GetInstalledVer(const string &package); + + string Package; + string Version; + string DepVer, PreDepVer; + unsigned int DepOp, PreDepOp; + + char *Config; + char *Template; + + static pkgCache *Cache; + enum { None, IsControl, IsConfig, IsTemplate } Which; +}; + +#endif -- cgit v1.2.3