nut/docs/man/libnutclient_misc.3

111 lines
3.2 KiB
Groff
Raw Normal View History

2013-11-24 15:00:12 +00:00
'\" t
.\" Title: libnutclient_misc
2022-06-29 10:37:36 +00:00
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 04/26/2022
2013-11-24 15:00:12 +00:00
.\" Manual: NUT Manual
2022-06-29 10:37:36 +00:00
.\" Source: Network UPS Tools 2.8.0
2013-11-24 15:00:12 +00:00
.\" Language: English
.\"
2022-06-29 10:37:36 +00:00
.TH "LIBNUTCLIENT_MISC" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual"
2013-11-24 15:00:12 +00:00
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
2022-06-29 10:37:36 +00:00
libnutclient_misc, nutclient_authenticate, nutclient_logout, nutclient_device_login, nutclient_get_device_num_logins, nutclient_device_master, nutclient_device_forced_shutdown \- Miscellaneous functions in Network UPS Tools high\-level client access library
2013-11-24 15:00:12 +00:00
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
2022-06-29 10:37:36 +00:00
void nutclient_authenticate(
NUTCLIENT_t client,
const char* login, const char* passwd);
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
void nutclient_logout(NUTCLIENT_t client);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
void nutclient_device_login(NUTCLIENT_t client, const char* dev);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
void nutclient_device_primary(NUTCLIENT_t client, const char* dev);
/* OBSOLETED name: */
2013-11-24 15:00:12 +00:00
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev);
.fi
.SH "DESCRIPTION"
.sp
2022-06-29 10:37:36 +00:00
The \fBnutclient_authenticate()\fR function authenticates the user\&.
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIlogin\fR
is the user name\&.
.RE
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIpasswd\fR
is the user password\&.
.RE
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
The \fBnutclient_logout()\fR function disconnects gracefully from the server\&.
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
The \fBnutclient_device_login()\fR function logs the fact that a system is drawing power from this UPS\&.
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
The \fBnutclient_get_device_num_logins()\fR function retrieves the number of clients which have been logged for this device\&.
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
The \fBnutclient_device_master()\fR and \fBnutclient_device_primary()\fR (note: the former is obsoleted since NUT v2\&.8\&.0 in favor of the latter) functions make sure that primary\-mode functions like FSD are available if necessary\&.
2013-11-24 15:00:12 +00:00
.sp
The \fBnutclient_device_forced_shutdown()\fR function sets the "forced shutdown" flag on the device\&.
.sp
\fIdev\fR is the device name\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3)