#ifndef INCLUDE_PBBERRNO_H
#define INCLUDE_PBBERRNO_H
/* ----------------------------------------------------------------------------
 * errorcodes.h
 * definitions of errorcodes used in pbbuttonsd and its modules
 *
 * Copyright 2002 Matthias Grimm
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 * ----------------------------------------------------------------------------*/

#include <stdarg.h>

#define E_OK		0
#define E_PERM		1
#define E_PRIVATE	2
#define E_NOEXIST	3
#define E_NOCHAR	4
#define E_NOBLK		5
#define E_NOFILE	6
#define E_NOLINK	7
#define E_BUFOVL	8
#define E_OPEN		9
#define E_FORMAT	10
#define E_MSGPORT	11
#define E_TWICE		12
#define E_INFO		13
#define E_NOSERVER	14
#define E_REGISTER	15
#define E_USER		16
#define E_RIGHTS	17
#define E_NOWRITE	18
#define E_NOREAD	19
#define E_CLDKILL	20
#define E_CLDEXIT	21
#define E_CLDSIG	22
#define E_NOMEM		23
#define E_NOSUPPORT	24
#define E_INVALID	25
#define E_CLDFAIL	26
#define E_OLDPORT	27
#define E_OPTEXISTS	28
#define E_NODIR		29

enum pbberrtype { PBB_ERR, PBB_WARN, PBB_INFO };

/* prototypes */
void print_error (char *msg, ...);
void print_msg (enum pbberrtype type, char *msg, ...);
void print_message (enum pbberrtype type, char *msg, va_list args);

#endif    /* INCLUDE_PBBERRNO_H */
