tdesktop/Telegram/SourceFiles/storage/storage_cloud_blob.h
23rd 704dcc8d65 Moved emoji sets and dictionaries loader states to CloudBlob.
- Moved CloudBlob to second namespace.
2020-02-24 18:48:33 +03:00

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