home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / somosutl.h < prev    next >
C/C++ Source or Header  |  1996-12-24  |  4KB  |  103 lines

  1. /*
  2.  *    @(#) 1.10 src/somos/core/somosutl/somosutl.h, somos, som3.0 10/28/96 16:00:11 [12/24/96 08:16:53]
  3.  *
  4.  * ComponentName: core/somosutl.h
  5.  *
  6.  * 25H7912  (C)  Copyright International Business Machines Corp. 1994, 1995,1996 
  7.  * All Rights Reserved
  8.  * Licensed Materials - Property of IBM
  9.  *
  10.  * US Government Users Restricted Rights - Use, duplication or disclosure
  11.  * restricted by GSA ADP Schedule Contract with IBM Corp.
  12.  *
  13.  * Description:  SOMOS Server utilities
  14.  */
  15.  
  16. #ifndef SOMOS_UTILS_H
  17. #define SOMOS_UTILS_H
  18.  
  19. /*
  20.  * Description
  21.  * -----------
  22.  * somosutl.c - This file defines the public interfaces to the somos
  23.  *              utilites library.
  24.  */
  25.  
  26. /*
  27.  * Change History:
  28.  * ---------------
  29.  * 06/24/96  23119  sz  Defined SOMOS_UTIL_IMPORT and exported somos_somossvr_dll.
  30.  * 10/28/96  20023 gpj  Added prototype for somos_uninit_persist_dbs.
  31.  */
  32.  
  33. /*****************************************************************************/
  34. /*  Includes                                                                 */
  35. /*****************************************************************************/
  36.  
  37. #ifdef __cplusplus
  38. #include <som.xh>
  39. #include <somos.xh>
  40. #else
  41. #include <som.h>
  42. #include <somos.h>
  43. #endif /* __cplusplus */
  44.  
  45. /*****************************************************************************/
  46. /*  Constants                                                                */
  47. /*****************************************************************************/
  48. /* The following constants are the available exit codes */
  49. #define SOMOS_USAGE_ERROR               100
  50. #define SOMOS_FIND_IMPLDEF_FAILED       101
  51. #define SOMOS_IMPL_IS_READY_FAILED      102
  52. #define SOMOS_CONFIG_FILE_ERROR         103
  53. #define SOMOS_LOG_OPEN_FAILED           104
  54. #define SOMOS_PERSIST_INIT_FAILED       105
  55. #define SOMOS_SECURITY_INIT_FAILED      106
  56. #define SOMOS_SOMD_INIT_FAILED          107
  57. #define SOMOS_REQUEST_LOOP_ERROR        108
  58. #define SOMOS_SERVER_FAILED             109
  59. #define SOMOS_SOMOA_NEW_FAILED          110
  60.  
  61. /*****************************************************************************/
  62. /*  Typedefs                                                                 */
  63. /*****************************************************************************/
  64. typedef void SOMLINK somosExitCallbackProc(void *client_data);
  65. /*****************************************************************************/
  66. /*  Externs                                                                  */
  67. /*****************************************************************************/
  68.  
  69. /*****************************************************************************/
  70. /* Prototypes                                                                */
  71. /*****************************************************************************/
  72. SOMEXTERN int SOMLINK somos_init_persist_dbs(char *impl_alias, Environment *ev);
  73. SOMEXTERN void SOMLINK somos_uninit_persist_dbs(char *impl_alias, Environment *ev);
  74. SOMEXTERN int SOMLINK somos_getopt(int argc, char **argv, char *opts);
  75. SOMEXTERN void SOMLINK somos_exit(int exit_code);
  76. SOMEXTERN void SOMLINK somos_setup(void);
  77. SOMEXTERN void SOMLINK somos_init_services(boolean initialize_mode);
  78. SOMEXTERN void SOMLINK somos_init_services_afterimpl(boolean initialize_mode);
  79. SOMEXTERN void SOMLINK somos_register_exit_callback(somOS_service_id_e somos_service_id, 
  80.                             somosExitCallbackProc *proc,
  81.                             void *client_data); 
  82. SOMEXTERN void SOMLINK somos_init_logging(void);
  83. #ifdef _WIN32
  84. SOMEXTERN void SOMLINK SOM_TERMINATION_HANDLER(void);
  85. #endif /* WIN_32 */
  86.  
  87. /* Ensure the proper linkage convention is used for OS2 */
  88. #if defined(__OS2__) && defined(__IBMC__)
  89. #pragma linkage(somos_init_persist_dbs, system)
  90. #pragma linkage(somos_uninit_persist_dbs, system)
  91. #pragma linkage(somos_getopt, system)
  92. #pragma linkage(somos_exit, system)
  93. #pragma linkage(somos_setup, system)
  94. #pragma linkage(somos_init_services, system)
  95. #pragma linkage(somos_init_services_afterimpl, system)
  96. #pragma linkage(somos_register_exit_callback, system)
  97. #pragma linkage(somos_init_logging, system)
  98. #endif
  99.  
  100. #endif /* SOMOS_UTILS_H */
  101.  
  102.  
  103.