summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-11-17 15:45:12 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-12-03 12:58:52 +0000
commit714cb53282c89d50055a17b67047d50b03d69521 (patch)
treeeed4df09569286817505c123262a36673c6b1d5e /src/host/layer23/include/osmocom/bb
parent88060f462cde2e3e6f4fc3cbf9c3708083e27dac (diff)
mobile: Inform the primitive layer about status and new sms
Inform the layer about new SMS and inform about the cause of it. In both cases pass the SMS. Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161
Diffstat (limited to 'src/host/layer23/include/osmocom/bb')
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h6
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/primitives.h19
2 files changed, 24 insertions, 1 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
index a94d1aa7..d3074fb3 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
@@ -4,6 +4,12 @@
#define SMS_HDR_SIZE 128
#define SMS_TEXT_SIZE 256
+#include <stdint.h>
+#include <time.h>
+
+struct osmocom_ms;
+struct msgb;
+
struct gsm_sms {
unsigned long validity_minutes;
uint8_t reply_path_req;
diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
index 4d81ba10..6804fc0e 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
@@ -1,5 +1,7 @@
#pragma once
+#include <osmocom/bb/mobile/gsm411_sms.h>
+
#include <osmocom/core/prim.h>
struct mobile_prim;
@@ -16,6 +18,7 @@ enum mobile_prims {
PRIM_MOB_TIMER_CANCEL,
PRIM_MOB_STARTED,
PRIM_MOB_SHUTDOWN,
+ PRIM_MOB_SMS,
};
struct mobile_prim_intf {
@@ -52,15 +55,27 @@ struct mobile_shutdown_param {
int new_state;
};
+/**
+ * SMS related configs.
+ */
+struct mobile_sms_param {
+ struct gsm_sms sms;
+
+ bool cause_valid;
+ int cause;
+};
+
struct mobile_prim {
struct osmo_prim_hdr hdr; /*!< Primitive base class */
union {
struct mobile_timer_param timer;
struct mobile_started_param started;
struct mobile_shutdown_param shutdown;
+ struct mobile_sms_param sms;
} u;
};
+
struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms);
int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr);
void mobile_prim_intf_free(struct mobile_prim_intf *intf);
@@ -68,4 +83,6 @@ void mobile_prim_intf_free(struct mobile_prim_intf *intf);
struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op);
void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started);
-void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); \ No newline at end of file
+void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state);
+void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms);
+void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause);