ZaStoGram_desktop/Telegram/SourceFiles/test/test_log_scan_internal.h
John Preston d03224a5cf [ai] Separate publication identity and secret audits
Task: 2026/10/18/separate-publication-identity-scans-from-secret-audits
2026-10-20 17:07:54 +04:00

37 lines
984 B
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "test/test_secrecy_scan.h"
namespace Test::Internal {
struct LogScanObserver {
Fn<void(SecrecyClass)> beginSource;
Fn<void(const QString &, bool entryStart)> line;
};
struct LogScanReading {
std::vector<SecrecyClassReading> classes;
int candidates = 0;
int accepted = 0;
int foreign = 0;
int missing = 0;
int unreadable = 0;
QStringList candidateIdentities;
};
// Callbacks are synchronous; null usable skips strict parsing.
[[nodiscard]] LogScanReading ReadLogClasses(
const SecrecyLaunchLogs &logs,
const QString &plantedControl,
const SecrecySecrets *usable = nullptr,
const std::vector<SecrecyComputedField> &computedFields = {},
LogScanObserver *observer = nullptr);
} // namespace Test::Internal