9c8e81bcfd07dabfca30e2f494485d09fa8ebf03
[platform/upstream/aspell.git] / interfaces / cc / aspell.h
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
13 extern "C" {
14 #endif
15
16 /******************************* type id *******************************/
17
18
19 union AspellTypeId {
20
21   unsigned int num;
22
23   char str[4];
24
25 };
26
27
28 typedef union AspellTypeId AspellTypeId;
29
30
31 /************************** mutable container **************************/
32
33
34 typedef struct AspellMutableContainer AspellMutableContainer;
35
36
37 int aspell_mutable_container_add(struct AspellMutableContainer * ths, const char * to_add);
38
39 int aspell_mutable_container_remove(struct AspellMutableContainer * ths, const char * to_rem);
40
41 void aspell_mutable_container_clear(struct AspellMutableContainer * ths);
42
43 struct AspellMutableContainer * aspell_mutable_container_to_mutable_container(struct AspellMutableContainer * ths);
44
45
46
47 /******************************* key info *******************************/
48
49
50
51 enum AspellKeyInfoType {AspellKeyInfoString, AspellKeyInfoInt, AspellKeyInfoBool, AspellKeyInfoList};
52 typedef enum AspellKeyInfoType AspellKeyInfoType;
53
54
55 struct 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
76 typedef struct AspellKeyInfo AspellKeyInfo;
77
78
79 /******************************** config ********************************/
80
81
82 typedef struct AspellKeyInfoEnumeration AspellKeyInfoEnumeration;
83
84
85 int aspell_key_info_enumeration_at_end(const struct AspellKeyInfoEnumeration * ths);
86
87 const struct AspellKeyInfo * aspell_key_info_enumeration_next(struct AspellKeyInfoEnumeration * ths);
88
89 void delete_aspell_key_info_enumeration(struct AspellKeyInfoEnumeration * ths);
90
91 struct AspellKeyInfoEnumeration * aspell_key_info_enumeration_clone(const struct AspellKeyInfoEnumeration * ths);
92
93 void aspell_key_info_enumeration_assign(struct AspellKeyInfoEnumeration * ths, const struct AspellKeyInfoEnumeration * other);
94
95
96
97 typedef struct AspellConfig AspellConfig;
98
99
100 struct AspellConfig * new_aspell_config();
101
102 void delete_aspell_config(struct AspellConfig * ths);
103
104 struct AspellConfig * aspell_config_clone(const struct AspellConfig * ths);
105
106 void aspell_config_assign(struct AspellConfig * ths, const struct AspellConfig * other);
107
108 unsigned int aspell_config_error_number(const struct AspellConfig * ths);
109
110 const char * aspell_config_error_message(const struct AspellConfig * ths);
111
112 const 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. */
118 void 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. */
125 const 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. */
129 struct 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. */
137 const 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. */
142 struct 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 */
154 int 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 */
166 int aspell_config_remove(struct AspellConfig * ths, const char * key);
167
168 int aspell_config_have(const struct AspellConfig * ths, const char * key);
169
170 /* Returns NULL on error. */
171 const char * aspell_config_retrieve(struct AspellConfig * ths, const char * key);
172
173 int 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. */
179 int 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. */
184 int aspell_config_retrieve_int(struct AspellConfig * ths, const char * key);
185
186
187
188 /******************************** error ********************************/
189
190
191 struct AspellError {
192
193   const char * mesg;
194
195   const struct AspellErrorInfo * err;
196
197 };
198
199
200 typedef struct AspellError AspellError;
201
202 int aspell_error_is_a(const struct AspellError * ths, const struct AspellErrorInfo * e);
203
204
205 struct 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
218 typedef struct AspellErrorInfo AspellErrorInfo;
219
220
221 /**************************** can have error ****************************/
222
223
224 typedef struct AspellCanHaveError AspellCanHaveError;
225
226
227 unsigned int aspell_error_number(const struct AspellCanHaveError * ths);
228
229 const char * aspell_error_message(const struct AspellCanHaveError * ths);
230
231 const struct AspellError * aspell_error(const struct AspellCanHaveError * ths);
232
233 void delete_aspell_can_have_error(struct AspellCanHaveError * ths);
234
235
236
237 /******************************** errors ********************************/
238
239
240 extern const struct AspellErrorInfo * const aerror_other;
241 extern const struct AspellErrorInfo * const aerror_operation_not_supported;
242 extern const struct AspellErrorInfo * const   aerror_cant_copy;
243 extern const struct AspellErrorInfo * const   aerror_unimplemented_method;
244 extern const struct AspellErrorInfo * const aerror_file;
245 extern const struct AspellErrorInfo * const   aerror_cant_open_file;
246 extern const struct AspellErrorInfo * const     aerror_cant_read_file;
247 extern const struct AspellErrorInfo * const     aerror_cant_write_file;
248 extern const struct AspellErrorInfo * const   aerror_invalid_name;
249 extern const struct AspellErrorInfo * const   aerror_bad_file_format;
250 extern const struct AspellErrorInfo * const aerror_dir;
251 extern const struct AspellErrorInfo * const   aerror_cant_read_dir;
252 extern const struct AspellErrorInfo * const aerror_config;
253 extern const struct AspellErrorInfo * const   aerror_unknown_key;
254 extern const struct AspellErrorInfo * const   aerror_cant_change_value;
255 extern const struct AspellErrorInfo * const   aerror_bad_key;
256 extern const struct AspellErrorInfo * const   aerror_bad_value;
257 extern const struct AspellErrorInfo * const   aerror_duplicate;
258 extern const struct AspellErrorInfo * const   aerror_key_not_string;
259 extern const struct AspellErrorInfo * const   aerror_key_not_int;
260 extern const struct AspellErrorInfo * const   aerror_key_not_bool;
261 extern const struct AspellErrorInfo * const   aerror_key_not_list;
262 extern const struct AspellErrorInfo * const   aerror_no_value_reset;
263 extern const struct AspellErrorInfo * const   aerror_no_value_enable;
264 extern const struct AspellErrorInfo * const   aerror_no_value_disable;
265 extern const struct AspellErrorInfo * const   aerror_no_value_clear;
266 extern const struct AspellErrorInfo * const aerror_language_related;
267 extern const struct AspellErrorInfo * const   aerror_unknown_language;
268 extern const struct AspellErrorInfo * const   aerror_unknown_soundslike;
269 extern const struct AspellErrorInfo * const   aerror_language_not_supported;
270 extern const struct AspellErrorInfo * const   aerror_no_wordlist_for_lang;
271 extern const struct AspellErrorInfo * const   aerror_mismatched_language;
272 extern const struct AspellErrorInfo * const aerror_affix;
273 extern const struct AspellErrorInfo * const   aerror_corrupt_affix;
274 extern const struct AspellErrorInfo * const   aerror_invalid_cond;
275 extern const struct AspellErrorInfo * const   aerror_invalid_cond_strip;
276 extern const struct AspellErrorInfo * const   aerror_incorrect_encoding;
277 extern const struct AspellErrorInfo * const aerror_encoding;
278 extern const struct AspellErrorInfo * const   aerror_unknown_encoding;
279 extern const struct AspellErrorInfo * const   aerror_encoding_not_supported;
280 extern const struct AspellErrorInfo * const   aerror_conversion_not_supported;
281 extern const struct AspellErrorInfo * const aerror_pipe;
282 extern const struct AspellErrorInfo * const   aerror_cant_create_pipe;
283 extern const struct AspellErrorInfo * const   aerror_process_died;
284 extern const struct AspellErrorInfo * const aerror_bad_input;
285 extern const struct AspellErrorInfo * const   aerror_invalid_string;
286 extern const struct AspellErrorInfo * const   aerror_invalid_word;
287 extern const struct AspellErrorInfo * const   aerror_invalid_affix;
288 extern const struct AspellErrorInfo * const   aerror_inapplicable_affix;
289 extern const struct AspellErrorInfo * const   aerror_unknown_unichar;
290 extern const struct AspellErrorInfo * const   aerror_word_list_flags;
291 extern const struct AspellErrorInfo * const     aerror_invalid_flag;
292 extern const struct AspellErrorInfo * const     aerror_conflicting_flags;
293 extern const struct AspellErrorInfo * const aerror_version_control;
294 extern const struct AspellErrorInfo * const   aerror_bad_version_string;
295 extern const struct AspellErrorInfo * const aerror_filter;
296 extern const struct AspellErrorInfo * const   aerror_cant_dlopen_file;
297 extern const struct AspellErrorInfo * const   aerror_empty_filter;
298 extern const struct AspellErrorInfo * const   aerror_no_such_filter;
299 extern const struct AspellErrorInfo * const   aerror_confusing_version;
300 extern const struct AspellErrorInfo * const   aerror_bad_version;
301 extern const struct AspellErrorInfo * const   aerror_identical_option;
302 extern const struct AspellErrorInfo * const   aerror_options_only;
303 extern const struct AspellErrorInfo * const   aerror_invalid_option_modifier;
304 extern const struct AspellErrorInfo * const   aerror_cant_describe_filter;
305 extern const struct AspellErrorInfo * const aerror_filter_mode_file;
306 extern const struct AspellErrorInfo * const   aerror_mode_option_name;
307 extern const struct AspellErrorInfo * const   aerror_no_filter_to_option;
308 extern const struct AspellErrorInfo * const   aerror_bad_mode_key;
309 extern const struct AspellErrorInfo * const   aerror_expect_mode_key;
310 extern const struct AspellErrorInfo * const   aerror_mode_version_requirement;
311 extern const struct AspellErrorInfo * const   aerror_confusing_mode_version;
312 extern const struct AspellErrorInfo * const   aerror_bad_mode_version;
313 extern const struct AspellErrorInfo * const   aerror_missing_magic_expression;
314 extern const struct AspellErrorInfo * const   aerror_empty_file_ext;
315 extern const struct AspellErrorInfo * const aerror_filter_mode_expand;
316 extern const struct AspellErrorInfo * const   aerror_unknown_mode;
317 extern const struct AspellErrorInfo * const   aerror_mode_extend_expand;
318 extern const struct AspellErrorInfo * const aerror_filter_mode_magic;
319 extern const struct AspellErrorInfo * const   aerror_file_magic_pos;
320 extern const struct AspellErrorInfo * const   aerror_file_magic_range;
321 extern const struct AspellErrorInfo * const   aerror_missing_magic;
322 extern const struct AspellErrorInfo * const   aerror_bad_magic;
323 extern const struct AspellErrorInfo * const aerror_expression;
324 extern const struct AspellErrorInfo * const   aerror_invalid_expression;
325
326
327 /******************************* speller *******************************/
328
329
330 typedef struct AspellSpeller AspellSpeller;
331
332
333 struct AspellCanHaveError * new_aspell_speller(struct AspellConfig * config);
334
335 struct AspellSpeller * to_aspell_speller(struct AspellCanHaveError * obj);
336
337 void delete_aspell_speller(struct AspellSpeller * ths);
338
339 unsigned int aspell_speller_error_number(const struct AspellSpeller * ths);
340
341 const char * aspell_speller_error_message(const struct AspellSpeller * ths);
342
343 const struct AspellError * aspell_speller_error(const struct AspellSpeller * ths);
344
345 struct 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. */
349 int aspell_speller_check(struct AspellSpeller * ths, const char * word, int word_size);
350
351 /* Add this word to your own personal word list. */
352 int aspell_speller_add_to_personal(struct AspellSpeller * ths, const char * word, int word_size);
353
354 /* Add this word to the current spelling session. */
355 int 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. */
360 const 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. */
366 const 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. */
370 const struct AspellWordList * aspell_speller_main_word_list(struct AspellSpeller * ths);
371
372 int aspell_speller_save_all_word_lists(struct AspellSpeller * ths);
373
374 int 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. */
379 const struct AspellWordList * aspell_speller_suggest(struct AspellSpeller * ths, const char * word, int word_size);
380
381 int 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
388 typedef struct AspellFilter AspellFilter;
389
390
391 void delete_aspell_filter(struct AspellFilter * ths);
392
393 unsigned int aspell_filter_error_number(const struct AspellFilter * ths);
394
395 const char * aspell_filter_error_message(const struct AspellFilter * ths);
396
397 const struct AspellError * aspell_filter_error(const struct AspellFilter * ths);
398
399 struct AspellFilter * to_aspell_filter(struct AspellCanHaveError * obj);
400
401
402
403 /*************************** document checker ***************************/
404
405
406 struct AspellToken {
407
408   unsigned int offset;
409
410   unsigned int len;
411
412 };
413
414
415 typedef struct AspellToken AspellToken;
416
417
418 typedef struct AspellDocumentChecker AspellDocumentChecker;
419
420
421 void delete_aspell_document_checker(struct AspellDocumentChecker * ths);
422
423 unsigned int aspell_document_checker_error_number(const struct AspellDocumentChecker * ths);
424
425 const char * aspell_document_checker_error_message(const struct AspellDocumentChecker * ths);
426
427 const 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. */
438 struct AspellCanHaveError * new_aspell_document_checker(struct AspellSpeller * speller);
439
440 struct 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. */
445 void 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. */
455 void 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 */
461 struct AspellToken aspell_document_checker_next_misspelling(struct AspellDocumentChecker * ths);
462
463 /* Returns the underlying filter class. */
464 struct AspellFilter * aspell_document_checker_filter(struct AspellDocumentChecker * ths);
465
466
467
468 /****************************** word list ******************************/
469
470
471 typedef struct AspellWordList AspellWordList;
472
473
474 int aspell_word_list_empty(const struct AspellWordList * ths);
475
476 unsigned int aspell_word_list_size(const struct AspellWordList * ths);
477
478 struct AspellStringEnumeration * aspell_word_list_elements(const struct AspellWordList * ths);
479
480
481
482 /************************** string enumeration **************************/
483
484
485 typedef struct AspellStringEnumeration AspellStringEnumeration;
486
487
488 void delete_aspell_string_enumeration(struct AspellStringEnumeration * ths);
489
490 struct AspellStringEnumeration * aspell_string_enumeration_clone(const struct AspellStringEnumeration * ths);
491
492 void aspell_string_enumeration_assign(struct AspellStringEnumeration * ths, const struct AspellStringEnumeration * other);
493
494 int aspell_string_enumeration_at_end(const struct AspellStringEnumeration * ths);
495
496 const char * aspell_string_enumeration_next(struct AspellStringEnumeration * ths);
497
498
499
500 /********************************* info *********************************/
501
502
503 struct 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
518 typedef struct AspellModuleInfo AspellModuleInfo;
519
520
521 struct 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
553 typedef struct AspellDictInfo AspellDictInfo;
554
555
556 typedef struct AspellModuleInfoList AspellModuleInfoList;
557
558
559 struct AspellModuleInfoList * get_aspell_module_info_list(struct AspellConfig * config);
560
561 int aspell_module_info_list_empty(const struct AspellModuleInfoList * ths);
562
563 unsigned int aspell_module_info_list_size(const struct AspellModuleInfoList * ths);
564
565 struct AspellModuleInfoEnumeration * aspell_module_info_list_elements(const struct AspellModuleInfoList * ths);
566
567
568
569 typedef struct AspellDictInfoList AspellDictInfoList;
570
571
572 struct AspellDictInfoList * get_aspell_dict_info_list(struct AspellConfig * config);
573
574 int aspell_dict_info_list_empty(const struct AspellDictInfoList * ths);
575
576 unsigned int aspell_dict_info_list_size(const struct AspellDictInfoList * ths);
577
578 struct AspellDictInfoEnumeration * aspell_dict_info_list_elements(const struct AspellDictInfoList * ths);
579
580
581
582 typedef struct AspellModuleInfoEnumeration AspellModuleInfoEnumeration;
583
584
585 int aspell_module_info_enumeration_at_end(const struct AspellModuleInfoEnumeration * ths);
586
587 const struct AspellModuleInfo * aspell_module_info_enumeration_next(struct AspellModuleInfoEnumeration * ths);
588
589 void delete_aspell_module_info_enumeration(struct AspellModuleInfoEnumeration * ths);
590
591 struct AspellModuleInfoEnumeration * aspell_module_info_enumeration_clone(const struct AspellModuleInfoEnumeration * ths);
592
593 void aspell_module_info_enumeration_assign(struct AspellModuleInfoEnumeration * ths, const struct AspellModuleInfoEnumeration * other);
594
595
596
597 typedef struct AspellDictInfoEnumeration AspellDictInfoEnumeration;
598
599
600 int aspell_dict_info_enumeration_at_end(const struct AspellDictInfoEnumeration * ths);
601
602 const struct AspellDictInfo * aspell_dict_info_enumeration_next(struct AspellDictInfoEnumeration * ths);
603
604 void delete_aspell_dict_info_enumeration(struct AspellDictInfoEnumeration * ths);
605
606 struct AspellDictInfoEnumeration * aspell_dict_info_enumeration_clone(const struct AspellDictInfoEnumeration * ths);
607
608 void aspell_dict_info_enumeration_assign(struct AspellDictInfoEnumeration * ths, const struct AspellDictInfoEnumeration * other);
609
610
611
612 /***************************** string list *****************************/
613
614
615 typedef struct AspellStringList AspellStringList;
616
617
618 struct AspellStringList * new_aspell_string_list();
619
620 int aspell_string_list_empty(const struct AspellStringList * ths);
621
622 unsigned int aspell_string_list_size(const struct AspellStringList * ths);
623
624 struct AspellStringEnumeration * aspell_string_list_elements(const struct AspellStringList * ths);
625
626 int aspell_string_list_add(struct AspellStringList * ths, const char * to_add);
627
628 int aspell_string_list_remove(struct AspellStringList * ths, const char * to_rem);
629
630 void aspell_string_list_clear(struct AspellStringList * ths);
631
632 struct AspellMutableContainer * aspell_string_list_to_mutable_container(struct AspellStringList * ths);
633
634 void delete_aspell_string_list(struct AspellStringList * ths);
635
636 struct AspellStringList * aspell_string_list_clone(const struct AspellStringList * ths);
637
638 void aspell_string_list_assign(struct AspellStringList * ths, const struct AspellStringList * other);
639
640
641
642 /****************************** string map ******************************/
643
644
645 typedef struct AspellStringMap AspellStringMap;
646
647
648 struct AspellStringMap * new_aspell_string_map();
649
650 int aspell_string_map_add(struct AspellStringMap * ths, const char * to_add);
651
652 int aspell_string_map_remove(struct AspellStringMap * ths, const char * to_rem);
653
654 void aspell_string_map_clear(struct AspellStringMap * ths);
655
656 struct AspellMutableContainer * aspell_string_map_to_mutable_container(struct AspellStringMap * ths);
657
658 void delete_aspell_string_map(struct AspellStringMap * ths);
659
660 struct AspellStringMap * aspell_string_map_clone(const struct AspellStringMap * ths);
661
662 void aspell_string_map_assign(struct AspellStringMap * ths, const struct AspellStringMap * other);
663
664 int aspell_string_map_empty(const struct AspellStringMap * ths);
665
666 unsigned int aspell_string_map_size(const struct AspellStringMap * ths);
667
668 struct 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. */
673 int 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. */
678 int 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. */
684 const char * aspell_string_map_lookup(const struct AspellStringMap * ths, const char * key);
685
686
687
688 /***************************** string pair *****************************/
689
690
691 struct AspellStringPair {
692
693   const char * first;
694
695   const char * second;
696
697 };
698
699
700 typedef struct AspellStringPair AspellStringPair;
701
702
703 /*********************** string pair enumeration ***********************/
704
705
706 typedef struct AspellStringPairEnumeration AspellStringPairEnumeration;
707
708
709 int aspell_string_pair_enumeration_at_end(const struct AspellStringPairEnumeration * ths);
710
711 struct AspellStringPair aspell_string_pair_enumeration_next(struct AspellStringPairEnumeration * ths);
712
713 void delete_aspell_string_pair_enumeration(struct AspellStringPairEnumeration * ths);
714
715 struct AspellStringPairEnumeration * aspell_string_pair_enumeration_clone(const struct AspellStringPairEnumeration * ths);
716
717 void 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". */
729 int aspell_reset_cache(const char * which);
730
731 #ifdef __cplusplus
732 }
733 #endif
734 #endif /* ASPELL_ASPELL__H */