/*----------------------------------------------------------------------
  $Id: headers.h,v 4.33 1998/11/16 20:14:44 hubert Exp $

            T H E    P I N E    M A I L   S Y S T E M

   Laurence Lundblade and Mike Seibel
   Networks and Distributed Computing
   Computing and Communications
   University of Washington
   Administration Builiding, AG-44
   Seattle, Washington, 98195, USA
   Internet: lgl@CAC.Washington.EDU
             mikes@CAC.Washington.EDU

   Please address all bugs and comments to "pine-bugs@cac.washington.edu"


   Pine and Pico are registered trademarks of the University of Washington.
   No commercial use of these trademarks may be made without prior written
   permission of the University of Washington.

   Pine, Pico, and Pilot software and its included text are Copyright
   1989-1998 by the University of Washington.

   The full text of our legal notices is contained in the file called
   CPYRIGHT, included with this distribution.


   Pine is in part based on The Elm Mail System:
    ***********************************************************************
    *  The Elm Mail System  -  Revision: 2.13                             *
    *                                                                     *
    * 			Copyright (c) 1986, 1987 Dave Taylor              *
    * 			Copyright (c) 1988, 1989 USENET Community Trust   *
    ***********************************************************************
 

  ----------------------------------------------------------------------*/

/*======================================================================
       headers.h

   The include file to always include that includes a few other things
     -  includes the most general system files and other pine include files
     -  declares the global variables
       
 ====*/
         

#ifndef _HEADERS_INCLUDED
#define _HEADERS_INCLUDED

/*----------------------------------------------------------------------
           Include files
 
 System specific includes and defines are in os.h, the source for which
is os-xxx.h. (Don't edit osdep.h; edit os-xxx.h instead.)
 ----*/
#include "../pico/headers.h"


#include "../c-client/mail.h"

#include "os.h"

#include "../c-client/rfc822.h"
#include "../c-client/misc.h"

#ifdef  ENABLE_LDAP

#include <lber.h>
#include <ldap.h>
/*
 * If LDAP_OPT_ON is defined in ldap.h, then this is the newer version of the
 * API (as opposed to the RFC1823 version). The newer version at the time
 * this was written was only described in draft-ietf-asid-ldap-c-api-00.txt.
 * Hmm. Seems mozilla.org defined LDAP_OPT_ON even in 1.1, so we'll require
 * that and LDAP_VERSION3.
 */
#ifndef LDAPAPI
#if	defined(LDAP_VERSION3)
#define	LDAPAPI	20
#else
#if	defined(LDAP_OPT_ON)
#define	LDAPAPI 11
#else
#define	LDAPAPI 10
#endif
#endif
#ifndef LDAP_OPT_ON
#define LDAP_OPT_ON ((void *)1)
#endif
#ifndef LDAP_OPT_OFF
#define LDAP_OPT_OFF ((void *)0)
#endif
#ifndef LDAP_OPT_SIZELIMIT
#define LDAP_OPT_SIZELIMIT 1134  /* we're hacking now! */
#endif
#ifndef LDAP_OPT_TIMELIMIT
#define LDAP_OPT_TIMELIMIT 1135
#endif
#ifndef LDAP_OPT_PROTOCOL_VERSION
#define LDAP_OPT_PROTOCOL_VERSION 1136
#endif
#endif

#ifndef LDAP_MSG_ONE
#define LDAP_MSG_ONE (0x00)
#define LDAP_MSG_ALL (0x01)
#define LDAP_MSG_RECEIVED (0x02)
#endif

#endif  /* ENABLE_LDAP */

#include "helptext.h"

#include "pine.h"

#include "context.h"



/*----------------------------------------------------------------------
    The few global variables we use in Pine
  ----*/

extern struct pine *ps_global;

extern char	   *pine_version;	/* pointer to version string	     */

extern char         tmp_20k_buf[];

#ifdef DEBUG
extern FILE        *debugfile;		/* file for debug output	  */
extern int          debug;		/* debugging level or none (zero) */
#endif

#endif /* _HEADERS_INCLUDED */
