Server Wait On Clients System - API Documentation  v1.3.2
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  * *
47  ************************************************************************
48  */
49 
50 #ifndef LIBSWOCSERVER_H
51 #define LIBSWOCSERVER_H
52 
53 #include <portability.h>
54 
55 BEGIN_C_DECLS
56 
57 extern char locks_held[];
58 
59 int sws_show_status(void);
60 
61 int sws_show_block_status(void);
62 
63 int sws_srv_block(void);
64 
65 int sws_srv_unblock(void);
66 
67 int sws_show_cli_blocklist(void);
68 
69 int sws_server_wait(void);
70 
71 int sws_release(char *lockname);
72 
73 int sws_cli_block(char *blockname);
74 
75 int sws_cli_unblock(char *blockname);
76 
77 int sws_end_daemon(void);
78 
79 int sws_reload_config(void);
80 
82 
84 
86 
88 
89 END_C_DECLS
90 
91 #endif /* ndef LIBSWOCSERVER_H */
92 
int sws_show_block_status(void)
Display status of server blocking.
Definition: optionproc.c:166
int sws_show_status(void)
Display clients with active locks to stdout.
Definition: optionproc.c:110
char * libswocserver_get_src_version(void)
Get the source version.
Definition: version.c:52
int sws_srv_block(void)
Request server blocking.
Definition: optionproc.c:217
int sws_cli_block(char *blockname)
Set a client to blocked.
Definition: optionproc.c:483
int sws_cli_unblock(char *blockname)
Unblock a client block.
Definition: optionproc.c:535
int sws_release(char *lockname)
Remove a lock.
Definition: optionproc.c:428
char * libswocserver_get_pkg_version(void)
Get the git-describe based package version.
Definition: version.c:43
int sws_server_wait(void)
Wait until no client locks remain.
Definition: optionproc.c:368
int sws_srv_unblock(void)
Request removal of server blocking.
Definition: optionproc.c:265
int sws_reload_config(void)
Request the daemon to reload the config file.
Definition: optionproc.c:637
int sws_end_daemon(void)
Terminate the daemon.
Definition: optionproc.c:587
BEGIN_C_DECLS char locks_held[]
Holds the number of locks currently held during swc_client_wait().
Definition: optionproc.c:98
int sws_show_cli_blocklist(void)
Display list of blocked clients to stdout.
Definition: optionproc.c:313
void libswocserver_print_pkg_version(void)
Print the package version string to stdout.
Definition: version.c:60
void libswocserver_print_src_version(void)
Print the source version string to stdout.
Definition: version.c:69