carrier.h

00001 /*
00002  * Copyright (C) 2009 1&1 Internet AG
00003  *
00004  * This file is part of sip-router, a free SIP server.
00005  *
00006  * sip-router is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version
00010  *
00011  * sip-router is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License 
00017  * along with this program; if not, write to the Free Software 
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 #ifndef _CARRIER_H_
00022 #define _CARRIER_H_
00023 
00024 
00025 
00026 
00027 #include "common.h"
00028 
00029 
00030 
00031 
00032 /*
00033  Initializes data structures.
00034  Must be called before any of the other functions!
00035  Returns 0 on success, -1 otherwise.
00036 */
00037 void init_carrier_names();
00038 
00039 /*
00040  Loads carrier names from a file.
00041  Format: "D[0-9][0-9][0-9] <name>".
00042 */
00043 int load_carrier_names(char *filename);
00044 
00045 /*
00046   Returns a name for the given carrier id.
00047   Always returns a string, even if id is invalid or the id is unknown.
00048 */
00049 char *carrierid2name(carrier_t carrier);
00050 
00051 
00052 
00053 
00054 #endif