[BACK]Return to library.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Annotation of OpenXM/doc/OpenXM-specs/library.tex, Revision 1.1

1.1     ! noro        1: %% $OpenXM$
        !             2: /*&jp
        !             3: \section{ OX サーバに対する C ライブラリインタフェース }
        !             4:
        !             5: 一部のOX サーバでは C のライブラリとしてリンクして使用するもできる.
        !             6: ライブラリとして使用するための C の関数は
        !             7: Asir の OX サーバ用クライアント関数に似たインタフェースを持つ.
        !             8:
        !             9: ライブラリ関数には, CMO を binary encoding して渡す.
        !            10: ライブラリ関数からは, CMO が binary encoded form で戻る.
        !            11:
        !            12: */
        !            13: /*&eg
        !            14: \section{ OX servers as a C library}
        !            15:
        !            16: In some OX servers, one can use the OX server as a C library.
        !            17: The interface functions of the C library
        !            18: are similar to Asir OX client functions such as
        !            19: \verb+ ox_push_cmo() +, \verb+ ox_pop_cmo() +.
        !            20:
        !            21: CMO should be in the binary encoded form to call these functions.
        !            22: */
        !            23: /*&C
        !            24:
        !            25: \medbreak
        !            26: \begin{verbatim}
        !            27:   int xxx_ox_byte_order(int type)
        !            28: \end{verbatim}
        !            29: */
        !            30: /*&eg
        !            31:   Specify the byte order to send int32 to the OX server xxx.
        !            32:   When type = 0, the network byte order will be used.
        !            33:   In case of error, -1 will be returned.
        !            34: */
        !            35: /*&jp
        !            36:   OX サーバ xxx へ int32 を送るための byte order を type で指定する.
        !            37:   ライブラリではあるが,
        !            38:   type = 0 で, network byte order を使用できないといけない??
        !            39:   失敗した場合, -1 を戻す.
        !            40: */
        !            41:
        !            42: /*&C
        !            43:
        !            44: \smallskip
        !            45: \begin{verbatim}
        !            46:   void xxx_ox_push_cmo(void *cmo, int size)
        !            47: \end{verbatim}
        !            48: */
        !            49: /*&eg
        !            50: Push the binary encoded CMO {\tt cmo} of the size {\tt size}
        !            51: onto the stack of the OX server xxx.
        !            52: */
        !            53: /*&jp
        !            54: Binary encoded された CMO (サイズは size) を, OX サーバ xxx
        !            55: の stack に push する.
        !            56: */
        !            57: /*&C
        !            58:
        !            59: \smallskip
        !            60: \begin{verbatim}
        !            61:   int xxx_ox_pop_cmo(void *cmo, int limit)
        !            62: \end{verbatim}
        !            63: */
        !            64: /*&eg
        !            65: Pop a binary encoded CMO from the OX server xxx
        !            66: and write it at {\tt cmo}.
        !            67: The return value is the size of the CMO in bytes.
        !            68: In case of the stack underflow, the return value is 0.
        !            69: If the size exceeds the {\tt limit}, -1 will be returned
        !            70: and the CMO is not popped and will not be written to {\tt cmo}.
        !            71: */
        !            72: /*&jp
        !            73: Binary encoded された CMO (サイズは size) を,  OX サーバより
        !            74: pop して, cmo に書き込む.
        !            75: 戻り値は CMO のサイズを byte で戻す.
        !            76: Stack underflow の場合の戻り値は 0 である.
        !            77: ただし, limit より大きいサイズの CMO は書き込まれない.
        !            78: この場合, 戻り値は -1 となる.
        !            79: */
        !            80:
        !            81: /*&C
        !            82:
        !            83: \smallskip
        !            84: \begin{verbatim}
        !            85:   int xxx_ox_peek_cmo_size()
        !            86: \end{verbatim}
        !            87: */
        !            88: /*&eg
        !            89: Return the size of the CMO at the top of the stack.
        !            90: */
        !            91:
        !            92: /*&C
        !            93:
        !            94: \smallskip
        !            95: \begin{verbatim}
        !            96:   int xxx_ox_peek_cmo_size()
        !            97: \end{verbatim}
        !            98: */
        !            99: /*&jp
        !           100: stack の一番上にある CMO のサイズを byte で戻す.
        !           101: ( ライブラリ版特有 )
        !           102: */
        !           103:
        !           104: /*&C
        !           105:
        !           106: \smallbreak
        !           107: \begin{verbatim}
        !           108: ox_push_cmd(), ox_execute_string()
        !           109: \end{verbatim}
        !           110: */
        !           111: /*&eg
        !           112: These functions have the same specification with those
        !           113: in Asir client functions. See Asir document.
        !           114: Numbers should be given in int 32 and strings should be given
        !           115: by char *
        !           116: */
        !           117: /*&jp
        !           118: については, Asir クライアントと同じインタフェース.
        !           119: 数は int32 で, 文字列は char * で.
        !           120: */
        !           121:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>