diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-08-09 23:26:19 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2018-01-03 18:55:41 +0100 |
commit | 02567e3084d2faec92e8bf248e89fda6452e634b (patch) | |
tree | 8b63361a754e54681ba6df6a5a917aa2a074d439 /apt-pkg/acquire-method.h | |
parent | c28682430a27f75ceb8cc8dff78b3a560fd68399 (diff) |
refactor message generation for methods
The format isn't too hard to get right, but it gets funny with multiline
fields (which we don't really have yet) and its just easier to deal with
it once and for all which can be reused for more messages later.
Diffstat (limited to 'apt-pkg/acquire-method.h')
-rw-r--r-- | apt-pkg/acquire-method.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 2de9cf5c2..fa22085b9 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -26,6 +26,7 @@ #include <time.h> #include <string> +#include <unordered_map> #include <vector> #ifndef APT_8_CLEANER_HEADERS @@ -99,6 +100,7 @@ class pkgAcqMethod virtual void Fail(std::string Why, bool Transient = false); virtual void URIStart(FetchResult &Res); virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0); + void SendMessage(std::string const &header, std::unordered_map<std::string, std::string> &&fields); bool MediaFail(std::string Required,std::string Drive); virtual void Exit() {}; |