mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-04 20:08:32 -05:00
* Switched to DB initialization at compile time * Organized and cleaned up db files directories(not finished completely) * Fixed DB related unit tests * Minor improvements to CMake * Small fixes for GCC12 build
28 lines
766 B
C++
28 lines
766 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "ContactsDB.hpp"
|
|
|
|
uint32_t ContactsDB::favouritesId = 0;
|
|
uint32_t ContactsDB::iceId = 0;
|
|
uint32_t ContactsDB::blockedId = 0;
|
|
uint32_t ContactsDB::temporaryId = 0;
|
|
|
|
ContactsDB::ContactsDB(const char *name)
|
|
: Database(name), contacts(this), name(this), number(this), ringtones(this), address(this), groups(this)
|
|
{
|
|
|
|
if (favouritesId == 0) {
|
|
favouritesId = groups.favouritesId();
|
|
}
|
|
if (iceId == 0) {
|
|
iceId = groups.iceId();
|
|
}
|
|
if (blockedId == 0) {
|
|
blockedId = groups.blockedId();
|
|
}
|
|
if (temporaryId == 0) {
|
|
temporaryId = groups.temporaryId();
|
|
}
|
|
}
|