mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-21 07:28:21 -04:00
ApplicationDesktop start was slowed down by two synchronous DB calls: -get unread threads count -get unread calls count Both were replaced with asynch versions.
33 lines
937 B
C++
33 lines
937 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <Common/Query.hpp>
|
|
#include <Common/Common.hpp>
|
|
|
|
namespace db::query
|
|
{
|
|
class ThreadGetCount : public Query
|
|
{
|
|
EntryState state;
|
|
|
|
public:
|
|
explicit ThreadGetCount(EntryState state);
|
|
[[nodiscard]] auto debugInfo() const -> std::string override;
|
|
[[nodiscard]] auto getState() const noexcept -> EntryState;
|
|
};
|
|
|
|
class ThreadGetCountResult : public QueryResult
|
|
{
|
|
EntryState state;
|
|
unsigned count;
|
|
|
|
public:
|
|
ThreadGetCountResult(EntryState state, unsigned count);
|
|
[[nodiscard]] auto debugInfo() const -> std::string override;
|
|
[[nodiscard]] auto getState() const noexcept -> EntryState;
|
|
[[nodiscard]] auto getCount() const noexcept -> unsigned;
|
|
};
|
|
} // namespace db::query
|