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.6 $ built " __DATE__ " " __TIME__ ;
00029
00753
00754 #include "saf-version.h"
00755
00756
00757
00765 #define SafESM_MAX 8
00766
00767
00768
00769
00770
00771
00772
00773 struct cas_saf_config_internal;
00774 struct cas_esm_config_internal;
00775
00776
00820 struct SafInit
00821 {
00822 mf_uns32 Version;
00823 #define SafMGR_API_VER 0
00825 mf_uns32 Environment;
00844 #define SafENV_CAS 0
00845 #define SafENV_MFDS (1<< 0)
00846 #define SafENV_CICS (1<< 1)
00847 #define SafENV_IMS (1<< 2)
00848 #define SafENV_JES (1<< 3)
00849 #define SafENV_SOLO (1ul<<31)
00850 #define SafENV_MTOMASK 0x0eul
00863 mf_uns32 Reason;
00864
00867 #define SafMGR_FAIL_NONE 0
00868 #define SafMGR_FAIL_GENERAL 1
00869 #define SafMGR_FAIL_RESOURCE 2
00870 #define SafMGR_FAIL_MGRCFG 3
00871 #define SafMGR_FAIL_LOAD 4
00872 #define SafMGR_FAIL_ESMCFG 5
00873 #define SafMGR_FAIL_ESMENTRY 100
00874 #define SafMGR_FAIL_ESM 101
00875 #define SafMGR_FAIL_ENV 200
00915 mf_uns32 Detail;
00916
00917 char ServerName[8];
00919 char Reserved[8];
00934 int (*CasMsgF)();
00935
00947 int (*CasTmpF)();
00948
00959 int (*CasLockF)();
00960
00961 void *Reserved2;
00963 struct cas_saf_config_internal
00964 *Config;
00965 mf_uns32 ESMCnt;
00968 struct cas_esm_config_internal
00969 *ESMCfg[SafESM_MAX];
00971 };
00972
00973
00974
00975
00976
00979 #define SafINIT_OK 0
00980 #define SafINIT_NULL 1
00981 #define SafINIT_VER 2
00982 #define SafINIT_BAD_CB 3
00983 #define SafINIT_ENV 4
00984 #define SafINIT_CFG 5
00985 #define SafINIT_CNT 6
00986 #define SafINIT_ESMCFG 7
00987 #define SafINIT_RESRCE 8
00988 #define SafINIT_OTHER 15
00989 #define SafINIT_FAIL 16
00997 #define SafINIT_BADENV 128
00998 #define SafINIT_INTERNAL 129
00999 #define SafINIT_MODNAME 130
01000 #define SafINIT_MODLOAD 131
01001 #define SafINIT_ENVFUNC 132
01002 #define SafINIT_EXTERNAL 133
01014 typedef enum SafRet
01015 {
01016 SafR_OK = 0,
01017 SafR_PARAM = 1,
01018 SafR_RESOURCE = 2,
01019 SafR_EXFAIL = 3,
01020 SafR_STATE = 4,
01021 SafR_INTERNAL = 5,
01022 SafR_NOTFOUND = 6,
01023 SafR_TRUNCATED = 7,
01024 SafR_NOMORE = 8,
01025 SafR_INVALID = 9,
01026 SafR_ESM = 10,
01027 SafR_END = 11,
01028 SafR_Invalid,
01029 SafR_Sizer = (1<<30)
01030 } SafRet;
01031
01032
01033
01034
01035
01036 mf_uns32 safmgr(struct SafInit *Init);
01037 mf_uns32 safterm(mf_uns32 What, void *Reserved);
01038
01039
01042 #define SafTERM_THREAD 0
01043 #define SafTERM_PROCESS 1
01045
01046
01047
01048
01049
01055 #define SafSTRCMP(s1, op, s2) (strcmp((s1),(s2)) op 0)
01056
01057
01063 #define SafSTRCMP_N(s1, op, s2, n) (strncmp((s1),(s2),(n)) op 0)
01064
01065
01071 #define SafSTRCMP_CI(s1, op, s2) (SafStrcmpCI((s1),(s2)) op 0)
01072
01073
01079 #define SafSTRCMP_CIN(s1, op, s2, n) (SafStrcmpCIN((s1),(s2),(n)) op 0)
01080
01081
01082
01083 #define SafDO_STR(x) #x
01084
01088 #define SafSTRING(x) SafDO_STR(x)
01089
01090
01091 mf_uns32 SafNative32u(mf_uns32 NetValue);
01092 int SafState(void);
01093 SafRet SafQueryCfg(const char *Class, const char *Name, char **ValueP);
01094
01095
01096 #endif
01097
01098
01099