mms_rsp_type, mms_get_tree, mms_get_str, mms_get_attribute, mms_handle_err_rsp - MMS client functions for handling responses
cc [ flag...] file... -lmms [ library...] #include <mms_api.h> int mms_rsp_type(void *response);
mms_par_node_t *mms_get_tree(void *response);
char *mms_get_str(void *response);
char *mms_get_attribute(void *response, char *name, void **prev);
int mms_handle_err_response(void *response, int * class, int * code, char **message);
For these functions, response is the MMS response to an MMP command sent by the client.
The mms_rsp_type() macro returns the type of the response. The following is a list of responses:
MMS_API_RSP_UNACC
MMS_API_RSP_FINAL
MMS_API_RSP_FINAL_INTR
MMS_API_RSP_FINAL_ERR
MMS_API_RSP_FINAL_CANC
The mms_get_tree() macro returns the parse tree of the response.
The mms_get_str() macro returns the response string.
The mms_get_attribute() function takes a response with name values looking for name, and returning the value associated with it. A client can call this function multiple times if the response contains multiple instances of name. When all occurrences of name have been found, NULL is returned.
The mms_handle_err_rsp() function processes an error response on behalf of the client. It returns the error class, error code, and the internationalized error message if one was included.
Upon successful completion, mms_handle_err_rsp() returns MMS_API_OK. If it encounters a processing error, it returns an error code indicating the type of error.
These functions will fail if:
MMS_API_ERROR
MMS_API_NOT_ERR_RSP
See attributes(5) for descriptions of the following attributes:
|
libmms(3LIB), mms_init(3MMS), mms_send_cmd(3MMS), attributes(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |