📄 api.h
字号:
#ifndef CMPP_API_H
#define CMPP_API_H
#ifdef __cplusplus
extern "C"{
#endif
#ifndef _ICP_DEBUG_
#define _ICP_DEBUG_
#endif
#ifndef _WIN32
#define _WIN32
#endif
#ifdef _WIN32
#define CMPP_API __declspec(dllexport)
#endif
#ifdef _UNIX
#define CMPP_API
#endif
#ifndef CMPP_API
#define CMPP_API
#endif
CMPP_API dpl_status_t cmpp_recv(conn_desc *conn,cmppe_packet *cp,dpl_uint8_t is_break);
CMPP_API dpl_status_t cmpp_deliver_resp(conn_desc *conn,dpl_uint32_t pk_seq,dpl_uint32_t status);
CMPP_API dpl_status_t cmpp_submit(conn_desc *conn,cmppe_submit *cs);
CMPP_API dpl_status_t cmpp_cancel(conn_desc *conn,cmppe_cancel *cc);
CMPP_API dpl_status_t cmpp_active_test(conn_desc *conn);
CMPP_API dpl_status_t cmpp_logout(conn_desc *conn);
CMPP_API dpl_status_t cmpp_login(conn_desc *conn,cmppe_login *cl);
CMPP_API dpl_status_t cmpp_connect_to_ismg(char *host,dpl_port_t port,conn_desc *conn);
CMPP_API dpl_status_t cmpp_disconnect_from_ismg(conn_desc *conn);
/*---------------------------------------------------
函数名称:cmppe_submit_sm_*
功能描述:初始化Submit请求数据包,设置各域值
传递参数:
返回数值: DPL_SUCCESS 设置成功
其他 试图对某域设置非法值
---------------------------------------------------*/
CMPP_API dpl_status_t cmppe_submit_sm_init(cmppe_submit *msg);
CMPP_API dpl_status_t cmppe_submit_sm_set_shortmsg(cmppe_submit *msg, void *short_msg, dpl_uint8_t size);
CMPP_API dpl_status_t cmppe_submit_sm_set_priority(cmppe_submit *msg, dpl_uint8_t priority);
CMPP_API dpl_status_t cmppe_submit_sm_set_msgmode(cmppe_submit *msg, dpl_uint8_t msg_mode);
CMPP_API dpl_status_t cmppe_submit_sm_set_protoid(cmppe_submit *msg, dpl_uint8_t proto_id);
CMPP_API dpl_status_t cmppe_submit_sm_set_dcs(cmppe_submit *msg, dpl_uint8_t dcs);
CMPP_API dpl_status_t cmppe_submit_sm_set_schedule(cmppe_submit *msg, const char *schedule);
CMPP_API dpl_status_t cmppe_submit_sm_set_validate(cmppe_submit *msg, const char *validate);
CMPP_API dpl_status_t cmppe_submit_sm_set_src_addr(cmppe_submit *msg, char *msisdn);
CMPP_API dpl_status_t cmppe_submit_sm_add_dst_addr(cmppe_submit *msg, char *msisdn);
CMPP_API dpl_status_t cmppe_submit_sm_set_icp_id(cmppe_submit *msg, char *icp_id);
CMPP_API dpl_status_t cmppe_submit_sm_set_svc_type(cmppe_submit *msg, char *svc_type);
CMPP_API dpl_status_t cmppe_submit_sm_set_fee_type(cmppe_submit *msg, dpl_uint8_t fee_type);
CMPP_API dpl_status_t cmppe_submit_sm_set_du_count(cmppe_submit *msg, dpl_uint8_t du_count);
CMPP_API dpl_status_t cmppe_submit_sm_set_info_fee(cmppe_submit *msg, dpl_uint32_t info_fee);
CMPP_API dpl_status_t cmppe_submit_sm_set_fee_user(cmppe_submit *msg,dpl_uint8_t fee_utype,char *fee_usr);
/*---------------------------------------------------
函数名称:cmppe_cancel_sm_*
功能描述:初始化Cancel请求数据包,设置各域值
传递参数:
返回数值: DPL_SUCCESS 设置成功
其他 试图对某域设置非法值
---------------------------------------------------*/
CMPP_API dpl_status_t cmppe_cancel_sm_init(cmppe_cancel *msg);
CMPP_API dpl_status_t cmppe_cancel_sm_set_msg_id(cmppe_cancel *msg, char *msg_id);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -