Server Wait On Clients System - Full Internal Documentation  v1.6.3
Server Wait On Clients System.
libswocserver.h
Go to the documentation of this file.
1 
14 /* **********************************************************************
15  * *
16  * Changelog *
17  * *
18  * Date Author Version Description *
19  * *
20  * 16/07/2016 MG 1.0.1 First versioned release. *
21  * 17/07/2016 MG 1.0.2 Further coding style changes. *
22  * 14/12/2016 MG 1.0.3 Changes for move from NFS share 'file *
23  * as flag' to TCP socket implementation. *
24  * Add server extern. *
25  * Add common server-side validate *
26  * prototype. *
27  * Add new end daemon function prototype. *
28  * 13/02/2017 MG 1.0.4 Add new reload config function. *
29  * 15/05/2017 MG 1.0.5 Change validate config to swocserver- *
30  * only, aot common with swocserverd. *
31  * 12/09/2017 MG 1.0.6 Change sws_force_unlock() to *
32  * sws_unlock(). *
33  * 15/09/2017 MG 1.0.7 Change references to ssl to tls. *
34  * 02/10/2017 MG 1.0.8 Move validate config to common. *
35  * 12/11/2017 MG 1.0.9 Add Doxygen comments. *
36  * Add SPDX license tag. *
37  * 29/03/2018 MG 1.0.10 Add locks_held for use during signal *
38  * handling, primarily in swocserver -w. *
39  * 10/05/2018 MG 1.0.11 Improve function name consistency, *
40  * unlock -> release. *
41  * Add support for server listing blocked *
42  * clients. *
43  * Add client block and unblock. *
44  * Add server block and unblock. *
45  * 18/05/2019 MG 1.0.12 Merge sub-projects into one. *
46  * 11/10/2021 MG 1.0.13 Move to api directory. *
47  * 08/12/2021 MG 1.0.14 Tighten SPDX tag. *
48  * *
49  ************************************************************************
50  */
51 
52 #ifndef LIBSWOCSERVER_H
53 #define LIBSWOCSERVER_H
54 
55 #include <portability.h>
56 
57 BEGIN_C_DECLS
58 
59 extern char locks_held[];
60 
61 int sws_show_status(void);
62 
63 int sws_show_block_status(void);
64 
65 int sws_srv_block(void);
66 
67 int sws_srv_unblock(void);
68 
69 int sws_show_cli_blocklist(void);
70 
71 int sws_server_wait(void);
72 
73 int sws_release(char *lockname);
74 
75 int sws_cli_block(char *blockname);
76 
77 int sws_cli_unblock(char *blockname);
78 
79 int sws_end_daemon(void);
80 
81 int sws_reload_config(void);
82 
84 
86 
88 
90 
91 END_C_DECLS
92 
93 #endif /* ndef LIBSWOCSERVER_H */
94 
char * libswocserver_get_src_version(void)
Get the source version.
Definition: version.c:53
int sws_srv_unblock(void)
Request removal of server blocking.
Definition: optionproc.c:271
int sws_end_daemon(void)
Terminate the daemon.
Definition: optionproc.c:597
int sws_show_status(void)
Display clients with active locks to stdout.
Definition: optionproc.c:116
BEGIN_C_DECLS char locks_held[]
Holds the number of locks currently held during swc_client_wait().
Definition: optionproc.c:103
int sws_show_block_status(void)
Display status of server blocking.
Definition: optionproc.c:172
int sws_show_cli_blocklist(void)
Display list of blocked clients to stdout.
Definition: optionproc.c:319
int sws_srv_block(void)
Request server blocking.
Definition: optionproc.c:223
void libswocserver_print_pkg_version(void)
Print the package version string to stdout.
Definition: version.c:61
char * libswocserver_get_pkg_version(void)
Get the git-describe based package version.
Definition: version.c:44
int sws_cli_unblock(char *blockname)
Unblock a client block.
Definition: optionproc.c:544
int sws_reload_config(void)
Request the daemon to reload the config file.
Definition: optionproc.c:647
int sws_release(char *lockname)
Remove a lock.
Definition: optionproc.c:435
void libswocserver_print_src_version(void)
Print the source version string to stdout.
Definition: version.c:70
int sws_server_wait(void)
Wait until no client locks remain.
Definition: optionproc.c:374
int sws_cli_block(char *blockname)
Set a client to blocked.
Definition: optionproc.c:491