home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / SRVCONST.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  6.1 KB  |  243 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  2. //
  3. // Symbol types.  These are passed to srv_symbol to translate Open Data Services
  4. // symbols.
  5. //
  6. #define SRV_ERROR      0
  7. #define SRV_DONE       1
  8. #define SRV_DATATYPE   2
  9. #define SRV_EVENT      4
  10.  
  11. // define srv_symbol() SRV_ERRORs
  12. //
  13. #define SRV_ENO_OS_ERR     0
  14. #define SRV_INFO           1
  15. #define SRV_FATAL_PROCESS  10
  16. #define SRV_FATAL_SERVER   19
  17.  
  18. // define event values
  19. //
  20. #define SRV_CONTINUE       0
  21. #define SRV_LANGUAGE       1
  22. #define SRV_CONNECT        2
  23. #define SRV_RPC            3
  24. #define SRV_RESTART        4
  25. #define SRV_DISCONNECT     5
  26. #define SRV_ATTENTION      6
  27. #define SRV_SLEEP          7
  28. #define SRV_START          8
  29. #define SRV_STOP           9
  30. #define SRV_EXIT           10
  31. #define SRV_CANCEL         11
  32. #define SRV_SETUP          12
  33. #define SRV_CLOSE          13
  34. #define SRV_PRACK          14
  35. #define SRV_PRERROR        15
  36. #define SRV_ATTENTION_ACK  16
  37. #define SRV_SKIP       17
  38. #define SRV_TRANSMGR       18
  39. #define SRV_INSERTEXEC       19
  40. #define SRV_OLEDB       20
  41.  
  42. #define SRV_INTERNAL_HANDLER 99
  43. #define SRV_PROGRAMMER_DEFINED  100
  44.  
  45. // define configuration values
  46. //
  47. #define SRV_SERVERNAME          0   // not a configuration option
  48. #define SRV_CONNECTIONS         1
  49. #define SRV_LOGFILE             2
  50. #define SRV_STACKSIZE           3
  51. #define SRV_PRINT_RECV          4
  52. #define SRV_PRINT_SEND          5
  53. #define SRV_VERSION             6
  54. #define SRV_REMOTE_ACCESS       7
  55. #define SRV_REMOTE_SITES        8
  56. #define SRV_REMOTE_CONNECTIONS  9
  57. #define SRV_MAX_PACKETS         10
  58. #define SRV_MAXWORKINGTHREADS    11
  59. #define SRV_MINWORKINGTHREADS    12
  60. #define SRV_THREADTIMEOUT    13
  61. #define SRV_CONCURRENTTHREADS    14
  62. #define SRV_LOCAL_ONLY        15
  63. #define SRV_UNPACK_RPC        16
  64. #define SRV_MAX_PACKETSIZE    17
  65. #define SRV_THREADPRIORITY    18
  66. #define SRV_ANSI_CODEPAGE    19
  67. #define SRV_REMOTENAME        20
  68. #define SRV_TDS_VERSION     21
  69. #define SRV_PROG_VERSION    22
  70. #ifdef BRIDGE
  71.   #define SRV_CONNECTION_NAMES    23
  72.   #define SRV_CURRENT_CONNECTS    24
  73.   #define SRV_AUDIT_CONNECTS    25
  74. #endif
  75. #define    SRV_DEFAULT_PACKETSIZE    26
  76. #define SRV_PASSTHROUGH        27
  77. #define SRV_THREADAFFINITY    28
  78.  
  79. // define thread priority values
  80. //
  81. #define SRV_PRIORITY_LOW      THREAD_PRIORITY_LOWEST
  82. #define SRV_PRIORITY_NORMAL   THREAD_PRIORITY_NORMAL
  83. #define SRV_PRIORITY_HIGH     THREAD_PRIORITY_HIGHEST
  84. #define SRV_PRIORITY_CRITICAL THREAD_PRIORITY_TIME_CRITICAL
  85.  
  86. // define server values
  87. //
  88. #if !defined( NULL )
  89.  
  90. #define NULL        0   // The null character
  91.  
  92. #endif
  93.  
  94. #if !defined( TRUE )
  95.  
  96. #define TRUE        1   // Boolean true value
  97.  
  98. #endif
  99.  
  100. #if !defined( FALSE )
  101.  
  102. #define FALSE       0   // Boolean false value
  103.  
  104. #endif
  105.  
  106. #if !defined( SUCCEED )
  107.  
  108. #define SUCCEED     1   // Successful return value
  109.  
  110. #endif
  111.  
  112. #if !defined( FAIL )
  113.  
  114. #define FAIL        0   // Unsuccessful return value
  115.  
  116. #endif
  117.  
  118. #if !defined( SRV_DUPLICATE_HANDLER )
  119.  
  120. #define SRV_DUPLICATE_HANDLER    2
  121.  
  122. #endif
  123.  
  124. #define SRV_NULLTERM   -1   // Indicates a null terminated string
  125.  
  126. #if !defined( STDEXIT)
  127.  
  128. #define STDEXIT     0   // Normal exit valule
  129.  
  130. #endif
  131.  
  132. #if !defined( ERREXIT)
  133.  
  134. #define ERREXIT     1   // Error exit value
  135.  
  136. #endif
  137.  
  138. //  Message types
  139. //
  140. #define SRV_MSG_INFO    1
  141. #define SRV_MSG_ERROR   2
  142.  
  143.  
  144. // define SRV_PROC->status values
  145. //
  146. #define SRV_LOGGING_IN 0x1   // slot is free for used
  147. #define SRV_FREE       0x2   // slot is free for used
  148. #define SRV_SUSPENDED  0x4   // thread is in suspended state
  149. #define SRV_DEAD       0x8   // thread is dead
  150. #define SRV_KILL       0x10   // thread needs to be killed
  151. #define SRV_RUNNING    0x20   // thread is running
  152. #define SRV_ATTN       0x40   // client has sent an attention signal for this thread
  153. #define SRV_WAITING    0x80   // waiting for next command
  154. #define SRV_IOERROR    0x100    // io error occured
  155. #define SRV_QUEUED     0x200    // srvproc has been placed on command queue
  156. #define SRV_INEXEC     0x400    // inserting data into local table
  157. #ifdef BRIDGE
  158. #define SRV_ATTN_MIMIC 0x800      // client side does not support OOB
  159. #endif
  160.  
  161. //  Done packet status fields.
  162. //
  163. #define SRV_DONE_FINAL  (DBUSMALLINT) 0x0000
  164. #define SRV_DONE_MORE   (DBUSMALLINT) 0x0001
  165. #define SRV_DONE_ERROR  (DBUSMALLINT) 0x0002
  166. #define SRV_DONE_INXACT (DBUSMALLINT) 0x0004
  167. #define SRV_DONE_PROC   (DBUSMALLINT) 0x0008
  168. #define SRV_DONE_COUNT  (DBUSMALLINT) 0x0010
  169. #define SRV_DONE_ATTN   (DBUSMALLINT) 0x0020
  170. #define SRV_DONE_RPC_IN_BATCH   (DBUSMALLINT) 0x0080
  171.  
  172. //  RPC return parameter type
  173. //
  174. #define SRV_PARAMRETURN 0x0001
  175.  
  176. //  Event types
  177. //
  178. #define SRV_EQUEUED (BYTE) 0x1
  179. #define SRV_EIMMEDIATE (BYTE) 0x2
  180.  
  181. //  Field types used as field argument to srv_pfield().
  182. //
  183. //#define SRV_LANGUAGE 1   already defined above
  184. //#define SRV_EVENT    4   already defined above
  185.  
  186. #define SRV_SPID       10
  187. #define SRV_NETSPID    11
  188. #define SRV_TYPE       12
  189. #define SRV_STATUS     13
  190. #define SRV_RMTSERVER  14
  191. #define SRV_HOST       15
  192. #define SRV_USER       16
  193. #define SRV_PWD        17
  194. #define SRV_CPID       18
  195. #define SRV_APPLNAME   19
  196. #define SRV_TDS        20
  197. #define SRV_CLIB       21
  198. #define SRV_LIBVERS    22
  199. #define SRV_ROWSENT    23
  200. #define SRV_BCPFLAG    24
  201. #define SRV_NATLANG    25
  202. #define SRV_PIPEHANDLE 26
  203. #define SRV_NETWORK_MODULE        27
  204. #define SRV_NETWORK_VERSION     28
  205. #define SRV_NETWORK_CONNECTION 29
  206. #define SRV_LSECURE      30
  207. #define SRV_SAXP      31
  208.  
  209. // define the different TDS versions.
  210. //
  211. #define SRV_TDS_NONE   0
  212. #define SRV_TDS_2_0    1
  213. #define SRV_TDS_3_4    2
  214. #define SRV_TDS_4_2    3
  215. #define SRV_TDS_6_0    4
  216.  
  217. // define initial number of network threads
  218. // to start when ODS is started.
  219.  
  220. #define SRV_INITIALNETTHREADCNT 1
  221.  
  222. // define RPC_ACTIVE flags
  223.  
  224. #define SRV_RPC_ACTIVE              1
  225. #define SRV_RPC_DISABLE_OUTPARAMS   2
  226.      
  227. // define the ENV_CHANGE types
  228. #define SRV_ENV_PACKETSIZE     4
  229.  
  230. //
  231. // Flush status for write_buffer
  232. //
  233. #define SRV_NO_FLUSH    0
  234. #define SRV_FLUSH_EOM    1
  235. #define SRV_FLUSH_MORE    2
  236.  
  237. //
  238. // Numeric array to convert precision to internal length.
  239. //
  240. extern unsigned char SrvPrecToLen[];
  241. extern unsigned char SrvLenToPrec[];
  242. #pragma option pop /*P_O_Pop*/
  243.