2020-02-05 00:03:54 +00:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
|
|
|
|
#ifndef TDESKTOP_DISABLE_SPELLCHECK
|
|
|
|
|
2020-02-05 10:59:07 +00:00
|
|
|
#include "storage/storage_cloud_blob.h"
|
|
|
|
|
2020-02-05 00:03:54 +00:00
|
|
|
namespace Spellchecker {
|
|
|
|
|
2020-02-05 13:06:38 +00:00
|
|
|
struct Dict : public Storage::CloudBlob::Blob {
|
2020-02-05 00:03:54 +00:00
|
|
|
};
|
|
|
|
|
2020-02-06 15:27:35 +00:00
|
|
|
int GetDownloadSize(int id);
|
|
|
|
MTP::DedicatedLoader::Location GetDownloadLocation(int id);
|
|
|
|
|
2020-02-05 00:03:54 +00:00
|
|
|
[[nodiscard]] QString DictionariesPath();
|
|
|
|
[[nodiscard]] QString DictPathByLangId(int langId);
|
|
|
|
bool UnpackDictionary(const QString &path, int langId);
|
|
|
|
[[nodiscard]] bool DictionaryExists(int langId);
|
|
|
|
|
|
|
|
bool WriteDefaultDictionary();
|
2020-02-06 15:27:35 +00:00
|
|
|
std::vector<Dict> Dictionaries();
|
2020-02-05 00:03:54 +00:00
|
|
|
|
|
|
|
} // namespace Spellchecker
|
|
|
|
|
|
|
|
#endif // !TDESKTOP_DISABLE_SPELLCHECK
|