yumapro  20.10-12
YumaPro SDK
plock.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
13 #define _H_plock
14 /* FILE: plock.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 21-jun-10 abb Begun.
35 
36 */
37 
38 #ifndef _H_plock_cb
39 #include "plock_cb.h"
40 #endif
41 
42 #ifndef _H_status
43 #include "status.h"
44 #endif
45 
46 #ifndef _H_xpath
47 #include "xpath.h"
48 #endif
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /********************************************************************
55 * *
56 * C O N S T A N T S *
57 * *
58 *********************************************************************/
59 
60 
61 /********************************************************************
62 * *
63 * T Y P E S *
64 * *
65 *********************************************************************/
66 
67 
68 /********************************************************************
69 * *
70 * F U N C T I O N S *
71 * *
72 *********************************************************************/
73 
90 extern plock_id_t
91  plock_get_id (plock_cb_t *plcb);
92 
93 
100 extern uint32
101  plock_get_sid (plock_cb_t *plcb);
102 
103 
110 extern const xmlChar *
111  plock_get_timestamp (plock_cb_t *plcb);
112 
113 
114 
121 extern xpath_result_t *
122  plock_get_final_result (plock_cb_t *plcb);
123 
124 
131 extern xpath_pcb_t *
132  plock_get_first_select (plock_cb_t *plcb);
133 
134 
141 extern xpath_pcb_t *
142  plock_get_next_select (xpath_pcb_t *xpathpcb);
143 
144 
152 extern void
153  plock_add_select (plock_cb_t *plcb,
154  xpath_pcb_t *xpathpcb,
155  xpath_result_t *result);
156 
157 
167 extern status_t
168  plock_make_final_result (plock_cb_t *plcb);
169 
170 
171 
175 #ifdef __cplusplus
176 } /* end extern 'C' */
177 #endif
178 
179 #endif /* _H_plock */
plock_add_select
void plock_add_select(plock_cb_t *plcb, xpath_pcb_t *xpathpcb, xpath_result_t *result)
Add a select XPath control block to the partial lock.
Definition: plock.c:284
ses.h
NETCONF Session Common definitions module.
cfg.h
ERR_NCX_XPATH_NODESET_EMPTY
@ ERR_NCX_XPATH_NODESET_EMPTY
371
Definition: status_enum.h:414
plock_get_sid
uint32 plock_get_sid(plock_cb_t *plcb)
Get the session ID holding this partial lock.
Definition: plock.c:153
tstamp.h
Timestamp utilities.
plock.h
RFC 57517 partial lock support.
xpath_move_nodeset
void xpath_move_nodeset(xpath_result_t *srcresult, xpath_result_t *destresult)
Move the nodes from a nodeset reult into the target nodeset result.
Definition: xpath.c:4194
val.h
Value Node Basic Support.
xml_util.h
XML Utilities.
plock_get_final_result
xpath_result_t * plock_get_final_result(plock_cb_t *plcb)
Get the session ID holding this partial lock.
Definition: plock.c:206
xpath1.h
XPath 1.0 expression support.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
plock_get_timestamp
const xmlChar * plock_get_timestamp(plock_cb_t *plcb)
Get the timestamp of the lock start time.
Definition: plock.c:180
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
plock_get_id
plock_id_t plock_get_id(plock_cb_t *plcb)
Get the lock ID for this partial lock.
Definition: plock.c:127
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
xpath1_prune_nodeset
void xpath1_prune_nodeset(xpath_pcb_t *pcb, xpath_result_t *result)
Check the current result nodeset and remove any redundant nodes from a NETCONF POV.
Definition: xpath1.c:5770
plock_make_final_result
status_t plock_make_final_result(plock_cb_t *plcb)
Create a final XPath result for all the partial results.
Definition: plock.c:315
log.h
NCX System Logging Manager.
plock_get_first_select
xpath_pcb_t * plock_get_first_select(plock_cb_t *plcb)
Get the first select XPath control block for the partial lock.
Definition: plock.c:232
plock_get_next_select
xpath_pcb_t * plock_get_next_select(xpath_pcb_t *xpathpcb)
Get the next select XPath control block for the partial lock.
Definition: plock.c:258
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
xpath_nodeset_empty
boolean xpath_nodeset_empty(const xpath_result_t *result)
Check if the result is an empty nodeset.
Definition: xpath.c:4228
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
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
xmlns.h
XML namespace support.
status.h
Global error messages for status code enumerations.