00001 /** 00002 * @file ccn/extend_dict.h 00003 * 00004 * Dictionary extension routines 00005 * 00006 * Part of the CCNx C Library. 00007 * 00008 * Copyright (C) 2010 Palo Alto Research Center, Inc. 00009 * 00010 * This library is free software; you can redistribute it and/or modify it 00011 * under the terms of the GNU Lesser General Public License version 2.1 00012 * as published by the Free Software Foundation. 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. You should have received 00017 * a copy of the GNU Lesser General Public License along with this library; 00018 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 00019 * Fifth Floor, Boston, MA 02110-1301 USA. 00020 */ 00021 00022 #ifndef CCN_EXTEND_DICT_DEFINED 00023 #define CCN_EXTEND_DICT_DEFINED 00024 00025 #include <ccn/coding.h> 00026 00027 /* 00028 * Deallocate a dictionary freeing each of the strings and the structure itself 00029 */ 00030 00031 void ccn_destroy_dict(struct ccn_dict **dp); 00032 00033 /* 00034 * Create a dictionary that is a copy of the one passed in, extended with the 00035 * index and name pairs loaded from the file passed in. 00036 */ 00037 int ccn_extend_dict(const char *dict_file, struct ccn_dict *d, 00038 struct ccn_dict **rdp); 00039 00040 #endif