struct bt_object base;
enum bt_notification_type type;
get_stream_func get_stream;
+ uint64_t seq_num;
bt_bool frozen;
};
+#define BT_ASSERT_PRE_NOTIF_IS_TYPE(_notif, _type) \
+ BT_ASSERT_PRE((_notif)->type == (_type), \
+ "Notification has the wrong type: expected-type=%s, " \
+ "%![notif-]+n", bt_notification_type_string(_type), \
+ (_notif))
+
BT_HIDDEN
void bt_notification_init(struct bt_notification *notification,
enum bt_notification_type type,
const char *bt_notification_type_string(enum bt_notification_type type)
{
switch (type) {
- case BT_NOTIFICATION_TYPE_SENTINEL:
- return "BT_NOTIFICATION_TYPE_SENTINEL";
case BT_NOTIFICATION_TYPE_UNKNOWN:
return "BT_NOTIFICATION_TYPE_UNKNOWN";
- case BT_NOTIFICATION_TYPE_ALL:
- return "BT_NOTIFICATION_TYPE_ALL";
case BT_NOTIFICATION_TYPE_EVENT:
return "BT_NOTIFICATION_TYPE_EVENT";
case BT_NOTIFICATION_TYPE_INACTIVITY: