From 87facac8ab09b380a81c0b4836d49274af4ffc9e Mon Sep 17 00:00:00 2001 From: James Davidson Date: Tue, 4 Sep 2012 12:19:16 -0700 Subject: Add cstore_cfg_path_exists_effective C interface --- src/cstore/cstore-c.cpp | 11 +++++++++++ src/cstore/cstore-c.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/cstore/cstore-c.cpp b/src/cstore/cstore-c.cpp index 86b544e..c3b5a37 100644 --- a/src/cstore/cstore-c.cpp +++ b/src/cstore/cstore-c.cpp @@ -61,6 +61,17 @@ cstore_cfg_path_exists(void *handle, const char *path_comps[], int num_comps) return 0; } +int +cstore_cfg_path_exists_effective(void *handle, const char *path_comps[], int num_comps) +{ + if (handle) { + Cpath p(path_comps, num_comps); + Cstore *cs = (Cstore *) handle; + return (cs->cfgPathEffective(p) ? 1 : 0); + } + return 0; +} + int cstore_get_var_ref(void *handle, const char *ref_str, vtw_type_e *type, char **val, int from_active) diff --git a/src/cstore/cstore-c.h b/src/cstore/cstore-c.h index 44f1efd..9728315 100644 --- a/src/cstore/cstore-c.h +++ b/src/cstore/cstore-c.h @@ -28,6 +28,8 @@ int cstore_validate_tmpl_path(void *handle, const char *path_comps[], int num_comps, int validate_tags); int cstore_cfg_path_exists(void *handle, const char *path_comps[], int num_comps); +int cstore_cfg_path_exists_effective(void *handle, const char *path_comps[], + int num_comps); int cstore_cfg_path_deactivated(void *handle, const char *path_comps[], int num_comps, int in_active); -- cgit v1.2.3