]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
f7faf1f5 | 2 | * "$Id: help-index.h 5143 2006-02-21 19:13:01Z mike $" |
ef416fc2 | 3 | * |
4 | * On-line help index definitions for the Common UNIX Printing System (CUPS). | |
5 | * | |
ecdc0628 | 6 | * Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 7 | * |
8 | * These coded instructions, statements, and computer programs are the | |
9 | * property of Easy Software Products and are protected by Federal | |
10 | * copyright law. Distribution and use rights are outlined in the file | |
11 | * "LICENSE.txt" which should have been included with this file. If this | |
12 | * file is missing or damaged please contact Easy Software Products | |
13 | * at: | |
14 | * | |
15 | * Attn: CUPS Licensing Information | |
16 | * Easy Software Products | |
17 | * 44141 Airport View Drive, Suite 204 | |
18 | * Hollywood, Maryland 20636 USA | |
19 | * | |
20 | * Voice: (301) 373-9600 | |
21 | * EMail: cups-info@cups.org | |
22 | * WWW: http://www.cups.org | |
23 | */ | |
24 | ||
25 | #ifndef _CUPS_HELP_INDEX_H_ | |
26 | # define _CUPS_HELP_INDEX_H_ | |
27 | ||
ecdc0628 | 28 | /* |
29 | * Include necessary headers... | |
30 | */ | |
31 | ||
32 | # include <cups/array.h> | |
33 | ||
ef416fc2 | 34 | |
35 | /* | |
36 | * Data structures... | |
37 | */ | |
38 | ||
39 | typedef struct /**** Help node structure... ****/ | |
40 | { | |
41 | char *filename; /* Filename, relative to help dir */ | |
42 | char *section; /* Section name (NULL if none) */ | |
43 | char *anchor; /* Anchor name (NULL if none) */ | |
44 | char *text; /* Text in anchor */ | |
45 | time_t mtime; /* Last modification time */ | |
46 | off_t offset; /* Offset in file */ | |
47 | size_t length; /* Length in bytes */ | |
48 | int score; /* Search score */ | |
49 | } help_node_t; | |
50 | ||
51 | typedef struct /**** Help index structure ****/ | |
52 | { | |
ecdc0628 | 53 | int search; /* 1 = search index, 0 = normal */ |
54 | cups_array_t *nodes; /* Nodes sorted by filename */ | |
55 | cups_array_t *sorted; /* Nodes sorted by score + text */ | |
ef416fc2 | 56 | } help_index_t; |
57 | ||
58 | ||
59 | /* | |
60 | * Functions... | |
61 | */ | |
62 | ||
63 | extern void helpDeleteIndex(help_index_t *hi); | |
ecdc0628 | 64 | extern help_node_t *helpFindNode(help_index_t *hi, const char *filename, |
65 | const char *anchor); | |
ef416fc2 | 66 | extern help_index_t *helpLoadIndex(const char *hifile, const char *directory); |
67 | extern int helpSaveIndex(help_index_t *hi, const char *hifile); | |
68 | extern help_index_t *helpSearchIndex(help_index_t *hi, const char *query, | |
69 | const char *section, | |
70 | const char *filename); | |
71 | ||
72 | ||
73 | #endif /* !_CUPS_HELP_INDEX_H_ */ | |
74 | ||
75 | /* | |
f7faf1f5 | 76 | * End of "$Id: help-index.h 5143 2006-02-21 19:13:01Z mike $". |
ef416fc2 | 77 | */ |