/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* Cherokee * * Authors: * Alvaro Lopez Ortega * * Copyright (C) 2001-2007 Alvaro Lopez Ortega * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * 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 */ #ifndef CHEROKEE_ENCODER_TABLE_H #define CHEROKEE_ENCODER_TABLE_H #include "common-internal.h" #include "avl.h" #include "encoder.h" #include "matching_list.h" #include "module.h" typedef struct { cherokee_matching_list_t *matching; encoder_func_new_t func_new; } cherokee_encoder_table_entry_t; typedef cherokee_avl_t cherokee_encoder_table_t; #define ETABLE(x) ((cherokee_encoder_table_t *)(x)) /* Encoder table methods */ ret_t cherokee_encoder_table_init (cherokee_encoder_table_t *et); ret_t cherokee_encoder_table_mrproper (cherokee_encoder_table_t *et); ret_t cherokee_encoder_table_set (cherokee_encoder_table_t *et, cherokee_buffer_t *encoder, cherokee_encoder_table_entry_t *entry); ret_t cherokee_encoder_table_get (cherokee_encoder_table_t *et, char *encoder, cherokee_encoder_table_entry_t **entry); ret_t cherokee_encoder_table_new_encoder (cherokee_encoder_table_t *et, char *encoder, char *ext, cherokee_encoder_t **new_encoder); /* Encoder entry methods */ ret_t cherokee_encoder_table_entry_new (cherokee_encoder_table_entry_t **eentry); ret_t cherokee_encoder_table_entry_free (cherokee_encoder_table_entry_t *eentry); ret_t cherokee_encoder_table_entry_get_info (cherokee_encoder_table_entry_t *eentry, cherokee_plugin_info_t *info); int cherokee_encoder_entry_has_matching_list (cherokee_encoder_table_entry_t *eentry); ret_t cherokee_encoder_entry_set_matching_list (cherokee_encoder_table_entry_t *eentry, cherokee_matching_list_t *matching); ret_t cherokee_encoder_entry_get_matching_list (cherokee_encoder_table_entry_t *eentry, cherokee_matching_list_t **matching); #endif /* CHEROKEE_ENCODER_TABLE_H */