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