1    | #ifndef READ_DEFS
2    | #define READ_DEFS
3    | 
4    | /***************************************
5    |   $Revision: 1.8 $
6    | 
7    |   Objects module (ob) - this _should_ eventually get merged in with the
8    |   config module.
9    | 
10   |   Status: NOT REVUED, NOT TESTED
11   | 
12   |   ******************/ /******************
13   |   Copyright (c) 1999                              RIPE NCC
14   |  
15   |   All Rights Reserved
16   |   
17   |   Permission to use, copy, modify, and distribute this software and its
18   |   documentation for any purpose and without fee is hereby granted,
19   |   provided that the above copyright notice appear in all copies and that
20   |   both that copyright notice and this permission notice appear in
21   |   supporting documentation, and that the name of the author not be
22   |   used in advertising or publicity pertaining to distribution of the
23   |   software without specific, written prior permission.
24   |   
25   |   THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
26   |   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
27   |   AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
28   |   DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
29   |   AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
30   |   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31   |   ***************************************/
32   | #include <glib.h>
33   | #include "bitmask.h"
34   | 
35   | #include "DF_class_enum.def"
36   | #include "DF_class_mask.def"
37   | 
38   | #include "DF_attribute_enum.def"
39   | #include "DF_attribute_inv_attr_mask.def"
40   | 
41   | typedef enum _R_Type_t {
42   |   R_SQL=0,
43   |   R_RADIX,
44   |   R_END
45   | } R_Type_t;
46   | 
47   | typedef enum _Q_Type_t {
48   |   Q_LOOKUP=0,
49   |   Q_INVERSE
50   | } Q_Type_t;
51   | 
52   | #include "which_keytypes.h"
53   | #include "iproutines.h"
54   | #include "rxroutines.h"
55   | 
56   | typedef struct {
57   |   R_Type_t refer;
58   |   Q_Type_t querytype;
59   |   WK_Type keytype;
60   |   A_Type_t attribute;
61   |   C_Type_t class;
62   |   char * const query;
63   |   char * const descr;
64   | } Query_t;
65   | 
66   | #ifdef DEFS_IMPL
67   | #include "QI_queries.def"
68   | #else
69   | extern Query_t Query[];
70   | #endif
71   | 
72   | typedef enum UD_qtype_t {
73   |   UD_AUX__,
74   |   UD_AX_PR,
75   |   UD_AX_MT,
76   |   UD_AX_MO,
77   |   UD_AX_MR,
78   |   UD_AX_MU,
79   |   UD_LEAF_,
80   |   UD_LF_IF,
81   |   UD_LF_RF,
82   |   UD_LF_AT,
83   |   UD_LF_OT,
84   |   UD_LF_AY,
85   |   UD_MAIN_,
86   |   UD_MA_RT,
87   |   UD_MA_OR,
88   |   UD_MA_PR,
89   |   UD_MA_U2,
90   |   UD_MA_IN,
91   |   UD_MA_I6,
92   |   UD_MA_AK,
93   |   UD_NULL_
94   | } UD_qtype;
95   | 
96   | typedef struct UD_query_t {
97   |   UD_qtype qtype;
98   |   char * const qry;
99   | } UD_query;
100  | 
101  | 
102  | char * const *DF_get_filter_names(void);
103  | char * const *DF_get_class_names(void);
104  | char * const *DF_get_class_aliases(void);
105  | int DF_get_class_index(int alias_index);
106  | char * const DF_get_class_name(int alias_index);
107  | char * const DF_get_class_code(C_Type_t index);
108  | int DF_get_class_dbase_code(int class_index);
109  | char * const DF_get_class_sql_table(C_Type_t index);
110  | char * const *DF_get_attribute_aliases(void);
111  | const char *DF_get_attribute_name(A_Type_t index);
112  | const char *DF_get_attribute_code(A_Type_t index);
113  | char * const *DF_get_attribute_names(void);
114  | int DF_get_attribute_index(int alias_index);
115  | const char *DF_get_class_template(C_Type_t index);
116  | const char *DF_get_class_template_v(C_Type_t index);
117  | const char *DF_get_attribute_desc(A_Type_t index);
118  | const char *DF_get_attribute_frmt(A_Type_t index);
119  | char *DF_attributes_to_string(void);
120  | A_Type_t DF_attribute_code2type(const gchar *token);
121  | A_Type_t DF_attribute_name2type(const gchar *token);
122  | C_Type_t DF_class_code2type(const gchar *token);
123  | C_Type_t DF_class_name2type(const gchar *token);
124  | const char *DF_get_server_query(int index);
125  | char * const *DF_get_server_queries(void);
126  | int DF_attrcode_has_radix_lookup(A_Type_t attr);
127  | const char *DF_get_update_query(A_Type_t index);
128  | UD_qtype DF_get_update_query_type(A_Type_t index);
129  | const char *DF_get_insert_query(A_Type_t index);
130  | UD_qtype DF_get_insert_query_type(A_Type_t index);
131  | const char *DF_get_select_query(A_Type_t index);
132  | UD_qtype DF_get_select_query_type(A_Type_t index);
133  | const char *DF_get_dummy_query(A_Type_t index);
134  | UD_qtype DF_get_dummy_query_type(A_Type_t index);
135  | const char *DF_get_database(int index);
136  | 
137  | 
138  | #endif /* READ_DEFS */
139  |