2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A%#
pragma ident "%Z%%M% %I% %E% SMI" 2N/Atypedef long entryp;
/* specifies location of an entry within table */ 2N/A%
void reset();
/* empty contents of free list */ 2N/A%
void init();
/* Empty free list */ 2N/A%
/* Returns the location of a free entry, or NULL, if there aren't any. */ 2N/A%
/* Adds given location to the free list. 2N/A% Returns TRUE if successful, FALSE otherwise (when out of memory). */ 2N/A%
/* Returns in a vector the information in the free list. 2N/A% Vector returned is of form: <n free cells><n1><n2><loc1>,..<locn>. 2N/A% Leave the first 'n' cells free. 2N/A% n1 is the number of entries that should be in the freelist. 2N/A% n2 is the number of entries actually found in the freelist. 2N/A% <loc1...locn> are the entries. n2 <= n1 because we never count beyond n1. 2N/A% It is up to the caller to free the returned vector when he is through. */ 2N/A%
/* Locking methods */ 2N/A long last_used;
/* last entry used; maintained for quick insertion */ 2N/A long count;
/* measures fullness of table */ 2N/A%
long last_used;
/* last entry used; maintained for quick insertion */ 2N/A%
long count;
/* measures fullness of table */ 2N/A% Fatal error if insufficient error. */ 2N/A%
/* Allocate expiration time array */ 2N/A%
db_table();
/* constructor for brand new, empty table. */ 2N/A%
db_table(
char * );
/* constructor for creating a table by loading 2N/A% in an existing one. */ 2N/A%
/* Init of LDAP/MT portion of class instance */ 2N/A%
/* Mark this instance as deferred */ 2N/A%
/* Remove deferred mark */ 2N/A%
/* Return the current 'tab' */ 2N/A%
/* Return how many entries there are in table. */ 2N/A%
/* Deletes table, entries, and free list */ 2N/A%
/* empties table by deleting all entries and other associated data structures */ 2N/A%
/* Returns whether location is valid. */ 2N/A%
/* Returns table size. */ 2N/A%
/* Returns the first entry in table, also return its position in 2N/A% 'where'. Return NULL in both if no next entry is found. */ 2N/A%
/* Returns the next entry in table from 'prev', also return its position in 2N/A% 'newentry'. Return NULL in both if no next entry is found. */ 2N/A%
/* Returns entry at location 'where', NULL if location is invalid. */ 2N/A%
/* Adds given entry to table in first available slot (either look in freelist 2N/A% or add to end of table) and return the the position of where the record 2N/A% is placed. 'count' is incremented if entry is added. Table may grow 2N/A% as a side-effect of the addition. Copy is made of the input. */ 2N/A%
/* Replaces object at specified location by given entry. 2N/A% Returns TRUE if replacement successful; FALSE otherwise. 2N/A% There must something already at the specified location, otherwise, 2N/A% replacement fails. Copy is not made of the input. 2N/A% The pre-existing entry is freed.*/ 2N/A%
/* Deletes entry at specified location. Returns TRUE if location is valid; 2N/A% FALSE if location is invalid, or the freed location cannot be added to 2N/A% the freelist. 'count' is decremented if the deletion occurs. The object 2N/A% at that location is freed. */ 2N/A%
/* Returns statistics of table. 2N/A% <table_size><last_used><count>[freelist]. 2N/A% It is up to the caller to free the returned vector when his is through 2N/A% The free list is included if 'fl' is TRUE. */ 2N/A%
/* Configure LDAP mapping */ 2N/A%
/* Initialize the mapping structure with default values */ 2N/A%
/* Check if entry at 'loc' is valid (not expired) */ 2N/A%
/* Update expiration time if supplied object same as the one at 'loc' */ 2N/A%
/* Set expiration time for entry */ 2N/A%
/* Enable enum mode */ 2N/A%
/* Clear enum mode */ 2N/A%
/* End enum mode, return array of untouched entries */ 2N/A%
/* Mark the indicated entry used for enum purposes */ 2N/A%
/* Add entry to enumIndex array */ 2N/A%
/* Touch the indicated entry */ 2N/A%#
endif /* _DB_TABLE_H */