summaryrefslogtreecommitdiffstats
path: root/methods/aptmethod.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--methods/aptmethod.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h
index 26b8c0b..1c24f3a 100644
--- a/methods/aptmethod.h
+++ b/methods/aptmethod.h
@@ -448,7 +448,7 @@ protected:
return true;
}
- void Warning(std::string &&msg)
+ void Message(std::string &&msg, std::string code)
{
std::unordered_map<std::string, std::string> fields;
if (Queue != 0)
@@ -458,7 +458,15 @@ protected:
if (not UsedMirror.empty())
fields.emplace("UsedMirror", UsedMirror);
fields.emplace("Message", std::move(msg));
- SendMessage("104 Warning", std::move(fields));
+ SendMessage(code, std::move(fields));
+ }
+ void Warning(std::string &&msg)
+ {
+ return Message(std::move(msg), "104 Warning");
+ }
+ void Audit(std::string &&msg)
+ {
+ return Message(std::move(msg), "105 Audit");
}
bool TransferModificationTimes(char const * const From, char const * const To, time_t &LastModified) APT_NONNULL(2, 3)