blob: d410a7b97537ea2118215eeb9a90acd496f6be47 [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:
Tomáš Pecka79344c82021-09-16 18:25:59 +020018 IETFSystem(std::shared_ptr<::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
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010028 std::shared_ptr<::sysrepo::Session> m_srSession;
Tomáš Pecka879a6032021-02-03 17:21:48 +010029 std::shared_ptr<::sysrepo::Subscribe> m_srSubscribe;
Tomáš Pecka292bc9c2021-01-11 22:03:11 +010030 velia::Log m_log;
31};
32}