summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb/mobile/primitives.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/mobile/primitives.h')
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/primitives.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
index a3168b2e..4d81ba10 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
@@ -14,6 +14,8 @@ struct mobile_prim;
enum mobile_prims {
PRIM_MOB_TIMER,
PRIM_MOB_TIMER_CANCEL,
+ PRIM_MOB_STARTED,
+ PRIM_MOB_SHUTDOWN,
};
struct mobile_prim_intf {
@@ -21,6 +23,7 @@ struct mobile_prim_intf {
void (*indication)(struct mobile_prim_intf *, struct mobile_prim *prim);
/* Internal state */
+ struct llist_head entry;
struct llist_head timers;
};
@@ -33,16 +36,36 @@ struct mobile_timer_param {
int seconds; /*!< Seconds the timer should fire in */
};
+/**
+ * Primitive to indicate starting of the mobile.
+ */
+struct mobile_started_param {
+ bool started;
+};
+
+/**
+ * Primitive to indicate shutdown of the mobile. It will go through
+ * various states.
+ */
+struct mobile_shutdown_param {
+ int old_state;
+ int new_state;
+};
+
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;
} 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);
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