diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:38 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:38 +0000 |
commit | 3fc8f6852335ef8d50f40882769d9df6728dd73d (patch) | |
tree | bbce2e57dca092670994b95587ddf9acd39a3147 /cmdline/debfile.h | |
parent | 0f2fa32291a66b7a154b5926a6dc8f38476bdd94 (diff) |
apt-extracttemplates stuff from debconf
Author: tausq
Date: 2001-02-23 04:28:49 GMT
apt-extracttemplates stuff from debconf
Diffstat (limited to 'cmdline/debfile.h')
-rw-r--r-- | cmdline/debfile.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/cmdline/debfile.h b/cmdline/debfile.h new file mode 100644 index 000000000..b2db3c80b --- /dev/null +++ b/cmdline/debfile.h @@ -0,0 +1,45 @@ +#ifndef _debfile_H +#define _debfile_H + +#include <apt-pkg/fileutl.h> +#include <apt-pkg/pkgcache.h> +#include <apt-pkg/dirstream.h> + +class DebFile : public pkgDirStream +{ + const char *ParseDepends(const char *Start,const char *Stop, + char *&Package, char *&Ver, + unsigned int &Op); + + char *CopyString(const char *start, unsigned int len); + + 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 char *package); + + char *Package; + char *Version; + char *DepVer, *PreDepVer; + unsigned int DepOp, PreDepOp; + + char *Config; + char *Template; + + static pkgCache *Cache; + enum { None, IsControl, IsConfig, IsTemplate } Which; +}; + +#endif |