summaryrefslogtreecommitdiff
path: root/methods/server.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-03-14 09:02:44 +0100
committerMichael Vogt <mvo@debian.org>2014-03-14 09:02:44 +0100
commit83b880c6505a20247239d897b7387bba37942993 (patch)
tree11a23275548175e301f6fefda20a6a8bb6fe6de8 /methods/server.h
parentf98d9bd2adf4f24a72d973f5752b47987843984c (diff)
parent40f8a8ba8c2e7ff9ce80781250c863c07ac130dd (diff)
fix test/integration/test-apt-helper
Diffstat (limited to 'methods/server.h')
-rw-r--r--methods/server.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/methods/server.h b/methods/server.h
index 2b81e6173..0f45ab994 100644
--- a/methods/server.h
+++ b/methods/server.h
@@ -12,7 +12,10 @@
#define APT_SERVER_H
#include <apt-pkg/strutl.h>
+#include <apt-pkg/acquire-method.h>
+#include <time.h>
+#include <iostream>
#include <string>
using std::cout;
@@ -32,7 +35,7 @@ struct ServerState
// These are some statistics from the last parsed header lines
unsigned long long Size;
- signed long long StartPos;
+ unsigned long long StartPos;
time_t Date;
bool HaveContent;
enum {Chunked,Stream,Closes} Encoding;
@@ -62,7 +65,7 @@ struct ServerState
/** \brief IO error while retrieving */
RUN_HEADERS_IO_ERROR,
/** \brief Parse error after retrieving */
- RUN_HEADERS_PARSE_ERROR,
+ RUN_HEADERS_PARSE_ERROR
};
/** \brief Get the headers before the data */
RunHeadersResult RunHeaders(FileFd * const File);
@@ -126,7 +129,7 @@ class ServerMethod : public pkgAcqMethod
static std::string FailFile;
static int FailFd;
static time_t FailTime;
- static void SigTerm(int);
+ static APT_NORETURN void SigTerm(int);
virtual bool Configuration(std::string Message);
virtual bool Flush() { return Server->Flush(File); };