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