blob: 725927317183f7abda9d499b66247d969e26f753 [file] [log] [blame]
Václav Kubernáte7a9fa32018-08-22 13:56:35 +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_values.hpp"
13
14/*! \class DatastoreAccess
15 * \brief Abstract class for accessing a datastore
16 */
17
18
19class DatastoreAccess {
20public:
21 virtual ~DatastoreAccess() = 0;
22 virtual std::map<std::string, leaf_data_> getItems(const std::string& path) = 0;
23 virtual void setLeaf(const std::string& path, leaf_data_ value) = 0;
24 virtual void createPresenceContainer(const std::string& path) = 0;
25 virtual void deletePresenceContainer(const std::string& path) = 0;
Václav Kubernát812ee282018-08-30 17:10:03 +020026
27 virtual void commitChanges() = 0;
Václav Kubernáte7a9fa32018-08-22 13:56:35 +020028};