library/src/network/httpd/BP-HTTPdRequestHandlerParameterFilters.cc
// Attempt to lookup a parameter filter structure given all lookup parameters.  This is mainly used for checking if
// filters exist before adding new filters, but it can also be used for any various kind of needed lookup.
Attempt to lookup a parameter filter structure given all lookup parameters.  This is mainly used for checking if
filters exist before adding new filters, but it can also be used for any various kind of needed lookup.
Attempt to lookup a parameter filter structure given all lookup parameters . This is mainly used for checking if filters exist before adding new filters but it can also be used for any various kind of needed lookup .
P_BP_HTTPD_REQUEST_HANDLER_PARAMETER_FILTER BP_HTTPdRequestHandlerFilterLookup
(
	P_BP_HTTPD_REQUEST_HANDLER                request_handler,
	BP_HTTPD_REQUEST_VAR_TYPE                 var_type,
	char                                    * key,
	char                                    * filter_name,
	BP_HTTPdRequestHandlerParameterFilterFptr filter
)
{
	if(!request_handler)
		return NULL;
	if(!var_type)
		return NULL;
	if(!key)
		return NULL;
	if(!filter)
		return NULL;
	char *filter_set_lookup[] = {"filters", key, "fitler_set", "filter_name", NULL};
	P_BP_HASH_TABLE_KEYED_ENTRY filter_lookup = BP_HashRegLookupTableEntryByPath(request_handler->parameter_filters, (char **) &filter_set_lookup);
	if(!filter)
		return NULL;
	P_BP_HTTPD_REQUEST_HANDLER_PARAMETER_FILTER filter_data = (P_BP_HTTPD_REQUEST_HANDLER_PARAMETER_FILTER) filter_lookup->data;
	return filter_data;
}
P_BP_HTTPD_REQUEST_HANDLER_PARAMETER_FILTER BP_HTTPdRequestHandlerFilterLookup ( P_BP_HTTPD_REQUEST_HANDLER request_handler , BP_HTTPD_REQUEST_VAR_TYPE var_type , char * key , char * filter_name , BP_HTTPdRequestHandlerParameterFilterFptr filter ) { if ( ! request_handler ) return NULL ; if ( ! var_type ) return NULL ; if ( ! key ) return NULL ; if ( ! filter ) return NULL ; char * filter_set_lookup [ ] = { " " , key , " " , " " , NULL } ; P_BP_HASH_TABLE_KEYED_ENTRY filter_lookup = BP_HashRegLookupTableEntryByPath ( request_handler -> parameter_filters , ( char * * ) & filter_set_lookup ) ; if ( ! filter ) return NULL ; P_BP_HTTPD_REQUEST_HANDLER_PARAMETER_FILTER filter_data = ( P_BP_HTTPD_REQUEST_HANDLER_PARAMETER_FILTER ) filter_lookup -> data ; return filter_data ; }
Attempt to lookup a parameter filter structure given all lookup parameters.
Attempt to lookup a parameter filter structure given all lookup parameters .
// basic null checks // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%% Attempt Lookup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // set lookup path // run filter check // set filter // return the lookup (or null if it's not found)