home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / msgapi38.zip / INCLUDE / API_BROW.H < prev    next >
C/C++ Source or Header  |  1991-11-16  |  5KB  |  117 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  MSGAPI Source Code, Version 2.00                                       *
  4.  *  Copyright 1989-1991 by Scott J. Dudley.  All rights reserved.          *
  5.  *                                                                         *
  6.  *  Definitions for the Browse API                                         *
  7.  *                                                                         *
  8.  *  For complete details of the licensing restrictions, please refer to    *
  9.  *  the licence agreement, which is published in its entirety in           *
  10.  *  README.1ST.                                                            *
  11.  *                                                                         *
  12.  *  USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE       *
  13.  *  MSGAPI LICENSING AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF THIS       *
  14.  *  AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO NOT HAVE    *
  15.  *  THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT ONE OF THE   *
  16.  *  ADDRESSES LISTED BELOW.  IN NO EVENT SHOULD YOU PROCEED TO USE THIS    *
  17.  *  FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE MSGAPI LICENSING         *
  18.  *  AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE ABLE TO REACH WITH THE   *
  19.  *  AUTHOR.                                                                *
  20.  *                                                                         *
  21.  *  You can contact the author at one of the address listed below:         *
  22.  *                                                                         *
  23.  *  Scott Dudley           FidoNet  1:249/106                              *
  24.  *  777 Downing St.        Internet f106.n249.z1.fidonet.org               *
  25.  *  Kingston, Ont.         BBS      (613) 389-8315   HST/14.4k, 24hrs      *
  26.  *  Canada - K7M 5N3                                                       *
  27.  *                                                                         *
  28.  ***************************************************************************/
  29.  
  30. /* $Id: api_brow.h_v 1.0 1991/11/16 16:16:51 sjd Rel sjd $ */
  31.  
  32. #define BROWSE_ACUR   0x0001  /* Scan current area only                     */
  33. #define BROWSE_ATAG   0x0002  /* Scan only marked areas                     */
  34. #define BROWSE_AALL   0x0004  /* Scan ALL areas                             */
  35.  
  36. #define BROWSE_ALL    0x0008  /* Scan all messages in area                  */
  37. #define BROWSE_NEW    0x0010  /* Scan only msgs since lastread              */
  38. #define BROWSE_SEARCH 0x0020  /* Search all msgs in area based on criteria  */
  39. #define BROWSE_FROM   0x0040  /* Search from msg#XX and up.                 */
  40.  
  41. #define BROWSE_READ   0x0100  /* Show messages in full form                 */
  42. #define BROWSE_LIST   0x0200  /* Display msg headers only                   */
  43. #define BROWSE_QWK    0x0400  /* QWK file format download                   */
  44.  
  45. #define BROWSE_GETTXT 0x0800  /* We have to read msg text when scanning     */
  46. #define BROWSE_EXACT  0x1000  /* Match search strings EXACTLY               *
  47.                                * (ie. use stricmp(), not stristr().)        */
  48. #define BROWSE_HASH   0x2000  /* Use hash compare for this one only         */
  49.  
  50. #define BROWSE_AREA (BROWSE_ACUR | BROWSE_ATAG | BROWSE_AALL)
  51. #define BROWSE_TYPE (BROWSE_ALL | BROWSE_NEW | BROWSE_SEARCH | BROWSE_FROM)
  52. #define BROWSE_DISPLAY (BROWSE_READ | BROWSE_LIST | BROWSE_QWK)
  53.  
  54. #define SF_HAS_ATTR     0x01
  55. #define SF_NOT_ATTR     0x02
  56. #define SF_OR           0x04
  57. #define SF_AND          0x08
  58.  
  59. #define WHERE_TO        0x01
  60. #define WHERE_FROM      0x02
  61. #define WHERE_SUBJ      0x04
  62. #define WHERE_BODY      0x08
  63.  
  64. #define WHERE_ALL (WHERE_TO | WHERE_FROM | WHERE_SUBJ | WHERE_BODY)
  65.  
  66.  
  67. #define SCAN_BLOCK_SDM     48   /* # of msgs to read in from scanfile at    *
  68.                                  * once from SCANFILE.DAT.                  */
  69. #define SCAN_BLOCK_SQUISH 512   /* Same as above, but for xxxxxxxx.SQI      */
  70.  
  71.  
  72. typedef struct _search
  73. {
  74.   struct _search *next;
  75.  
  76.   long attr;
  77.   int  flag;
  78.  
  79.   char *txt;
  80.   char where;
  81.  
  82. } SEARCH;
  83.  
  84.  
  85. struct _browse;
  86. typedef struct _browse BROWSE;
  87.  
  88. struct _browse
  89. {
  90.   char *path;
  91.   word type;
  92.  
  93.   word bflag;
  94.   dword bdata;
  95.   SEARCH *first;
  96.   char *nonstop;
  97.   
  98.   dword msgn;
  99.   
  100.   MSG *sq;
  101.   MSGH *m;
  102.   XMSG msg;
  103.   word matched;
  104.   
  105.   int (*Begin_Ptr)(BROWSE *b);
  106.   int (*Status_Ptr)(BROWSE *b,char *aname,int colour);
  107.   int (*Idle_Ptr)(BROWSE *b);
  108.   int (*Display_Ptr)(BROWSE *b);
  109.   int (*After_Ptr)(BROWSE *b);
  110.   int (*End_Ptr)(BROWSE *b);
  111.   int (*Match_Ptr)(BROWSE *b);
  112. };
  113.  
  114.  
  115.  
  116.  
  117.