Annotation of 43BSDReno/contrib/isode-beta/doc/manual/documents.tex, revision 1.1.1.1

1.1       root        1: % run this through LaTeX with the appropriate wrapper
                      2: 
                      3: \chapter      {The ISO Documents Database}\label{isodocuments}
                      4: The database \file{isodocuments} in the ISODE \verb"ETCDIR" directory
                      5: (usually the directory \file{/usr/etc/})
                      6: contains a simple mapping between
                      7: textual descriptions of FTAM document types and the various object
                      8: identifiers which compose each document type.
                      9: 
                     10: The database itself is an ordinary ASCII text file containg information
                     11: regarding the known FTAM document types on the host.
                     12: Each line contains
                     13: \begin{itemize}
                     14: \item  the entry number of the document type, a simple string;
                     15: 
                     16: \item  the document type, an object identifier;
                     17: 
                     18: \item  the constraint set, an object identifier;
                     19: 
                     20: \item  the abstract syntax, an object identifier;
                     21: and,
                     22: 
                     23: \item  the transfer syntax, an object identifier
                     24: \end{itemize}
                     25: Blanks and/or tab characters are used to seperate items.
                     26: However, double-quotes may be used to prevent separation for items containing
                     27: embedded whitspace.
                     28: The sharp character (`\verb"#"') at the beginning of a line indicates a
                     29: commentary line.
                     30: 
                     31: \section      {Accessing the Database}
                     32: The \man libftam(3n) library contains the routines used to access the database.
                     33: These routines ultimately manipulate an \verb"isodocment" structure,
                     34: which is the internal form.
                     35: \begin{quote}\index{isodocument}\small\begin{verbatim}
                     36: struct isodocument {
                     37:     char   *id_entry;
                     38: 
                     39:     OID     id_type;
                     40:     OID     id_constraint;
                     41:     OID     id_abstract;
                     42:     OID     id_transfer;
                     43: };
                     44: \end{verbatim}\end{quote}
                     45: The elements of this structure are:
                     46: \begin{describe}
                     47: \item[\verb"id\_entry":] the entry number of the document type;
                     48: 
                     49: \item[\verb"id\_type":] the document type;
                     50: 
                     51: \item[\verb"id\_constraint":] the constraint set;
                     52: 
                     53: \item[\verb"id\_abstract":] the abstract syntax;
                     54: and,
                     55: 
                     56: \item[\verb"id\_transfer":] the transfer syntax.
                     57: \end{describe}
                     58: 
                     59: The routine \verb"getisodocument" reads the next entry in the database,
                     60: opening the database if necessary
                     61: \begin{quote}\index{getisodocument}\small\begin{verbatim}
                     62: struct isodocument *getisodocument ()
                     63: \end{verbatim}\end{quote}
                     64: It returns the manifest constant \verb"NULL" on error or end-of-file.
                     65: 
                     66: The routine \verb"setisodocument" opens and rewinds the database.
                     67: \begin{quote}\index{setisodocument}\small\begin{verbatim}
                     68: int     setisodocument (f)
                     69: int     f;
                     70: \end{verbatim}\end{quote}
                     71: The parameter to this procedure is:
                     72: \begin{describe}
                     73: \item[\verb"f":] the ``stayopen'' indicator,
                     74: if non-zero, then the database will remain open over subsequent calls to the
                     75: library.
                     76: \end{describe}
                     77: The routine \verb"endisodocument" closes the database.
                     78: \begin{quote}\index{endisodocument}\small\begin{verbatim}
                     79: int     endisodocument ()
                     80: \end{verbatim}\end{quote}
                     81: Both of these routines return non-zero on success and zero otherwise.
                     82: 
                     83: There are two routines used to fetch a particular entry in the database.
                     84: The routine \verb"getisodocumentbyentry" maps textual descriptions into
                     85: the internal form.
                     86: \begin{quote}\index{getisodocumentbyentry}\small\begin{verbatim}
                     87: struct isodocument *getisodocumentbyentry (entry)
                     88: char   *entry;
                     89: \end{verbatim}\end{quote}
                     90: The parameter to this procedure is:
                     91: \begin{describe}
                     92: \item[\verb"entry":] the descriptor of the object.
                     93: \end{describe}
                     94: and returns the \verb"isodocument" structure describing that document.
                     95: On failure, the manifest constant \verb"NULL" is returned instead.
                     96: 
                     97: The routine \verb"getisodocumentbytype" performs the inverse function.
                     98: \begin{quote}\index{getisodocumentbytype}\small\begin{verbatim}
                     99: struct isodocument *getisodocumentbytype (tpye)
                    100: OID     type;
                    101: \end{verbatim}\end{quote}
                    102: The parameter to this procedure is:
                    103: \begin{describe}
                    104: \item[\verb"type":] the identifier of the document.
                    105: \end{describe}
                    106: On a successful return,
                    107: an \verb"isodocument" structure describing the document is returned.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.