Minor fixes.

This commit is contained in:
levlam 2020-12-22 15:51:57 +03:00
parent b89cb3fbd6
commit 3589676550
13 changed files with 31 additions and 23 deletions

View File

@ -494,6 +494,7 @@ set(TDLIB_SOURCE
td/telegram/FullMessageId.h td/telegram/FullMessageId.h
td/telegram/Game.h td/telegram/Game.h
td/telegram/Global.h td/telegram/Global.h
td/telegram/GroupCallId.h
td/telegram/GroupCallManager.h td/telegram/GroupCallManager.h
td/telegram/GroupCallParticipant.h td/telegram/GroupCallParticipant.h
td/telegram/HashtagHints.h td/telegram/HashtagHints.h

View File

@ -3225,7 +3225,7 @@ messageStatistics message_interaction_graph:StatisticalGraph = MessageStatistics
point x:double y:double = Point; point x:double y:double = Point;
//@class VectorPathCommand @description Reperesents a vector path command //@class VectorPathCommand @description Represents a vector path command
//@description A straight line to a given point @end_point The end point of the straight line //@description A straight line to a given point @end_point The end point of the straight line
vectorPathCommandLine end_point:point = VectorPathCommand; vectorPathCommandLine end_point:point = VectorPathCommand;

View File

@ -19,7 +19,6 @@
#include "td/telegram/files/FileType.h" #include "td/telegram/files/FileType.h"
#include "td/telegram/FolderId.h" #include "td/telegram/FolderId.h"
#include "td/telegram/Global.h" #include "td/telegram/Global.h"
#include "td/telegram/GroupCallManager.h"
#include "td/telegram/InlineQueriesManager.h" #include "td/telegram/InlineQueriesManager.h"
#include "td/telegram/InputGroupCallId.h" #include "td/telegram/InputGroupCallId.h"
#include "td/telegram/logevent/LogEvent.h" #include "td/telegram/logevent/LogEvent.h"

View File

@ -6,21 +6,25 @@
// //
#include "td/telegram/GroupCallManager.h" #include "td/telegram/GroupCallManager.h"
#include "td/telegram/AccessRights.h"
#include "td/telegram/AuthManager.h" #include "td/telegram/AuthManager.h"
#include "td/telegram/ContactsManager.h" #include "td/telegram/ContactsManager.h"
#include "td/telegram/DialogParticipant.h" #include "td/telegram/DialogParticipant.h"
#include "td/telegram/Global.h" #include "td/telegram/Global.h"
#include "td/telegram/MessageId.h"
#include "td/telegram/MessagesManager.h" #include "td/telegram/MessagesManager.h"
#include "td/telegram/misc.h" #include "td/telegram/misc.h"
#include "td/telegram/net/NetQuery.h" #include "td/telegram/net/NetQuery.h"
#include "td/telegram/Td.h" #include "td/telegram/Td.h"
#include "td/telegram/UpdatesManager.h" #include "td/telegram/UpdatesManager.h"
#include "td/actor/MultiPromise.h" #include "td/utils/buffer.h"
#include "td/utils/JsonBuilder.h" #include "td/utils/JsonBuilder.h"
#include "td/utils/misc.h"
#include "td/utils/Random.h" #include "td/utils/Random.h"
#include <limits>
#include <map>
#include <unordered_set> #include <unordered_set>
#include <utility> #include <utility>

View File

@ -18,6 +18,8 @@
#include "td/actor/PromiseFuture.h" #include "td/actor/PromiseFuture.h"
#include "td/actor/Timeout.h" #include "td/actor/Timeout.h"
#include "td/utils/common.h"
#include "td/utils/logging.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include <unordered_map> #include <unordered_map>

View File

@ -8,6 +8,8 @@
#include "td/telegram/ContactsManager.h" #include "td/telegram/ContactsManager.h"
#include "td/utils/logging.h"
namespace td { namespace td {
GroupCallParticipant::GroupCallParticipant(const tl_object_ptr<telegram_api::groupCallParticipant> &participant) { GroupCallParticipant::GroupCallParticipant(const tl_object_ptr<telegram_api::groupCallParticipant> &participant) {

View File

@ -6,9 +6,6 @@
// //
#include "td/telegram/InputGroupCallId.h" #include "td/telegram/InputGroupCallId.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
namespace td { namespace td {
InputGroupCallId::InputGroupCallId(const tl_object_ptr<telegram_api::inputGroupCall> &input_group_call) InputGroupCallId::InputGroupCallId(const tl_object_ptr<telegram_api::inputGroupCall> &input_group_call)

View File

@ -47,6 +47,8 @@
#include "td/utils/PathView.h" #include "td/utils/PathView.h"
#include "td/utils/Random.h" #include "td/utils/Random.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/StackAllocator.h"
#include "td/utils/StringBuilder.h"
#include "td/utils/Time.h" #include "td/utils/Time.h"
#include "td/utils/tl_helpers.h" #include "td/utils/tl_helpers.h"
#include "td/utils/utf8.h" #include "td/utils/utf8.h"

View File

@ -43,6 +43,7 @@
#include "td/telegram/FolderId.h" #include "td/telegram/FolderId.h"
#include "td/telegram/FullMessageId.h" #include "td/telegram/FullMessageId.h"
#include "td/telegram/Global.h" #include "td/telegram/Global.h"
#include "td/telegram/GroupCallId.h"
#include "td/telegram/GroupCallManager.h" #include "td/telegram/GroupCallManager.h"
#include "td/telegram/HashtagHints.h" #include "td/telegram/HashtagHints.h"
#include "td/telegram/InlineQueriesManager.h" #include "td/telegram/InlineQueriesManager.h"

View File

@ -9,6 +9,7 @@
#include "td/utils/ExitGuard.h" #include "td/utils/ExitGuard.h"
#include "td/utils/MpscPollableQueue.h" #include "td/utils/MpscPollableQueue.h"
#include "td/utils/port/thread_local.h" #include "td/utils/port/thread_local.h"
#include "td/utils/ScopeGuard.h"
#include <memory> #include <memory>

View File

@ -12,6 +12,7 @@
#include "td/utils/Closure.h" #include "td/utils/Closure.h"
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/invoke.h" // for tuple_for_each #include "td/utils/invoke.h" // for tuple_for_each
#include "td/utils/MovableValue.h"
#include "td/utils/ScopeGuard.h" #include "td/utils/ScopeGuard.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"

View File

@ -162,7 +162,7 @@ class TestClient : public td::Actor {
td::Promise<> close_promise_; td::Promise<> close_promise_;
}; };
class Task : public TestClient::Listener { class TestClinetTask : public TestClient::Listener {
public: public:
void on_update(std::shared_ptr<TestClient::Update> update) override { void on_update(std::shared_ptr<TestClient::Update> update) override {
auto it = sent_queries_.find(update->id); auto it = sent_queries_.find(update->id);
@ -198,7 +198,7 @@ class Task : public TestClient::Listener {
} }
}; };
class DoAuthentication : public Task { class DoAuthentication : public TestClinetTask {
public: public:
DoAuthentication(td::string name, td::string phone, td::string code, td::Promise<> promise) DoAuthentication(td::string name, td::string phone, td::string code, td::Promise<> promise)
: name_(std::move(name)), phone_(std::move(phone)), code_(std::move(code)), promise_(std::move(promise)) { : name_(std::move(name)), phone_(std::move(phone)), code_(std::move(code)), promise_(std::move(promise)) {
@ -274,7 +274,7 @@ class DoAuthentication : public Task {
} }
}; };
class SetUsername : public Task { class SetUsername : public TestClinetTask {
public: public:
SetUsername(td::string username, td::Promise<> promise) SetUsername(td::string username, td::Promise<> promise)
: username_(std::move(username)), promise_(std::move(promise)) { : username_(std::move(username)), promise_(std::move(promise)) {
@ -339,7 +339,7 @@ class SetUsername : public Task {
} }
}; };
class CheckTestA : public Task { class CheckTestA : public TestClinetTask {
public: public:
CheckTestA(td::string tag, td::Promise<> promise) : tag_(std::move(tag)), promise_(std::move(promise)) { CheckTestA(td::string tag, td::Promise<> promise) : tag_(std::move(tag)), promise_(std::move(promise)) {
} }
@ -371,7 +371,7 @@ class CheckTestA : public Task {
} }
}; };
class TestA : public Task { class TestA : public TestClinetTask {
public: public:
TestA(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) { TestA(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) {
} }
@ -397,7 +397,7 @@ class TestA : public Task {
td::string username_; td::string username_;
}; };
class TestSecretChat : public Task { class TestSecretChat : public TestClinetTask {
public: public:
TestSecretChat(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) { TestSecretChat(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) {
} }
@ -448,7 +448,7 @@ class TestSecretChat : public Task {
td::int64 chat_id_ = 0; td::int64 chat_id_ = 0;
}; };
class TestFileGenerated : public Task { class TestFileGenerated : public TestClinetTask {
public: public:
TestFileGenerated(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) { TestFileGenerated(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) {
} }
@ -514,7 +514,7 @@ class TestFileGenerated : public Task {
class GenerateFile : public td::Actor { class GenerateFile : public td::Actor {
public: public:
GenerateFile(Task *parent, td::int64 id, td::string original_path, td::string destination_path, GenerateFile(TestClinetTask *parent, td::int64 id, td::string original_path, td::string destination_path,
td::string conversion) td::string conversion)
: parent_(parent) : parent_(parent)
, id_(id) , id_(id)
@ -524,7 +524,7 @@ class TestFileGenerated : public Task {
} }
private: private:
Task *parent_; TestClinetTask *parent_;
td::int64 id_; td::int64 id_;
td::string original_path_; td::string original_path_;
td::string destination_path_; td::string destination_path_;
@ -589,7 +589,7 @@ class TestFileGenerated : public Task {
td::int64 chat_id_ = 0; td::int64 chat_id_ = 0;
}; };
class CheckTestC : public Task { class CheckTestC : public TestClinetTask {
public: public:
CheckTestC(td::string username, td::string tag, td::Promise<> promise) CheckTestC(td::string username, td::string tag, td::Promise<> promise)
: username_(std::move(username)), tag_(std::move(tag)), promise_(std::move(promise)) { : username_(std::move(username)), tag_(std::move(tag)), promise_(std::move(promise)) {

View File

@ -10,18 +10,16 @@
#include "td/db/TQueue.h" #include "td/db/TQueue.h"
#include "td/utils/buffer.h" #include "td/utils/buffer.h"
#include "td/utils/common.h"
#include "td/utils/int_types.h" #include "td/utils/int_types.h"
#include "td/utils/misc.h" #include "td/utils/logging.h"
#include "td/utils/port/path.h"
#include "td/utils/Random.h" #include "td/utils/Random.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Span.h" #include "td/utils/Span.h"
#include "td/utils/Status.h"
#include "td/utils/tests.h" #include "td/utils/tests.h"
#include "td/utils/VectorQueue.h"
#include <map> #include <memory>
#include <set> #include <utility>
TEST(TQueue, hands) { TEST(TQueue, hands) {
td::TQueue::Event events[100]; td::TQueue::Event events[100];