yumapro  20.10-12
YumaPro SDK
op.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_op
13 #define _H_op
14 /* FILE: op.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
26 /*********************************************************************
27 * *
28 * C H A N G E H I S T O R Y *
29 * *
30 *********************************************************************
31 
32 date init comment
33 ----------------------------------------------------------------------
34 06-apr-05 abb Begun.
35 */
36 
37 #include <xmlstring.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /********************************************************************
44 * *
45 * C O N S T A N T S *
46 * *
47 *********************************************************************/
48 
49 
50 
51 /********************************************************************
52 * *
53 * T Y P E S *
54 * *
55 *********************************************************************/
56 
68 typedef enum op_method_t_ {
83 } YPACK op_method_t;
84 
85 
87 typedef enum op_srctyp_t_ {
92 } YPACK op_srctyp_t;
93 
94 
96 typedef enum op_targtyp_t_ {
100 } YPACK op_targtyp_t;
101 
102 
104 typedef enum op_defop_t_ {
110 } YPACK op_defop_t;
111 
112 
114 typedef enum op_filtertyp_t_ {
118 } YPACK op_filtertyp_t;
119 
120 
122 typedef enum op_editop_t_ {
133 } YPACK op_editop_t;
134 
135 
137 typedef enum op_insertop_t_ {
143 } YPACK op_insertop_t;
144 
145 
147 typedef enum op_t_ {
156 } YPACK op_t;
157 
158 
160 typedef enum op_testop_t_ {
165 } YPACK op_testop_t;
166 
167 
173 typedef enum op_errop_t_ {
178 } YPACK op_errop_t;
179 
180 
182 typedef struct op_filter_t_ {
183  op_filtertyp_t op_filtyp;
185 } YPACK op_filter_t;
186 
187 
188 /********************************************************************
189 * *
190 * F U N C T I O N S *
191 * *
192 *********************************************************************/
193 
194 
201 extern const xmlChar *
202  op_method_name (op_method_t op_id);
203 
204 
211 extern const xmlChar *
212  op_editop_name (op_editop_t ed_id);
213 
214 
221 extern op_editop_t
222  op_editop_id (const xmlChar *opstr);
223 
224 
231 extern const xmlChar *
232  op_insertop_name (op_insertop_t ins_id);
233 
234 
241 extern op_insertop_t
242  op_insertop_id (const xmlChar *opstr);
243 
244 
251 extern op_filtertyp_t
252  op_filtertyp_id (const xmlChar *filstr);
253 
254 
261 extern const xmlChar *
262  op_defop_name (op_defop_t def_id);
263 
264 
271 extern op_editop_t
272  op_defop_id (const xmlChar *defstr);
273 
274 
281 extern const xmlChar *
282  op_testop_name (op_testop_t test_id);
283 
284 
291 extern op_testop_t
292  op_testop_enum (const xmlChar *teststr);
293 
294 
301 extern const xmlChar *
302  op_errop_name (op_errop_t err_id);
303 
304 
311 extern op_errop_t
312  op_errop_id (const xmlChar *errstr);
313 
314 
322 extern op_defop_t
323  op_defop_id2 (const xmlChar *defstr);
324 
325 
338 extern boolean
339  op_editop_is_delete (op_editop_t ed_id);
340 
341 
344 #ifdef __cplusplus
345 } /* end extern 'C' */
346 #endif
347 
348 #endif /* _H_op */
OP_KILL_SESSION
@ OP_KILL_SESSION
kill-session
Definition: op.h:78
OP_COMMIT
@ OP_COMMIT
commit, #candidate capability
Definition: op.h:79
OP_ERROP_ROLLBACK
@ OP_ERROP_ROLLBACK
rollback-on-error
Definition: op.h:177
op_defop_name
const xmlChar * op_defop_name(op_defop_t def_id)
Get the keyword for the specified op_defop_t enumeration.
Definition: op.c:303
OP_EDITOP_CREATE
@ OP_EDITOP_CREATE
edit op is create
Definition: op.h:126
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
OP_EDITOP_NONE
@ OP_EDITOP_NONE
not set
Definition: op.h:123
OP_ERROP_NONE
@ OP_ERROP_NONE
not set
Definition: op.h:174
OP_DELETE
@ OP_DELETE
delete
Definition: op.h:152
OP_GET
@ OP_GET
get
Definition: op.h:76
op_method_name
const xmlChar * op_method_name(op_method_t op_id)
Get the keyword for the specified STD RPC method.
Definition: op.c:58
OP_INSOP_AFTER
@ OP_INSOP_AFTER
insert after foo
Definition: op.h:142
OP_UNLOCK
@ OP_UNLOCK
unlock
Definition: op.h:75
op_testop_t_
op_testop_t_
NETCONF edit-config test-option types.
Definition: op.h:160
OP_INSOP_BEFORE
@ OP_INSOP_BEFORE
insert before foo
Definition: op.h:141
op_errop_name
const xmlChar * op_errop_name(op_errop_t err_id)
Get the keyword for the specified op_errop_t enumeration.
Definition: op.c:421
op_errop_t_
op_errop_t_
NETCONF edit-config error-option types.
Definition: op.h:173
xml_util.h
XML Utilities.
op_insertop_id
op_insertop_t op_insertop_id(const xmlChar *opstr)
Get the ID for the insert operation from its keyword.
Definition: op.c:234
OP_INSOP_FIRST
@ OP_INSOP_FIRST
insert first
Definition: op.h:139
OP_VALIDATE
@ OP_VALIDATE
validate, #validate capability
Definition: op.h:81
OP_CREATE
@ OP_CREATE
create
Definition: op.h:151
OP_CANCEL_COMMIT
@ OP_CANCEL_COMMIT
cancel-commit, base:1.1 + conf-commit
Definition: op.h:82
OP_GET_CONFIG
@ OP_GET_CONFIG
get-config
Definition: op.h:70
op.h
NETCONF protocol operations.
OP_FILTER_SUBTREE
@ OP_FILTER_SUBTREE
subtree filter
Definition: op.h:116
op_insertop_name
const xmlChar * op_insertop_name(op_insertop_t ins_id)
Get the keyword for the specified op_insertop_t enumeration.
Definition: op.c:204
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
op_filter_t_::op_filter
struct val_value_t_ * op_filter
back-ptr to the filter value
Definition: op.h:184
OP_FILTER_XPATH
@ OP_FILTER_XPATH
XPath filter.
Definition: op.h:117
OP_DISCARD_CHANGES
@ OP_DISCARD_CHANGES
discard-changes, #candidate capability
Definition: op.h:80
OP_DEFOP_MERGE
@ OP_DEFOP_MERGE
defaul op is merge
Definition: op.h:107
OP_TARGET_CONFIG
@ OP_TARGET_CONFIG
target is a datastore
Definition: op.h:98
OP_ERROP_STOP
@ OP_ERROP_STOP
stop-on-error
Definition: op.h:175
OP_LOCK
@ OP_LOCK
lock
Definition: op.h:74
OP_EDITOP_DELETE
@ OP_EDITOP_DELETE
edit op is delete
Definition: op.h:127
op_filter_t_::op_filtyp
op_filtertyp_t op_filtyp
filter type
Definition: op.h:183
OP_TESTOP_TESTONLY
@ OP_TESTOP_TESTONLY
test-only
Definition: op.h:164
OP_DEFOP_REPLACE
@ OP_DEFOP_REPLACE
defaul op is replace
Definition: op.h:108
OP_SOURCE_NONE
@ OP_SOURCE_NONE
not set
Definition: op.h:88
OP_SOURCE_URL
@ OP_SOURCE_URL
source is URL
Definition: op.h:91
op_defop_id
op_editop_t op_defop_id(const xmlChar *defstr)
Get the ID for the default-operation from its keyword.
Definition: op.c:333
op_targtyp_t_
op_targtyp_t_
NETCONF protocol operation PDU target types.
Definition: op.h:96
OP_NO_METHOD
@ OP_NO_METHOD
not set
Definition: op.h:69
OP_ERROP_CONTINUE
@ OP_ERROP_CONTINUE
continue-on-error
Definition: op.h:176
op_t_
op_t_
NETCONF full operation list for access control.
Definition: op.h:147
OP_INSOP_NONE
@ OP_INSOP_NONE
not set
Definition: op.h:138
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
OP_COPY_CONFIG
@ OP_COPY_CONFIG
copy-config
Definition: op.h:72
OP_MERGE
@ OP_MERGE
merge
Definition: op.h:149
yangconst.h
Contains YANG constants separated to prevent H file include loops.
OP_EDITOP_COMMIT
@ OP_EDITOP_COMMIT
commit, internal enum
Definition: op.h:129
val_value_t_
one value to match one type
Definition: val.h:860
OP_EDITOP_DELETE_ALL
@ OP_EDITOP_DELETE_ALL
delete-all, yumapro only
Definition: op.h:131
op_defop_id2
op_defop_t op_defop_id2(const xmlChar *defstr)
Get the ID for the default-operation from its keyword Return the op_defop_t, not the op_editop_t conv...
Definition: op.c:484
OP_INSOP_LAST
@ OP_INSOP_LAST
insert last (default)
Definition: op.h:140
op_editop_name
const xmlChar * op_editop_name(op_editop_t ed_id)
Get the keyword for the specified op_editop_t enumeration.
Definition: op.c:106
OP_TARGET_NONE
@ OP_TARGET_NONE
not set
Definition: op.h:97
OP_SOURCE_INLINE
@ OP_SOURCE_INLINE
source is inline config
Definition: op.h:90
op_method_t_
op_method_t_
NETCONF protocol operation enumeration is actually an RPC method in the NECONF namespace This is not ...
Definition: op.h:68
op_insertop_t_
op_insertop_t_
YANG insert operation types.
Definition: op.h:137
op_editop_t_
op_editop_t_
NETCONF edit-config operation types.
Definition: op.h:122
op_defop_t_
op_defop_t_
NETCONF protocol default edit-config operation types.
Definition: op.h:104
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
OP_EDITOP_LOAD
@ OP_EDITOP_LOAD
load, internal enum
Definition: op.h:128
op_testop_enum
op_testop_t op_testop_enum(const xmlChar *teststr)
Get the enum for the specified op_testop_t string.
Definition: op.c:396
OP_TARGET_URL
@ OP_TARGET_URL
target is a URL
Definition: op.h:99
op_editop_is_delete
boolean op_editop_is_delete(op_editop_t ed_id)
Check if the editop is some sort of delete.
Definition: op.c:522
OP_FILTER_NONE
@ OP_FILTER_NONE
not set
Definition: op.h:115
OP_EDITOP_REMOVE
@ OP_EDITOP_REMOVE
remove, base:1.1 only
Definition: op.h:130
op_filtertyp_t_
op_filtertyp_t_
NETCONF protocol operation PDU filter types.
Definition: op.h:114
OP_DELETE_CONFIG
@ OP_DELETE_CONFIG
delete-config
Definition: op.h:73
OP_NOTIFY
@ OP_NOTIFY
notify
Definition: op.h:154
OP_REPLACE
@ OP_REPLACE
replace
Definition: op.h:150
OP_SOURCE_CONFIG
@ OP_SOURCE_CONFIG
source is a datastore
Definition: op.h:89
OP_READ
@ OP_READ
read
Definition: op.h:155
OP_TESTOP_SET
@ OP_TESTOP_SET
set
Definition: op.h:163
op_testop_name
const xmlChar * op_testop_name(op_testop_t test_id)
Get the keyword for the specified op_testop_t enumeration.
Definition: op.c:367
OP_LOAD
@ OP_LOAD
load
Definition: op.h:153
op_errop_id
op_errop_t op_errop_id(const xmlChar *errstr)
Get the ID for the error-option from its keyword.
Definition: op.c:449
OP_EDITOP_REMOVE_ALL
@ OP_EDITOP_REMOVE_ALL
remove-all, yumapro only
Definition: op.h:132
OP_TESTOP_TESTTHENSET
@ OP_TESTOP_TESTTHENSET
test-then-set (default)
Definition: op.h:162
op_srctyp_t_
op_srctyp_t_
NETCONF protocol operation PDU source types.
Definition: op.h:87
OP_DEFOP_NONE
@ OP_DEFOP_NONE
defaul op is none
Definition: op.h:106
OP_DEFOP_NOT_USED
@ OP_DEFOP_NOT_USED
defaul op not used
Definition: op.h:109
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
OP_CLOSE_SESSION
@ OP_CLOSE_SESSION
close-session
Definition: op.h:77
xmlns.h
XML namespace support.
OP_EDIT_CONFIG
@ OP_EDIT_CONFIG
edit-config
Definition: op.h:71
status.h
Global error messages for status code enumerations.
OP_NONE
@ OP_NONE
not set
Definition: op.h:148
op_filtertyp_id
op_filtertyp_t op_filtertyp_id(const xmlChar *filstr)
Get the ID for the filter type from its keyword.
Definition: op.c:271
dlq.h
dlq provides general double-linked list and queue support:
op_editop_id
op_editop_t op_editop_id(const xmlChar *opstr)
Get the ID for the editop from its keyword.
Definition: op.c:146
op_filter_t_
NETCONF protocol operation filter spec.
Definition: op.h:182
OP_TESTOP_NONE
@ OP_TESTOP_NONE
not set
Definition: op.h:161
OP_DEFOP_NOT_SET
@ OP_DEFOP_NOT_SET
not set
Definition: op.h:105