mms_rsp_type(3MMS) Media Management System Library Functionsmms_rsp_type(3MMS)NAME
mms_rsp_type, mms_get_tree, mms_get_str, mms_get_attribute, mms_han‐
dle_err_rsp - MMS client functions for handling responses
SYNOPSIS
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);
DESCRIPTION
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 follow‐
ing is a list of responses:
MMS_API_RSP_UNACC unacceptable response
MMS_API_RSP_FINAL success response
MMS_API_RSP_FINAL_INTR intermediate response
MMS_API_RSP_FINAL_ERR error response
MMS_API_RSP_FINAL_CANC cancelled response
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 interna‐
tionalized error message if one was included.
RETURN VALUES
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.
ERRORS
These functions will fail if:
MMS_API_ERROR Unable to obtain error class or code.
MMS_API_NOT_ERR_RSP Response is not an error response.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
┌─────────────────────────────┬─────────────────────────────┐
│ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
├─────────────────────────────┼─────────────────────────────┤
│Interface Stability │Uncommitted │
├─────────────────────────────┼─────────────────────────────┤
│MT-Level │MT-Safe │
└─────────────────────────────┴─────────────────────────────┘
SEE ALSOlibmms(3LIB), mms_init(3MMS), mms_send_cmd(3MMS), attributes(5)SunOS 5.11 28 Oct 2008 mms_rsp_type(3MMS)