summaryrefslogtreecommitdiffstats
path: root/src/util/profile/profile.hin
blob: 98f7d02150c474a2ca1997765bb5e82e5e129e8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
 * profile.h
 */

#ifndef _KRB5_PROFILE_H
#define _KRB5_PROFILE_H

#if defined(_MSDOS) || defined(_WIN32) || defined(MACINTOSH)
#include <win-mac.h>
#endif

#ifndef KRB5_CALLCONV
#define KRB5_CALLCONV
#define KRB5_CALLCONV_C
#define KRB5_DLLIMP
#define GSS_DLLIMP
#define KRB5_EXPORTVAR
#define FAR
#define NEAR
#endif

typedef struct _profile_t *profile_t;

#if !defined(PROTOTYPE)
#if defined(__STDC__) || defined(__cplusplus) || defined(_MSDOS) || defined(_WIN32)
#define PROTOTYPE(x) x
#else
#define PROTOTYPE(x) ()
#endif
#endif

/*
 * Used by the profile iterator in prof_get.c
 */
#define PROFILE_ITER_LIST_SECTION	0x0001
#define PROFILE_ITER_SECTIONS_ONLY	0x0002
#define PROFILE_ITER_RELATIONS_ONLY	0x0004

KRB5_DLLIMP long KRB5_CALLCONV profile_init
	PROTOTYPE ((const char **filenames, profile_t *ret_profile));

KRB5_DLLIMP long KRB5_CALLCONV profile_init_path
	PROTOTYPE ((const char *filepath, profile_t *ret_profile));

KRB5_DLLIMP long KRB5_CALLCONV profile_flush
	PROTOTYPE ((profile_t profile));

KRB5_DLLIMP void KRB5_CALLCONV profile_abandon
	PROTOTYPE ((profile_t profile));

KRB5_DLLIMP void KRB5_CALLCONV profile_release
	PROTOTYPE ((profile_t profile));

KRB5_DLLIMP long KRB5_CALLCONV profile_get_values
	PROTOTYPE ((profile_t profile, const char **names, char ***ret_values));

KRB5_DLLIMP void KRB5_CALLCONV profile_free_list
	PROTOTYPE ((char **list));

KRB5_DLLIMP long KRB5_CALLCONV profile_get_string
	PROTOTYPE((profile_t profile, const char *name, const char *subname, 
			const char *subsubname, const char *def_val,
			char **ret_string));
KRB5_DLLIMP long KRB5_CALLCONV profile_get_integer
	PROTOTYPE((profile_t profile, const char *name, const char *subname,
			const char *subsubname, int def_val,
			int *ret_default));

KRB5_DLLIMP long KRB5_CALLCONV profile_get_relation_names
	PROTOTYPE((profile_t profile, const char **names, char ***ret_names));

KRB5_DLLIMP long KRB5_CALLCONV profile_get_subsection_names
	PROTOTYPE((profile_t profile, const char **names, char ***ret_names));

KRB5_DLLIMP long KRB5_CALLCONV profile_iterator_create
	PROTOTYPE((profile_t profile, const char **names,
		   int flags, void **ret_iter));

KRB5_DLLIMP void KRB5_CALLCONV profile_iterator_free
	PROTOTYPE((void **iter_p));
	
KRB5_DLLIMP long KRB5_CALLCONV profile_iterator
	PROTOTYPE((void	**iter_p, char **ret_name, char **ret_value));

KRB5_DLLIMP void KRB5_CALLCONV profile_release_string PROTOTYPE((char *str));

KRB5_DLLIMP long KRB5_CALLCONV profile_update_relation
	PROTOTYPE((profile_t profile, const char **names, 
		   const char *old_value, const char *new_value));

KRB5_DLLIMP long KRB5_CALLCONV profile_clear_relation
	PROTOTYPE((profile_t profile, const char **names));

KRB5_DLLIMP long KRB5_CALLCONV profile_rename_section
	PROTOTYPE((profile_t profile, const char **names, 
		   const char *new_name));

KRB5_DLLIMP long KRB5_CALLCONV profile_add_relation
	PROTOTYPE((profile_t profile, const char **names, 
		   const char *new_value));

#endif /* _KRB5_PROFILE_H */