mirror of
https://github.com/yibaiba/hideck.git
synced 2026-12-05 16:02:17 +00:00
Keep the latest RFC 3842 snapshot on the pool, attach it to device runtime JSON, and clear it when VoWiFi is disabled. Call-waiting notify is forwarded from the same dispatcher.
21 lines
646 B
Go
21 lines
646 B
Go
package device
|
||
|
||
import "time"
|
||
|
||
// Notifier 定义了设备池需要的事件通知接口,
|
||
// 用于解耦具体的通知实现(如 Telegram 或 Webhook)
|
||
type Notifier interface {
|
||
NotifySMS(deviceID, sender, content string, timestamp time.Time)
|
||
NotifyIPRotated(deviceID, oldIP, newIP string, duration time.Duration)
|
||
NotifyRaw(msg string)
|
||
}
|
||
|
||
type SMSSourceNotifier interface {
|
||
NotifySMSWithSource(deviceID, sender, content, source string, timestamp time.Time)
|
||
}
|
||
|
||
// IncomingCallNotifier is implemented by host notifiers that can surface a ring.
|
||
type IncomingCallNotifier interface {
|
||
NotifyIncomingCall(deviceID, caller, callee string)
|
||
}
|