mms_init, mms_ainit, mms_goodbye, mms_agoodbye, mms_hello - manage sessions between the client application and MMS
cc [ flag...] file... -lmms [ library...] #include <mms_api.h> int mms_init(void *session, int *version);
int mms_ainit(void *session, int *version, void (*callbk)(void *arg));
int mms_hello(void *session, char *host, char *app, char *ai, char *tag, char *pass);
int mms_goodbye(void *session, int force);
int mms_agoodbye(void *session, int force);
The mms_init() function creates and initializes the data structure used by a client to communicate with the Media Management System (MMS) synchronously. The mms_ainit() function creates and initializes the data structure used by a client to communicate with MMS asynchronously. On successful completion, session contains the pointer to the data structure and version contains the MMS API library version. If non-null, the callbk argument specifies which client routine to invoke if the asynchronous session shuts down.
In the following functions, session is a session pointer returned by either mms_init() or mms_ainit(). The format of the client's logging routine is the following:
void logfunctionname(char *, char *)
The first argument is the prefix and the second is the API error message of the error encountered.
The mms_hello() function establishes the session connection between the client and MMS. The client specifies the host where MM is running (host), application name (app), application instance (ai), application tag (tag), and application password (pass) to use to connect with MMS. These values must be present in MMS for the connection to be allowed.
The mms_goodbye() function shuts down a synchronous session between the client and MMS.
The mms_agoodbye() function shuts down an asynchronous session between the client and MMS. If force is set, no goodbye is sent to MM.
Upon successful completion, MMS_API_OK is returned. If a function has 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_DUPLICATE_REG
MMS_E_CONNECT_ERR
MMS_E_INVALID_RESPONSE
MMS_E_NET_IO_ERR
MMS_E_SYNTAX_ERR
MMS_ERR_BIAS
MMS_EV_REG_FAILED
MMS_EV_UNREG_FAILED
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_send_cmd(3MMS), attributes(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |