00001 /* 00002 * Prefix Route Module - tree search interface 00003 * 00004 * Copyright (C) 2007 Alfred E. Heggestad 00005 * Copyright (C) 2008 Telio Telecom AS 00006 * 00007 * This file is part of ser, a free SIP server. 00008 * 00009 * ser is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version 00013 * 00014 * For a license to use the ser software under conditions 00015 * other than those described here, or to purchase support for this 00016 * software, please contact iptel.org by e-mail at the following addresses: 00017 * info@iptel.org 00018 * 00019 * ser is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License 00025 * along with this program; if not, write to the Free Software 00026 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00027 */ 00028 00029 00030 struct tree_item; 00031 00032 struct tree_item *tree_item_alloc(void); 00033 void tree_item_free(struct tree_item *item); 00034 int tree_item_add(struct tree_item *root, const char *prefix, 00035 const char *route, int route_ix); 00036 int tree_item_get(const struct tree_item *root, const str *user); 00037 void tree_item_print(const struct tree_item *item, FILE *f, int level); 00038 00039 00040 struct tree; 00041 00042 int tree_init(void); 00043 void tree_close(void); 00044 int tree_swap(struct tree_item *root); 00045 int tree_route_get(const str *user); 00046 void tree_print(FILE *f);
1.7.1