yumapro  20.10-12
YumaPro SDK
plock_cb.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_plock_cb
13 #define _H_plock_cb
14 /* FILE: plock_cb.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
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 25-jun-10 abb Begun; slpit out from plock.h
37 
38 */
39 
40 #ifndef _H_dlq
41 #include "dlq.h"
42 #endif
43 
44 #ifndef _H_status
45 #include "status.h"
46 #endif
47 
48 #ifndef _H_tstamp
49 #include "tstamp.h"
50 #endif
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 /********************************************************************
57 * *
58 * C O N S T A N T S *
59 * *
60 *********************************************************************/
61 
62 
63 
64 /********************************************************************
65 * *
66 * T Y P E S *
67 * *
68 *********************************************************************/
69 
70 
78 typedef uint32 plock_id_t;
79 
81 typedef struct plock_cb_t_ {
82  dlq_hdr_t qhdr;
84  uint32 plock_sesid;
85  dlq_hdr_t plock_xpathpcbQ;
86  dlq_hdr_t plock_resultQ;
89 } plock_cb_t;
90 
91 
92 /********************************************************************
93 * *
94 * F U N C T I O N S *
95 * *
96 *********************************************************************/
97 
98 
108 extern plock_cb_t *
109  plock_cb_new (uint32 sid,
110  status_t *res);
111 
112 
118 extern void
119  plock_cb_free (plock_cb_t *plcb);
120 
121 
128 extern void
129  plock_cb_reset_id (void);
130 
131 
136 #ifdef __cplusplus
137 } /* end extern 'C' */
138 #endif
139 
140 #endif /* _H_plock_cb */
ses.h
NETCONF Session Common definitions module.
cfg.h
xpath_free_pcb
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:2963
val_value_t_::res
status_t res
validation result
Definition: val.h:910
tstamp.h
Timestamp utilities.
xpath_result_t_
XPath expression result.
Definition: xpath.h:619
plock_cb_t_::plock_final_result
struct xpath_result_t_ * plock_final_result
final result
Definition: plock_cb.h:87
val.h
Value Node Basic Support.
xml_util.h
XML Utilities.
plock_cb_reset_id
void plock_cb_reset_id(void)
Set the next ID number back to the start.
Definition: plock_cb.c:212
plock_cb_t_
struct representing 1 configuration database
Definition: plock_cb.h:81
plock_cb_free
void plock_cb_free(plock_cb_t *plcb)
Free a partial lock control block.
Definition: plock_cb.c:185
xpath1.h
XPath 1.0 expression support.
xpath.h
Schema and data model Xpath search support.
xpath_free_result
void xpath_free_result(xpath_result_t *result)
Free a malloced XPath result struct.
Definition: xpath.c:3107
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
plock_cb_t_::plock_xpathpcbQ
dlq_hdr_t plock_xpathpcbQ
Q of xpath_pcb_t.
Definition: plock_cb.h:85
plock_cb_t_::plock_resultQ
dlq_hdr_t plock_resultQ
Q of xpath_result_t.
Definition: plock_cb.h:86
plock_cb_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: plock_cb.h:82
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
ERR_NCX_RESOURCE_DENIED
@ ERR_NCX_RESOURCE_DENIED
269
Definition: status_enum.h:310
plock_cb_t_::plock_id
plock_id_t plock_id
partial lock ID
Definition: plock_cb.h:83
tstamp_datetime
void tstamp_datetime(xmlChar *buff)
Set the current date and time in an XML dateTime string format.
Definition: tstamp.c:160
plock_cb_t_::plock_sesid
uint32 plock_sesid
session holding lock
Definition: plock_cb.h:84
log.h
NCX System Logging Manager.
plock_cb_t_::plock_time
xmlChar plock_time[TSTAMP_MIN_SIZE]
lock time
Definition: plock_cb.h:88
xpath_new_result
xpath_result_t * xpath_new_result(xpath_restype_t restype)
malloc an XPath result
Definition: xpath.c:3033
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
TSTAMP_MIN_SIZE
#define TSTAMP_MIN_SIZE
normal minimum buffer size for a tstamp buffer
Definition: tstamp.h:67
plock_cb_new
plock_cb_t * plock_cb_new(uint32 sid, status_t *res)
Create a new partial lock control block.
Definition: plock_cb.c:132
plock_cb.h
RFC 57517 partial lock support Data structure definition.
plock_id_t
uint32 plock_id_t
matches lock-id-type in YANG module
Definition: plock_cb.h:78
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
XP_RT_NODESET
@ XP_RT_NODESET
node-set result
Definition: xpath.h:347
xmlns.h
XML namespace support.
status.h
Global error messages for status code enumerations.
dlq.h
dlq provides general double-linked list and queue support: