1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * lt-ext-mdule-private.h
4  * Copyright (C) 2011-2015 Akira TAGOH
5  *
6  * Authors:
7  *   Akira TAGOH  <akira@tagoh.org>
8  *
9  * You may distribute under the terms of either the GNU
10  * Lesser General Public License or the Mozilla Public
11  * License, as specified in the README file.
12  */
13 #ifndef __LT_EXT_MODULE_PRIVATE_H__
14 #define __LT_EXT_MODULE_PRIVATE_H__
15 
16 #if !defined (__LANGTAG_PRIVATE)
17 #error "Unable to use the private header publicly"
18 #endif
19 
20 #include <liblangtag/lt-macros.h>
21 #include <liblangtag/lt-error.h>
22 #include <liblangtag/lt-ext-module-data.h>
23 #include <liblangtag/lt-ext-module.h>
24 
25 LT_BEGIN_DECLS
26 
27 #define LT_MAX_EXT_MODULES	(('9' - '0' + 1) + ('z' - 'a' + 1) + 2)
28 
29 lt_bool_t             lt_ext_module_validate_singleton   (char                   singleton);
30 int                   lt_ext_module_singleton_char_to_int(char                   singleton_c);
31 char                  lt_ext_module_singleton_int_to_char(int                    singleton);
32 lt_ext_module_t      *lt_ext_module_lookup               (char                   singleton_c);
33 lt_ext_module_t      *lt_ext_module_new                  (const char            *name);
34 const char           *lt_ext_module_get_name             (lt_ext_module_t       *module);
35 char                  lt_ext_module_get_singleton        (lt_ext_module_t       *module);
36 char                 *lt_ext_module_get_tag              (lt_ext_module_t       *module,
37 							  lt_ext_module_data_t  *data);
38 lt_ext_module_data_t *lt_ext_module_create_data          (lt_ext_module_t       *module);
39 lt_bool_t             lt_ext_module_parse_tag            (lt_ext_module_t       *module,
40                                                           lt_ext_module_data_t  *data,
41                                                           const char            *subtag,
42                                                           lt_error_t           **error);
43 lt_bool_t             lt_ext_module_validate_tag         (lt_ext_module_t       *module,
44 							  lt_ext_module_data_t  *data);
45 lt_bool_t             lt_ext_module_precheck_tag         (lt_ext_module_t       *module,
46 							  lt_ext_module_data_t  *data,
47 							  const lt_tag_t        *tag,
48 							  lt_error_t           **error);
49 
50 LT_END_DECLS
51 
52 #endif /* __LT_EXT_MODULE_PRIVATE_H__ */
53