An Example Pre-Operation Plug-In
50
Netscape Directory Server Plug-In Programmer’s Guide • December 2003
break;
default:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_DEREF",
"unknown value specified: %d\n", deref );
break;
}
}
/* Get and log the search filter information */
if ( slapi_pblock_get(pb,SLAPI_SEARCH_FILTER, &filter)==0 ) {
/* Get and log the filter type */
filter_type = slapi_filter_get_choice( filter );
switch( filter_type ) {
case LDAP_FILTER_AND:
case LDAP_FILTER_OR:
case LDAP_FILTER_NOT:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_FILTER",
"Complex search filter. See value of
SLAPI_SEARCH_STRFILTER.\n" );
break;
case LDAP_FILTER_EQUALITY:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_FILTER",
"LDAP_FILTER_EQUALITY\n" );
break;
case LDAP_FILTER_GE:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_FILTER",
"LDAP_FILTER_GE\n" );
break;
case LDAP_FILTER_LE:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_FILTER",
"LDAP_FILTER_LE\n" );
break;
case LDAP_FILTER_APPROX:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_FILTER",
"LDAP_FILTER_APPROX\n" );
break;
case LDAP_FILTER_SUBSTRINGS:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_FILTER",
"LDAP_FILTER_SUBSTRINGS\n" );
/* For substring filters, get and log the attribute type and
the substrings in the filter */
slapi_filter_get_subfilt( filter, &attr_type, &substr_init,
&substr_any, &substr_final );
if ( attr_type != NULL )
slapi_log_error( SLAPI_LOG_PLUGIN, "\tAttribute type",
"%s\n", attr_type );
if ( substr_init != NULL )
slapi_log_error( SLAPI_LOG_PLUGIN, "\tInitial substring",
"%s\n", substr_init );
if ( substr_any != NULL ) {
for ( i = 0; substr_any[i] != NULL; i++ ) {
slapi_log_error( SLAPI_LOG_PLUGIN, "\tSubstring",
"# %d: %s\n", i, substr_any[i] );
}
}
if ( substr_final != NULL )
Code Example 4-1
Sample Pre-Operation Search and Initialization Functions (Continued)
Содержание NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Страница 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Страница 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 26: ...Types of Directory Server Plug Ins 26 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 38: ...Compiling a Directory Server Plug In 38 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 54: ...An Example Pre Operation Plug In 54 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 90: ...Processing an LDAP Abandon Operation 90 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 110: ...Using SASL with an LDAP Client 110 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 122: ...Specifying Start and Close Functions 122 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 214: ...Summary of Data Types and Structures 214 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 554: ...Functions for Registering Additional Plug Ins 554 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 596: ...Parameters for the Virtual Attribute Service 596 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Страница 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...