mms_send_cmd, mms_send_acmd, mms_read_response, mms_free_rsp - communication functions for MMS client
cc [ flag...] file... -lmms [ library...] #include <mms_api.h> int mms_send_cmd(void *session, char *cmd, void **rsp);
int mms_send_acmd(void *session, char *cmd, void (*callbk)(void *arg, void *arg1), void callbk_parm);
int mms_read_response(void *session, char *tid, void **rsp);
void mms_free_rsp(void *rsp);
For these functions, session specifies which session to use to communicate with the MMS.
The mms_send_cmd() function sends an MMP command cmd with a task ID of tid to MMS. On successful completion of the command, the response is returned in rsp. This function can be used in either a synchronous or asynchronous session.
The mms_send_acmd() function sends an MMP command cmd with a task ID of tid to MMS, but does not wait for a response from MMS. When a response is received, the API invokes the call back function callbk, passing callbk_parm as the first argument and the response as the second argument. This function can only be used in an asynchronous session.
The mms_read_response() function obtains additional responses if the response to mms_send_cmd() or mms_send_acmd() function returned an "intermediate" response. This occurs when the response exceeds the allowed size and has to be delivered in several separate responses.
The mms_free_rsp() function frees the memory associated with a response from one of the communication functions.
There are five possible responses from MMS:
cancelled
error
intermediate
success
unacceptable
Upon successful completion, MMS_API_OK is returned. If a function encounters a processing error, it returns an error code indicating the type of error.
These functions will fail if:
MMS_API_ERR
MMS_API_NOT_ERR_RSP
MMS_API_SHUTDOWN
MMS_ASYNC_API_FAILURE
MMS_CFG_FILE_ERR
MMS_E_CONNECT_ERR
MMS_E_INVALID_RESPONSE
MMS_E_NET_IO_ERR
MMS_E_SYNTAX_ERR
MMS_ERR_BIAS
MMS_INVALID_RSP
MMS_MALLOC_ERROR
MMS_MISSING_TASKID
MMS_SELECT_ERROR
MMS_TRACE_FAILURE
MMS_WRONG_API_MODE
MMS_WRONG_TASKID
See attributes(5) for descriptions of the following attributes:
|
libmms(3LIB), mms_rsp_type(3MMS), mms_init(3MMS), attributes(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |