aboutsummaryrefslogtreecommitdiffstats
path: root/include/openbsc/signal.h
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-02-14 22:51:00 +0000
committerHolger Freyther <zecke@selfish.org>2009-02-14 22:51:00 +0000
commit2b2d2e350e2cf03ca2eb0a7e5c6a9d99b774c457 (patch)
tree1af6b33b83a65dec193e161fd910c3583ffafeee /include/openbsc/signal.h
parent09d38d3b618a11c25ae884f04692d97681f93479 (diff)
[signal] Add generic signal registration and dispatch...
This will be used for generic registration and dispatching of any kind of event. We will have different areas (like with the debug interface) and each layer can define their own struct for the event message... This is not tested yet
Diffstat (limited to 'include/openbsc/signal.h')
-rw-r--r--include/openbsc/signal.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/openbsc/signal.h b/include/openbsc/signal.h
new file mode 100644
index 000000000..6a0d6fb90
--- /dev/null
+++ b/include/openbsc/signal.h
@@ -0,0 +1,57 @@
+/* Generic signalling/notification infrastructure */
+/* (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef OPENBSC_SIGNAL_H
+#define OPENBSC_SIGNAL_H
+
+#include <openbsc/gsm_data.h>
+#include <openbsc/gsm_subscriber.h>
+
+
+/*
+ * Signalling areas
+ */
+#define S_PAGING 0x0001
+
+
+struct signal_data {
+};
+
+
+struct paging_signal_data {
+ struct signal_data data;
+
+ struct gsm_subscriber *subscr;
+ struct gsm_bts *bts;
+
+ /* NULL in case the paging didn't work */
+ struct gsm_lchan *lchan;
+};
+
+
+/* Management */
+void register_signal_handler(int areas, int (*sig)(struct signal_data *, void *data), void *data);
+void remove_signal_handler(int (*sig)(struct signal_data *, void *data), void *data);
+
+/* Dispatch */
+void dispatch_signal(int area, struct signal_data *data);
+
+
+#endif