diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-04-30 21:42:12 +0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-05-10 09:25:13 +0800 |
commit | 491b4c361f3a612835e76604fbd751e6e6905c3d (patch) | |
tree | 0fdb2e86fab5938bf171d23ef7cf23ccd555e531 /src/cstore/cstore.hpp | |
parent | 4c5199a11c951361934c7c5d4bd91e7e2ae8679a (diff) | |
download | vyatta-cfg-491b4c361f3a612835e76604fbd751e6e6905c3d.tar.gz vyatta-cfg-491b4c361f3a612835e76604fbd751e6e6905c3d.zip |
preliminary implementation of new commit
(cherry picked from commit 1b2a0fd1ae1e6dfc18e4f75f73cd7befb47cf538)
Diffstat (limited to 'src/cstore/cstore.hpp')
-rw-r--r-- | src/cstore/cstore.hpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/cstore/cstore.hpp b/src/cstore/cstore.hpp index f2163a8..af4a56d 100644 --- a/src/cstore/cstore.hpp +++ b/src/cstore/cstore.hpp @@ -40,6 +40,13 @@ extern "C" void* Perl_get_context(void) "calling %s() without config session", \ __func__); +// forward decl +namespace cnode { +class CfgNode; +} +namespace commit { +class PrioNode; +} namespace cstore { // begin namespace cstore @@ -163,6 +170,13 @@ public: virtual bool inSession() = 0; // commit bool unmarkCfgPathChanged(const Cpath& path_comps); + bool executeTmplActions(char *at_str, const Cpath& path, + const Cpath& disp_path, const vtw_node *actions, + const vtw_def *def); + bool cfgPathMarkedCommitted(const Cpath& path_comps, bool is_delete); + bool markCfgPathCommitted(const Cpath& path_comps, bool is_delete); + virtual bool clearCommittedMarkers() = 0; + virtual bool commitConfig(commit::PrioNode& pnode) = 0; // load bool loadFile(const char *filename); @@ -361,14 +375,6 @@ private: virtual bool get_comment(string& comment, bool active_cfg) = 0; virtual bool marked_display_default(bool active_cfg) = 0; - // observers during commit operation - virtual bool marked_committed(const tr1::shared_ptr<Ctemplate>& def, - bool is_set) = 0; - - // these operate on both current tmpl and work paths - virtual bool validate_val_impl(const tr1::shared_ptr<Ctemplate>& def, - char *value) = 0; - // observers for "edit/tmpl levels" (for "edit"-related operations) /* note that these should be handled in the base class since they * should not be implementation-specific. however, current definitions @@ -385,6 +391,10 @@ private: virtual void get_edit_level(Cpath& path_comps) = 0; virtual bool edit_level_at_root() = 0; + // functions for commit operation + virtual bool marked_committed(bool is_delete) = 0; + virtual bool mark_committed(bool is_delete) = 0; + // these are for testing/debugging virtual string cfg_path_to_str() = 0; virtual string tmpl_path_to_str() = 0; |