cfengine  3.15.4
About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version.
  Fossies Dox: cfengine-3.15.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

expand.h
Go to the documentation of this file.
1 /*
2  Copyright 2019 Northern.tech AS
3 
4  This file is part of CFEngine 3 - written and maintained by Northern.tech AS.
5 
6  This program is free software; you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by the
8  Free Software Foundation; version 3.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 
19  To the extent this program is licensed as part of the Enterprise
20  versions of CFEngine, the applicable Commercial Open Source License
21  (COSL) may apply to this file if you as a licensee so wish it. See
22  included file COSL.txt.
23 */
24 
25 #ifndef CFENGINE_EXPAND_H
26 #define CFENGINE_EXPAND_H
27 
28 
29 #include <cf3.defs.h>
30 #include <generic_agent.h>
31 #include <actuator.h>
32 
33 
34 PromiseResult CommonEvalPromise(EvalContext *ctx, const Promise *pp, void *param);
35 
36 PromiseResult ExpandPromise(EvalContext *ctx, const Promise *pp, PromiseActuator *ActOnPromise, void *param);
37 
38 Rval ExpandDanglers(EvalContext *ctx, const char *ns, const char *scope, Rval rval, const Promise *pp);
39 
40 bool IsExpandable(const char *str);
41 
42 char *ExpandScalar(const EvalContext *ctx, const char *ns, const char *scope,
43  const char *string, Buffer *out);
44 Rval ExpandBundleReference(EvalContext *ctx, const char *ns, const char *scope, Rval rval);
45 Rval ExpandPrivateRval(EvalContext *ctx, const char *ns, const char *scope, const void *rval_item, RvalType rval_type);
46 Rlist *ExpandList(EvalContext *ctx, const char *ns, const char *scope, const Rlist *list, int expandnaked);
47 Rval EvaluateFinalRval(EvalContext *ctx, const Policy *policy, const char *ns, const char *scope, Rval rval, bool forcelist, const Promise *pp);
48 
49 void BundleResolve(EvalContext *ctx, const Bundle *bundle);
50 void PolicyResolve(EvalContext *ctx, const Policy *policy, GenericAgentConfig *config);
51 void BundleResolvePromiseType(EvalContext *ctx, const Bundle *bundle, const char *type, PromiseActuator *actuator);
52 
53 bool IsNakedVar(const char *str, char vtype);
54 void GetNaked(char *dst, const char *s);
55 bool IsVarList(const char *var);
56 
57 #include <protocol.h> // ProtocolVersionParse() TODO: Remove
58 
59 #endif
PromiseResult PromiseActuator(EvalContext *ctx, const Promise *pp, void *param)
Definition: actuator.h:30
RvalType
Definition: cf3.defs.h:605
PromiseResult
Definition: cf3.defs.h:122
bool IsVarList(const char *var)
Definition: expand.c:1274
Rlist * ExpandList(EvalContext *ctx, const char *ns, const char *scope, const Rlist *list, int expandnaked)
Definition: expand.c:466
PromiseResult ExpandPromise(EvalContext *ctx, const Promise *pp, PromiseActuator *ActOnPromise, void *param)
Definition: expand.c:257
void PolicyResolve(EvalContext *ctx, const Policy *policy, GenericAgentConfig *config)
Definition: expand.c:1065
void GetNaked(char *dst, const char *s)
Definition: expand.c:1253
Rval ExpandDanglers(EvalContext *ctx, const char *ns, const char *scope, Rval rval, const Promise *pp)
void BundleResolve(EvalContext *ctx, const Bundle *bundle)
Definition: expand.c:800
char * ExpandScalar(const EvalContext *ctx, const char *ns, const char *scope, const char *string, Buffer *out)
Definition: expand.c:516
Rval EvaluateFinalRval(EvalContext *ctx, const Policy *policy, const char *ns, const char *scope, Rval rval, bool forcelist, const Promise *pp)
Definition: expand.c:610
bool IsNakedVar(const char *str, char vtype)
Definition: expand.c:1198
PromiseResult CommonEvalPromise(EvalContext *ctx, const Promise *pp, void *param)
Definition: expand.c:1291
Rval ExpandBundleReference(EvalContext *ctx, const char *ns, const char *scope, Rval rval)
Definition: expand.c:484
bool IsExpandable(const char *str)
Definition: expand.c:1117
void BundleResolvePromiseType(EvalContext *ctx, const Bundle *bundle, const char *type, PromiseActuator *actuator)
Definition: expand.c:715
Rval ExpandPrivateRval(EvalContext *ctx, const char *ns, const char *scope, const void *rval_item, RvalType rval_type)
Definition: expand.c:313
Definition: buffer.h:50
Definition: policy.h:70
Definition: policy.h:53
Definition: rlist.h:35
Definition: cf3.defs.h:614