samp_samp_exp.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:2k
- /*
- file: samp_samp_exp.c
- decription: implements SAMP samp APIs for use by UI task.
- */
- #include "config.h"
- #ifdef TEST_HARNASS // for test only./////////////////////////////////////////////////////////////////
- #include "IncludeSysDefs.h"
- #include "playcoresampsamp_gen.h"
- #include "playcoresampschedulersamp_api.h"
- SAMP(ErrCode) SAMP_EXP(SAMP_Init)(void)
- {
- SAMP(ErrCode) err;
- SAMP_APICallRequest (SAMP_INIT, &err);
- return err;
- }
- SAMP(ErrCode) SAMP_EXP(SAMP_Term)(void)
- {
- SAMP(ErrCode) err;
- SAMP_APICallRequest (SAMP_TERM, &err);
- return err;
- }
- SAMP(ErrCode) SAMP_EXP(SAMP_SACDDiscRec)( SAMP(Bool) *pSACD, SAMP(Bool) *pHybrid )
- {
- SAMP(ErrCode) err;
- SAMP_API_PARAM[0] = (UINT32)pSACD ;
- SAMP_API_PARAM[1] = (UINT32)pHybrid ;
- SAMP_APICallRequest (SAMP_SACDDISCREC, &err);
- return err;
- }
- SAMP(ErrCode) SAMP_EXP(SAMP_Activate)( SAMP(Bool) discRecognised,
- SAMP(SAMP_AreaInfoDef) *pST_Info,
- SAMP(SAMP_AreaInfoDef) *pMC_Info,
- SAMP(Bool) *pHybrid )
- {
- SAMP(ErrCode) err;
- SAMP_API_PARAM[0] = (UINT32)discRecognised ;
- SAMP_API_PARAM[1] = (UINT32)pST_Info ;
- SAMP_API_PARAM[2] = (UINT32)pMC_Info ;
- SAMP_API_PARAM[3] = (UINT32)pHybrid ;
- SAMP_APICallRequest (SAMP_ACTIVATE, &err);
- return err;
- }
- SAMP(ErrCode) SAMP_EXP(SAMP_Deactivate)(void)
- {
- SAMP(ErrCode) err;
- SAMP_APICallRequest (SAMP_DEACTIVATE, &err);
- return err;
- }
- SAMP(ErrCode) SAMP_EXP(SAMP_Reactivate)(void)
- {
- SAMP(ErrCode) err;
- SAMP_APICallRequest (SAMP_REACTIVATE, &err);
- return err;
- }
- SAMP(ErrCode) SAMP_EXP(SAMP_Subscribe)(SAMP(SAMP_CallbackDef) Callback, SAMP(BitSet32) Events)
- {
- SAMP(ErrCode) err;
- SAMP_API_PARAM[0] = (UINT32)Callback ;
- SAMP_API_PARAM[1] = (UINT32)Events ;
- SAMP_APICallRequest (SAMP_SUBSCRIBE, &err);
- return err;
- }
- #endif////////////////////////////////////////////////////////////////////////////////////////////////////