yumapro  21.10T-9
YumaPro SDK
agt_yangapi.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
3  *
4  * Unless required by applicable law or agreed to in writing,
5  * software distributed under the License is distributed on an
6  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7  * KIND, either express or implied. See the License for the
8  * specific language governing permissions and limitations
9  * under the License.
10  */
11 #if defined (WITH_YANGAPI) || defined(WITH_YCONTROL) || defined(WITH_RESTCONF)
12 #ifndef _H_agt_yangapi
13 #define _H_agt_yangapi
14 /* FILE: agt_yangapi.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 10-apr-12 abb Begun.
36 */
37 
38 #ifndef _H_ses
39 #include "ses.h"
40 #endif
41 
42 #ifndef _H_status
43 #include "status.h"
44 #endif
45 
46 #ifndef _H_yangapi
47 #include "yangapi.h"
48 #endif
49 
50 #ifndef _H_yang_patch
51 #include "yang_patch.h"
52 #endif
53 
54 #ifndef _H_agt_restcmn
55 #include "agt_restcmn.h"
56 #endif
57 
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 
64 /********************************************************************
65 * *
66 * C O N S T A N T S *
67 * *
68 *********************************************************************/
69 
70 
71 /********************************************************************
72 * *
73 * T Y P E S *
74 * *
75 *********************************************************************/
76 
77 
78 /********************************************************************
79 * *
80 * F U N C T I O N S *
81 * *
82 *********************************************************************/
83 
102 extern status_t
103  agt_yangapi_init (void);
104 
105 
111 extern void
112  agt_yangapi_cleanup (void);
113 
114 
122 extern boolean
124 
125 
145 extern boolean
147  yang_patch_cb_t *pcb,
148  boolean skip_sil,
149  boolean skip_save,
150  const xmlChar *comment_str,
151  status_t *res);
152 
153 
165 extern status_t
167  yangapi_cb_t *rcb,
168  rpc_msg_t *msg);
169 
170 
176 extern agt_yangapi_context_t *
178 
179 
184 #ifdef __cplusplus
185 } /* end extern 'C' */
186 #endif
187 
188 #endif /* _H_agt_yangapi */
189 #endif // WITH_YANGAPI || WITH_YCONTROL || WITH_RESTCONF
Restapi Control Block Used by RESTCONF to hold parse and request processing state.
Definition: yangapi.h:224
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
agt_yangapi_context_t * agt_yangapi_get_context(void)
Get the YANG-API Context structure.
Definition: agt_yangapi.c:1768
status_t agt_yangapi_validate_method_params(ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg)
validate that the operation is supported for the URI parameters given.
Definition: agt_yangapi.c:1630
NETCONF Session Common definitions module.
YANG-API definitions (pre-RESTCONF)
One YANG Patch Request.
Definition: yang_patch.h:155
boolean agt_yangapi_dispatch_db_api(ses_cb_t *scb, yang_patch_cb_t *pcb, boolean skip_sil, boolean skip_save, const xmlChar *comment_str, status_t *res)
Dispatch an incoming YControl DB-API request.
Definition: agt_yangapi.c:1260
YANG Patch Media Type.
status_t agt_yangapi_init(void)
Initialize the agt_yangapi module.
Definition: agt_yangapi.c:834
Session Control Block.
Definition: ses.h:542
status_t
global error return code
Definition: status_enum.h:186
module context node with cached schema tree and API template for retrieval (root) ...
Definition: agt_restcmn.h:171
Common function for RESTCONF and YANG-API protocols.
Global error messages for status code enumerations.
void agt_yangapi_cleanup(void)
Cleanup the agt_yangapi module.
Definition: agt_yangapi.c:859
boolean agt_yangapi_dispatch(ses_cb_t *scb)
Dispatch an incoming Yuma REST API request.
Definition: agt_yangapi.c:882