apm-proto.h revision 1.1 1 1.1 jtk /* $NetBSD: apm-proto.h,v 1.1 1996/08/25 23:40:59 jtk Exp $ */
2 1.1 jtk /*-
3 1.1 jtk * Copyright (c) 1995,1996 John T. Kohl. All rights reserved.
4 1.1 jtk *
5 1.1 jtk * Redistribution and use in source and binary forms, with or without
6 1.1 jtk * modification, are permitted provided that the following conditions
7 1.1 jtk * are met:
8 1.1 jtk * 1. Redistributions of source code must retain the above copyright
9 1.1 jtk * notice, this list of conditions and the following disclaimer.
10 1.1 jtk * 2. Redistributions in binary form must reproduce the above copyright
11 1.1 jtk * notice, this list of conditions and the following disclaimer in the
12 1.1 jtk * documentation and/or other materials provided with the distribution.
13 1.1 jtk * 3. All advertising materials mentioning features or use of this software
14 1.1 jtk * must display the following acknowledgement:
15 1.1 jtk * This product includes software developed by the University of
16 1.1 jtk * California, Berkeley and its contributors.
17 1.1 jtk * 4. Neither the name of the University nor the names of its contributors
18 1.1 jtk * may be used to endorse or promote products derived from this software
19 1.1 jtk * without specific prior written permission.
20 1.1 jtk *
21 1.1 jtk * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
22 1.1 jtk * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 1.1 jtk * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 1.1 jtk * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 1.1 jtk * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 1.1 jtk * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 1.1 jtk * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 1.1 jtk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 1.1 jtk * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 1.1 jtk * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 1.1 jtk * POSSIBILITY OF SUCH DAMAGE.
32 1.1 jtk *
33 1.1 jtk */
34 1.1 jtk
35 1.1 jtk enum apm_action {
36 1.1 jtk NONE,
37 1.1 jtk SUSPEND,
38 1.1 jtk STANDBY,
39 1.1 jtk GETSTATUS
40 1.1 jtk };
41 1.1 jtk
42 1.1 jtk enum apm_state {
43 1.1 jtk NORMAL,
44 1.1 jtk SUSPENDING,
45 1.1 jtk STANDING_BY
46 1.1 jtk };
47 1.1 jtk
48 1.1 jtk struct apm_command {
49 1.1 jtk int vno;
50 1.1 jtk enum apm_action action;
51 1.1 jtk };
52 1.1 jtk
53 1.1 jtk struct apm_reply {
54 1.1 jtk int vno;
55 1.1 jtk enum apm_state newstate;
56 1.1 jtk struct apm_power_info batterystate;
57 1.1 jtk };
58 1.1 jtk
59 1.1 jtk #define APMD_VNO 1
60 1.1 jtk
61 1.1 jtk extern const char *battstate __P((int state));
62 1.1 jtk extern const char *ac_state __P((int state));
63