summaryrefslogtreecommitdiffstats
path: root/methods/aptmethod.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:28:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:28:44 +0000
commit179b27be1e4cf4e68ccb9df64c64156dbb7b3820 (patch)
tree656b95c0086c4c552c43914f47b3c292b0276618 /methods/aptmethod.h
parentAdding upstream version 2.9.6. (diff)
downloadapt-179b27be1e4cf4e68ccb9df64c64156dbb7b3820.tar.xz
apt-179b27be1e4cf4e68ccb9df64c64156dbb7b3820.zip
Adding upstream version 2.9.7.upstream/2.9.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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)