00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined(SafMGR_H)
00025 #define SafMGR_H
00026
00027 static const char *SafMGR_Hsccsid =
00028 "@(#)safmgr.h $Revision: 1.8 $ built " __DATE__ " " __TIME__ ;
00029
00718
00719 #include "saf-version.h"
00720
00721
00722
00730 #define SafESM_MAX 8
00731
00732
00733
00734
00735
00736
00737
00738 struct cas_saf_config_internal;
00739 struct cas_esm_config_internal;
00740
00741
00785 struct SafInit
00786 {
00787 mf_uns32 Version;
00788 #define SafMGR_API_VER 0
00790 mf_uns32 Environment;
00809 #define SafENV_CAS 0
00810 #define SafENV_MFDS (1<< 0)
00811 #define SafENV_CICS (1<< 1)
00812 #define SafENV_IMS (1<< 2)
00813 #define SafENV_JES (1<< 3)
00814 #define SafENV_SOLO (1ul<<31)
00815 #define SafENV_MTOMASK 0x0eul
00828 mf_uns32 Reason;
00829
00832 #define SafMGR_FAIL_NONE 0
00833 #define SafMGR_FAIL_GENERAL 1
00834 #define SafMGR_FAIL_RESOURCE 2
00835 #define SafMGR_FAIL_MGRCFG 3
00836 #define SafMGR_FAIL_LOAD 4
00837 #define SafMGR_FAIL_ESMCFG 5
00838 #define SafMGR_FAIL_ESMENTRY 100
00839 #define SafMGR_FAIL_ESM 101
00840 #define SafMGR_FAIL_ENV 200
00880 mf_uns32 Detail;
00881
00882 char ServerName[8];
00884 char Reserved[8];
00899 int (*CasMsgF)();
00900
00912 int (*CasTmpF)();
00913
00924 int (*CasLockF)();
00925
00926 void *Reserved2;
00928 struct cas_saf_config_internal
00929 *Config;
00930 mf_uns32 ESMCnt;
00933 struct cas_esm_config_internal
00934 *ESMCfg[SafESM_MAX];
00936 };
00937
00938
00939
00940
00941
00944 #define SafINIT_OK 0
00945 #define SafINIT_NULL 1
00946 #define SafINIT_VER 2
00947 #define SafINIT_BAD_CB 3
00948 #define SafINIT_ENV 4
00949 #define SafINIT_CFG 5
00950 #define SafINIT_CNT 6
00951 #define SafINIT_ESMCFG 7
00952 #define SafINIT_RESRCE 8
00953 #define SafINIT_OTHER 15
00954 #define SafINIT_FAIL 16
00962 #define SafINIT_BADENV 128
00963 #define SafINIT_INTERNAL 129
00964 #define SafINIT_MODNAME 130
00965 #define SafINIT_MODLOAD 131
00966 #define SafINIT_ENVFUNC 132
00967 #define SafINIT_EXTERNAL 133
00979 typedef enum SafRet
00980 {
00981 SafR_OK = 0,
00982 SafR_PARAM = 1,
00983 SafR_RESOURCE = 2,
00984 SafR_EXFAIL = 3,
00985 SafR_STATE = 4,
00986 SafR_INTERNAL = 5,
00987 SafR_NOTFOUND = 6,
00988 SafR_TRUNCATED = 7,
00989 SafR_NOMORE = 8,
00990 SafR_INVALID = 9,
00991 SafR_ESM = 10,
00992 SafR_END = 11,
00993 SafR_Invalid,
00994 SafR_Sizer = (1<<30)
00995 } SafRet;
00996
00997
00998
00999
01000
01001 mf_uns32 safmgr(struct SafInit *Init);
01002 mf_uns32 safterm(mf_uns32 What, void *Reserved);
01003
01004
01007 #define SafTERM_THREAD 0
01008 #define SafTERM_PROCESS 1
01009 #define SafTERM_ESF 2
01011
01012
01013
01014
01015
01021 #define SafSTRCMP(s1, op, s2) (strcmp((s1),(s2)) op 0)
01022
01023
01029 #define SafSTRCMP_N(s1, op, s2, n) (strncmp((s1),(s2),(n)) op 0)
01030
01031
01037 #define SafSTRCMP_CI(s1, op, s2) (SafStrcmpCI((s1),(s2)) op 0)
01038
01039
01045 #define SafSTRCMP_CIN(s1, op, s2, n) (SafStrcmpCIN((s1),(s2),(n)) op 0)
01046
01047
01048
01049 #define SafDO_STR(x) #x
01050
01054 #define SafSTRING(x) SafDO_STR(x)
01055
01056
01057 mf_uns32 SafNative32u(mf_uns32 NetValue);
01058 int SafState(void);
01059 SafRet SafQueryCfg(const char *Class, const char *Name, char **ValueP);
01060
01061
01062 #endif
01063
01064
01065