Václav Kubernát | e7a9fa3 | 2018-08-22 13:56:35 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
Jan Kundrát | 36075ab | 2019-02-05 20:42:15 +0100 | [diff] [blame] | 11 | #include <map> |
Václav Kubernát | e7a9fa3 | 2018-08-22 13:56:35 +0200 | [diff] [blame] | 12 | #include <string> |
| 13 | #include "ast_values.hpp" |
| 14 | |
| 15 | /*! \class DatastoreAccess |
| 16 | * \brief Abstract class for accessing a datastore |
| 17 | */ |
| 18 | |
| 19 | |
| 20 | class DatastoreAccess { |
| 21 | public: |
| 22 | virtual ~DatastoreAccess() = 0; |
| 23 | virtual std::map<std::string, leaf_data_> getItems(const std::string& path) = 0; |
| 24 | virtual void setLeaf(const std::string& path, leaf_data_ value) = 0; |
| 25 | virtual void createPresenceContainer(const std::string& path) = 0; |
| 26 | virtual void deletePresenceContainer(const std::string& path) = 0; |
Václav Kubernát | 812ee28 | 2018-08-30 17:10:03 +0200 | [diff] [blame] | 27 | |
| 28 | virtual void commitChanges() = 0; |
Václav Kubernát | 6d79143 | 2018-10-25 16:00:35 +0200 | [diff] [blame] | 29 | virtual void discardChanges() = 0; |
Václav Kubernát | e7a9fa3 | 2018-08-22 13:56:35 +0200 | [diff] [blame] | 30 | }; |