transport: Retain knowledge of setting and clearing of events

The protocol layer now just filters the events based on the version of
the protocol in use, and leaves it to the transport layer to manage how
the resulting state is represented. For the moment this simply moves
manipulation of bmc_events in struct mbox_context down in to the
transport layer.

Change-Id: Iff1df934505dc9c769be3d376396d425fb4e8264
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/transport_mbox.c b/transport_mbox.c
index 24d4734..671e1c4 100644
--- a/transport_mbox.c
+++ b/transport_mbox.c
@@ -121,8 +121,25 @@
 	return 0;
 }
 
+static int transport_mbox_set_events(struct mbox_context *context,
+				     uint8_t events)
+{
+	context->bmc_events |= events;
+
+	return transport_mbox_flush_events(context);
+}
+
+static int transport_mbox_clear_events(struct mbox_context *context,
+				       uint8_t events)
+{
+	context->bmc_events &= ~events;
+
+	return transport_mbox_flush_events(context);
+}
+
 static const struct transport_ops transport_mbox_ops = {
-	.flush_events = transport_mbox_flush_events,
+	.set_events = transport_mbox_set_events,
+	.clear_events = transport_mbox_clear_events,
 };
 
 /* Command Handlers */