yumapro  20.10-12
YumaPro SDK
agt_commit_complete.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_agt_commit_complete_cb
13 #define _H_agt_commit_complete_cb
14 
15 /* FILE: agt_cb.h
16 *********************************************************************
17 * P U R P O S E
18 *********************************************************************/
19 
28 /*********************************************************************
29 * C H A N G E H I S T O R Y
30 *********************************************************************
31 
32 date init comment
33 ----------------------------------------------------------------------
34 24-oct-11 mp First draft.
35 */
36 
37 #include <xmlstring.h>
38 
39 #include "procdefs.h"
40 #include "agt.h"
41 #include "status.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 
61 /********************************************************************
62 * T Y P E D E F S
63 *********************************************************************/
64 
66 typedef status_t
67  (*agt_commit_complete_cb_t)(agt_commit_type_t commit_type);
68 
69 
70 /********************************************************************
71 * F U N C T I O N S
72 *********************************************************************/
73 
74 
80 extern void
82 
83 
89 extern void
91 
92 
105 extern status_t
106  agt_commit_complete_register (const xmlChar *modname,
108 
109 
117 extern void
118  agt_commit_complete_unregister (const xmlChar *modname);
119 
120 
133 extern status_t
134  agt_commit_complete (rpc_msg_t *msg,
135  agt_commit_type_t commit_type);
136 
137 
141 #ifdef __cplusplus
142 } /* end extern 'C' */
143 #endif
144 
145 #endif // _H_agt_commit_complete_cb
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
agt_commit_complete_register
status_t agt_commit_complete_register(const xmlChar *modname, agt_commit_complete_cb_t cb)
Register a Commit Complete callback.
Definition: agt_commit_complete.c:176
xml_util.h
XML Utilities.
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
agt_commit_complete_init
void agt_commit_complete_init(void)
Initialise the callback commit module.
Definition: agt_commit_complete.c:123
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
agt_commit_complete.h
NETCONF Server Commit Complete callback handler. This file contains functions to support registering,...
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
dlq_remove
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:519
agt_commit_complete_unregister
void agt_commit_complete_unregister(const xmlChar *modname)
Unregister a Commit Complete callback.
Definition: agt_commit_complete.c:216
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
LOGINFO
#define LOGINFO
Check if at least log-level=info.
Definition: log.h:279
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
agt.h
Multi-Protocol Network Management Server.
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
AGT_CFG_GET_SKIP_SIL
#define AGT_CFG_GET_SKIP_SIL(C)
check the skip SIL callback flag
Definition: agt_cfg.h:118
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
agt_cfg.h
Manage Server configuration edit transactions.
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
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
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
agt_commit_complete_cleanup
void agt_commit_complete_cleanup(void)
Cleanup the callback commit module.
Definition: agt_commit_complete.c:140
agt_commit_complete_cb_t
status_t(* agt_commit_complete_cb_t)(agt_commit_type_t commit_type)
Typedef of the commit_complete callback.
Definition: agt_commit_complete.h:67
status.h
Global error messages for status code enumerations.
agt_commit_complete
status_t agt_commit_complete(rpc_msg_t *msg, agt_commit_type_t commit_type)
Complete a commit operation.
Definition: agt_commit_complete.c:252
dlq.h
dlq provides general double-linked list and queue support:
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297