00001 /* 00002 * $Id$ 00003 * 00004 * Copyright (C) 2007-2008 1&1 Internet AG 00005 * 00006 * This file is part of SIP-router, a free SIP server. 00007 * 00008 * SIP-router is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version 00012 * 00013 * SIP-router 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 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 */ 00022 00030 #ifndef CR_CARRIER_H 00031 #define CR_CARRIER_H 00032 00033 #include <sys/types.h> 00034 #include "../../str.h" 00035 00036 00040 struct carrier_data_t { 00041 int id; 00042 str * name; 00043 struct domain_data_t ** domains; 00044 size_t domain_num; 00045 size_t first_empty_domain; 00046 }; 00047 00048 00059 struct carrier_data_t * create_carrier_data(int carrier_id, str *carrier_name, int domains); 00060 00061 00067 void destroy_carrier_data(struct carrier_data_t *carrier_data); 00068 00069 00080 int add_domain_data(struct carrier_data_t * carrier_data, struct domain_data_t * domain_data, int index); 00081 00082 00092 struct domain_data_t *get_domain_data(struct carrier_data_t * carrier_data, int domain_id); 00093 00094 00101 int compare_carrier_data(const void *v1, const void *v2); 00102 00103 00104 #endif
1.7.1