00001 /******************************************************************************/ 00002 /* XrdFfsDent.hh help functions to merge direntries */ 00003 /* */ 00004 /* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University */ 00005 /* All Rights Reserved */ 00006 /* Author: Wei Yang (SLAC National Accelerator Laboratory, 2009) */ 00007 /* Contract DE-AC02-76-SFO0515 with the Department of Energy */ 00008 /******************************************************************************/ 00009 00010 #include <string.h> 00011 #include <stdlib.h> 00012 #include <time.h> 00013 #include <pthread.h> 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 struct XrdFfsDentnames { 00020 char *name; 00021 struct XrdFfsDentnames *next; 00022 }; 00023 00024 void XrdFfsDent_names_del(struct XrdFfsDentnames **p); 00025 void XrdFfsDent_names_add(struct XrdFfsDentnames **p, char *name); 00026 void XrdFfsDent_names_join(struct XrdFfsDentnames **p, struct XrdFfsDentnames **n); 00027 int XrdFfsDent_names_extract(struct XrdFfsDentnames **p, char ***dnarray); 00028 00029 void XrdFfsDent_cache_init(); 00030 void XrdFfsDent_cache_destroy(); 00031 int XrdFfsDent_cache_fill(char *dname, char ***dnarray, int nents); 00032 int XrdFfsDent_cache_search(char *dname, char *dentname); 00033 00034 #ifdef __cplusplus 00035 } 00036 #endif 00037 00038