home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / somosutl.xh < prev    next >
Text File  |  1996-12-24  |  4KB  |  91 lines

  1. /*
  2.  * @(#) 1.9 src/somos/core/somosutl/somosutl.xh, somos, som3.0 10/28/96 16:09:43 [12/24/96 08:16:55]
  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. /*****************************************************************************/
  28. /*  Includes                                                                 */
  29. /*****************************************************************************/
  30.  
  31. #ifdef __cplusplus
  32. #include <som.xh>
  33. #include <somos.xh>
  34. #else
  35. #include <som.h>
  36. #include <somos.h>
  37. #endif /* __cplusplus */
  38.  
  39. /*****************************************************************************/
  40. /*  Constants                                                                */
  41. /*****************************************************************************/
  42. /* The following constants are the available exit codes */
  43. #define SOMOS_USAGE_ERROR               100
  44. #define SOMOS_FIND_IMPLDEF_FAILED       101
  45. #define SOMOS_IMPL_IS_READY_FAILED      102
  46. #define SOMOS_CONFIG_FILE_ERROR         103
  47. #define SOMOS_LOG_OPEN_FAILED           104
  48. #define SOMOS_PERSIST_INIT_FAILED       105
  49. #define SOMOS_SECURITY_INIT_FAILED      106
  50. #define SOMOS_SOMD_INIT_FAILED          107
  51. #define SOMOS_REQUEST_LOOP_ERROR        108
  52. #define SOMOS_SERVER_FAILED             109
  53. #define SOMOS_SOMOA_NEW_FAILED          110
  54.  
  55. /*****************************************************************************/
  56. /*  Typedefs                                                                 */
  57. /*****************************************************************************/
  58. typedef void SOMLINK somosExitCallbackProc(void *client_data);
  59.  
  60. /*****************************************************************************/
  61. /* Prototypes                                                                */
  62. /*****************************************************************************/
  63. SOMEXTERN int SOMLINK somos_init_persist_dbs(char *impl_alias, Environment *ev);
  64. SOMEXTERN void SOMLINK somos_uninit_persist_dbs(char *impl_alias, Environment *ev);
  65. SOMEXTERN int SOMLINK somos_getopt(int argc, char **argv, char *opts);
  66. SOMEXTERN void SOMLINK somos_exit(int exit_code);
  67. SOMEXTERN void SOMLINK somos_setup(void);
  68. SOMEXTERN void SOMLINK somos_init_services(boolean initialize_mode);
  69. SOMEXTERN void SOMLINK somos_init_services_afterimpl(boolean initialize_mode);
  70. SOMEXTERN void SOMLINK somos_register_exit_callback(somOS_service_id_e somos_service_id, 
  71.                             somosExitCallbackProc *proc,
  72.                             void *client_data); 
  73. SOMEXTERN void SOMLINK somos_init_logging(void);
  74.  
  75. /* Ensure the proper linkage convention is used for OS2 */
  76. #if defined(__OS2__) && defined(__IBMC__)
  77. #pragma linkage(somos_init_persist_dbs, system)
  78. #pragma linkage(somos_uninit_persist_dbs, system)
  79. #pragma linkage(somos_getopt, system)
  80. #pragma linkage(somos_exit, system)
  81. #pragma linkage(somos_setup, system)
  82. #pragma linkage(somos_init_services, system)
  83. #pragma linkage(somos_init_services_afterimpl, system)
  84. #pragma linkage(somos_register_exit_callback, system)
  85. #pragma linkage(somos_init_logging, system)
  86. #endif
  87.  
  88. #endif /* SOMOS_UTILS_H */
  89.  
  90.  
  91.