1/* Automatically generated file. Do not edit directly. */
2
3/* This file is part of The New Aspell
4 * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
5 * license version 2.0 or 2.1. You should have received a copy of the
6 * LGPL license along with this library if you did not you can find it
7 * at http://www.gnu.org/. */
8
9#ifndef ASPELL_ASPELL__H
10#define ASPELL_ASPELL__H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/******************************* type id *******************************/
17
18
19union AspellTypeId {
20
21 unsigned int num;
22
23 char str[4];
24
25};
26
27
28typedef union AspellTypeId AspellTypeId;
29
30
31/************************** mutable container **************************/
32
33
34typedef struct AspellMutableContainer AspellMutableContainer;
35
36
37int aspell_mutable_container_add(struct AspellMutableContainer * ths, const char * to_add);
38
39int aspell_mutable_container_remove(struct AspellMutableContainer * ths, const char * to_rem);
40
41void aspell_mutable_container_clear(struct AspellMutableContainer * ths);
42
43struct AspellMutableContainer * aspell_mutable_container_to_mutable_container(struct AspellMutableContainer * ths);
44
45
46
47/******************************* key info *******************************/
48
49
50
51enum AspellKeyInfoType {AspellKeyInfoString, AspellKeyInfoInt, AspellKeyInfoBool, AspellKeyInfoList};
52typedef enum AspellKeyInfoType AspellKeyInfoType;
53
54
55struct AspellKeyInfo {
56
57 /* The name of the key. */
58 const char * name;
59
60 /* The key type. */
61 enum AspellKeyInfoType type;
62
63 /* The default value of the key. */
64 const char * def;
65
66 /* A brief description of the key or NULL if internal value. */
67 const char * desc;
68
69 int flags;
70
71 int other_data;
72
73};
74
75
76typedef struct AspellKeyInfo AspellKeyInfo;
77
78
79/******************************** config ********************************/
80
81
82typedef struct AspellKeyInfoEnumeration AspellKeyInfoEnumeration;
83
84
85int aspell_key_info_enumeration_at_end(const struct AspellKeyInfoEnumeration * ths);
86
87const struct AspellKeyInfo * aspell_key_info_enumeration_next(struct AspellKeyInfoEnumeration * ths);
88
89void delete_aspell_key_info_enumeration(struct AspellKeyInfoEnumeration * ths);
90
91struct AspellKeyInfoEnumeration * aspell_key_info_enumeration_clone(const struct AspellKeyInfoEnumeration * ths);
92
93void aspell_key_info_enumeration_assign(struct AspellKeyInfoEnumeration * ths, const struct AspellKeyInfoEnumeration * other);
94
95
96
97typedef struct AspellConfig AspellConfig;
98
99
100struct AspellConfig * new_aspell_config();
101
102void delete_aspell_config(struct AspellConfig * ths);
103
104struct AspellConfig * aspell_config_clone(const struct AspellConfig * ths);
105
106void aspell_config_assign(struct AspellConfig * ths, const struct AspellConfig * other);
107
108unsigned int aspell_config_error_number(const struct AspellConfig * ths);
109
110const char * aspell_config_error_message(const struct AspellConfig * ths);
111
112const struct AspellError * aspell_config_error(const struct AspellConfig * ths);
113
114/* Sets extra keys which this config class should
115 * accept. begin and end are expected to point to
116 * the beginning and ending of an array of Aspell
117 * Key Info. */
118void aspell_config_set_extra(struct AspellConfig * ths, const struct AspellKeyInfo * begin, const struct AspellKeyInfo * end);
119
120/* Returns the KeyInfo object for the
121 * corresponding key or returns NULL and sets
122 * error_num to PERROR_UNKNOWN_KEY if the key is
123 * not valid. The pointer returned is valid for
124 * the lifetime of the object. */
125const struct AspellKeyInfo * aspell_config_keyinfo(struct AspellConfig * ths, const char * key);
126
127/* Returns a newly allocated enumeration of all
128 * the possible objects this config class uses. */
129struct AspellKeyInfoEnumeration * aspell_config_possible_elements(struct AspellConfig * ths, int include_extra);
130
131/* Returns the default value for given key which
132 * may involve substituting variables, thus it is
133 * not the same as keyinfo(key)->def returns NULL
134 * and sets error_num to PERROR_UNKNOWN_KEY if
135 * the key is not valid. Uses the temporary
136 * string. */
137const char * aspell_config_get_default(struct AspellConfig * ths, const char * key);
138
139/* Returns a newly allocated enumeration of all
140 * the key/value pairs. This DOES not include ones
141 * which are set to their default values. */
142struct AspellStringPairEnumeration * aspell_config_elements(struct AspellConfig * ths);
143
144/* Inserts an item, if the item already exists it
145 * will be replaced. Returns TRUE if it succeeded
146 * or FALSE on error. If the key is not valid it
147 * sets error_num to PERROR_UNKNOWN_KEY, if the
148 * value is not valid it will set error_num to
149 * PERROR_BAD_VALUE, if the value can not be
150 * changed it sets error_num to
151 * PERROR_CANT_CHANGE_VALUE, and if the value is
152 * a list and you are trying to set its directory,
153 * it sets error_num to PERROR_LIST_SET */
154int aspell_config_replace(struct AspellConfig * ths, const char * key, const char * value);
155
156/* Remove a key and returns TRUE if it exists
157 * otherwise return FALSE. This effectively sets
158 * the key to its default value. Calling replace
159 * with a value of "<default>" will also call
160 * remove. If the key does not exist then it sets
161 * error_num to 0 or PERROR_NOT, if the key is
162 * not valid then it sets error_num to
163 * PERROR_UNKNOWN_KEY, if the value can not be
164 * changed then it sets error_num to
165 * PERROR_CANT_CHANGE_VALUE */
166int aspell_config_remove(struct AspellConfig * ths, const char * key);
167
168int aspell_config_have(const struct AspellConfig * ths, const char * key);
169
170/* Returns NULL on error. */
171const char * aspell_config_retrieve(struct AspellConfig * ths, const char * key);
172
173int aspell_config_retrieve_list(struct AspellConfig * ths, const char * key, struct AspellMutableContainer * lst);
174
175/* In "ths" Aspell configuration, search for a
176 * character string matching "key" string.
177 * If "key" is found then return 1 else return 0.
178 * If error encountered, then return -1. */
179int aspell_config_retrieve_bool(struct AspellConfig * ths, const char * key);
180
181/* In "ths" Aspell configuration, search for an
182 * integer value matching "key" string.
183 * Return -1 on error. */
184int aspell_config_retrieve_int(struct AspellConfig * ths, const char * key);
185
186
187
188/******************************** error ********************************/
189
190
191struct AspellError {
192
193 const char * mesg;
194
195 const struct AspellErrorInfo * err;
196
197};
198
199
200typedef struct AspellError AspellError;
201
202int aspell_error_is_a(const struct AspellError * ths, const struct AspellErrorInfo * e);
203
204
205struct AspellErrorInfo {
206
207 const struct AspellErrorInfo * isa;
208
209 const char * mesg;
210
211 unsigned int num_parms;
212
213 const char * parms[3];
214
215};
216
217
218typedef struct AspellErrorInfo AspellErrorInfo;
219
220
221/**************************** can have error ****************************/
222
223
224typedef struct AspellCanHaveError AspellCanHaveError;
225
226
227unsigned int aspell_error_number(const struct AspellCanHaveError * ths);
228
229const char * aspell_error_message(const struct AspellCanHaveError * ths);
230
231const struct AspellError * aspell_error(const struct AspellCanHaveError * ths);
232
233void delete_aspell_can_have_error(struct AspellCanHaveError * ths);
234
235
236
237/******************************** errors ********************************/
238
239
240extern const struct AspellErrorInfo * const aerror_other;
241extern const struct AspellErrorInfo * const aerror_operation_not_supported;
242extern const struct AspellErrorInfo * const aerror_cant_copy;
243extern const struct AspellErrorInfo * const aerror_unimplemented_method;
244extern const struct AspellErrorInfo * const aerror_file;
245extern const struct AspellErrorInfo * const aerror_cant_open_file;
246extern const struct AspellErrorInfo * const aerror_cant_read_file;
247extern const struct AspellErrorInfo * const aerror_cant_write_file;
248extern const struct AspellErrorInfo * const aerror_invalid_name;
249extern const struct AspellErrorInfo * const aerror_bad_file_format;
250extern const struct AspellErrorInfo * const aerror_dir;
251extern const struct AspellErrorInfo * const aerror_cant_read_dir;
252extern const struct AspellErrorInfo * const aerror_config;
253extern const struct AspellErrorInfo * const aerror_unknown_key;
254extern const struct AspellErrorInfo * const aerror_cant_change_value;
255extern const struct AspellErrorInfo * const aerror_bad_key;
256extern const struct AspellErrorInfo * const aerror_bad_value;
257extern const struct AspellErrorInfo * const aerror_duplicate;
258extern const struct AspellErrorInfo * const aerror_key_not_string;
259extern const struct AspellErrorInfo * const aerror_key_not_int;
260extern const struct AspellErrorInfo * const aerror_key_not_bool;
261extern const struct AspellErrorInfo * const aerror_key_not_list;
262extern const struct AspellErrorInfo * const aerror_no_value_reset;
263extern const struct AspellErrorInfo * const aerror_no_value_enable;
264extern const struct AspellErrorInfo * const aerror_no_value_disable;
265extern const struct AspellErrorInfo * const aerror_no_value_clear;
266extern const struct AspellErrorInfo * const aerror_language_related;
267extern const struct AspellErrorInfo * const aerror_unknown_language;
268extern const struct AspellErrorInfo * const aerror_unknown_soundslike;
269extern const struct AspellErrorInfo * const aerror_language_not_supported;
270extern const struct AspellErrorInfo * const aerror_no_wordlist_for_lang;
271extern const struct AspellErrorInfo * const aerror_mismatched_language;
272extern const struct AspellErrorInfo * const aerror_affix;
273extern const struct AspellErrorInfo * const aerror_corrupt_affix;
274extern const struct AspellErrorInfo * const aerror_invalid_cond;
275extern const struct AspellErrorInfo * const aerror_invalid_cond_strip;
276extern const struct AspellErrorInfo * const aerror_incorrect_encoding;
277extern const struct AspellErrorInfo * const aerror_encoding;
278extern const struct AspellErrorInfo * const aerror_unknown_encoding;
279extern const struct AspellErrorInfo * const aerror_encoding_not_supported;
280extern const struct AspellErrorInfo * const aerror_conversion_not_supported;
281extern const struct AspellErrorInfo * const aerror_pipe;
282extern const struct AspellErrorInfo * const aerror_cant_create_pipe;
283extern const struct AspellErrorInfo * const aerror_process_died;
284extern const struct AspellErrorInfo * const aerror_bad_input;
285extern const struct AspellErrorInfo * const aerror_invalid_string;
286extern const struct AspellErrorInfo * const aerror_invalid_word;
287extern const struct AspellErrorInfo * const aerror_invalid_affix;
288extern const struct AspellErrorInfo * const aerror_inapplicable_affix;
289extern const struct AspellErrorInfo * const aerror_unknown_unichar;
290extern const struct AspellErrorInfo * const aerror_word_list_flags;
291extern const struct AspellErrorInfo * const aerror_invalid_flag;
292extern const struct AspellErrorInfo * const aerror_conflicting_flags;
293extern const struct AspellErrorInfo * const aerror_version_control;
294extern const struct AspellErrorInfo * const aerror_bad_version_string;
295extern const struct AspellErrorInfo * const aerror_filter;
296extern const struct AspellErrorInfo * const aerror_cant_dlopen_file;
297extern const struct AspellErrorInfo * const aerror_empty_filter;
298extern const struct AspellErrorInfo * const aerror_no_such_filter;
299extern const struct AspellErrorInfo * const aerror_confusing_version;
300extern const struct AspellErrorInfo * const aerror_bad_version;
301extern const struct AspellErrorInfo * const aerror_identical_option;
302extern const struct AspellErrorInfo * const aerror_options_only;
303extern const struct AspellErrorInfo * const aerror_invalid_option_modifier;
304extern const struct AspellErrorInfo * const aerror_cant_describe_filter;
305extern const struct AspellErrorInfo * const aerror_filter_mode_file;
306extern const struct AspellErrorInfo * const aerror_mode_option_name;
307extern const struct AspellErrorInfo * const aerror_no_filter_to_option;
308extern const struct AspellErrorInfo * const aerror_bad_mode_key;
309extern const struct AspellErrorInfo * const aerror_expect_mode_key;
310extern const struct AspellErrorInfo * const aerror_mode_version_requirement;
311extern const struct AspellErrorInfo * const aerror_confusing_mode_version;
312extern const struct AspellErrorInfo * const aerror_bad_mode_version;
313extern const struct AspellErrorInfo * const aerror_missing_magic_expression;
314extern const struct AspellErrorInfo * const aerror_empty_file_ext;
315extern const struct AspellErrorInfo * const aerror_filter_mode_expand;
316extern const struct AspellErrorInfo * const aerror_unknown_mode;
317extern const struct AspellErrorInfo * const aerror_mode_extend_expand;
318extern const struct AspellErrorInfo * const aerror_filter_mode_magic;
319extern const struct AspellErrorInfo * const aerror_file_magic_pos;
320extern const struct AspellErrorInfo * const aerror_file_magic_range;
321extern const struct AspellErrorInfo * const aerror_missing_magic;
322extern const struct AspellErrorInfo * const aerror_bad_magic;
323extern const struct AspellErrorInfo * const aerror_expression;
324extern const struct AspellErrorInfo * const aerror_invalid_expression;
325
326
327/******************************* speller *******************************/
328
329
330typedef struct AspellSpeller AspellSpeller;
331
332
333struct AspellCanHaveError * new_aspell_speller(struct AspellConfig * config);
334
335struct AspellSpeller * to_aspell_speller(struct AspellCanHaveError * obj);
336
337void delete_aspell_speller(struct AspellSpeller * ths);
338
339unsigned int aspell_speller_error_number(const struct AspellSpeller * ths);
340
341const char * aspell_speller_error_message(const struct AspellSpeller * ths);
342
343const struct AspellError * aspell_speller_error(const struct AspellSpeller * ths);
344
345struct AspellConfig * aspell_speller_config(struct AspellSpeller * ths);
346
347/* Returns 0 if it is not in the dictionary,
348 * 1 if it is, or -1 on error. */
349int aspell_speller_check(struct AspellSpeller * ths, const char * word, int word_size);
350
351/* Add this word to your own personal word list. */
352int aspell_speller_add_to_personal(struct AspellSpeller * ths, const char * word, int word_size);
353
354/* Add this word to the current spelling session. */
355int aspell_speller_add_to_session(struct AspellSpeller * ths, const char * word, int word_size);
356
357/* This is your own personal word list file plus
358 * any extra words added during this session to
359 * your own personal word list. */
360const struct AspellWordList * aspell_speller_personal_word_list(struct AspellSpeller * ths);
361
362/* This is a list of words added to this session
363 * that are not in the main word list or in your
364 * own personal list but are considered valid for
365 * this spelling session. */
366const struct AspellWordList * aspell_speller_session_word_list(struct AspellSpeller * ths);
367
368/* This is the main list of words used during this
369 * spelling session. */
370const struct AspellWordList * aspell_speller_main_word_list(struct AspellSpeller * ths);
371
372int aspell_speller_save_all_word_lists(struct AspellSpeller * ths);
373
374int aspell_speller_clear_session(struct AspellSpeller * ths);
375
376/* Return NULL on error.
377 * The word list returned by suggest is only
378 * valid until the next call to suggest. */
379const struct AspellWordList * aspell_speller_suggest(struct AspellSpeller * ths, const char * word, int word_size);
380
381int aspell_speller_store_replacement(struct AspellSpeller * ths, const char * mis, int mis_size, const char * cor, int cor_size);
382
383
384
385/******************************** filter ********************************/
386
387
388typedef struct AspellFilter AspellFilter;
389
390
391void delete_aspell_filter(struct AspellFilter * ths);
392
393unsigned int aspell_filter_error_number(const struct AspellFilter * ths);
394
395const char * aspell_filter_error_message(const struct AspellFilter * ths);
396
397const struct AspellError * aspell_filter_error(const struct AspellFilter * ths);
398
399struct AspellFilter * to_aspell_filter(struct AspellCanHaveError * obj);
400
401
402
403/*************************** document checker ***************************/
404
405
406struct AspellToken {
407
408 unsigned int offset;
409
410 unsigned int len;
411
412};
413
414
415typedef struct AspellToken AspellToken;
416
417
418typedef struct AspellDocumentChecker AspellDocumentChecker;
419
420
421void delete_aspell_document_checker(struct AspellDocumentChecker * ths);
422
423unsigned int aspell_document_checker_error_number(const struct AspellDocumentChecker * ths);
424
425const char * aspell_document_checker_error_message(const struct AspellDocumentChecker * ths);
426
427const struct AspellError * aspell_document_checker_error(const struct AspellDocumentChecker * ths);
428
429/* Creates a new document checker.
430 * The speller class is expected to last until
431 * this class is destroyed.
432 * If config is given it will be used to override
433 * any relevent options set by this speller class.
434 * The config class is not once this function is done.
435 * If filter is given then it will take ownership of
436 * the filter class and use it to do the filtering.
437 * You are expected to free the checker when done. */
438struct AspellCanHaveError * new_aspell_document_checker(struct AspellSpeller * speller);
439
440struct AspellDocumentChecker * to_aspell_document_checker(struct AspellCanHaveError * obj);
441
442/* Reset the internal state of the filter.
443 * Should be called whenever a new document is
444 * being filtered. */
445void aspell_document_checker_reset(struct AspellDocumentChecker * ths);
446
447/* Process a string.
448 * The string passed in should only be split on
449 * white space characters. Furthermore, between
450 * calls to reset, each string should be passed
451 * in exactly once and in the order they appeared
452 * in the document. Passing in strings out of
453 * order, skipping strings or passing them in
454 * more than once may lead to undefined results. */
455void aspell_document_checker_process(struct AspellDocumentChecker * ths, const char * str, int size);
456
457/* Returns the next misspelled word in the
458 * processed string. If there are no more
459 * misspelled words, then token.word will be
460 * NULL and token.size will be 0 */
461struct AspellToken aspell_document_checker_next_misspelling(struct AspellDocumentChecker * ths);
462
463/* Returns the underlying filter class. */
464struct AspellFilter * aspell_document_checker_filter(struct AspellDocumentChecker * ths);
465
466
467
468/****************************** word list ******************************/
469
470
471typedef struct AspellWordList AspellWordList;
472
473
474int aspell_word_list_empty(const struct AspellWordList * ths);
475
476unsigned int aspell_word_list_size(const struct AspellWordList * ths);
477
478struct AspellStringEnumeration * aspell_word_list_elements(const struct AspellWordList * ths);
479
480
481
482/************************** string enumeration **************************/
483
484
485typedef struct AspellStringEnumeration AspellStringEnumeration;
486
487
488void delete_aspell_string_enumeration(struct AspellStringEnumeration * ths);
489
490struct AspellStringEnumeration * aspell_string_enumeration_clone(const struct AspellStringEnumeration * ths);
491
492void aspell_string_enumeration_assign(struct AspellStringEnumeration * ths, const struct AspellStringEnumeration * other);
493
494int aspell_string_enumeration_at_end(const struct AspellStringEnumeration * ths);
495
496const char * aspell_string_enumeration_next(struct AspellStringEnumeration * ths);
497
498
499
500/********************************* info *********************************/
501
502
503struct AspellModuleInfo {
504
505 const char * name;
506
507 double order_num;
508
509 const char * lib_dir;
510
511 struct AspellStringList * dict_dirs;
512
513 struct AspellStringList * dict_exts;
514
515};
516
517
518typedef struct AspellModuleInfo AspellModuleInfo;
519
520
521struct AspellDictInfo {
522
523 /* The Name to identify this dictionary by. */
524 const char * name;
525
526 /* The language code to identify this dictionary.
527 * A two letter UPPER-CASE ISO 639 language code
528 * and an optional two letter ISO 3166 country
529 * code after a dash or underscore. */
530 const char * code;
531
532 /* Any extra information to distinguish this
533 * variety of dictionary from other dictionaries
534 * which may have the same language and size. */
535 const char * jargon;
536
537 int size;
538
539 /* A two char digit code describing the size of
540 * the dictionary: 10=tiny, 20=really small,
541 * 30=small, 40=med-small, 50=med, 60=med-large,
542 * 70=large, 80=huge, 90=insane. Please check
543 * the README in aspell-lang-200?????.tar.bz2 or
544 * see SCOWL (http://wordlist.sourceforge.net)
545 * for an example of how these sizes are used. */
546 const char * size_str;
547
548 struct AspellModuleInfo * module;
549
550};
551
552
553typedef struct AspellDictInfo AspellDictInfo;
554
555
556typedef struct AspellModuleInfoList AspellModuleInfoList;
557
558
559struct AspellModuleInfoList * get_aspell_module_info_list(struct AspellConfig * config);
560
561int aspell_module_info_list_empty(const struct AspellModuleInfoList * ths);
562
563unsigned int aspell_module_info_list_size(const struct AspellModuleInfoList * ths);
564
565struct AspellModuleInfoEnumeration * aspell_module_info_list_elements(const struct AspellModuleInfoList * ths);
566
567
568
569typedef struct AspellDictInfoList AspellDictInfoList;
570
571
572struct AspellDictInfoList * get_aspell_dict_info_list(struct AspellConfig * config);
573
574int aspell_dict_info_list_empty(const struct AspellDictInfoList * ths);
575
576unsigned int aspell_dict_info_list_size(const struct AspellDictInfoList * ths);
577
578struct AspellDictInfoEnumeration * aspell_dict_info_list_elements(const struct AspellDictInfoList * ths);
579
580
581
582typedef struct AspellModuleInfoEnumeration AspellModuleInfoEnumeration;
583
584
585int aspell_module_info_enumeration_at_end(const struct AspellModuleInfoEnumeration * ths);
586
587const struct AspellModuleInfo * aspell_module_info_enumeration_next(struct AspellModuleInfoEnumeration * ths);
588
589void delete_aspell_module_info_enumeration(struct AspellModuleInfoEnumeration * ths);
590
591struct AspellModuleInfoEnumeration * aspell_module_info_enumeration_clone(const struct AspellModuleInfoEnumeration * ths);
592
593void aspell_module_info_enumeration_assign(struct AspellModuleInfoEnumeration * ths, const struct AspellModuleInfoEnumeration * other);
594
595
596
597typedef struct AspellDictInfoEnumeration AspellDictInfoEnumeration;
598
599
600int aspell_dict_info_enumeration_at_end(const struct AspellDictInfoEnumeration * ths);
601
602const struct AspellDictInfo * aspell_dict_info_enumeration_next(struct AspellDictInfoEnumeration * ths);
603
604void delete_aspell_dict_info_enumeration(struct AspellDictInfoEnumeration * ths);
605
606struct AspellDictInfoEnumeration * aspell_dict_info_enumeration_clone(const struct AspellDictInfoEnumeration * ths);
607
608void aspell_dict_info_enumeration_assign(struct AspellDictInfoEnumeration * ths, const struct AspellDictInfoEnumeration * other);
609
610
611
612/***************************** string list *****************************/
613
614
615typedef struct AspellStringList AspellStringList;
616
617
618struct AspellStringList * new_aspell_string_list();
619
620int aspell_string_list_empty(const struct AspellStringList * ths);
621
622unsigned int aspell_string_list_size(const struct AspellStringList * ths);
623
624struct AspellStringEnumeration * aspell_string_list_elements(const struct AspellStringList * ths);
625
626int aspell_string_list_add(struct AspellStringList * ths, const char * to_add);
627
628int aspell_string_list_remove(struct AspellStringList * ths, const char * to_rem);
629
630void aspell_string_list_clear(struct AspellStringList * ths);
631
632struct AspellMutableContainer * aspell_string_list_to_mutable_container(struct AspellStringList * ths);
633
634void delete_aspell_string_list(struct AspellStringList * ths);
635
636struct AspellStringList * aspell_string_list_clone(const struct AspellStringList * ths);
637
638void aspell_string_list_assign(struct AspellStringList * ths, const struct AspellStringList * other);
639
640
641
642/****************************** string map ******************************/
643
644
645typedef struct AspellStringMap AspellStringMap;
646
647
648struct AspellStringMap * new_aspell_string_map();
649
650int aspell_string_map_add(struct AspellStringMap * ths, const char * to_add);
651
652int aspell_string_map_remove(struct AspellStringMap * ths, const char * to_rem);
653
654void aspell_string_map_clear(struct AspellStringMap * ths);
655
656struct AspellMutableContainer * aspell_string_map_to_mutable_container(struct AspellStringMap * ths);
657
658void delete_aspell_string_map(struct AspellStringMap * ths);
659
660struct AspellStringMap * aspell_string_map_clone(const struct AspellStringMap * ths);
661
662void aspell_string_map_assign(struct AspellStringMap * ths, const struct AspellStringMap * other);
663
664int aspell_string_map_empty(const struct AspellStringMap * ths);
665
666unsigned int aspell_string_map_size(const struct AspellStringMap * ths);
667
668struct AspellStringPairEnumeration * aspell_string_map_elements(const struct AspellStringMap * ths);
669
670/* Insert a new element.
671 * Will NOT overwrite an existing entry.
672 * Returns FALSE if the element already exists. */
673int aspell_string_map_insert(struct AspellStringMap * ths, const char * key, const char * value);
674
675/* Insert a new element.
676 * Will overwrite an existing entry.
677 * Always returns TRUE. */
678int aspell_string_map_replace(struct AspellStringMap * ths, const char * key, const char * value);
679
680/* Looks up an element and returns the value.
681 * Returns NULL if the element does not exist.
682 * Returns an empty string if the element exists
683 * but has a NULL value. */
684const char * aspell_string_map_lookup(const struct AspellStringMap * ths, const char * key);
685
686
687
688/***************************** string pair *****************************/
689
690
691struct AspellStringPair {
692
693 const char * first;
694
695 const char * second;
696
697};
698
699
700typedef struct AspellStringPair AspellStringPair;
701
702
703/*********************** string pair enumeration ***********************/
704
705
706typedef struct AspellStringPairEnumeration AspellStringPairEnumeration;
707
708
709int aspell_string_pair_enumeration_at_end(const struct AspellStringPairEnumeration * ths);
710
711struct AspellStringPair aspell_string_pair_enumeration_next(struct AspellStringPairEnumeration * ths);
712
713void delete_aspell_string_pair_enumeration(struct AspellStringPairEnumeration * ths);
714
715struct AspellStringPairEnumeration * aspell_string_pair_enumeration_clone(const struct AspellStringPairEnumeration * ths);
716
717void aspell_string_pair_enumeration_assign(struct AspellStringPairEnumeration * ths, const struct AspellStringPairEnumeration * other);
718
719
720
721/******************************** cache ********************************/
722
723
724/* Reset the global cache(s) so that cache queries will
725 * create a new object. If existing objects are still in
726 * use they are not deleted. If which is NULL then all
727 * caches will be reset. Current caches are "encode",
728 * "decode", "dictionary", "language", and "keyboard". */
729int aspell_reset_cache(const char * which);
730
731#ifdef __cplusplus
732}
733#endif
734#endif /* ASPELL_ASPELL__H */
735