30 lines
654 B
C
30 lines
654 B
C
//
|
|
// Created by xajhu on 2019/11/19 0019.
|
|
//
|
|
|
|
#ifndef ZTP_CLIENT_JSON_INTERFACE_H
|
|
#define ZTP_CLIENT_JSON_INTERFACE_H
|
|
|
|
typedef enum {
|
|
JE_AUTH_ZTP = 0,
|
|
|
|
JSON_ENGINE_MAX,
|
|
} JSON_ENGINE_TYPE;
|
|
|
|
typedef struct {
|
|
char *pESN;
|
|
} AUTH_ZTH_REQ, *PAUTH_ZTH_REQ;
|
|
|
|
typedef struct {
|
|
char *status;
|
|
int iptype;
|
|
char *ip;
|
|
char *code;
|
|
} AUTH_ZTH_RSP, *PAUTH_ZTH_RSP;
|
|
|
|
|
|
int Json2Struct(const char *pJsonStr, void *pData, JSON_ENGINE_TYPE type, int enBase64);
|
|
const char *Struct2Json(void *pStruct, JSON_ENGINE_TYPE type, int enBase64, int *pErr);
|
|
|
|
#endif //ZTP_CLIENT_JSON_INTERFACE_H
|