Files
MuditaOS/module-db/queries/phonebook/QueryMergeContactsList.cpp
Lukasz Mastalerz d7c8a8a6bf [CP-1210] Contacts imported from SIM dont show up in Mudita Center
Fix for imported contacts from SIM don't show up in Mudita Center.
Added functionality to send notification after all imported contacts are
added to the database.
2023-01-26 15:12:10 +01:00

36 lines
958 B
C++

// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "QueryMergeContactsList.hpp"
#include <string>
using namespace db::query;
MergeContactsList::MergeContactsList(std::vector<ContactRecord> contacts)
: Query(Query::Type::Read), contacts(std::move(contacts))
{}
std::vector<ContactRecord> &MergeContactsList::getContactsList()
{
return contacts;
}
MergeContactsListResult::MergeContactsListResult(const std::vector<std::pair<db::Query::Type, uint32_t>> &addedContacts)
: addedContacts(addedContacts)
{}
std::vector<std::pair<db::Query::Type, uint32_t>> &MergeContactsListResult::getResult()
{
return addedContacts;
}
[[nodiscard]] auto MergeContactsList::debugInfo() const -> std::string
{
return "MergeContactsList";
}
[[nodiscard]] auto MergeContactsListResult::debugInfo() const -> std::string
{
return "MergeContactsListResult";
}