SocketNotificationData
struct SocketNotificationData : Content
Informs Notification WebSocket clients of a new notification.
Each notification is delivered as a JSON string, containing a type of announcement and a string appropriate for displaying to the user. The string will be of the form, “User @authorName wrote a forum post that mentioned you.”
-
Declaration
Swift
enum NotificationTypeData : Content
-
The type of event that happened. See
SocketNotificationData.NotificationTypeData
for values.Declaration
Swift
var type: NotificationTypeData
-
A string describing what happened, suitable for adding to a notification alert.
Declaration
Swift
var info: String
-
An ID of an Announcement, Fez, Twarrt, ForumPost, or Event.
Declaration
Swift
var contentID: String
-
For .incomingPhoneCall notifications, the caller.
Declaration
Swift
var caller: UserHeader?
-
For .incomingPhoneCall notification,s the caller’s IP addresses. May be nil, in which case the receiver opens a server socket instead.
Declaration
Swift
var callerAddress: PhoneSocketServerAddress?
-
Declaration
Swift
init(_ type: NotificationType, info: String, id: String)
-
Declaration
Swift
init(callID: UUID, caller: UserHeader, callerAddr: PhoneSocketServerAddress?)
-
Declaration
Swift
init(forCallEnded: UUID)
-
Declaration
Swift
init(forCallAnswered: UUID)