blob: f167dbaed5596d43df375037c3067f07065c848c [file] [log] [blame]
Tomáš Pecka292bc9c2021-01-11 22:03:11 +01001/*
2 * Copyright (C) 2021 CESNET, https://photonics.cesnet.cz/
3 *
4 * Written by Tomáš Pecka <tomas.pecka@fit.cvut.cz>
5 *
6 */
7#pragma once
8
9#include <filesystem>
Tomáš Pecka79344c82021-09-16 18:25:59 +020010#include <sdbus-c++/sdbus-c++.h>
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010011#include <sysrepo-cpp/Session.hpp>
12#include "utils/log-fwd.h"
13
14namespace velia::system {
15
Tomáš Peckaf976c5b2021-01-23 21:19:52 +010016class IETFSystem {
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010017public:
Václav Kubernát7efd6d52021-11-09 01:31:11 +010018 IETFSystem(::sysrepo::Session srSession, const std::filesystem::path& osRelease, sdbus::IConnection& dbusConnection, const std::string& dbusName);
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010019
20private:
Václav Kubernátd2927cc2021-02-18 04:36:26 +010021 void initStaticProperties(const std::filesystem::path& osRelease);
22 void initSystemRestart();
Václav Kubernát566c9402021-02-10 08:33:54 +010023 void initHostname();
Jan Kundrátdcd50f02021-02-18 23:28:26 +010024 void initDummies();
Jan Kundrát51f1d6d2021-02-19 00:41:28 +010025 void initClock();
Tomáš Pecka79344c82021-09-16 18:25:59 +020026 void initDNS(sdbus::IConnection& connection, const std::string& dbusName);
Václav Kubernátd2927cc2021-02-18 04:36:26 +010027
Václav Kubernát7efd6d52021-11-09 01:31:11 +010028 ::sysrepo::Session m_srSession;
29 std::optional<::sysrepo::Subscription> m_srSubscribe;
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010030 velia::Log m_log;
31};
32}