libmms - Media Management System library
cc [ flag... ] file... -lmms [ library... ]
Functions in this library provide access to the Media Management System (MMS).
The Media Management System (MMS) is a distributed removable media management system. It is based on IEEE 1244, Media Management System (MMS). Client applications request MMS to mount and unmount cartridges and process them after they are mounted. Applications use Media Management Protocol (MMP) commands to make requests. The Media Management System (MMS) client API provides basic functions that give an application the ability to connect to MMS, send commands to MMS, and interpret the responses to the commands.
For a client to establish a connection to MMS, it needs to first initialize a session and then establish the connection. There are two types of sessions:
synchronous
asynchronous
The type of session is specified with the choice of initialization function, either mms_init() or mms_ainit().
The connection is established with the hello function, mms_hello().
Within an asynchronous session, the client can also send synchronous commands.
If a client's instance is configured to allow multiple sessions, the client can create more than one session, in any combination of synchronous and asynchronous types. The client must manage which commands are sent over which session.
If the client's instance is not configured to allow multiple sessions and a second init function is called, the client's hello function receives an "unwelcome" response from MMS.
Any command sent using the asynchronous send function, mms_send_acmd(), specifies a callback routine that is invoked when the MMS API receives a response to the command. This callback routine is a client-specified function. A callback function can not issue other commands to MMS because the callback function is executed as part of the MMS API's reader thread.
An asynchronous session allows the client to also issue commands using the synchronous send function, mms_send_cmd(), waiting for a response before returning.
A client can receive notification of certain events that occur within MMS through the event notification mechanism.
Routines are provided by the API to help in the processing of responses to the client's commands.
For OpenSolaris platforms, libmms is released in shared object (.so) format, installed in /usr/lib/libmms.so.
The following table lists libmms library routines and indicates the type of connection that supports them and whether they are optional.
Routine | Availability | Required |
mms_init() | synchronous | required for synchronous |
mms_ainit() | ||
mms_hello() | ||
mms_send_cmd() | ||
mms_send_acmd() | ||
mms_read_response() | ||
mms_free_rsp() | ||
mms_goodbye() | ||
mms_agoodbye() |
The following routines are used by a client to to process the response to a MMS command.
mms_rsp_type()
mms_handle_err_rsp()
mms_get_tree()
mms_get_attribute()
To make a client application able to use MMS, build the client with access to the MMS API library routines and then configure the application.
The shared object libmms.so.1 provides the public interfaces defined below. See Intro(3) for additional information on shared object interfaces.
mms_agoodbye | mms_ainit |
mms_free_rsp | mms_get_attribute |
mms_get_str | |
mms_goodbye | |
mms_hello | |
mms_read_response | |
mms_send_acmd |
/usr/lib/libmms.so.1
/usr/lib/64/libmms.so.1
See attributes(5) for descriptions of the following attributes:
|
Intro(3), mms_init(3MMS), mms_rsp_type(3MMS), mms_send_cmd(3MMS), attributes(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |