~aleteoryx/muditaos

ref: 5b0ea283eb9cc6e453cf9bae898b98e1f65038f0 muditaos/module-db/queries/messages/sms/QuerySMSGetByText.cpp -rw-r--r-- 1.1 KiB
5b0ea283 — Adam Wulkiewicz [BH-000] Update changelog for 1.8.2 and 1.9.0 2 years 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
36
37
38
39
40
41
42
43
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "QuerySMSGetByText.hpp"

namespace db::query
{
    SMSGetByText::SMSGetByText(std::string text) : Query(Query::Type::Read), text(std::move(text))
    {}

    void SMSGetByText::filterByPhoneNumber(const utils::PhoneNumber::View &number) noexcept
    {
        phoneNumber = number;
    }

    auto SMSGetByText::getPhoneNumber() const noexcept -> const std::optional<utils::PhoneNumber::View> &
    {
        return phoneNumber;
    }

    auto SMSGetByText::getText() const noexcept -> const std::string &
    {
        return text;
    }

    auto SMSGetByText::debugInfo() const -> std::string
    {
        return "SMSGetByText";
    }

    SMSGetByTextResult::SMSGetByTextResult(std::vector<SMSRecord> result) : result(std::move(result))
    {}

    auto SMSGetByTextResult::getResults() const -> std::vector<SMSRecord>
    {
        return result;
    }
    auto SMSGetByTextResult::debugInfo() const -> std::string
    {
        return "SMSGetByTextResult";
    }

} // namespace db::query