home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff290.lzh / IPC / IPC_Include / IPCPorts.h < prev    next >
C/C++ Source or Header  |  1989-12-11  |  4KB  |  85 lines

  1. #ifndef IPC_PORTS_H
  2. #define IPC_PORTS_H
  3.  
  4. /*** include this BEFORE IPC.H (if required) ***/
  5.  
  6. /*******************************************************************
  7.  *                                                                 *
  8.  *                           IPCPorts.h                            *
  9.  *                                                                 *
  10.  *           Inter-Process-Communication Port Format               *
  11.  *                                                                 *
  12.  *              Release  2.0 -- 1989 March 25                      *
  13.  *                                                                 *
  14.  *              Copyright 1988,1989 Peeter Goodeve                 *
  15.  *                                                                 *
  16.  *  This source is freely distributable, and may be used freely    *
  17.  *  in any program,  but the structures should not be modified.     *
  18.  *                                                                 *
  19.  *******************************************************************/
  20. /*******************************************************************
  21.  *                                                                 *
  22.  *  88:7:22     ipp_BrokerInfo added to IPCPort                    *
  23.  *                                                                 *
  24.  *  89:3:25     IPCBasePort structure removed for shared lib.      *
  25.  *                                                                 *
  26.  *                                                                 *
  27.  *******************************************************************/
  28.  
  29. #ifndef EXEC_TYPES_H
  30. #include "exec/types.h"
  31. #endif
  32.  
  33. #ifndef EXEC_PORTS_H
  34. #include "exec/ports.h"
  35. #endif
  36.  
  37. /*******************************************************************
  38.  *                                                                 *
  39.  *  IPC Ports are essentially standard Exec message Ports except   *
  40.  *  for added fields to keep track of their usage.  Also they      *
  41.  *  are kept on their own list.                                    *
  42.  *                                                                 *
  43.  *  NOTE: IPCPorts are READ-ONLY TO ALL APPLICATION PROGRAMS!!     *
  44.  *   -- their internal data must be changed ONLY by the library    *
  45.  *  routines; for example, their ln_Node must NEVER be used by an  *
  46.  *  application to hang them on a local list (even if they are     *
  47.  *  anonymous).                                                    *
  48.  *                                                                 *
  49.  *  Note that the port name has to be kept WITHIN the structure    *
  50.  *  also, as the process that created it may go away.  The size    *
  51.  *  field holds the size of the structure including the name, so   *
  52.  *  it may be deleted safely when no longer needed.                *
  53.  *                                                                 *
  54.  *******************************************************************/
  55.  
  56. struct IPCPort {
  57.     struct MsgPort  ipp_Port;
  58.     ULONG           ipp_Id;         /* for future use */
  59.     UWORD           ipp_UseCount,   /* number of connections to the port */
  60.                     ipp_Flags,      /* internal information */
  61.                     ipp_Size;       /* size of the WHOLE structure */
  62.     void          * ipp_Broker_Info;  /* pointer to private information */
  63.     char            ipp_Name[1];    /* where name is actually kept! */
  64.     };
  65.  
  66.  
  67. /* ipp_Flags -- defined in IPC.h: */
  68.  
  69. /***********************************
  70. #define IPP_SERVED 0x8000
  71. #define IPP_SHUT 0x4000
  72. #define IPP_REOPEN 0x2000
  73. #define IPP_LOADING 0x1000
  74.  
  75. #define IPP_NOTIFY 0x0001
  76. ***********************************/
  77.  
  78. #define IPP_SERVER_FLAGS 0x00FF
  79.  
  80.  
  81. /*******************************************************************/
  82.  
  83. #endif
  84.  
  85.