]>
git.saurik.com Git - apt.git/blob - methods/aptmethod.h
7f7f31dba02efdef1464e00cf33d6314492a5c01
1 #ifndef APT_APTMETHOD_H
2 #define APT_APTMETHOD_H
4 #include <apt-pkg/acquire-method.h>
5 #include <apt-pkg/configuration.h>
9 class aptMethod
: public pkgAcqMethod
11 char const * const Binary
;
14 virtual bool Configuration(std::string Message
) APT_OVERRIDE
16 if (pkgAcqMethod::Configuration(Message
) == false)
19 std::string
const conf
= std::string("Binary::") + Binary
;
20 _config
->MoveSubTree(conf
.c_str(), NULL
);
27 bool CalculateHashes(FetchItem
const * const Itm
, FetchResult
&Res
) const
29 Hashes
Hash(Itm
->ExpectedHashes
);
31 if (Fd
.Open(Res
.Filename
, FileFd::ReadOnly
) == false || Hash
.AddFD(Fd
) == false)
37 aptMethod(char const * const Binary
, char const * const Ver
, unsigned long const Flags
) :
38 pkgAcqMethod(Ver
, Flags
), Binary(Binary
)