~aleteoryx/muditaos

ref: 721fbbb1bd7fe9877faee2c60337ab7b43387c61 muditaos/module-db/queries/multimedia_files/QueryMultimediaFilesGetOffset.hpp -rw-r--r-- 1.1 KiB
721fbbb1 — Maciej Gibowicz [BH-1896] Add opening the vertical lists on the currently set sound 1 year, 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include "module-db/Interface/MultimediaFilesRecord.hpp"

#include <Common/Query.hpp>

namespace db::multimedia_files::query
{
    class GetOffsetByPath : public Query
    {
      public:
        GetOffsetByPath(const std::string &folderPath,
                        const std::string &recordPath,
                        SortingBy sorting = SortingBy::TitleAscending);
        [[nodiscard]] auto debugInfo() const -> std::string override;

        const std::string folderPath;
        const std::string recordPath;
        const SortingBy sorting = SortingBy::TitleAscending;
    };

    class GetOffsetResult : public QueryResult
    {
      public:
        explicit GetOffsetResult(SortedRecord sortedRecord);
        [[nodiscard]] auto getResult() const -> SortedRecord;
        [[nodiscard]] auto debugInfo() const -> std::string override;

      private:
        const SortedRecord sortedRecord;
    };
} // namespace db::multimedia_files::query