home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / include / extnsionst.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-31  |  2.6 KB  |  74 lines

  1. /* $XConsortium: extnsionst.h,v 1.9 89/08/31 18:41:12 rws Exp $ */
  2. /***********************************************************
  3. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  4. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission to use, copy, modify, and distribute this software and its 
  9. documentation for any purpose and without fee is hereby granted, 
  10. provided that the above copyright notice appear in all copies and that
  11. both that copyright notice and this permission notice appear in 
  12. supporting documentation, and that the names of Digital or MIT not be
  13. used in advertising or publicity pertaining to distribution of the
  14. software without specific, written prior permission.  
  15.  
  16. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  18. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  19. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  21. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  22. SOFTWARE.
  23.  
  24. ******************************************************************/
  25. #ifndef EXTENSIONSTRUCT_H
  26. #define EXTENSIONSTRUCT_H 
  27. #include "extension.h"
  28. typedef struct _ExtensionEntry {
  29.     int index;
  30.     void (* CloseDown)();    /* called at server shutdown */
  31.     char *name;               /* extension name */
  32.     int base;                 /* base request number */
  33.     int eventBase;            
  34.     int eventLast;
  35.     int errorBase;
  36.     int errorLast;
  37.     int num_aliases;
  38.     char **aliases;
  39.     pointer extPrivate;
  40.     unsigned short (* MinorOpcode)();    /* called for errors */
  41. } ExtensionEntry;
  42.  
  43. extern void (* EventSwapVector[128]) ();
  44.  
  45. typedef void (* ExtensionLookupProc)();
  46.  
  47. typedef struct _ProcEntry {
  48.     char *name;
  49.     ExtensionLookupProc proc;
  50. } ProcEntryRec, *ProcEntryPtr;
  51.  
  52. typedef struct _ScreenProcEntry {
  53.     int num;
  54.     ProcEntryPtr procList;
  55. } ScreenProcEntry;
  56.  
  57. #define    SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom)    \
  58.     pGC->VectorElement = NewRoutineAddress;
  59.  
  60. #define    GetGCValue(pGC, GCElement)    (pGC->GCElement)
  61.  
  62. extern void InitExtensions();
  63. extern int ProcQueryExtension();
  64. extern int ProcListExtensions();
  65. extern ExtensionEntry *AddExtension();
  66. extern Bool AddExtensionAlias();
  67. extern ExtensionLookupProc LookupProc();
  68. extern Bool RegisterProc();
  69. extern Bool RegisterScreenProc();
  70. extern unsigned short MinorOpcodeOfRequest();
  71. extern unsigned short StandardMinorOpcode();
  72.  
  73. #endif /* EXTENSIONSTRUCT_H */
  74.