00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _LCN_SEGMENT_H
00023 #define _LCN_SEGMENT_H
00024
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028
00029 #include "lcn_types.h"
00030 #include "lcn_directory.h"
00031 #include "lcn_term.h"
00032 #include "lcn_document.h"
00033
00034
00035 typedef struct lcn_segment_t lcn_segment_t;
00036
00037
00038
00039
00040
00041 lcn_error_t *
00042 lcn_segment_open (lcn_segment_t **segment,
00043 const lcn_char_t *segname,
00044 apr_uint32_t size,
00045 apr_uint32_t offset,
00046 const lcn_directory_t *d,
00047 apr_pool_t *pool);
00048
00049
00050 const lcn_char_t *
00051 lcn_segment_name (const lcn_segment_t *segment);
00052
00053
00054 apr_uint32_t
00055 lcn_segment_size (const lcn_segment_t *segment);
00056
00057
00058 const lcn_directory_t *
00059 lcn_segment_directory (const lcn_segment_t *segment);
00060
00061
00062
00063
00064
00065 lcn_error_t *
00066 lcn_segment_term_docs (apr_uint32_t *doc_freq,
00067 apr_uint32_t **docs,
00068 apr_uint32_t **freqs,
00069 lcn_segment_t *segment,
00070 const lcn_term_t *term,
00071 apr_pool_t *pool);
00072
00073
00074
00075
00076 lcn_error_t *
00077 lcn_segment_get_document (lcn_document_t **doc,
00078 lcn_segment_t *segment,
00079 apr_uint32_t docnum,
00080 apr_pool_t *pool);
00081
00082 #ifdef __cplusplus
00083 }
00084 #endif
00085
00086 #endif