#ifndef CONFIG_MIN_8M_VERSION
#include "ext_socket_func.h"
#include "cfg_nv_def.h"
#include "at_context.h"
#include "kwatch_msg.h"

int ext_mygpshw_inquire_func(char *at_paras, void ** res_msg)
{
	ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_GPS,KWATCH_MSG_GPS_INQUIRE_REQ,0, NULL,0);
	return AT_CONTINUE;
}

int ext_mygpscdn_set_func(char *at_paras, void ** res_msg)
{
	ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_GPS,KWATCH_MSG_GPS_COORDINATE_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
	return AT_CONTINUE;
}
int ext_mygpsgpd_set_func(char *at_paras, void ** res_msg)
{
	ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_GPS,KWATCH_MSG_GPS_GPD_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
	return AT_CONTINUE;
}

int ext_mygpspwr_set_func(char *at_paras, void ** res_msg)
{
	ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_GPS,KWATCH_MSG_GPS_PWR_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
	return AT_CONTINUE;
}

int  ext_gps_regist(void)
{	
	register_serv_func("MYGPSPWR=", MODULE_ID_GPS, ext_mygpspwr_set_func);
	register_serv_func("MYGPSGPD=", MODULE_ID_GPS, ext_mygpsgpd_set_func);
	register_serv_func("MYGPSCDN=", MODULE_ID_GPS, ext_mygpscdn_set_func);
	register_serv_func("MYGPSHW?", MODULE_ID_GPS, ext_mygpshw_inquire_func);

	return 0;
}

#endif
