mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-19 06:30:46 -04:00
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "CalllogRecord.hpp"
|
|
#include <PhoneNumber.hpp>
|
|
|
|
namespace sys
|
|
{
|
|
class Service;
|
|
}
|
|
namespace CellularCall
|
|
{
|
|
class Call;
|
|
}
|
|
|
|
namespace call::api
|
|
{
|
|
class DB
|
|
{
|
|
public:
|
|
virtual void incrementNotAnsweredCallsNotification(const utils::PhoneNumber::View &number) = 0;
|
|
// overrides record data
|
|
virtual void startCall(CalllogRecord &rec) = 0;
|
|
virtual void endCall(const CalllogRecord &rec) = 0;
|
|
virtual bool isNumberInFavourites(const utils::PhoneNumber::View &number) = 0;
|
|
virtual ~DB() = default;
|
|
};
|
|
|
|
} // namespace call::api
|
|
|
|
class CallDB : public call::api::DB
|
|
{
|
|
sys::Service *owner;
|
|
|
|
public:
|
|
explicit CallDB(sys::Service *);
|
|
|
|
void incrementNotAnsweredCallsNotification(const utils::PhoneNumber::View &number) override;
|
|
void startCall(CalllogRecord &rec) override;
|
|
void endCall(const CalllogRecord &rec) override;
|
|
bool isNumberInFavourites(const utils::PhoneNumber::View &number) override;
|
|
};
|