1mms_init(3MMS)     Media Management System Library Functions    mms_init(3MMS)
2
3
4

NAME

6       mms_init, mms_ainit, mms_goodbye, mms_agoodbye, mms_hello - manage ses‐
7       sions between the client application and MMS
8

SYNOPSIS

10       cc [ flag...] file... -lmms [ library...]
11       #include <mms_api.h>
12
13       int mms_init(void *session, int *version);
14
15
16       int mms_ainit(void *session, int *version,
17            void (*callbk)(void *arg));
18
19
20       int mms_hello(void *session, char *host, char *app, char *ai,
21            char *tag, char *pass);
22
23
24       int mms_goodbye(void *session, int force);
25
26
27       int mms_agoodbye(void *session, int force);
28
29

DESCRIPTION

31       The mms_init() function creates and initializes the data structure used
32       by  a client to communicate with the Media Management System (MMS) syn‐
33       chronously. The mms_ainit() function creates and initializes  the  data
34       structure  used  by a client to communicate with MMS asynchronously. On
35       successful completion, session contains the pointer to the data  struc‐
36       ture and version contains the MMS API library version. If non-null, the
37       callbk argument specifies which client routine to invoke if  the  asyn‐
38       chronous session shuts down.
39
40
41       In  the  following  functions, session is a session pointer returned by
42       either mms_init() or mms_ainit(). The format of  the  client's  logging
43       routine is the following:
44
45         void logfunctionname(char *, char *)
46
47
48
49       The  first  argument is the prefix and the second is the API error mes‐
50       sage of the error encountered.
51
52
53       The mms_hello() function establishes the session connection between the
54       client  and  MMS.  The  client  specifies  the host where MM is running
55       (host), application name (app), application instance (ai),  application
56       tag  (tag), and application password (pass) to use to connect with MMS.
57       These values must be present in MMS for the connection to be allowed.
58
59
60       The mms_goodbye() function shuts down a synchronous session between the
61       client and MMS.
62
63
64       The  mms_agoodbye() function shuts down an asynchronous session between
65       the client and MMS. If force is set, no goodbye is sent to MM.
66

RETURN VALUES

68       Upon successful completion, MMS_API_OK is returned. If a function has a
69       processing  error,  it  returns  an  error  code indicating the type of
70       error.
71

ERRORS

73       These functions will fail if:
74
75       MMS_API_ERR               Unrecoverable   internal   processing   error
76                                 occurred.
77
78
79       MMS_API_NOT_ERR_RSP       Response is not an error response.
80
81
82       MMS_API_SHUTDOWN          Client has shut down API.
83
84
85       MMS_ASYNC_API_FAILURE     Reader thread unable to obtain reader mutex.
86
87
88       MMS_CFG_FILE_ERR          Unable  to open watcher daemon's network con‐
89                                 figuration file.
90
91
92       MMS_DUPLICATE_REG         Event is already registered.
93
94
95       MMS_E_CONNECT_ERR         Failed to connect to MMS.
96
97
98       MMS_E_INVALID_RESPONSE    Invalid MMS response to command.
99
100
101       MMS_E_NET_IO_ERR          Connection failure to MMS.
102
103
104       MMS_E_SYNTAX_ERR          MMS response contained a syntax error.
105
106
107       MMS_ERR_BIAS              Unknown Error code.
108
109
110       MMS_EV_REG_FAILED         MMS did not accept event registration.
111
112
113       MMS_EV_UNREG_FAILED       MMS did not accept event unregistration.
114
115
116       MMS_INVALID_RSP           Unknown response type received.
117
118
119       MMS_MALLOC_ERROR          Unable to allocate required space.
120
121
122       MMS_MISSING_TASKID        Unable to find task ID in response.
123
124
125       MMS_SELECT_ERROR          Select system call failed.
126
127
128       MMS_TRACE_FAILURE         Unable to open API's trace file.
129
130
131       MMS_WRONG_API_MODE        API session does not support  this  API  com‐
132                                 mand.
133
134
135       MMS_WRONG_TASKID          Wrong task ID found for accept response.
136
137

ATTRIBUTES

139       See attributes(5) for descriptions of the following attributes:
140
141
142
143
144       ┌─────────────────────────────┬─────────────────────────────┐
145       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
146       ├─────────────────────────────┼─────────────────────────────┤
147       │Interface Stability          │Uncommitted                  │
148       ├─────────────────────────────┼─────────────────────────────┤
149       │MT-Level                     │MT-Safe                      │
150       └─────────────────────────────┴─────────────────────────────┘
151

SEE ALSO

153       libmms(3LIB), mms_rsp_type(3MMS), mms_send_cmd(3MMS), attributes(5)
154
155
156
157SunOS 5.11                        28 Oct 2008                   mms_init(3MMS)
Impressum