home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / WEBSERVE / PI3 / PI3WEB.EXE / DEVEL / INCLUDE / PIDefs.h < prev    next >
C/C++ Source or Header  |  1997-10-26  |  4KB  |  103 lines

  1. /*____________________________________________________________________________*\
  2.  *
  3.  
  4.  Copyright (c) 1997 John Roy. All rights reserved.
  5.  
  6.  These sources, libraries and applications are
  7.  FREE FOR COMMERCIAL AND NON-COMMERCIAL USE
  8.  as long as the following conditions are adhered to.
  9.  
  10.  Redistribution and use in source and binary forms, with or without
  11.  modification, are permitted provided that the following conditions
  12.  are met:
  13.  
  14.  1. Redistributions of source code must retain the above copyright
  15.     notice, this list of conditions and the following disclaimer. 
  16.  
  17.  2. Redistributions in binary form must reproduce the above copyright
  18.     notice, this list of conditions and the following disclaimer in
  19.     the documentation and/or other materials provided with the
  20.     distribution.
  21.  
  22.  3. Redistributions of any form whatsoever and all advertising materials 
  23.     mentioning features must contain the following
  24.     acknowledgment:
  25.     "This product includes software developed by John Roy
  26.     (http://www.johnroy.com/pi3/)."
  27.  
  28.  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  29.  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30.  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  31.  IN NO EVENT SHALL THE AUTHORS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
  32.  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33.  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34.  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35.  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  36.  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  37.  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  38.  OF THE POSSIBILITY OF SUCH DAMAGE.
  39.  
  40.  *____________________________________________________________________________*|
  41.  *
  42.  * $Source: PIDefs.h$
  43.  * $Date: Sun Aug 10 06:29:35 1997$
  44.  *
  45.  Description:
  46.     Defininition of error codes and macros for PI.
  47. \*____________________________________________________________________________*/
  48. /* $HeaderTop:$ */
  49.  
  50. #ifndef PIDEFS_H_
  51. #define PIDEFS_H_
  52.  
  53. #define PIAPI_COMPLETED        (0)        /* action completed succesfully */
  54. #define PIAPI_ERROR            (-1)    /* an unspecified local error occured */
  55. #define PIAPI_EXHAUSTED        (-2)    /* a system or program resource allocation
  56.                                         failed */
  57. #define PIAPI_INTERNALERROR    (-3)    /* an internal error caused by a bug */ 
  58. #define PIAPI_EINVAL        (-4)    /* an invalid argument was given */
  59. #define PIAPI_NOTSUPPORTED    (-5)    /* unimplemented facility */
  60. #define PIAPI_EEXIST        (-6)    /* cannot create new object because an
  61.                                         object already exists */
  62. #define PIAPI_EACCES        (-7)    /* access denied */
  63. #define PIAPI_EINIT            (-8)    /* library not correctly initialized */
  64. #define PIAPI_DEADLOCK        (-9)    /* action would cause deadlock */
  65.  
  66. /* ----
  67. Specialized return codes
  68. --- */
  69. #define PIAPI_CONTINUE        (-1001)    /* no action performed */
  70. #define PIAPI_WARNING        (-1002)    /* something to take note of */
  71. #define PIAPI_ABORT            (-1003)    /* an unspecified critical error occurred */
  72. #define PIAPI_TIMEOUT        (-1004)    /* a timeout occurred */
  73.  
  74. /* ---
  75. Additional context dependant result codes
  76. --- */
  77. #define PIAPI_WOULDBLOCK    (-10)    /* for non-blocking socket operations */
  78.  
  79. /* ---
  80. Special
  81. --- */
  82. #define PIAPI_TRUE            (1)    
  83. #define PIAPI_FALSE            (0)    
  84.  
  85. /* ---
  86. Thread priorities
  87. --- */
  88. #define PITHREAD_PRIORITY_SIZE        5
  89. #define PITHREAD_PRIORITY_INVALID    -1
  90. #define PITHREAD_PRIORITY_LOWEST    0
  91. #define PITHREAD_PRIORITY_LOW        1
  92. #define PITHREAD_PRIORITY_MED        2
  93. #define PITHREAD_PRIORITY_HIGH        3
  94. #define PITHREAD_PRIORITY_HIGHEST    4
  95.  
  96. /* ---
  97. Thread flags
  98. --- */
  99. #define PITHREAD_FLAGS_SUSPENDED    0x0001
  100.  
  101. #endif    /* PIDEFS_H_ */
  102.  
  103.