fix recall

This commit is contained in:
lnk
2025-10-30 20:57:19 +08:00
parent 06a2f3a75b
commit 5e63adc8f9
5 changed files with 509 additions and 69 deletions

View File

@@ -164,6 +164,7 @@ public:
class qvvr_data
{
public:
bool is_pair;
bool used_status; //是否占用
int QVVR_type; //暂态类型
uint64_t QVVR_time; //暂态开始时间 unsigned longlong
@@ -815,11 +816,20 @@ inline void print_terminal(const terminal_dev& tmnl) { print_terminal_common(tmn
///////////////////////////////////////////////////////////////////////////////////////////////////////////////小工具
// 小工具:判断 s 是否以 suffix 结尾
static inline bool has_suffix(const std::string& s, const std::string& suffix) {
inline bool has_suffix(const std::string& s, const std::string& suffix) {
if (suffix.size() > s.size()) return false;
return std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
}
// 小工具:替换前缀
inline bool replace_prefix(std::string& s, const std::string& from, const std::string& to) {
if (s.rfind(from, 0) == 0) { // 以 from 为前缀
s.replace(0, from.size(), to);
return true;
}
return false;
}
inline std::string trim_cstr(const char* s, size_t n) {
if (!s) return {};
size_t end = 0;
@@ -993,4 +1003,6 @@ bool get_recall_record_fields_by_guid_monitor(const std::string& guid,
bool SendFileWebAuto(const std::string& id,
const std::string& local_path,
const std::string& remote_path,
std::string& out_filename);
std::string& out_filename);
void cleanup_old_unpaired_qvvr_events();