blob: 0a9f57bde0df8866f2f5dc9205a870c62d91a8c5 [file] [log] [blame]
Václav Kubernát80aacc02018-08-22 17:41:54 +02001/*
2 * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/
3 * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/
4 *
5 * Written by Václav Kubernát <kubervac@fit.cvut.cz>
6 *
7*/
8
9#pragma once
10
11#include <string>
12#include "ast_commands.hpp"
13#include "datastore_access.hpp"
14
15/*! \class DatastoreAccess
16 * \brief Abstract class for accessing a datastore
17 */
18
19class Connection;
20class Session;
21
22class SysrepoAccess : public DatastoreAccess {
23public:
24 ~SysrepoAccess() override;
25 SysrepoAccess(const std::string& appname);
26 std::map<std::string, leaf_data_> getItems(const std::string& path) override;
27 void setLeaf(const std::string& path, leaf_data_ value) override;
28 void createPresenceContainer(const std::string& path) override;
29 void deletePresenceContainer(const std::string& path) override;
30
31private:
32 std::shared_ptr<Connection> m_connection;
33 std::shared_ptr<Session> m_session;
34};