66 lines
1.8 KiB
C
66 lines
1.8 KiB
C
#ifndef __REST_PROXY_CONF_H__
|
|
#define __REST_PROXY_CONF_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#define REST_PROXY_DEFAULT_CONF_FILE "./conf/rest_proxy.conf"
|
|
|
|
typedef struct _s_restproxy_conf
|
|
{
|
|
const char* cnf_file; /* rest proxy configure name */
|
|
|
|
unsigned int local_ip; /* rest proxy host udp ip. host order */
|
|
unsigned short local_port; /* rest proxy host udp port. host order */
|
|
int as_server_fd; /* fd when rest proxy as server */
|
|
|
|
|
|
unsigned int query_ip; /* restful http ip. host order */
|
|
char query_ip_str[24];
|
|
unsigned short query_port; /* restful http port. host order */
|
|
|
|
unsigned int recharege_ip; /* restful http vourchar ip. host order */
|
|
char recharge_ip_str[24];
|
|
unsigned short recharge_port; /* restful http vourchar port. host order */
|
|
|
|
#ifdef TEST_RESTPROXY
|
|
char msisdn[24];
|
|
char msisdn_in[24];
|
|
char pin[24];
|
|
#endif
|
|
char username[24];
|
|
char password[24];
|
|
|
|
|
|
char subsystem[24];
|
|
char customer_ip[24];
|
|
|
|
int b_fetch_subscribid; /* ±êʶquery/recharge ÊÇ·ñ¶¼Òª»ñÈ¡subscriberID */
|
|
|
|
char url_fetchwalletbalance_getsubsid[128];
|
|
char url_fetchwalletbalance[128];
|
|
char url_recharge_getsubsid[128];
|
|
char url_recharge[128];
|
|
|
|
char url_trans_getsubsid_sender[128];
|
|
char url_trans_getsubsid_receiver[128];
|
|
char url_trans[128];
|
|
}s_restproxy_conf;
|
|
|
|
|
|
|
|
int rest_proxy_load_cnf(s_restproxy_conf *conf);
|
|
|
|
char *rest_proxy_errcodemsg(const unsigned int errcode);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __REST_PROXY_CONF_H__ */
|