2002-07-19 03:00:24 +04:00
/*
* Unix SMB / CIFS implementation .
* Generic Abstract Data Types
2005-09-03 20:38:51 +04:00
* Copyright ( C ) Gerald Carter 2002 - 2005.
2002-07-19 03:00:24 +04:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
2007-07-09 23:25:36 +04:00
* the Free Software Foundation ; either version 3 of the License , or
2002-07-19 03:00:24 +04:00
* ( at your option ) any later version .
*
* 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
2007-07-10 09:23:25 +04:00
* along with this program ; if not , see < http : //www.gnu.org/licenses/>.
2002-07-19 03:00:24 +04:00
*/
# ifndef ADT_TREE_H
# define ADT_TREE_H
2010-02-07 17:47:07 +03:00
struct sorted_tree ;
2002-07-19 03:00:24 +04:00
2005-02-23 19:36:44 +03:00
/*
* API
*/
2005-09-03 20:38:51 +04:00
/* create a new tree, talloc_free() to throw it away */
2010-02-07 17:49:13 +03:00
struct sorted_tree * pathtree_init ( void * data_p ) ;
2005-02-23 19:36:44 +03:00
/* add a new path component */
2010-02-07 17:45:42 +03:00
WERROR pathtree_add ( struct sorted_tree * tree , const char * path , void * data_p ) ;
2005-02-23 19:36:44 +03:00
/* search path */
2010-02-07 17:45:42 +03:00
void * pathtree_find ( struct sorted_tree * tree , char * key ) ;
2005-02-23 19:36:44 +03:00
/* debug (print) functions */
2010-02-07 17:45:42 +03:00
void pathtree_print_keys ( struct sorted_tree * tree , int debug ) ;
2005-02-23 19:36:44 +03:00
2002-07-19 03:00:24 +04:00
# endif