pdb_server_backend.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 _PDB_SERVER_BACKEND_H_
00022 #define _PDB_SERVER_BACKEND_H_
00023 
00024 
00025 
00026 
00027 #include "common.h"
00028 
00029 
00030 
00031 
00032 /*
00033  Initializes the backend and loads the required data from the given file.
00034  Returns 0 on success, -1 otherwise.
00035 */
00036 int init_backend(char *filename);
00037 
00038 /*
00039  Finds the carrier id for the given number and returns it.
00040  Returns 0 if not found.
00041 */
00042 carrier_t lookup_number(char *number);
00043 
00044 
00045 
00046 
00047 #endif