yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
agt_db_lock.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 - 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#ifdef WITH_YCONTROL
12#ifndef _H_agt_db_lock
13#define _H_agt_db_lock
14
15/* FILE: agt_db_lock.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
34date init comment
35----------------------------------------------------------------------
3629-jan-19 abb Begun
37*/
38
39#include <xmlstring.h>
40
41#ifndef _H_agt_cfg
42#include "agt_cfg.h"
43#endif
44
45#ifndef _H_status_enum
46#include "status_enum.h"
47#endif
48
49#ifndef _H_val
50#include "val.h"
51#endif
52
53#ifndef _H_ycontrol
54#include "ycontrol.h"
55#endif
56
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
62/********************************************************************
63* *
64* C O N S T A N T S *
65* *
66*********************************************************************/
67
68/********************************************************************
69* *
70* T Y P E S *
71* *
72*********************************************************************/
73
74
75/********************************************************************
76* *
77* F U N C T I O N S *
78* *
79*********************************************************************/
80
81/* header in agt_db_api.h */
82
83
97extern status_t
98 agt_db_lock_init (void);
99
100
106extern void
107 agt_db_lock_cleanup (void);
108
109
117extern status_t
118 agt_db_lock_set_owner (const xmlChar *subsys_id,
119 int subsys_fd);
120
121
127extern boolean
128 agt_db_lock_needed (void);
129
130
137extern status_t
139
140
146extern status_t
147 agt_db_lock_release (void);
148
149
160extern status_t
161 agt_db_lock_handle_response (uint32 msgid,
162 const xmlChar *subsys_id,
163 ycontrol_msgbody_t msgbody_type,
164 val_value_t *msgbody);
165
166
173extern void
174 agt_db_lock_subsys_gone (const xmlChar *subsys_id);
175
176
183extern boolean
185
186
190#ifdef __cplusplus
191} /* end extern 'C' */
192#endif
193
194#endif /* _H_agt_db_lock */
195#endif // WITH_YCONTROL
Manage Server configuration edit transactions.
status_t agt_db_lock_init(void)
Initialize the DB-Edit-Lock subsysystem handler.
Definition: agt_db_lock.c:424
void agt_db_lock_cleanup(void)
Cleanup the DB-Edit-Lock Module.
Definition: agt_db_lock.c:491
boolean agt_db_lock_init_waiting(void)
Check if db-lock is stuck in init-waiting state.
Definition: agt_db_lock.c:950
status_t agt_db_lock_request(agt_cfg_transaction_t *txcb)
Request the DB-Edit-Lock.
Definition: agt_db_lock.c:598
void agt_db_lock_subsys_gone(const xmlChar *subsys_id)
Called when the subsystem is gone to cleanup any db-lock state in progress.
Definition: agt_db_lock.c:917
status_t agt_db_lock_set_owner(const xmlChar *subsys_id, int subsys_fd)
Set the subsystem that owns the DB-Edit-Lock.
Definition: agt_db_lock.c:518
status_t agt_db_lock_handle_response(uint32 msgid, const xmlChar *subsys_id, ycontrol_msgbody_t msgbody_type, val_value_t *msgbody)
Handle the db-lock response.
Definition: agt_db_lock.c:818
boolean agt_db_lock_needed(void)
Check if lock is needed.
Definition: agt_db_lock.c:577
status_t agt_db_lock_release(void)
Release the DB-Edit-Lock.
Definition: agt_db_lock.c:755
status_t
global error return code
Definition: status_enum.h:210
ycontrol_msgbody_t
YControl message body types.
Definition: ycontrol_types.h:85
global error status code enumerations
Transaction Control Block.
Definition: agt_cfg.h:235
one value to match one type
Definition: val.h:912
Value Node Basic Support.
YumaPro Subsystem Control Protocol.