00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _LCN_TERMINFOS_H
00023 #define _LCN_TERMINFOS_H
00024
00025 #include "lcn_types.h"
00026 #include "lcn_directory.h"
00027 #include "lcn_term.h"
00028
00029 #include <apr_hash.h>
00030 #include <apr_file_io.h>
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00036
00037 typedef struct lcn_terminfo_t lcn_terminfo_t;
00038
00039
00040 typedef struct lcn_terminfos_idx_t lcn_terminfos_idx_t;
00041
00042
00043 typedef struct lcn_terminfos_t lcn_terminfos_t;
00044
00045
00046 const lcn_term_t *lcn_terminfo_term (const lcn_terminfo_t *ti);
00047
00048
00049 apr_uint32_t lcn_terminfo_field_num (const lcn_terminfo_t *ti);
00050
00051
00052 apr_uint32_t lcn_terminfo_doc_freq (const lcn_terminfo_t *ti);
00053
00054
00055 apr_uint64_t lcn_terminfo_prox_position (const lcn_terminfo_t *ti);
00056
00057
00058 apr_uint64_t lcn_terminfo_freq_position (const lcn_terminfo_t *ti);
00059
00060
00061 apr_uint32_t lcn_terminfo_skip_offset (const lcn_terminfo_t *ti);
00062
00063
00064 lcn_terminfo_t *
00065 lcn_terminfo_copy (const lcn_terminfo_t *ti, apr_pool_t *pool);
00066
00067
00068
00069
00070 lcn_error_t *
00071 lcn_terminfos_idx_read (lcn_terminfos_idx_t **tisidx,
00072 const lcn_directory_t *directory,
00073 const lcn_char_t *segment,
00074 apr_pool_t *pool);
00075
00076
00077 apr_uint64_t
00078 lcn_terminfos_idx_get_count (const lcn_terminfos_idx_t *tisidx);
00079
00080
00081 lcn_error_t *
00082 lcn_terminfos_idx_get_terminfo (lcn_terminfo_t **ti,
00083 const lcn_terminfos_idx_t *tisidx,
00084 apr_uint64_t position);
00085
00086
00087
00088
00089 lcn_error_t *
00090 lcn_terminfos_open (lcn_terminfos_t **tis,
00091 const lcn_directory_t *directory,
00092 const lcn_char_t *segment,
00093 apr_pool_t *pool);
00094
00095
00096
00097
00098 lcn_error_t *
00099 lcn_terminfos_get_terminfo (lcn_terminfo_t **ti,
00100 const lcn_terminfos_t *tis,
00101 const lcn_term_t *term,
00102 apr_pool_t *pool);
00103
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107
00108 #endif