MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Interface Libraries                                  libmms(3LIB)



NAME
     libmms - Media Management System library

SYNOPSIS
     cc [ flag... ] file... -lmms [ library... ]


DESCRIPTION
     Functions in  this  library  provide  access  to  the  Media
     Management System (MS).


     The Media Management System (MS) is a distributed removable
     media  management  system.  It  is based on IE 1244, Media
     Management System (MS). Client applications request MS  to
     mount and unmount cartridges and process them after they are
     mounted. Applications use Media  Management  Protocol  (MP)
     commands to make requests. The Media Management System (MS)
     client API provides basic functions that give an application
     the  ability  to  connect  to MS, send commands to MS, and
     interpret the responses to the commands.


     For a client to establish a connection to MS, it  needs  to
     first  initialize  a  session and then establish the connec-
     tion. There are two types of sessions:

     synchronous     A  synchronous  connection  means  that  the
                     client waits for a response for each command
                     that it sends to MS.


     asynchronous    A asynchronous connections means the  client
                     can continue to send commands to MS without
                     waiting for a response to the commands.



     The type of session is specified with the choice of initial-
     ization function, either mmsinit() or mmsainit().


     The connection  is  established  with  the  hello  function,
     mmshello().


     Within an asynchronous session, the  client  can  also  send
     synchronous commands.


     If a client's instance is configured to allow multiple  ses-
     sions,  the  client can create more than one session, in any



SunOS 5.11           Last change: 2 Dec 2008                    1






Interface Libraries                                  libmms(3LIB)



     combination  of  synchronous  and  asynchronous  types.  The
     client  must  manage which commands are sent over which ses-
     sion.


     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 MS.


     Any command  sent  using  the  asynchronous  send  function,
     mmssendacmd(),   specifies  a  callback  routine  that  is
     invoked when the MS API receives a response to the command.
     This  callback  routine  is  a  client-specified function. A
     callback function  can  not  issue  other  commands  to  MS
     because the callback function is executed as part of the MS
     API's reader thread.


     An asynchronous session allows the client to also issue com-
     mands  using  the synchronous send function, mmssendcmd(),
     waiting for a response before returning.


     A client can receive notification  of  certain  events  that
     occur within MS 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  indi-
     cates  the type of connection that supports them and whether
     they are optional.



           Routine                 Availability                    Required
     
     mmsinit()            synchronous                    required for synchronous
     
     mmsainit()           asynchronous                   required for asynchronous
     
     mmshello()           synchronous and asynchronous   required for both
     





SunOS 5.11           Last change: 2 Dec 2008                    2






Interface Libraries                                  libmms(3LIB)



     mmssendcmd()        synchronous and asynchronous   required  for  synchronous,
                                                          optional for asynchronous
     
     mmssendacmd()       synchronous and asynchronous   required for  asynchronous,
                                                          optional for synchronous
     
     mmsreadresponse()   synchronous and asynchronous   required  for  intermediate
                                                          response to mmssendcmd()
     
     mmsfreersp()        synchronous and asynchronous   required for both
     
     mmsgoodbye()         synchronous                    required for synchronous
     
     mmsagoodbye()        asynchronous                   required for asynchronous



     The following routines are used by a client  to  to  process
     the response to a MS command.

     mmsrsptype()          Returns the type  of  response  that
                             was received for the command.


     mmshandleerrrsp()    Returns the  error  code  and  error
                             message from an error response.


     mmsgettree()          Returns  the  parse  tree   of   the
                             response.


     mmsgetattribute()     Obtains the value associcated with a
                             attribute  name  from  a response in
                             namevalue mode.


USAGE
     To make a client application able  to  use  MS,  build  the
     client  with access to the MS API library routines and then
     configure the application.

         1.   Get a copy of the MS source tree.

         2.   Include     and      in   the
              makefile.      The     path     is     the     san-
              andreas/include/$(OBJDIR). For example, OBJDIR is
              the obj/SunOS5.10sparcDEBUG.

         3.   Link the client to the mms library to get  the  MS
              API. A client can link either statically or dynami-
              cally. To link the library statically, the path  is



SunOS 5.11           Last change: 2 Dec 2008                    3






Interface Libraries                                  libmms(3LIB)



              san-andreas/lib/$(OBJDIR). To link at runtime, MS
              is installed in /opt/SUNWsmmms/lib/libmms.so.

         4.   Link  with  either  libcommon.so   or   libcommon.a
              depending on if the client is dynamically linked or
              statically linked.

         5.   Create the client's application name in  MS  data-
              base.  Client application instances must be created
              within MS database in order for clients to  estab-
              lish  a connection with MS.

         6.   Use the MS database password to  connect  to  MS.
              The  default database password is a construction of
              the administrator password with  the  characters  "
              dbadmin" appended.

INTERFACES
     The shared object libmms.so.1 provides the public interfaces
     defined  below.  See  Intro(3) for additional information on
     shared object interfaces.



     mmsagoodbye                  mmsainit
     mmsfreersp                  mmsgetattribute
     mmsgetstr                   mmsgettree
     mmsgoodbye                   mmshandleerrrsp
     mmshello                     mmsinit
     mmsreadresponse             mmsrsptype
     mmssendacmd                 mmssendcmd


FILES
     /usr/lib/libmms.so.1       shared object


     /usr/lib/64/libmms.so.1    64-bit shared object


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:












SunOS 5.11           Last change: 2 Dec 2008                    4






Interface Libraries                                  libmms(3LIB)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWmmsu                    
    
     Interface Stability          Uncommitted                 
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     Intro(3),        mmsinit(3MS),         mmsrsptype(3MS),
     mmssendcmd(3MS), attributes(5)









































SunOS 5.11           Last change: 2 Dec 2008                    5



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™