feat(onvif): 添加通知存储

This commit is contained in:
2024-08-26 15:21:47 +08:00
parent ff5cc66a55
commit 0ef8af021f
4 changed files with 22 additions and 4 deletions

View File

@ -43,10 +43,11 @@ func NotifyCallback(c *gin.Context) {
return
}
// TODO: handle notifications
for _, msg := range envelope.Body.Content.(*event.Notify).NotificationMessage {
log.Printf("Topic: %s, Message: %s", msg.Topic.TopicKinds, msg.Message.Message)
}
onvif.Notifications[xaddr] = append(onvif.Notifications[xaddr], notify.NotificationMessage...)
//for _, msg := range envelope.Body.Content.(*event.Notify).NotificationMessage {
// log.Printf("Topic: %s, Message: %s", msg.Topic.TopicKinds, msg.Message.Message)
//}
response.NewResponse().Success().Send(c)
}