Holger Freyther | 2b2d2e3 | 2009-02-14 22:51:00 +0000 | [diff] [blame] | 1 | /* Generic signalling/notification infrastructure */ |
| 2 | /* (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org> |
| 3 | * All Rights Reserved |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #ifndef OPENBSC_SIGNAL_H |
| 22 | #define OPENBSC_SIGNAL_H |
| 23 | |
| 24 | #include <openbsc/gsm_data.h> |
| 25 | #include <openbsc/gsm_subscriber.h> |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | * Signalling areas |
| 30 | */ |
| 31 | #define S_PAGING 0x0001 |
| 32 | |
| 33 | |
| 34 | struct signal_data { |
Holger Freyther | e4b3fa3 | 2009-02-14 22:51:10 +0000 | [diff] [blame] | 35 | int area; |
Holger Freyther | 2b2d2e3 | 2009-02-14 22:51:00 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | |
| 39 | struct paging_signal_data { |
| 40 | struct signal_data data; |
| 41 | |
| 42 | struct gsm_subscriber *subscr; |
| 43 | struct gsm_bts *bts; |
| 44 | |
| 45 | /* NULL in case the paging didn't work */ |
| 46 | struct gsm_lchan *lchan; |
| 47 | }; |
| 48 | |
| 49 | |
| 50 | /* Management */ |
| 51 | void register_signal_handler(int areas, int (*sig)(struct signal_data *, void *data), void *data); |
Holger Freyther | e4b3fa3 | 2009-02-14 22:51:10 +0000 | [diff] [blame] | 52 | void remove_signal_handler(int areas, int (*sig)(struct signal_data *, void *data), void *data); |
Holger Freyther | 2b2d2e3 | 2009-02-14 22:51:00 +0000 | [diff] [blame] | 53 | |
| 54 | /* Dispatch */ |
Holger Freyther | e4b3fa3 | 2009-02-14 22:51:10 +0000 | [diff] [blame] | 55 | void dispatch_signal(struct signal_data *data); |
Holger Freyther | 2b2d2e3 | 2009-02-14 22:51:00 +0000 | [diff] [blame] | 56 | |
| 57 | |
| 58 | #endif |