File: pkg_acqfile.h

package info (click to toggle)
synaptic 0.84.6
  • links: PTS
  • area: main
  • in suites: buster
  • size: 21,340 kB
  • sloc: cpp: 24,306; xml: 10,562; ansic: 2,084; makefile: 578; sh: 452; sed: 93; python: 82
file content (36 lines) | stat: -rw-r--r-- 989 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// pkg_acqfile.h
//

#include <apt-pkg/acquire-item.h>

// new APT has a proper pkgAcqFile so all good
#if APT_PKG_MAJOR >= 5
 #define pkgAcqFileSane pkgAcqFile
#else
class pkgAcqFileSane : public pkgAcquire::Item
// This is frustrating: pkgAcqFile is **almost** good enough, but has some
// hardcoded stuff that makes it not quite work.
//
//  Based heavily on that class, though.
{
  pkgAcquire::ItemDesc Desc;
  std::string Md5Hash;
  unsigned int Retries;

public:
  pkgAcqFileSane(pkgAcquire *Owner,
                 std::string URI,
                 HashStringList const &hsl,
                 unsigned long long const Size,
		 std::string Description,
                 std::string ShortDesc,
                 std::string const &DestDir,
                 std::string const &DestFilename);

  void Failed(std::string Message, pkgAcquire::MethodConfig *Cnf);
  std::string MD5Sum() {return Md5Hash;}
  std::string DescURI() {return Desc.URI;}
  virtual ~pkgAcqFileSane() {}
};

#endif