yumapro  21.10T-12
YumaPro SDK
db_api_types.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_db_api_types
13 #define _H_db_api_types
14 
15 /* FILE: db_api_types.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
28 /*********************************************************************
29 * *
30 * C H A N G E H I S T O R Y *
31 * *
32 *********************************************************************
33 
34 date init comment
35 ----------------------------------------------------------------------
36 18-nov-14 abb Begun
37 */
38 
39 #include <xmlstring.h>
40 
41 #ifndef _H_dlq
42 #include "dlq.h"
43 #endif
44 
45 #ifndef _H_ncxtypes
46 #include "ncxtypes.h"
47 #endif
48 
49 #ifndef _H_obj
50 #include "obj.h"
51 #endif
52 
53 #ifndef _H_rpc
54 #include "rpc.h"
55 #endif
56 
57 #ifndef _H_status_enum
58 #include "status_enum.h"
59 #endif
60 
61 #ifndef _H_val
62 #include "val.h"
63 #endif
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
70 /********************************************************************
71 * *
72 * C O N S T A N T S *
73 * *
74 *********************************************************************/
75 
76 
88 /********************************************************************
89 * *
90 * T Y P E S *
91 * *
92 *********************************************************************/
93 
95 typedef enum db_api_state_t_ {
98 
101 
104 
107 
110 
113 
116 
119 
122 
125 
127 
128 
130 typedef enum lock_state_t_ {
133 
136 
139 
142 
145 
148 } lock_state_t;
149 
150 
152 typedef struct db_api_cb_t_ {
155 
158 
161 
163  db_api_state_t state;
164 
166  uint32 msgid;
167 
170 
173 
175  uint32 last_msgid;
176 
179 
181  xmlChar *last_msg;
182 
184  xmlChar *filespec;
185 
187  const char *cmdname;
188 
191 
193  lock_state_t db_lock_state;
194 
196  xmlChar *lock_id;
197 } db_api_cb_t;
198 
199 
204 #ifdef __cplusplus
205 } /* end extern 'C' */
206 #endif
207 
208 #endif /* _H_db_api_types */
Data Object Support.
dlq provides general double-linked list and queue support:
ready for use
Definition: db_api_types.h:138
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
not set
Definition: db_api_types.h:132
const char * cmdname
back-ptr to command name
Definition: db_api_types.h:187
boolean db_lock_enabled
db-lock is enabled
Definition: db_api_types.h:190
One YANG data-def-stmt.
Definition: obj.h:1146
xmlChar * lock_id
current lock-id if locked (malloced string)
Definition: db_api_types.h:196
not set
Definition: db_api_types.h:97
uint32 msgid
request msgid that is expected in the response
Definition: db_api_types.h:166
uint32 last_msgid
edit or getconfig in progress state
Definition: db_api_types.h:175
lock_state_t db_lock_state
current db-lock state if enabled
Definition: db_api_types.h:193
rpc_msg_t * rpc_msg
dummy msg used for DB-API callback functions
Definition: db_api_types.h:172
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1055
lock_state_t
db-lock state enumerations
Definition: db_api_types.h:130
DB-API is ready for using request APIs.
Definition: db_api_types.h:112
val_value_t * payload
cached <payload> element for use in request messages
Definition: db_api_types.h:160
xmlChar * last_msg
saved last message (malloced string)
Definition: db_api_types.h:181
Value Node Basic Support.
ncx_module_t * mod
yumaworks-db-api YANG module
Definition: db_api_types.h:154
DB-API is waiting for a server response to an edit request.
Definition: db_api_types.h:115
internal control block for the DB-API module
Definition: db_api_types.h:152
db_api_state_t state
DB-API module state.
Definition: db_api_types.h:163
waiting for server response to init request
Definition: db_api_types.h:135
DB-API is waiting for a server response to a subrpc request.
Definition: db_api_types.h:124
YANG module data structures Many internal representations of YANG module constructs.
status_t last_status
last message status
Definition: db_api_types.h:178
DB-API is waiting for a server response to a get request.
Definition: db_api_types.h:118
one value to match one type
Definition: val.h:876
status_t
global error return code
Definition: status_enum.h:186
DB-API is starting up.
Definition: db_api_types.h:100
NETCONF protocol remote procedure call common definitions.
xmlChar * filespec
getconfig in progress state, last filespec (malloced string)
Definition: db_api_types.h:184
DB-API waiting for reply to register.
Definition: db_api_types.h:109
currently locked by a local system user
Definition: db_api_types.h:141
DB-API in error state.
Definition: db_api_types.h:106
currently locked by the main server
Definition: db_api_types.h:144
db_api_state_t
DB-API service state machine enumerations.
Definition: db_api_types.h:95
db-lock error state
Definition: db_api_types.h:147
obj_template_t * obj
<db-api> object within the /ycontrol/payload object
Definition: db_api_types.h:157
val_value_t * edit_request
cached <edit-request> message body
Definition: db_api_types.h:169
DB-API is waiting for a server response to a db-lock init request.
Definition: db_api_types.h:121
global error status code enumerations
DB-API is stopped.
Definition: db_api_types.h:103