7a5fe432b360000d86bfd6431090a60062158e37
[openafs.git] / src / WINNT / kfw / inc / krb5 / profile.h
1 /*
2  * profile.h
3  */
4
5 #ifndef _KRB5_PROFILE_H
6 #define _KRB5_PROFILE_H
7
8 #if defined(_WIN32)
9 #include <win-mac.h>
10 #endif
11
12 #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
13 #    include <TargetConditionals.h>
14 #    if TARGET_RT_MAC_CFM
15 #        error "Use KfM 4.0 SDK headers for CFM compilation."
16 #    endif
17 #endif
18
19 #ifndef KRB5_CALLCONV
20 #define KRB5_CALLCONV
21 #define KRB5_CALLCONV_C
22 #endif
23
24 typedef struct _profile_t *profile_t;
25
26 /*
27  * Used by the profile iterator in prof_get.c
28  */
29 #define PROFILE_ITER_LIST_SECTION       0x0001
30 #define PROFILE_ITER_SECTIONS_ONLY      0x0002
31 #define PROFILE_ITER_RELATIONS_ONLY     0x0004
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
36
37 #if TARGET_OS_MAC
38 #    if defined(__MWERKS__)
39 #        pragma import on
40 #    endif
41 #endif
42
43 typedef char* profile_filespec_t;       /* path as C string */
44 typedef char* profile_filespec_list_t;  /* list of : separated paths, C string */
45 typedef const char * const_profile_filespec_t;  /* path as C string */
46 typedef const char * const_profile_filespec_list_t;     /* list of : separated paths, C string */
47
48 long KRB5_CALLCONV profile_init
49         (const_profile_filespec_t *files, profile_t *ret_profile);
50
51 long KRB5_CALLCONV profile_init_path
52         (const_profile_filespec_list_t filelist, profile_t *ret_profile);
53
54 long KRB5_CALLCONV profile_flush
55         (profile_t profile);
56
57 void KRB5_CALLCONV profile_abandon
58         (profile_t profile);
59
60 void KRB5_CALLCONV profile_release
61         (profile_t profile);
62
63 long KRB5_CALLCONV profile_get_values
64         (profile_t profile, const char *const *names, char ***ret_values);
65
66 void KRB5_CALLCONV profile_free_list
67         (char **list);
68
69 long KRB5_CALLCONV profile_get_string
70         (profile_t profile, const char *name, const char *subname, 
71                         const char *subsubname, const char *def_val,
72                         char **ret_string);
73 long KRB5_CALLCONV profile_get_integer
74         (profile_t profile, const char *name, const char *subname,
75                         const char *subsubname, int def_val,
76                         int *ret_default);
77
78 long KRB5_CALLCONV profile_get_boolean
79         (profile_t profile, const char *name, const char *subname,
80                         const char *subsubname, int def_val,
81                         int *ret_default);
82
83 long KRB5_CALLCONV profile_get_relation_names
84         (profile_t profile, const char **names, char ***ret_names);
85
86 long KRB5_CALLCONV profile_get_subsection_names
87         (profile_t profile, const char **names, char ***ret_names);
88
89 long KRB5_CALLCONV profile_iterator_create
90         (profile_t profile, const char **names,
91                    int flags, void **ret_iter);
92
93 void KRB5_CALLCONV profile_iterator_free
94         (void **iter_p);
95         
96 long KRB5_CALLCONV profile_iterator
97         (void   **iter_p, char **ret_name, char **ret_value);
98
99 void KRB5_CALLCONV profile_release_string (char *str);
100
101 long KRB5_CALLCONV profile_update_relation
102         (profile_t profile, const char **names, 
103                    const char *old_value, const char *new_value);
104
105 long KRB5_CALLCONV profile_clear_relation
106         (profile_t profile, const char **names);
107
108 long KRB5_CALLCONV profile_rename_section
109         (profile_t profile, const char **names, 
110                    const char *new_name);
111
112 long KRB5_CALLCONV profile_add_relation
113         (profile_t profile, const char **names, 
114                    const char *new_value);
115
116 #if TARGET_OS_MAC
117 #    if defined(__MWERKS__)
118 #        pragma import reset
119 #    endif
120 #endif
121
122 #ifdef __cplusplus
123 }
124 #endif /* __cplusplus */
125
126 #endif /* _KRB5_PROFILE_H */
127 /*
128  * util/profile/prof_err.h:
129  * This file is automatically generated; please do not edit it.
130  */
131
132 #include <com_err.h>
133
134 #define PROF_VERSION                             (-1429577728L)
135 #define PROF_MAGIC_NODE                          (-1429577727L)
136 #define PROF_NO_SECTION                          (-1429577726L)
137 #define PROF_NO_RELATION                         (-1429577725L)
138 #define PROF_ADD_NOT_SECTION                     (-1429577724L)
139 #define PROF_SECTION_WITH_VALUE                  (-1429577723L)
140 #define PROF_BAD_LINK_LIST                       (-1429577722L)
141 #define PROF_BAD_GROUP_LVL                       (-1429577721L)
142 #define PROF_BAD_PARENT_PTR                      (-1429577720L)
143 #define PROF_MAGIC_ITERATOR                      (-1429577719L)
144 #define PROF_SET_SECTION_VALUE                   (-1429577718L)
145 #define PROF_EINVAL                              (-1429577717L)
146 #define PROF_READ_ONLY                           (-1429577716L)
147 #define PROF_SECTION_NOTOP                       (-1429577715L)
148 #define PROF_SECTION_SYNTAX                      (-1429577714L)
149 #define PROF_RELATION_SYNTAX                     (-1429577713L)
150 #define PROF_EXTRA_CBRACE                        (-1429577712L)
151 #define PROF_MISSING_OBRACE                      (-1429577711L)
152 #define PROF_MAGIC_PROFILE                       (-1429577710L)
153 #define PROF_MAGIC_SECTION                       (-1429577709L)
154 #define PROF_TOPSECTION_ITER_NOSUPP              (-1429577708L)
155 #define PROF_INVALID_SECTION                     (-1429577707L)
156 #define PROF_END_OF_SECTIONS                     (-1429577706L)
157 #define PROF_BAD_NAMESET                         (-1429577705L)
158 #define PROF_NO_PROFILE                          (-1429577704L)
159 #define PROF_MAGIC_FILE                          (-1429577703L)
160 #define PROF_FAIL_OPEN                           (-1429577702L)
161 #define PROF_EXISTS                              (-1429577701L)
162 #define PROF_BAD_BOOLEAN                         (-1429577700L)
163 #define PROF_BAD_INTEGER                         (-1429577699L)
164 #define PROF_MAGIC_FILE_DATA                     (-1429577698L)
165 #define ERROR_TABLE_BASE_prof (-1429577728L)
166
167 extern const struct error_table et_prof_error_table;
168
169 #if !defined(_WIN32)
170 /* for compatibility with older versions... */
171 extern void initialize_prof_error_table () /*@modifies internalState@*/;
172 #else
173 #define initialize_prof_error_table()
174 #endif
175
176 #if !defined(_WIN32)
177 #define init_prof_err_tbl initialize_prof_error_table
178 #define prof_err_base ERROR_TABLE_BASE_prof
179 #endif