home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / samtexco.zip / imolspro.h < prev   
C/C++ Source or Header  |  2002-08-14  |  13KB  |  236 lines

  1. /*====================================================================*/
  2. /*  Name:     IMOLSPRO.H    (Library Services - prototype statements) */
  3. /*====================================================================*/
  4. /*                                                                    */
  5. /*  Licensed Materials - Property of IBM                              */
  6. /*                                                                    */
  7. /*  5765-IMT (C) Copyright IBM Corporation 1997, 1998                 */
  8. /*                                                                    */
  9. /*  All rights reserved.                                              */
  10. /*  US Government Users Restricted Rights -                           */
  11. /*  Use, duplication or disclosure restricted by GSA ADP              */
  12. /*  Schedule Contract with IBM Corporation.                           */
  13. /*                                                                    */
  14. /*  See Copyright Instructions.                                       */
  15. /*                                                                    */
  16. /*====================================================================*/
  17. /*                                                                    */
  18. /* Permission Notice                                                  */
  19. /*                                                                    */
  20. /* Permission is granted to copy, use, modify, and merge this         */
  21. /* software into your applications and to permit others to do any of  */
  22. /* the foregoing.                                                     */
  23. /* You may further distribute these object classes for commercial     */
  24. /* purposes only as part of your application that adds significant    */
  25. /* value and function beyond that provided by these object classes.   */
  26. /* You must include this permission statement and retain the          */
  27. /* copyright notice in all copies and modified versions of this       */
  28. /* software.                                                          */
  29. /*                                                                    */
  30. /*====================================================================*/
  31.  
  32. #if !defined(IMOLSPRO_DEFINED)      /* prototypes already included ?  */
  33. #define IMOLSPRO_DEFINED            /* if not, include them           */
  34.  
  35. /*--------------------------------------------------------------------*/
  36. /*  Library Services - mapping of external names to uppercase         */
  37. /*--------------------------------------------------------------------*/
  38. #define  LIB_init                      LIB_INIT
  39. #define  LIB_access_doc                LIB_ACCESS_DOC
  40. #define  LIB_read_doc_content          LIB_READ_DOC_CONTENT
  41. #define  LIB_close_doc                 LIB_CLOSE_DOC
  42. #define  LIB_list_doc_groups           LIB_LIST_DOC_GROUPS
  43. #define  LIB_list_documents            LIB_LIST_DOCUMENTS
  44. #define  LIB_get_doc_attr_values       LIB_GET_DOC_ATTR_VALUES
  45. #define  LIB_get_doc_group_attr_values LIB_GET_DOC_GROUP_ATTR_VALUES
  46. #define  LIB_doc_index_status          LIB_DOC_INDEX_STATUS
  47. #define  LIB_end                       LIB_END
  48.  
  49. /*--------------------------------------------------------------------*/
  50. /*  Library Services - calling conventions                            */
  51. /*--------------------------------------------------------------------*/
  52.  
  53. #if defined(__WINDOWS__) || defined(_WIN32)
  54.    #if defined(_WIN32)
  55.       #define  LSCALL               __cdecl
  56.    #else
  57.       #define  LSCALL               FAR PASCAL
  58.    #endif
  59. #elif defined(__UNIX__) || defined(_AIX) || defined(_HP_UX) || defined(__SOLARIS__) || defined(AS400)
  60. #define  LSCALL
  61. #else
  62. #define  LSCALL                     _System
  63. #endif
  64.  
  65. /*--------------------------------------------------------------------*/
  66. /*  Library Services - prototype statements                           */
  67. /*--------------------------------------------------------------------*/
  68. #ifdef __cplusplus
  69. extern "C" {
  70. #endif
  71.  
  72. unsigned long                       /* Initialize Library Services ---*/
  73. LSCALL   LIB_init
  74.  (
  75.  unsigned short    usLenSessInfo,   /* In:  Length of session info    */
  76.  char            * pSessionInfo,    /* In:  Session information       */
  77.                                     /*      with index name and       */
  78.                                     /*      library information items */
  79.  void           ** ppAnchor,        /* Out: pointer that can be used  */
  80.                                     /*      as anchor (when calling   */
  81.                                     /*      LIB_init, *ppAnchor has   */
  82.                                     /*      to be initialized to 0)   */
  83.  unsigned short  * pusReserved,     /* Reserved for future use        */
  84.  char            * pReserved,       /* Reserved for future use        */
  85.  char            * pDiagInfo        /* I/O: buffer to receive         */
  86.                                     /*      diagnosis information     */
  87.  );
  88.  
  89. unsigned long                       /* Access Document ---------------*/
  90. LSCALL   LIB_access_doc
  91.  (
  92.  void            * pAnchor,         /* In:  anchor                    */
  93.  unsigned short    usLenDocId,      /* In:  length of document id     */
  94.  char            * pDocId,          /* In:  document identifier       */
  95.  unsigned short  * pusLenDocInfo,   /* Out: actual length of document */
  96.                                     /*      related information       */
  97.  char            * pDocInfo,        /* I/O: buffer to receive         */
  98.                                     /*      document related info     */
  99.  void           ** ppDocHandle,     /* Out: document handle           */
  100.  char            * pDiagInfo        /* I/O: buffer to receive         */
  101.                                     /*      diagnosis information     */
  102.  );
  103.  
  104. unsigned long                       /* Read Document Text ------------*/
  105. LSCALL   LIB_read_doc_content
  106.  (
  107.  void            * pAnchor,         /* In:  anchor                    */
  108.  void            * pDocHandle,      /* In:  document handle           */
  109.  unsigned short    usSkipBytes,     /* In:  number of bytes to skip   */
  110.                                     /*      from current position     */
  111.  unsigned short    usReadBytes,     /* In:  bytes to read then from   */
  112.                                     /*      current position          */
  113.  unsigned short  * pusBytesRead,    /* Out: number of bytes actually  */
  114.                                     /*      read                      */
  115.  char            * pDocText,        /* I/O: buffer to receive text    */
  116.  char            * pDiagInfo        /* I/O: buffer to receive         */
  117.                                     /*      diagnosis information     */
  118.  );
  119.  
  120. unsigned long                       /* Close Document ----------------*/
  121. LSCALL   LIB_close_doc
  122.  (
  123.  void            * pAnchor,         /* In:  anchor                    */
  124.  void            * pDocHandle,      /* In:  document handle           */
  125.                                     /*      to be released by LS      */
  126.  char            * pDiagInfo        /* I/O: buffer to receive         */
  127.                                     /*      diagnosis information     */
  128.  );
  129.  
  130. unsigned long                       /* List Doc Group Identifiers ----*/
  131. LSCALL   LIB_list_doc_groups
  132.  (
  133.  void            * pAnchor,         /* In:  anchor                    */
  134.  unsigned short    usLenDocGroupId, /* In:  length of input           */
  135.  char            * pDocGroupId,     /* In:  library/document group    */
  136.                                     /*      identifier                */
  137.  unsigned long     ulLenOutBuffer,  /* In:  length of buffer to       */
  138.                                     /*      receive doc group list    */
  139.  char              RequestType,     /* In:  type of the request       */
  140.                                     /* I/O: document group list handle*/
  141.  void           ** ppDocGroupListHandle,
  142.                                     /* Out: actual length of document */
  143.  unsigned long   * pulLenDocGroupList,
  144.                                     /*      group list                */
  145.  char            * pDocGroupList,   /* I/O: buffer to receive         */
  146.                                     /*      document group list       */
  147.  char            * pDiagInfo        /* I/O: buffer to receive         */
  148.                                     /*      diagnosis information     */
  149.  );
  150.  
  151. unsigned long                       /* List Document Identifiers -----*/
  152. LSCALL   LIB_list_documents
  153.  (
  154.  void            * pAnchor,         /* In:  anchor                    */
  155.  unsigned short    usLenDocGroupId, /* In:  length of input           */
  156.  char            * pDocGroupId,     /* In:  document group identifier */
  157.  unsigned long     ulLenOutBuffer,  /* In:  length of buffer to       */
  158.                                     /*      receive document id       */
  159.  char              RequestType,     /* In:  type of the request       */
  160.  void           ** ppDocListHandle, /* I/O: document list handle      */
  161.  unsigned long   * pulLenDocList,   /* Out: actual length of document */
  162.                                     /*      identifier list           */
  163.  char            * pDocList,        /* I/O: buffer to receive         */
  164.                                     /*      document identifiers      */
  165.  char            * pDiagInfo        /* I/O: buffer to receive         */
  166.                                     /*      diagnosis information     */
  167.  );
  168.  
  169. unsigned long                       /* Get Document Attribute Values--*/
  170. LSCALL   LIB_get_doc_attr_values
  171.  (
  172.  void            * pAnchor,         /* In:  anchor                    */
  173.  unsigned short    usLenDocAttrList,/* In:  length of input           */
  174.  char            * pDocAttrList,    /* In:  attribute / document list */
  175.  unsigned long     ulLenOutBuffer,  /* In:  length of buffer to       */
  176.                                     /*      receive requested values  */
  177.  char              RequestType,     /* In:  type of the request       */
  178.                                     /* I/O: attribute value list      */
  179.                                     /*      handle                    */
  180.  void           ** ppAttrValListHandle,
  181.  unsigned long   * pulLenAttrValues,/* Out: actual length of          */
  182.                                     /*      attribute values          */
  183.  char            * pAttrValues,     /* I/O: buffer to receive         */
  184.                                     /*      attribute values          */
  185.  char            * pDiagInfo        /* I/O: buffer to receive         */
  186.                                     /*      diagnosis information     */
  187.  );
  188.  
  189. unsigned long                       /* Get Docgroup Attribute Values -*/
  190. LSCALL   LIB_get_doc_group_attr_values
  191.  (
  192.  void            * pAnchor,         /* In:  anchor                    */
  193.                                     /* In:  length of input           */
  194.  unsigned short    usLenDocGrpAttrList,
  195.  char            * pDGrpAttrList,   /* In:  attribute / docgroup list */
  196.  unsigned long     ulLenOutBuffer,  /* In:  length of buffer to       */
  197.                                     /*      receive requested values  */
  198.  char              RequestType,     /* In:  type of the request       */
  199.                                     /* I/O: attribute value list      */
  200.                                     /*      handle                    */
  201.  void **           ppAttrValListHandle,
  202.  unsigned long   * pulLenAttrValues,/* Out: actual length of          */
  203.                                     /*      attribute values          */
  204.  char            * pAttrValues,     /* I/O: buffer to receive         */
  205.                                     /*      attribute values          */
  206.  char            * pDiagInfo        /* I/O: buffer to receive         */
  207.                                     /*      diagnosis information     */
  208.  );
  209.  
  210. unsigned long                       /* Set document index status -----*/
  211. LSCALL   LIB_doc_index_status
  212.  (
  213.  void            * pAnchor,         /* In:  anchor                    */
  214.  unsigned short    usLenDocStatList,/* In:  length of input           */
  215.  char            * pDocStatList,    /* In:  list of documents to set  */
  216.                                     /*      index status              */
  217.  unsigned short    usCheckRequired, /* In:  special checks required   */
  218.  char            * pDiagInfo        /* I/O: buffer to receive         */
  219.                                     /*      diagnosis information     */
  220.  );
  221.  
  222. unsigned long                       /* End Library Services ----------*/
  223. LSCALL   LIB_end
  224.  (
  225.  void            * pAnchor,         /* In:  anchor                    */
  226.  char            * pDiagInfo        /* I/O: buffer to receive         */
  227.                                     /*      diagnosis information     */
  228.  );
  229.  
  230. #ifdef __cplusplus
  231.    }
  232. #endif
  233.  
  234. #endif                              /* end of include                 */
  235.  
  236.