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/******************************* version *******************************/
189
190
191/* Returns a version string, which may include additional
192 * information on how Aspell was compiled. */
193const char * aspell_version_string();
194
195/******************************** error ********************************/
196
197
198struct AspellError {
199
200 const char * mesg;
201
202 const struct AspellErrorInfo * err;
203
204};
205
206
207typedef struct AspellError AspellError;
208
209int aspell_error_is_a(const struct AspellError * ths, const struct AspellErrorInfo * e);
210
211
212struct AspellErrorInfo {
213
214 const struct AspellErrorInfo * isa;
215
216 const char * mesg;
217
218 unsigned int num_parms;
219
220 const char * parms[3];
221
222};
223
224
225typedef struct AspellErrorInfo AspellErrorInfo;
226
227
228/**************************** can have error ****************************/
229
230
231typedef struct AspellCanHaveError AspellCanHaveError;
232
233
234unsigned int aspell_error_number(const struct AspellCanHaveError * ths);
235
236const char * aspell_error_message(const struct AspellCanHaveError * ths);
237
238const struct AspellError * aspell_error(const struct AspellCanHaveError * ths);
239
240void delete_aspell_can_have_error(struct AspellCanHaveError * ths);
241
242
243
244/******************************** errors ********************************/
245
246
247extern const struct AspellErrorInfo * const aerror_other;
248extern const struct AspellErrorInfo * const aerror_operation_not_supported;
249extern const struct AspellErrorInfo * const aerror_cant_copy;
250extern const struct AspellErrorInfo * const aerror_unimplemented_method;
251extern const struct AspellErrorInfo * const aerror_file;
252extern const struct AspellErrorInfo * const aerror_cant_open_file;
253extern const struct AspellErrorInfo * const aerror_cant_read_file;
254extern const struct AspellErrorInfo * const aerror_cant_write_file;
255extern const struct AspellErrorInfo * const aerror_invalid_name;
256extern const struct AspellErrorInfo * const aerror_bad_file_format;
257extern const struct AspellErrorInfo * const aerror_dir;
258extern const struct AspellErrorInfo * const aerror_cant_read_dir;
259extern const struct AspellErrorInfo * const aerror_config;
260extern const struct AspellErrorInfo * const aerror_unknown_key;
261extern const struct AspellErrorInfo * const aerror_cant_change_value;
262extern const struct AspellErrorInfo * const aerror_bad_key;
263extern const struct AspellErrorInfo * const aerror_bad_value;
264extern const struct AspellErrorInfo * const aerror_duplicate;
265extern const struct AspellErrorInfo * const aerror_key_not_string;
266extern const struct AspellErrorInfo * const aerror_key_not_int;
267extern const struct AspellErrorInfo * const aerror_key_not_bool;
268extern const struct AspellErrorInfo * const aerror_key_not_list;
269extern const struct AspellErrorInfo * const aerror_no_value_reset;
270extern const struct AspellErrorInfo * const aerror_no_value_enable;
271extern const struct AspellErrorInfo * const aerror_no_value_disable;
272extern const struct AspellErrorInfo * const aerror_no_value_clear;
273extern const struct AspellErrorInfo * const aerror_language_related;
274extern const struct AspellErrorInfo * const aerror_unknown_language;
275extern const struct AspellErrorInfo * const aerror_unknown_soundslike;
276extern const struct AspellErrorInfo * const aerror_language_not_supported;
277extern const struct AspellErrorInfo * const aerror_no_wordlist_for_lang;
278extern const struct AspellErrorInfo * const aerror_mismatched_language;
279extern const struct AspellErrorInfo * const aerror_affix;
280extern const struct AspellErrorInfo * const aerror_corrupt_affix;
281extern const struct AspellErrorInfo * const aerror_invalid_cond;
282extern const struct AspellErrorInfo * const aerror_invalid_cond_strip;
283extern const struct AspellErrorInfo * const aerror_incorrect_encoding;
284extern const struct AspellErrorInfo * const aerror_encoding;
285extern const struct AspellErrorInfo * const aerror_unknown_encoding;
286extern const struct AspellErrorInfo * const aerror_encoding_not_supported;
287extern const struct AspellErrorInfo * const aerror_conversion_not_supported;
288extern const struct AspellErrorInfo * const aerror_pipe;
289extern const struct AspellErrorInfo * const aerror_cant_create_pipe;
290extern const struct AspellErrorInfo * const aerror_process_died;
291extern const struct AspellErrorInfo * const aerror_bad_input;
292extern const struct AspellErrorInfo * const aerror_invalid_string;
293extern const struct AspellErrorInfo * const aerror_invalid_word;
294extern const struct AspellErrorInfo * const aerror_invalid_affix;
295extern const struct AspellErrorInfo * const aerror_inapplicable_affix;
296extern const struct AspellErrorInfo * const aerror_unknown_unichar;
297extern const struct AspellErrorInfo * const aerror_word_list_flags;
298extern const struct AspellErrorInfo * const aerror_invalid_flag;
299extern const struct AspellErrorInfo * const aerror_conflicting_flags;
300extern const struct AspellErrorInfo * const aerror_version_control;
301extern const struct AspellErrorInfo * const aerror_bad_version_string;
302extern const struct AspellErrorInfo * const aerror_filter;
303extern const struct AspellErrorInfo * const aerror_cant_dlopen_file;
304extern const struct AspellErrorInfo * const aerror_empty_filter;
305extern const struct AspellErrorInfo * const aerror_no_such_filter;
306extern const struct AspellErrorInfo * const aerror_confusing_version;
307extern const struct AspellErrorInfo * const aerror_bad_version;
308extern const struct AspellErrorInfo * const aerror_identical_option;
309extern const struct AspellErrorInfo * const aerror_options_only;
310extern const struct AspellErrorInfo * const aerror_invalid_option_modifier;
311extern const struct AspellErrorInfo * const aerror_cant_describe_filter;
312extern const struct AspellErrorInfo * const aerror_filter_mode_file;
313extern const struct AspellErrorInfo * const aerror_mode_option_name;
314extern const struct AspellErrorInfo * const aerror_no_filter_to_option;
315extern const struct AspellErrorInfo * const aerror_bad_mode_key;
316extern const struct AspellErrorInfo * const aerror_expect_mode_key;
317extern const struct AspellErrorInfo * const aerror_mode_version_requirement;
318extern const struct AspellErrorInfo * const aerror_confusing_mode_version;
319extern const struct AspellErrorInfo * const aerror_bad_mode_version;
320extern const struct AspellErrorInfo * const aerror_missing_magic_expression;
321extern const struct AspellErrorInfo * const aerror_empty_file_ext;
322extern const struct AspellErrorInfo * const aerror_filter_mode_expand;
323extern const struct AspellErrorInfo * const aerror_unknown_mode;
324extern const struct AspellErrorInfo * const aerror_mode_extend_expand;
325extern const struct AspellErrorInfo * const aerror_filter_mode_magic;
326extern const struct AspellErrorInfo * const aerror_file_magic_pos;
327extern const struct AspellErrorInfo * const aerror_file_magic_range;
328extern const struct AspellErrorInfo * const aerror_missing_magic;
329extern const struct AspellErrorInfo * const aerror_bad_magic;
330extern const struct AspellErrorInfo * const aerror_expression;
331extern const struct AspellErrorInfo * const aerror_invalid_expression;
332
333
334/******************************* speller *******************************/
335
336
337typedef struct AspellSpeller AspellSpeller;
338
339
340struct AspellCanHaveError * new_aspell_speller(struct AspellConfig * config);
341
342struct AspellSpeller * to_aspell_speller(struct AspellCanHaveError * obj);
343
344void delete_aspell_speller(struct AspellSpeller * ths);
345
346unsigned int aspell_speller_error_number(const struct AspellSpeller * ths);
347
348const char * aspell_speller_error_message(const struct AspellSpeller * ths);
349
350const struct AspellError * aspell_speller_error(const struct AspellSpeller * ths);
351
352struct AspellConfig * aspell_speller_config(struct AspellSpeller * ths);
353
354/* Returns 0 if it is not in the dictionary,
355 * 1 if it is, or -1 on error. */
356int aspell_speller_check(struct AspellSpeller * ths, const char * word, int word_size);
357
358/* Add this word to your own personal word list. */
359int aspell_speller_add_to_personal(struct AspellSpeller * ths, const char * word, int word_size);
360
361/* Add this word to the current spelling session. */
362int aspell_speller_add_to_session(struct AspellSpeller * ths, const char * word, int word_size);
363
364/* This is your own personal word list file plus
365 * any extra words added during this session to
366 * your own personal word list. */
367const struct AspellWordList * aspell_speller_personal_word_list(struct AspellSpeller * ths);
368
369/* This is a list of words added to this session
370 * that are not in the main word list or in your
371 * own personal list but are considered valid for
372 * this spelling session. */
373const struct AspellWordList * aspell_speller_session_word_list(struct AspellSpeller * ths);
374
375/* This is the main list of words used during this
376 * spelling session. */
377const struct AspellWordList * aspell_speller_main_word_list(struct AspellSpeller * ths);
378
379int aspell_speller_save_all_word_lists(struct AspellSpeller * ths);
380
381int aspell_speller_clear_session(struct AspellSpeller * ths);
382
383/* Return NULL on error.
384 * The word list returned by suggest is only
385 * valid until the next call to suggest. */
386const struct AspellWordList * aspell_speller_suggest(struct AspellSpeller * ths, const char * word, int word_size);
387
388int aspell_speller_store_replacement(struct AspellSpeller * ths, const char * mis, int mis_size, const char * cor, int cor_size);
389
390
391
392/******************************** filter ********************************/
393
394
395typedef struct AspellFilter AspellFilter;
396
397
398void delete_aspell_filter(struct AspellFilter * ths);
399
400unsigned int aspell_filter_error_number(const struct AspellFilter * ths);
401
402const char * aspell_filter_error_message(const struct AspellFilter * ths);
403
404const struct AspellError * aspell_filter_error(const struct AspellFilter * ths);
405
406struct AspellFilter * to_aspell_filter(struct AspellCanHaveError * obj);
407
408
409
410/*************************** document checker ***************************/
411
412
413struct AspellToken {
414
415 unsigned int offset;
416
417 unsigned int len;
418
419};
420
421
422typedef struct AspellToken AspellToken;
423
424
425typedef struct AspellDocumentChecker AspellDocumentChecker;
426
427
428void delete_aspell_document_checker(struct AspellDocumentChecker * ths);
429
430unsigned int aspell_document_checker_error_number(const struct AspellDocumentChecker * ths);
431
432const char * aspell_document_checker_error_message(const struct AspellDocumentChecker * ths);
433
434const struct AspellError * aspell_document_checker_error(const struct AspellDocumentChecker * ths);
435
436/* Creates a new document checker.
437 * The speller class is expected to last until
438 * this class is destroyed.
439 * If config is given it will be used to override
440 * any relevent options set by this speller class.
441 * The config class is not once this function is done.
442 * If filter is given then it will take ownership of
443 * the filter class and use it to do the filtering.
444 * You are expected to free the checker when done. */
445struct AspellCanHaveError * new_aspell_document_checker(struct AspellSpeller * speller);
446
447struct AspellDocumentChecker * to_aspell_document_checker(struct AspellCanHaveError * obj);
448
449/* Reset the internal state of the filter.
450 * Should be called whenever a new document is
451 * being filtered. */
452void aspell_document_checker_reset(struct AspellDocumentChecker * ths);
453
454/* Process a string.
455 * The string passed in should only be split on
456 * white space characters. Furthermore, between
457 * calls to reset, each string should be passed
458 * in exactly once and in the order they appeared
459 * in the document. Passing in strings out of
460 * order, skipping strings or passing them in
461 * more than once may lead to undefined results. */
462void aspell_document_checker_process(struct AspellDocumentChecker * ths, const char * str, int size);
463
464/* Returns the next misspelled word in the
465 * processed string. If there are no more
466 * misspelled words, then token.word will be
467 * NULL and token.size will be 0 */
468struct AspellToken aspell_document_checker_next_misspelling(struct AspellDocumentChecker * ths);
469
470/* Returns the underlying filter class. */
471struct AspellFilter * aspell_document_checker_filter(struct AspellDocumentChecker * ths);
472
473
474
475/****************************** word list ******************************/
476
477
478typedef struct AspellWordList AspellWordList;
479
480
481int aspell_word_list_empty(const struct AspellWordList * ths);
482
483unsigned int aspell_word_list_size(const struct AspellWordList * ths);
484
485struct AspellStringEnumeration * aspell_word_list_elements(const struct AspellWordList * ths);
486
487
488
489/************************** string enumeration **************************/
490
491
492typedef struct AspellStringEnumeration AspellStringEnumeration;
493
494
495void delete_aspell_string_enumeration(struct AspellStringEnumeration * ths);
496
497struct AspellStringEnumeration * aspell_string_enumeration_clone(const struct AspellStringEnumeration * ths);
498
499void aspell_string_enumeration_assign(struct AspellStringEnumeration * ths, const struct AspellStringEnumeration * other);
500
501int aspell_string_enumeration_at_end(const struct AspellStringEnumeration * ths);
502
503const char * aspell_string_enumeration_next(struct AspellStringEnumeration * ths);
504
505
506
507/********************************* info *********************************/
508
509
510struct AspellModuleInfo {
511
512 const char * name;
513
514 double order_num;
515
516 const char * lib_dir;
517
518 struct AspellStringList * dict_dirs;
519
520 struct AspellStringList * dict_exts;
521
522};
523
524
525typedef struct AspellModuleInfo AspellModuleInfo;
526
527
528struct AspellDictInfo {
529
530 /* The Name to identify this dictionary by. */
531 const char * name;
532
533 /* The language code to identify this dictionary.
534 * A two letter UPPER-CASE ISO 639 language code
535 * and an optional two letter ISO 3166 country
536 * code after a dash or underscore. */
537 const char * code;
538
539 /* Any extra information to distinguish this
540 * variety of dictionary from other dictionaries
541 * which may have the same language and size. */
542 const char * jargon;
543
544 int size;
545
546 /* A two char digit code describing the size of
547 * the dictionary: 10=tiny, 20=really small,
548 * 30=small, 40=med-small, 50=med, 60=med-large,
549 * 70=large, 80=huge, 90=insane. Please check
550 * the README in aspell-lang-200?????.tar.bz2 or
551 * see SCOWL (http://wordlist.sourceforge.net)
552 * for an example of how these sizes are used. */
553 const char * size_str;
554
555 struct AspellModuleInfo * module;
556
557};
558
559
560typedef struct AspellDictInfo AspellDictInfo;
561
562
563typedef struct AspellModuleInfoList AspellModuleInfoList;
564
565
566struct AspellModuleInfoList * get_aspell_module_info_list(struct AspellConfig * config);
567
568int aspell_module_info_list_empty(const struct AspellModuleInfoList * ths);
569
570unsigned int aspell_module_info_list_size(const struct AspellModuleInfoList * ths);
571
572struct AspellModuleInfoEnumeration * aspell_module_info_list_elements(const struct AspellModuleInfoList * ths);
573
574
575
576typedef struct AspellDictInfoList AspellDictInfoList;
577
578
579struct AspellDictInfoList * get_aspell_dict_info_list(struct AspellConfig * config);
580
581int aspell_dict_info_list_empty(const struct AspellDictInfoList * ths);
582
583unsigned int aspell_dict_info_list_size(const struct AspellDictInfoList * ths);
584
585struct AspellDictInfoEnumeration * aspell_dict_info_list_elements(const struct AspellDictInfoList * ths);
586
587
588
589typedef struct AspellModuleInfoEnumeration AspellModuleInfoEnumeration;
590
591
592int aspell_module_info_enumeration_at_end(const struct AspellModuleInfoEnumeration * ths);
593
594const struct AspellModuleInfo * aspell_module_info_enumeration_next(struct AspellModuleInfoEnumeration * ths);
595
596void delete_aspell_module_info_enumeration(struct AspellModuleInfoEnumeration * ths);
597
598struct AspellModuleInfoEnumeration * aspell_module_info_enumeration_clone(const struct AspellModuleInfoEnumeration * ths);
599
600void aspell_module_info_enumeration_assign(struct AspellModuleInfoEnumeration * ths, const struct AspellModuleInfoEnumeration * other);
601
602
603
604typedef struct AspellDictInfoEnumeration AspellDictInfoEnumeration;
605
606
607int aspell_dict_info_enumeration_at_end(const struct AspellDictInfoEnumeration * ths);
608
609const struct AspellDictInfo * aspell_dict_info_enumeration_next(struct AspellDictInfoEnumeration * ths);
610
611void delete_aspell_dict_info_enumeration(struct AspellDictInfoEnumeration * ths);
612
613struct AspellDictInfoEnumeration * aspell_dict_info_enumeration_clone(const struct AspellDictInfoEnumeration * ths);
614
615void aspell_dict_info_enumeration_assign(struct AspellDictInfoEnumeration * ths, const struct AspellDictInfoEnumeration * other);
616
617
618
619/***************************** string list *****************************/
620
621
622typedef struct AspellStringList AspellStringList;
623
624
625struct AspellStringList * new_aspell_string_list();
626
627int aspell_string_list_empty(const struct AspellStringList * ths);
628
629unsigned int aspell_string_list_size(const struct AspellStringList * ths);
630
631struct AspellStringEnumeration * aspell_string_list_elements(const struct AspellStringList * ths);
632
633int aspell_string_list_add(struct AspellStringList * ths, const char * to_add);
634
635int aspell_string_list_remove(struct AspellStringList * ths, const char * to_rem);
636
637void aspell_string_list_clear(struct AspellStringList * ths);
638
639struct AspellMutableContainer * aspell_string_list_to_mutable_container(struct AspellStringList * ths);
640
641void delete_aspell_string_list(struct AspellStringList * ths);
642
643struct AspellStringList * aspell_string_list_clone(const struct AspellStringList * ths);
644
645void aspell_string_list_assign(struct AspellStringList * ths, const struct AspellStringList * other);
646
647
648
649/****************************** string map ******************************/
650
651
652typedef struct AspellStringMap AspellStringMap;
653
654
655struct AspellStringMap * new_aspell_string_map();
656
657int aspell_string_map_add(struct AspellStringMap * ths, const char * to_add);
658
659int aspell_string_map_remove(struct AspellStringMap * ths, const char * to_rem);
660
661void aspell_string_map_clear(struct AspellStringMap * ths);
662
663struct AspellMutableContainer * aspell_string_map_to_mutable_container(struct AspellStringMap * ths);
664
665void delete_aspell_string_map(struct AspellStringMap * ths);
666
667struct AspellStringMap * aspell_string_map_clone(const struct AspellStringMap * ths);
668
669void aspell_string_map_assign(struct AspellStringMap * ths, const struct AspellStringMap * other);
670
671int aspell_string_map_empty(const struct AspellStringMap * ths);
672
673unsigned int aspell_string_map_size(const struct AspellStringMap * ths);
674
675struct AspellStringPairEnumeration * aspell_string_map_elements(const struct AspellStringMap * ths);
676
677/* Insert a new element.
678 * Will NOT overwrite an existing entry.
679 * Returns FALSE if the element already exists. */
680int aspell_string_map_insert(struct AspellStringMap * ths, const char * key, const char * value);
681
682/* Insert a new element.
683 * Will overwrite an existing entry.
684 * Always returns TRUE. */
685int aspell_string_map_replace(struct AspellStringMap * ths, const char * key, const char * value);
686
687/* Looks up an element and returns the value.
688 * Returns NULL if the element does not exist.
689 * Returns an empty string if the element exists
690 * but has a NULL value. */
691const char * aspell_string_map_lookup(const struct AspellStringMap * ths, const char * key);
692
693
694
695/***************************** string pair *****************************/
696
697
698struct AspellStringPair {
699
700 const char * first;
701
702 const char * second;
703
704};
705
706
707typedef struct AspellStringPair AspellStringPair;
708
709
710/*********************** string pair enumeration ***********************/
711
712
713typedef struct AspellStringPairEnumeration AspellStringPairEnumeration;
714
715
716int aspell_string_pair_enumeration_at_end(const struct AspellStringPairEnumeration * ths);
717
718struct AspellStringPair aspell_string_pair_enumeration_next(struct AspellStringPairEnumeration * ths);
719
720void delete_aspell_string_pair_enumeration(struct AspellStringPairEnumeration * ths);
721
722struct AspellStringPairEnumeration * aspell_string_pair_enumeration_clone(const struct AspellStringPairEnumeration * ths);
723
724void aspell_string_pair_enumeration_assign(struct AspellStringPairEnumeration * ths, const struct AspellStringPairEnumeration * other);
725
726
727
728/******************************** cache ********************************/
729
730
731/* Reset the global cache(s) so that cache queries will
732 * create a new object. If existing objects are still in
733 * use they are not deleted. If which is NULL then all
734 * caches will be reset. Current caches are "encode",
735 * "decode", "dictionary", "language", and "keyboard". */
736int aspell_reset_cache(const char * which);
737
738#ifdef __cplusplus
739}
740#endif
741#endif /* ASPELL_ASPELL__H */
742