mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-04-01 23:00:58 +00:00
60 lines
1.2 KiB
C++
60 lines
1.2 KiB
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
|
|
|
|
namespace Storage::CloudBlob {
|
|
|
|
struct Blob {
|
|
int id = 0;
|
|
int postId = 0;
|
|
int size = 0;
|
|
QString name;
|
|
};
|
|
|
|
struct Available {
|
|
int size = 0;
|
|
|
|
inline bool operator<(const Available &other) const {
|
|
return size < other.size;
|
|
}
|
|
inline bool operator==(const Available &other) const {
|
|
return size == other.size;
|
|
}
|
|
};
|
|
struct Ready {
|
|
inline bool operator<(const Ready &other) const {
|
|
return false;
|
|
}
|
|
inline bool operator==(const Ready &other) const {
|
|
return true;
|
|
}
|
|
};
|
|
struct Active {
|
|
inline bool operator<(const Active &other) const {
|
|
return false;
|
|
}
|
|
inline bool operator==(const Active &other) const {
|
|
return true;
|
|
}
|
|
};
|
|
struct Failed {
|
|
inline bool operator<(const Failed &other) const {
|
|
return false;
|
|
}
|
|
inline bool operator==(const Failed &other) const {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
bool UnpackBlob(
|
|
const QString &path,
|
|
const QString &folder,
|
|
Fn<bool(const QString &)> checkNameCallback);
|
|
|
|
} // namespace Storage::CloudBlob
|