X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=dcache.h;fp=dcache.h;h=1be01507ef832c701b14d28c9011046d4befd159;hb=1d1dd8f55a8b91e873db2f4255a1f1d9446e1bd0;hp=0000000000000000000000000000000000000000;hpb=9e83a47a9d9bd9a8020a80393e1f0e03bb34efe7;p=betaftpd diff --git a/dcache.h b/dcache.h new file mode 100644 index 0000000..1be0150 --- /dev/null +++ b/dcache.h @@ -0,0 +1,38 @@ +/* dcache.h: BetaFTPD directory cache prototypes + Copyright (C) 2000 Steinar H. Gunderson + + This program is is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, version 2 if the + License as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +/* doubly linked list of cached directory listings */ +struct dcache { + struct dcache *prev_dcache; + struct dcache *next_dcache; + + int use_count; + time_t last_used; + time_t generated; + + char dir_name[256]; + char pattern[256]; + struct list_options lo; + + char *dir_data; + int dir_size; +}; + +struct dcache *alloc_new_dcache(); +void time_out_dcache(); +void populate_dcache(struct ftran * const f, const char * const cwd, + const char * const pattern, const struct list_options * const lo);