8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / idmap / idmapd / directory_server_impl.h
blob31583cf3f2964e3d3bf1734e17260f315b753ea0
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _DIRECTORY_SERVER_IMPL_H
28 #define _DIRECTORY_SERVER_IMPL_H
31 * Internal implementation details for the server side of directory lookup.
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
39 * Functions to populate Directory Attribute Value lists.
41 directory_error_t str_list_dav(directory_values_rpc *lvals,
42 const char * const *str_list, int n);
43 directory_error_t uint_list_dav(directory_values_rpc *lvals,
44 const unsigned int *uint_list, int n);
45 directory_error_t bin_list_dav(directory_values_rpc *lvals,
46 const void *array, int n, size_t sz);
49 * Split a name@domain into name, domain. Recommend allocating the
50 * destination buffers the same size as the input, on the stack,
51 * using variable length arrays.
53 void split_name(char *name, char *domain, char *id);
56 * Insert a directory_error_t into a directory entry to be returned.
57 * Caller MUST NOT free the directory_error_t.
59 void directory_entry_set_error(directory_entry_rpc *ent,
60 directory_error_t de);
63 * This is the structure by which a provider supplies its entry points.
64 * The name is not currently used.
66 struct directory_provider_static {
67 char *name;
68 directory_error_t (*get)(
69 directory_entry_rpc *ret,
70 idmap_utf8str_list *ids,
71 idmap_utf8str types,
72 idmap_utf8str_list *attrs);
75 #ifdef __cplusplus
77 #endif
79 #endif /* _DIRECTORY_SERVER_IMPL_H */