mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-18 12:04:03 -04:00
Reduce firmware size by refactoring global data defined in public headers. Each global variable which require runtime initialization adds initialization code to every translation unit which includes the header where the variable is defined and declared.
31 lines
741 B
C++
31 lines
741 B
C++
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "CalllogRecord.hpp"
|
|
#include "SwitchData.hpp"
|
|
|
|
namespace calllog
|
|
{
|
|
|
|
inline constexpr auto CALLLOG_SWITCH_DATA_STR = "CallLogSwitchData";
|
|
|
|
class CallLogSwitchData : public gui::SwitchData
|
|
{
|
|
protected:
|
|
CalllogRecord record;
|
|
|
|
public:
|
|
CallLogSwitchData() = delete;
|
|
CallLogSwitchData(CalllogRecord record) : SwitchData(CALLLOG_SWITCH_DATA_STR), record{record} {};
|
|
virtual ~CallLogSwitchData() = default;
|
|
|
|
const CalllogRecord &getRecord() const
|
|
{
|
|
return record;
|
|
};
|
|
};
|
|
|
|
} // namespace calllog
|