/**
* @headerfile			tcua 头文件
*/
#include <tc/tc.h>
#include <tccore/custom.h>
#include <server_exits/user_server_exits.h>
#include "error_handling.h"
#include "epm_register_handler.h"//引入这个头文件，在里面注册handler
#include "epm_handler_common.h"


#ifdef __cplusplus
extern "C" {
#endif


	/**
	* @fn					extern "C" DLLAPI int liborigin_register_callbacks
	* @return				usually return ITK_ok
	* @brief				liborigin customization entry
	* 此函数必须有规范的写法，必须以dll的名称(JK_itk)加上"_"开头,这就是程序的入口
	*/
	DLLAPI int General_register_callbacks()//注意此处的General即dll的名称，若是写错，注册会失败
	{
		int ifail = ITK_ok;
		printf("*******************************************************************************\n");
		printf("*           General_register_callbacks  is starting                  *\n");
		printf("*******************************************************************************\n");


		


//		ITKCALL(ifail = CUSTOM_register_exit( "JK_itk", "USER_init_module",
//		(CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_runtime_methods) );
//	
//		 Register_revise_msg();
			 Register_revise_msg();
		//注册handler的入口，转到注册方法的文件，该文件必须引入注册handler的头文件
		//USERSERVICE_custom_register_handlers是具体的注册handler的文件
		ITKCALL( ifail = CUSTOM_register_exit("General","USER_gs_shell_init_module",//注意此处的General即dll的名称，若是写错，注册会失败
		(CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_handlers) );
		printf( "\n General	registering USERSERVICE_custom_register_handlers completed!\n" );
		ITKCALL(ifail = CUSTOM_register_exit("General", "USERSERVICE_register_methods", (CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods));
		if (ifail == ITK_ok) {
			printf("General_register_callbacks 注册成功！\n");
		}
		else {
			printf("General_register_callbacks 注册失败：%d\n", ifail);
		}
	

		return ifail;
	}

#ifdef __cplusplus
}
#endif