/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*
*/
/*
* searchpref.c: search preferences library routines for LDAP clients
*/
#include "ldap-int.h"
#include "srchpref.h"
static char *sobjoptions[] = {
"internal",
};
static unsigned long sobjoptvals[] = {
};
int
{
char *buf;
return( LDAP_SEARCHPREF_ERR_FILE );
}
return( LDAP_SEARCHPREF_ERR_FILE );
}
return( LDAP_SEARCHPREF_ERR_FILE );
}
return( LDAP_SEARCHPREF_ERR_MEM );
}
NSLDAPI_FREE( buf );
return( LDAP_SEARCHPREF_ERR_FILE );
}
NSLDAPI_FREE( buf );
return( rc );
}
int
struct ldap_searchobj **solistp )
{
char **toks;
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
if ( version != LDAP_SEARCHPREF_VERSION &&
return( LDAP_SEARCHPREF_ERR_VERSION );
}
if ( prevso == NULLSEARCHOBJ ) {
} else {
}
}
if ( rc != 0 ) {
}
return( rc );
}
void
{
free_searchobj( so );
}
}
/* XXX XXX need to do some work here */
}
static void
{
}
}
}
}
}
}
}
}
}
}
NSLDAPI_FREE( sa );
}
}
}
}
NSLDAPI_FREE( sm );
}
}
NSLDAPI_FREE( so );
}
}
struct ldap_searchobj *
{
return( solist );
}
struct ldap_searchobj *
{
}
static int
int soversion )
{
int i, j, tokcnt;
char **toks;
/*
* Object type prompt comes first
*/
return( tokcnt == 0 ? 0 : LDAP_SEARCHPREF_ERR_SYNTAX );
}
sizeof( struct ldap_searchobj ))) == NULL ) {
return( LDAP_SEARCHPREF_ERR_MEM );
}
NSLDAPI_FREE( (char *)toks );
/*
* if this is post-version zero, options come next
*/
if ( soversion > LDAP_SEARCHPREF_VERSION_ZERO ) {
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
for ( j = 0; sobjoptions[ j ] != NULL; ++j ) {
}
}
}
}
/*
* "Fewer choices" prompt is next
*/
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
NSLDAPI_FREE( (char *)toks );
/*
* Filter prefix for "More Choices" searching is next
*/
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
NSLDAPI_FREE( (char *)toks );
/*
* "Fewer Choices" filter tag comes next
*/
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
NSLDAPI_FREE( (char *)toks );
/*
* Selection (disambiguation) attribute comes next
*/
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
NSLDAPI_FREE( (char *)toks );
/*
* Label for selection (disambiguation) attribute
*/
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
NSLDAPI_FREE( (char *)toks );
/*
* Search scope is next
*/
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
} else {
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
/*
* "More Choices" search option list comes next
*/
if ( tokcnt < 5 ) {
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
sizeof( struct ldap_searchattr ))) == NULL ) {
return( LDAP_SEARCHPREF_ERR_MEM );
}
/* Deal with bitmap */
( *sa )->sa_matchtypebitmap = 0;
}
}
NSLDAPI_FREE( ( char * ) toks );
}
/*
* Match types are last
*/
if ( tokcnt < 2 ) {
return( LDAP_SEARCHPREF_ERR_SYNTAX );
}
sizeof( struct ldap_searchmatch ))) == NULL ) {
return( LDAP_SEARCHPREF_ERR_MEM );
}
NSLDAPI_FREE( ( char * ) toks );
}
return( 0 );
}