HCoop
/
ntk
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use 'best' hash for source authentication
[ntk/apt.git]
/
apt-pkg
/
srcrecords.h
diff --git
a/apt-pkg/srcrecords.h
b/apt-pkg/srcrecords.h
index
e000e17
..
dde22bd
100644
(file)
--- a/
apt-pkg/srcrecords.h
+++ b/
apt-pkg/srcrecords.h
@@
-14,6
+14,7
@@
#define PKGLIB_SRCRECORDS_H
#include <apt-pkg/macros.h>
#define PKGLIB_SRCRECORDS_H
#include <apt-pkg/macros.h>
+#include <apt-pkg/hashes.h>
#include <string>
#include <vector>
#include <string>
#include <vector>
@@
-29,15
+30,28
@@
class pkgSrcRecords
{
public:
{
public:
+#if __GNUC__ >= 4
+ // ensure that con- & de-structor don't trigger this warning
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
// Describes a single file
struct File
{
// Describes a single file
struct File
{
- std::string MD5Hash;
- unsigned long Size;
+
APT_DEPRECATED
std::string MD5Hash;
+
APT_DEPRECATED
unsigned long Size;
std::string Path;
std::string Type;
};
std::string Path;
std::string Type;
};
-
+ struct File2 : public File
+ {
+ unsigned long long FileSize;
+ HashStringList Hashes;
+ };
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic pop
+#endif
+
// Abstract parser for each source record
class Parser
{
// Abstract parser for each source record
class Parser
{
@@
-77,6
+91,7
@@
class pkgSrcRecords
static const char *BuildDepType(unsigned char const &Type) APT_PURE;
virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
static const char *BuildDepType(unsigned char const &Type) APT_PURE;
virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
+ bool Files2(std::vector<pkgSrcRecords::File2> &F);
Parser(const pkgIndexFile *Index) : iIndex(Index) {};
virtual ~Parser() {};
Parser(const pkgIndexFile *Index) : iIndex(Index) {};
virtual ~Parser() {};