blob: 9cd6a7034a242c9ee60902432fb11fdd9d3c1afc [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át6d791432018-10-25 16:00:35 +020028 virtual void discardChanges() = 0;
Václav Kubernáte7a9fa32018-08-22 13:56:35 +020029};