2014-05-30 08:53:19 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-05-30 08:53:19 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-09-26 12:09:59 +00:00
|
|
|
#include <string>
|
|
|
|
#include <exception>
|
2017-02-21 13:45:56 +00:00
|
|
|
#include <memory>
|
2016-09-26 12:09:59 +00:00
|
|
|
#include <ctime>
|
2018-06-04 15:35:11 +00:00
|
|
|
#include <functional>
|
2018-06-02 14:29:21 +00:00
|
|
|
#include <gsl/gsl>
|
2016-09-26 12:09:59 +00:00
|
|
|
|
2017-04-06 14:38:10 +00:00
|
|
|
#include "base/build_config.h"
|
2017-09-28 09:40:26 +00:00
|
|
|
#include "base/ordered_set.h"
|
2018-06-04 15:35:11 +00:00
|
|
|
#include "base/unique_function.h"
|
|
|
|
#include "base/functors.h"
|
|
|
|
|
|
|
|
namespace func = base::functors;
|
2017-02-21 14:37:53 +00:00
|
|
|
|
2017-09-04 11:40:02 +00:00
|
|
|
using gsl::not_null;
|
2017-08-17 08:31:24 +00:00
|
|
|
|
2018-06-04 15:35:11 +00:00
|
|
|
template <typename Signature>
|
|
|
|
using Fn = std::function<Signature>;
|
|
|
|
|
|
|
|
template <typename Signature>
|
|
|
|
using FnMut = base::unique_function<Signature>;
|
|
|
|
|
2016-09-29 11:37:16 +00:00
|
|
|
//using uchar = unsigned char; // Qt has uchar
|
|
|
|
using int16 = qint16;
|
|
|
|
using uint16 = quint16;
|
|
|
|
using int32 = qint32;
|
|
|
|
using uint32 = quint32;
|
|
|
|
using int64 = qint64;
|
|
|
|
using uint64 = quint64;
|
|
|
|
using float32 = float;
|
|
|
|
using float64 = double;
|
2016-03-23 18:12:07 +00:00
|
|
|
|
2018-06-02 14:29:21 +00:00
|
|
|
using TimeMs = int64;
|
2018-06-22 23:18:43 +00:00
|
|
|
using TimeId = int32;
|
2018-06-02 14:29:21 +00:00
|
|
|
|
2016-03-15 12:18:12 +00:00
|
|
|
#define qsl(s) QStringLiteral(s)
|
2018-06-04 15:35:11 +00:00
|
|
|
#define qstr(s) QLatin1String((s), sizeof(s) - 1)
|