| #ifdef MBTK_FUNC_TYPEDEF |
| // Add function define start. |
| typedef bool (*mbtk_cmd_line_ex)(const char*, void (*)(char*, int)); |
| //typedef int (*mbtk_at_play)(const char*); |
| //typedef int (*mbtk_at_rec)(const char*); |
| //typedef int (*mbtk_at_loopback)(int type); // 1 : Start 0 : Stop |
| //typedef int (*mbtk_at_adc)(int); |
| //typedef int (*mbtk_at_gnss)(int, void*); |
| //typedef int (*mbtk_mgpsc_set)(int); |
| //typedef int (*mbtk_at_gnss_reset)(int); |
| //typedef int (*mbtk_at_gpio)(bool, void*); |
| //typedef int (*mbtk_at_gnss_start_ttff)(int, int, int); |
| |
| typedef int (*mbtk_audio_loopback_start)(int); |
| typedef int (*mbtk_audio_loopback_stop)(); |
| typedef int (*mbtk_audio_mode_set)(int); |
| typedef int (*mbtk_audio_ubus_init)(); |
| typedef int (*mbtk_audio_ubus_deinit)(); |
| typedef int (*mbtk_audio_wav_init)(); |
| typedef int (*mbtk_audio_wav_play_start)(const void *); |
| typedef int (*mbtk_audio_wav_deinit)(); |
| typedef int (*mbtk_audio_wav_recorder_start)(const void *, int); |
| |
| typedef void (*mbtk_log_init)(char*, char*); |
| typedef void (*log_hex)(const char *tag, const void *data, int data_len); |
| typedef int (*mbtk_at_ftp)(int, int, char*, char*, char*, int, bool, bool); |
| typedef int (*mbtk_at_get_ftp_info)(int ,int *,char *, char *, char *,int * ,int *, int *); |
| typedef int (*mbtk_at_ftp_mkrmdel)(int ,char *); |
| typedef int (*mbtk_at_ftp_upload)(char *,char *, int, int); |
| typedef int (*mbtk_at_ftp_download)(void *, void *, int , int , int ); |
| typedef int (*mbtk_at_ftp_list)(char *); |
| typedef int (*mbtk_at_get_ftp_data_info)(char *, char *, int *, int *, int *); |
| typedef int (*mbtk_at_msgid)(int *); |
| //typedef int (*mbtk_system_sleep)(void); |
| |
| |
| //typedef int (*mbtk_http_handle_get)(int, void(*)(int, int, void*, int)); |
| typedef int (*mbtk_http_handle_get)(int, void*); |
| typedef int (*mbtk_http_handle_free)(int); |
| typedef int (*mbtk_http_session_url_set)(int,int,void *); |
| typedef int (*mbtk_http_session_create)(int,int,int); |
| typedef int (*mbtk_http_session_option_reset)(int,int,int); |
| typedef int (*mbtk_http_session_ingnore_cert_set)(int,int,bool); |
| typedef int (*mbtk_http_session_start)(int,int); |
| typedef int (*mbtk_http_session_head_add)(int,int,char *, char *); |
| typedef int (*mbtk_http_session_content_set)(int,int,char *, int); |
| typedef int (*mbtk_http_session_get)(int,int); |
| |
| |
| #include "mbtk_at_tcpip.h" |
| |
| typedef int (*mbtk_task_queue_start)(void * ,void *(*)(void *) ); |
| typedef void (*mbtk_task_queue_stop)(void * ); |
| typedef int (*mbtk_signal_send)(void * ,mbtk_signal_info* ); |
| typedef mbtk_signal_info* (*mbtk_signal_get)(void * ); |
| |
| typedef mbtk_tcpip_err_enum (*mbtk_tcpip_net_open)(void (*)(int ,const char * ), void (*)(int , int )); |
| typedef mbtk_tcpip_err_enum (*mbtk_tcpip_net_close)(); |
| |
| typedef mbtk_tcpip_err_enum (*mbtk_tcpip_sock_open)(const mbtk_tcpip_info_t *); |
| typedef mbtk_tcpip_err_enum (*mbtk_tcpip_sock_close)(int ); |
| typedef int (*mbtk_tcpip_send)(int , const char* , int , const char* , int ); |
| typedef int (*mbtk_tcpip_read)(int , char* , int ); |
| typedef int (*mbtk_tcpip_info_get)(int , mbtk_tcpip_tcp_state_info_s *); |
| typedef void (*mbtk_tcpip_set_read_cb)(int , mbtk_tcpip_read_callback_func ); |
| typedef int (*mbtk_tcpip_data_traffic_get)(int ); |
| typedef mbtk_tcpip_err_enum (*mbtk_tcpip_data_traffic_reset)(int ); |
| typedef int (*mbtk_tcpip_link_state_get)(int ); |
| // Add function define end. |
| #endif |
| |
| |
| #ifdef MBTK_FUNC_INIT |
| // Add function start. |
| // libmbtk_lib.so |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_cmd_line_ex); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_log_init); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, log_hex); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_task_queue_start); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_task_queue_stop); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_signal_send); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_signal_get); |
| |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_loopback_start); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_loopback_stop); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_mode_set); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_ubus_init); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_ubus_deinit); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_wav_init); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_wav_deinit); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_wav_play_start); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_audio_wav_recorder_start); |
| |
| // libmbtk_factory.so |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_at_adc); |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_at_gpio); |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_at_play); |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_at_rec); |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_at_loopback); |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_system_sleep); |
| //MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_FACTORY, mbtk_mgpsc_set); |
| |
| // libmbtk_ftp.so |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_ftp); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_get_ftp_info); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_ftp_mkrmdel); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_ftp_upload); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_ftp_download); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_ftp_list); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_get_ftp_data_info); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_at_msgid); |
| |
| // libmbtk_http.so |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_handle_get); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_handle_free); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_url_set); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_create); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_option_reset); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_ingnore_cert_set); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_start); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_head_add); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_content_set); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_http_session_get); |
| |
| // libmbtk_tcpip.so |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_net_open); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_net_close); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_sock_open); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_sock_close); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_send); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_read); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_info_get); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_set_read_cb); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_data_traffic_get); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_data_traffic_reset); |
| MBTK_FUNC_ADD(MBTK_AT_FUNC_TYPE_BASIC, mbtk_tcpip_link_state_get); |
| |
| // Add function end. |
| #endif |