Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
4.1 KiB

  1. /* httpsrch.h */
  2. //-----------------
  3. // FULL TEXT SEARCH
  4. //-----------------
  5. // Variables used to echange information between server and client
  6. #define FTS_DOWNLOAD \
  7. LPBYTE lpTopicBuf; /* dest buffer for topics */ \
  8. LPBYTE lpOccBuf; /* dest buffer for occurences */ \
  9. DWORD dwTopicBsize; /* topic buffer size */ \
  10. DWORD dwOccBsize; /* Occurence buffer size */ \
  11. DWORD lcTotalNumOfTopics; /* The total number of topics returned */ \
  12. DWORD lcReturnedTopics; /* The total number of topics the user wants to get returned */ \
  13. DWORD lcDownloadedTopics; /* number of topics downloaded during the last request (HTTP) */ \
  14. DWORD lcMaxTopic; /* Max TopicId number (internal) */ \
  15. DWORD lcMaxDownloadedTopic;/* Max TopicId number downloaded (HTTP) */ \
  16. DWORD lLastTopicId; /* Last accessed topicId */ \
  17. DWORD dwStart; /* first topic in the list to download for current result window */ \
  18. DWORD dwCount; /* how many topics to download for current result window & Offset in Occurence file (last) */ \
  19. DWORD dwOccFileOffset
  20. typedef struct _httpFTS_TAG
  21. {
  22. HANDLE hStruct; // handle on this structure MUST be first field
  23. FTS_DOWNLOAD; // Client/Server info interface
  24. /* Info related to the query */
  25. HANDLE hTitle; // virtual handle on the client side
  26. DWORD dwFlags;
  27. HANDLE hStrQuery; // handle on the query string
  28. LPCSTR lpstrQuery; // The Query
  29. LPVOID lpGroup; // LPGROUP lpGroup,
  30. WORD wNear;
  31. WORD pad;
  32. DWORD dwCountQ; // dwCount from the Query
  33. LPVOID lpGroupHits;
  34. // Global result for this query
  35. DWORD dwGStart; // first topic in the list that has been downloaded from the beginning
  36. DWORD dwGCount; // how many topics have been downloaded from the beginning
  37. } HTTPQ, *LPHTTPQ;
  38. // parameters downloaded by the server: This structure MUST
  39. // match exactly the "Partial download variables Section"
  40. // in the above HTTPQ structure declaration.
  41. typedef struct _httpFTS_VARTAG
  42. {
  43. FTS_DOWNLOAD;
  44. } VHTTPQ, *LPVHTTPQ;
  45. #define DWNLD_TOPIC_SIZE 20000
  46. #define DWNLD_OCC_SIZE 44000
  47. // number of topics to download in a window of result
  48. #define DWNLD_CNT 10
  49. // comparison macros
  50. #define MIN(a, b) (((a) < (b)) ? (a) : (b))
  51. #define MAX(a, b) (((a) > (b)) ? (a) : (b))
  52. #define ABS(x) ((x > 0) ? (x) : (-x))
  53. //-----------------
  54. // WORDWHEEL SEARCH
  55. //-----------------
  56. // Variables used to echange information between server and client
  57. #define WWS_DOWNLOAD \
  58. LPBYTE lpGroupDestBuf; /* dest buffer for the result group */ \
  59. DWORD lcItemReturned; /* number of items returned till now */ \
  60. DWORD lcTotalNumOfItem; /* The total number of Item */ \
  61. DWORD lcDownloadedTopics; /* number of topics downloaded during the last request (HTTP) */ \
  62. DWORD lcMaxTopic; /* Max TopicId number (internal) */ \
  63. DWORD lcMaxDownloadedTopic;/* Max TopicId number downloaded (HTTP) */ \
  64. DWORD lLastTopicId; /* Last accessed topicId */ \
  65. DWORD dwStart; /* first topic in the list to download for current result window & how many topics to download for current result window & Offset in Occurence file (last) */ \
  66. DWORD dwCount
  67. typedef struct _httpWWS_TAG
  68. {
  69. HANDLE hStruct; // handle on this structure MUST be first field
  70. WWS_DOWNLOAD; // Client/Server info interface
  71. /* Info related to the query */
  72. HANDLE hCww; // handle on client word wheel container
  73. DWORD dwFlags;
  74. HANDLE hStrQuery; // handle on the query string
  75. LPCSTR lpstrQuery; // The Query
  76. LPVOID lpGroup; // LPGROUP lpGroup,
  77. DWORD dwCountQ; // dwCount from the Query
  78. LPVOID lpGroupHits;
  79. // Global result for this query
  80. DWORD dwGStart; // first topic in the list that has been downloaded from the beginning
  81. DWORD dwGCount; // how many topics have been downloaded from the beginning
  82. } WW_HTTPQ, *LPWW_HTTPQ;
  83. // parameters downloaded by the server: This structure MUST
  84. // match exactly the "Partial download variables Section"
  85. // in the above HTTPQ structure declaration.
  86. typedef struct _httpWWS_VARTAG
  87. {
  88. WWS_DOWNLOAD;
  89. } WW_VHTTPQ, *LPWW_VHTTPQ;