Jan Luebbe | faaa49c | 2008-12-27 01:07:07 +0000 | [diff] [blame] | 1 | /* (C) 2008 by Jan Luebbe <jluebbe@debian.org> |
| 2 | * All Rights Reserved |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along |
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | #ifndef _DB_H |
| 21 | #define _DB_H |
| 22 | |
Jan Luebbe | 5c15c85 | 2008-12-27 15:59:25 +0000 | [diff] [blame] | 23 | #include <sys/types.h> |
Jan Luebbe | faaa49c | 2008-12-27 01:07:07 +0000 | [diff] [blame] | 24 | |
Jan Luebbe | 5c15c85 | 2008-12-27 15:59:25 +0000 | [diff] [blame] | 25 | #include <openbsc/gsm_subscriber.h> |
Jan Luebbe | faaa49c | 2008-12-27 01:07:07 +0000 | [diff] [blame] | 26 | |
Holger Freyther | bde3610 | 2008-12-28 22:51:39 +0000 | [diff] [blame] | 27 | int db_init(const char *name); |
Jan Luebbe | faaa49c | 2008-12-27 01:07:07 +0000 | [diff] [blame] | 28 | int db_prepare(); |
| 29 | int db_fini(); |
| 30 | |
Jan Luebbe | 5c15c85 | 2008-12-27 15:59:25 +0000 | [diff] [blame] | 31 | struct gsm_subscriber* db_create_subscriber(char imsi[GSM_IMSI_LENGTH]); |
| 32 | int db_get_subscriber(enum gsm_subscriber_field field, struct gsm_subscriber* subscriber); |
| 33 | int db_set_subscriber(struct gsm_subscriber* subscriber); |
| 34 | int db_subscriber_alloc_tmsi(struct gsm_subscriber* subscriber); |
Jan Luebbe | fac25fc | 2008-12-27 18:04:34 +0000 | [diff] [blame] | 35 | int db_subscriber_assoc_imei(struct gsm_subscriber* subscriber, char imei[GSM_IMEI_LENGTH]); |
Jan Luebbe | faaa49c | 2008-12-27 01:07:07 +0000 | [diff] [blame] | 36 | |
| 37 | #endif /* _DB_H */ |