msp_cmn.h
Go to the documentation of this file.
1 
53 #ifndef __MSP_CMN_H__
54 
55 #define __MSP_CMN_H__
56 
57 #include "msp_types.h"
58 
59 #if __cplusplus
60 
61 extern "C" {
62 
63 #endif /* C++ */
64 
65 //#if MSP_WCHAR_SUPPORT
66 
91 char* Wchar2Mbytes(const wchar_t* wcstr);
92 
117 wchar_t* Mbytes2Wchar(const char* mbstr);
118 
119 //#endif /*MSP_WCHAR_SUPPORT*/
120 
145 int MSPAPI MSPLogin(const char* usr, const char* pwd, const char* params);
146 typedef int(MSPAPI* Proc_MSPLogin)(const char* usr, const char* pwd, const char* params);
147 
148 //#if MSP_WCHAR_SUPPORT
149 
150 int MSPAPI MSPLoginW(const wchar_t* usr, const wchar_t* pwd, const wchar_t* params);
151 
152 typedef int(MSPAPI* Proc_MSPLoginW)(const wchar_t* usr, const wchar_t* pwd, const wchar_t* params);
153 
154 //#endif/*MSP_WCHAR_SUPPORT*/
155 
174 int MSPAPI MSPLogout();
175 
176 typedef int(MSPAPI* Proc_MSPLogout)();
177 
178 //#if MSP_WCHAR_SUPPORT
179 
180 int MSPAPI MSPLogoutW();
181 
182 typedef int(MSPAPI* Proc_MSPLogoutW)();
183 
184 //#endif/*MSP_WCHAR_SUPPORT*/
185 
210 int MSPAPI MSPUpload(const char* dataName, const char* params, const char* dataID);
211 
212 typedef int(MSPAPI* Proc_MSPUpload)(const char* dataName, const char* params, const char* dataID);
213 
234 typedef int (*DownloadStatusCB)(int errorCode, long param1, const void* param2, void* userData);
235 
236 typedef int (*DownloadResultCB)(const void* data, long dataLen, void* userData);
237 
238 int MSPAPI MSPDownload(const char* dataName, const char* params, DownloadStatusCB statusCb, DownloadResultCB resultCb,
239  void* userData);
240 
241 typedef int(MSPAPI* Proc_MSPDownload)(const char* dataName, const char* params, DownloadStatusCB statusCb,
242  DownloadResultCB resultCb, void* userData);
243 
244 int MSPAPI MSPDownloadW(const wchar_t* wdataName, const wchar_t* wparams, DownloadStatusCB statusCb,
245  DownloadResultCB resultCb, void* userData);
246 
247 typedef int(MSPAPI* Proc_MSPDownloadW)(const wchar_t* wdataName, const wchar_t* wparams, DownloadStatusCB statusCb,
248  DownloadResultCB resultCb, void* userData);
249 
274 int MSPAPI MSPAppendData(void* data, unsigned int dataLen, unsigned int dataStatus);
275 
276 typedef int(MSPAPI* Proc_MSPAppendData)(void* data, unsigned int dataLen, unsigned int dataStatus);
277 
302 const char* MSPAPI MSPGetResult(unsigned int* rsltLen, int* rsltStatus, int* errorCode);
303 
304 typedef const char*(MSPAPI* Proc_MSPGetResult)(unsigned int* rsltLen, int* rsltStatus, int* errorCode);
305 
328 int MSPAPI MSPSetParam(const char* paramName, const char* paramValue);
329 
330 typedef int(MSPAPI* Proc_MSPSetParam)(const char* paramName, const char* paramValue);
331 
356 int MSPAPI MSPGetParam(const char* paramName, char* paramValue, unsigned int* valueLen);
357 
358 typedef int(MSPAPI* Proc_MSPGetParam)(const char* paramName, char* paramValue, unsigned int* valueLen);
359 
388 const char* MSPAPI MSPUploadData(const char* dataName, void* data, unsigned int dataLen, const char* params,
389  int* errorCode);
390 
391 typedef const char*(MSPAPI* Proc_MSPUploadData)(const char* dataName, void* data, unsigned int dataLen,
392  const char* params, int* errorCode);
393 
419 const void* MSPAPI MSPDownloadData(const char* params, unsigned int* dataLen, int* errorCode);
420 
421 typedef const void*(MSPAPI* Proc_MSPDownloadData)(const char* params, unsigned int* dataLen, int* errorCode);
422 
423 //#if MSP_WCHAR_SUPPORT
424 
425 const void* MSPAPI MSPDownloadDataW(const wchar_t* params, unsigned int* dataLen, int* errorCode);
426 
427 typedef const void*(MSPAPI* Proc_MSPDownloadDataW)(const wchar_t* params, unsigned int* dataLen, int* errorCode);
428 
429 //#endif/*MSP_WCHAR_SUPPORT*/
430 
456 const char* MSPAPI MSPSearch(const char* params, const char* text, unsigned int* dataLen, int* errorCode);
457 
458 typedef const char*(MSPAPI* Proc_MSPSearch)(const char* params, const char* text, unsigned int* dataLen,
459  int* errorCode);
460 
461 typedef int (*NLPSearchCB)(const char* sessionID, int errorCode, int status, const void* result, long rsltLen,
462  void* userData);
463 
464 const char* MSPAPI MSPNlpSearch(const char* params, const char* text, unsigned int textLen, int* errorCode,
465  NLPSearchCB callback, void* userData);
466 
467 typedef const char*(MSPAPI* Proc_MSPNlpSearch)(const char* params, const char* text, unsigned int textLen,
468  int* errorCode, NLPSearchCB callback, void* userData);
469 
470 int MSPAPI MSPNlpSchCancel(const char* sessionID, const char* hints);
471 
494 typedef void (*msp_status_ntf_handler)(int type, int status, int param1, const void* param2, void* userData);
495 
496 int MSPAPI MSPRegisterNotify(msp_status_ntf_handler statusCb, void* userData);
497 
498 typedef const char*(MSPAPI* Proc_MSPRegisterNotify)(msp_status_ntf_handler statusCb, void* userData);
499 
522 const char* MSPAPI MSPGetVersion(const char* verName, int* errorCode);
523 
524 typedef const char*(MSPAPI* Proc_MSPGetVersion)(const char* verName, int* errorCode);
525 
526 #if __cplusplus
527 
528 } /* extern "C" */
529 
530 #endif /* C++ */
531 
532 #endif /* __MSP_CMN_H__ */
const char *(MSPAPI * Proc_MSPNlpSearch)(const char *params, const char *text, unsigned int textLen, int *errorCode, NLPSearchCB callback, void *userData)
Definition: msp_cmn.h:467
int MSPAPI MSPLogoutW()
const char *MSPAPI MSPUploadData(const char *dataName, void *data, unsigned int dataLen, const char *params, int *errorCode)
int MSPAPI MSPRegisterNotify(msp_status_ntf_handler statusCb, void *userData)
const char *(MSPAPI * Proc_MSPUploadData)(const char *dataName, void *data, unsigned int dataLen, const char *params, int *errorCode)
Definition: msp_cmn.h:391
int MSPAPI MSPNlpSchCancel(const char *sessionID, const char *hints)
int(MSPAPI * Proc_MSPAppendData)(void *data, unsigned int dataLen, unsigned int dataStatus)
Definition: msp_cmn.h:276
int MSPAPI MSPLoginW(const wchar_t *usr, const wchar_t *pwd, const wchar_t *params)
int MSPAPI MSPAppendData(void *data, unsigned int dataLen, unsigned int dataStatus)
#define MSPAPI
Definition: msp_types.h:8
int(MSPAPI * Proc_MSPUpload)(const char *dataName, const char *params, const char *dataID)
Definition: msp_cmn.h:212
const void *(MSPAPI * Proc_MSPDownloadData)(const char *params, unsigned int *dataLen, int *errorCode)
Definition: msp_cmn.h:421
int(MSPAPI * Proc_MSPDownload)(const char *dataName, const char *params, DownloadStatusCB statusCb, DownloadResultCB resultCb, void *userData)
Definition: msp_cmn.h:241
int(* DownloadResultCB)(const void *data, long dataLen, void *userData)
Definition: msp_cmn.h:236
char * Wchar2Mbytes(const wchar_t *wcstr)
int MSPAPI MSPUpload(const char *dataName, const char *params, const char *dataID)
int MSPAPI MSPDownloadW(const wchar_t *wdataName, const wchar_t *wparams, DownloadStatusCB statusCb, DownloadResultCB resultCb, void *userData)
const char *(MSPAPI * Proc_MSPGetVersion)(const char *verName, int *errorCode)
Definition: msp_cmn.h:524
int MSPAPI MSPLogin(const char *usr, const char *pwd, const char *params)
int MSPAPI MSPSetParam(const char *paramName, const char *paramValue)
const char *MSPAPI MSPSearch(const char *params, const char *text, unsigned int *dataLen, int *errorCode)
int(MSPAPI * Proc_MSPLoginW)(const wchar_t *usr, const wchar_t *pwd, const wchar_t *params)
Definition: msp_cmn.h:152
int MSPAPI MSPGetParam(const char *paramName, char *paramValue, unsigned int *valueLen)
const void *MSPAPI MSPDownloadDataW(const wchar_t *params, unsigned int *dataLen, int *errorCode)
int(MSPAPI * Proc_MSPSetParam)(const char *paramName, const char *paramValue)
Definition: msp_cmn.h:330
const void *MSPAPI MSPDownloadData(const char *params, unsigned int *dataLen, int *errorCode)
int(MSPAPI * Proc_MSPDownloadW)(const wchar_t *wdataName, const wchar_t *wparams, DownloadStatusCB statusCb, DownloadResultCB resultCb, void *userData)
Definition: msp_cmn.h:247
int(MSPAPI * Proc_MSPLogin)(const char *usr, const char *pwd, const char *params)
Definition: msp_cmn.h:146
int MSPAPI MSPLogout()
user logout interface
const char *MSPAPI MSPGetResult(unsigned int *rsltLen, int *rsltStatus, int *errorCode)
int(MSPAPI * Proc_MSPLogout)()
Definition: msp_cmn.h:176
int MSPAPI MSPDownload(const char *dataName, const char *params, DownloadStatusCB statusCb, DownloadResultCB resultCb, void *userData)
int(MSPAPI * Proc_MSPLogoutW)()
Definition: msp_cmn.h:182
int(* DownloadStatusCB)(int errorCode, long param1, const void *param2, void *userData)
Definition: msp_cmn.h:234
int(MSPAPI * Proc_MSPGetParam)(const char *paramName, char *paramValue, unsigned int *valueLen)
Definition: msp_cmn.h:358
const char *(MSPAPI * Proc_MSPSearch)(const char *params, const char *text, unsigned int *dataLen, int *errorCode)
Definition: msp_cmn.h:458
wchar_t * Mbytes2Wchar(const char *mbstr)
int(* NLPSearchCB)(const char *sessionID, int errorCode, int status, const void *result, long rsltLen, void *userData)
Definition: msp_cmn.h:461
const char *(MSPAPI * Proc_MSPGetResult)(unsigned int *rsltLen, int *rsltStatus, int *errorCode)
Definition: msp_cmn.h:304
const char *MSPAPI MSPGetVersion(const char *verName, int *errorCode)
void(* msp_status_ntf_handler)(int type, int status, int param1, const void *param2, void *userData)
Definition: msp_cmn.h:494
const char *MSPAPI MSPNlpSearch(const char *params, const char *text, unsigned int textLen, int *errorCode, NLPSearchCB callback, void *userData)
const char *(MSPAPI * Proc_MSPRegisterNotify)(msp_status_ntf_handler statusCb, void *userData)
Definition: msp_cmn.h:498
const void *(MSPAPI * Proc_MSPDownloadDataW)(const wchar_t *params, unsigned int *dataLen, int *errorCode)
Definition: msp_cmn.h:427


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:53