 
#ifndef event_DEFINED
#define event_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from event.ch and will be
 * overwritten.  Make changes to event.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from event.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/


 

#define event_VERSION 1

#ifdef EVENT_IMPLEMENTATION
#define event_t t
#define event_proc proc
#define event_procdata procdata
#define event_next next
#define event_id id
#endif






#define event_TUtoSEC(x)  ((x)/(1000000>>6))
#define event_TUtoUSEC(x) ((x)<<6)
#define event_TUtoMSEC(x) (((x)<<3)/(1000>>3))
#define event_SECtoTU(x)  ((x)*(1000000>>6))
#define event_USECtoTU(x) ((x)>>6)
#define event_MSECtoTU(x) (((x)*(1000>>3))>>3)
#define event_ENDOFTIME 2000000000



/* 
 * End of information copied from event.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* event has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for event 
 */ 
struct event { 
    struct {
	struct basicobject_methods *event_methods;
    } header;
      /* WARNING WARNING WARNING: the event data structure is private.
       in fact the event * returned from enqueue event isn't really a pointer!
       The argument to event_Cancel must be a value returned from EnqueueEvent. -rr2b */
    long event_t;		/* time of evenet in microsec >> 6 */
    int (*event_proc)();	/* procedure to call for event */
    char *event_procdata;	/* data to be passed to proc */
    struct event *event_next;
    unsigned long event_id;

};

 
/* 
 * End of data structure for event.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef event_PROGRAMMERVERSION
#define event_PROGRAMMERVERSION 1
#endif /* event_PROGRAMMERVERSION */

#ifdef event_VERSION
#undef event_VERSION
#endif /* event_VERSION */
#define event_VERSION ((((event_PROGRAMMERVERSION << 16) ^ (0 << 8) ^ sizeof(struct event)) & 0x7ffff) + 0x80000 + (131 << 20))


#endif /* class_StaticInfoOnly */
#define event_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *event__GetClassInfo(); \
 extern struct classheader *event_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, event_classheader_StaticExport->name, event__GetClassInfo, NULL, event_classheader_StaticExport->namekey); } 
 
#define event_StaticLoad()  \
    { \
    event_StaticLoadOnlyThisClass();  \
    } 
 
#define event_StaticEntry  {event_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader event_classheader = {
    event_VERSION,
    "event",
    "event",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define event_CLASSPROCEDURES (event_classheader.classprocedures)
int event_classref_;
#endif /* class_StaticInfoOnly */

#endif /* event_DEFINED */

#if !defined(event_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_event) && !defined(class_StaticEntriesOnly)
#define event_ROUTINESDEFINED


#define event_NewFromObject(self) \
    ((* ((struct event * (*)())((self)->header.event_methods->info->procs->routines[0]))) (&event_classheader, (self)->header.event_methods->info->versionnumber))
#define event_New() \
    (*((struct event * (*)()) (event_CLASSPROCEDURES->routines[0])))(&event_classheader,event_VERSION)
#define event_Initialize(self) \
    (*((void (*)()) (event_CLASSPROCEDURES->routines[2])))(&event_classheader,self, event_VERSION)

#define event_Destroy(self) \
    ((* ((void (*)()) ((self)->header.event_methods->info->procs->routines[1]))) (&event_classheader, self))
#define event_Finalize(self) \
    (*((void (*)()) (event_CLASSPROCEDURES->routines[3])))(&event_classheader,self)

#define event_Cancel(event) \
    (*((void (*)()) (event_CLASSPROCEDURES->routines[5])))(&event_classheader,event)
#define event_Enqueue(time,proc,procdata) \
    (*((struct event * (*)()) (event_CLASSPROCEDURES->routines[6])))(&event_classheader,time,proc,procdata)
#define event_ForceNext() \
    (*((void (*)()) (event_CLASSPROCEDURES->routines[7])))(&event_classheader)
#define event_FirstTime(currentTime) \
    (*((long (*)()) (event_CLASSPROCEDURES->routines[8])))(&event_classheader,currentTime)
#define event_StartTimer() \
    (*((void (*)()) (event_CLASSPROCEDURES->routines[9])))(&event_classheader)
#define event_HandleTimer(currentTime) \
    (*((long (*)()) (event_CLASSPROCEDURES->routines[10])))(&event_classheader,currentTime)
#define event_Now() \
    (*((long (*)()) (event_CLASSPROCEDURES->routines[11])))(&event_classheader)
#define event_Allocate() \
    (*((struct event * (*)()) (event_CLASSPROCEDURES->routines[12])))(&event_classheader)
#define event_Deallocate(self) \
    (*((void (*)()) (event_CLASSPROCEDURES->routines[13])))(&event_classheader,self)


#endif /* !defined(event_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_event ) && !defined(class_StaticEntriesOnly)*/

