protocol

package
v1.0.58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2023 License: AGPL-3.0 Imports: 1 Imported by: 5

Documentation

Overview

Package protocol implements the Notifications protocol

Package protocol implements the Notifications protocol

Package protocol implements the Notifications protocol

Package protocol implements the Notfications protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the Nintendo Notifications protocol
	ProtocolID = 0xE

	// MethodProcessNotificationEvent is the method ID for the method ProcessNotificationEvent
	MethodProcessNotificationEvent = 0x1
)

Variables

View Source
var NotificationCategories = notificationCategories{
	Participation:                3,
	OwnershipChanged:             4,
	RequestJoinGathering:         101,
	EndGathering:                 102,
	GatheringUnregistered:        109,
	HostChanged:                  110,
	ServiceItemRequestCompleted:  115,
	MatchmakeRefereeRoundStarted: 116,
	SystemPasswordChanged:        120,
	SystemPasswordCleared:        121,
	SwitchGathering:              122,
}

NotificationCategories is a list of all the categories a notification can be in the Notifications protocol

Not all of these are categories, some are stand-alone types This is a design choice made by NEX, not us

View Source
var NotificationSubTypes = notificationSubTypes{
	Participation: notificationParticipationSubTypes{
		None:           0,
		NewParticipant: 1,
		Cancelled:      2,
		Disconnected:   7,
		Ended:          8,
	},
	OwnershipChanged: notificationsOwnershipChangedSubTypes{
		None: 0,
	},
	RequestJoinGathering: notificationsRequestJoinGatheringSubTypes{
		None: 0,
	},
	EndGathering: notificationsEndGatheringSubTypes{
		None: 0,
	},
	GatheringUnregistered: notificationsGatheringUnregisteredSubTypes{
		None: 0,
	},
	HostChanged: notificationsHostChangedSubTypes{
		None: 0,
	},
	ServiceItemRequestCompleted: notificationsServiceItemRequestCompletedSubTypes{
		None: 0,
	},
	MatchmakeRefereeRoundStarted: notificationsMatchmakeRefereeRoundStartedSubTypes{
		None: 0,
	},
	SystemPasswordChanged: notificationsSystemPasswordChangedSubTypes{
		None: 0,
	},
	SystemPasswordCleared: notificationsSystemPasswordClearedSubTypes{
		None: 0,
	},
	SwitchGathering: notificationsSwitchGatheringSubTypes{
		None: 0,
	},
}

NotificationSubTypes is a list of all the subtypes a notification can be in a given category of the Notifications protocol

Not all categories have subtypes

Functions

func BuildNotificationType added in v1.0.35

func BuildNotificationType(category, subtype uint32) uint32

BuildNotificationType builds a combined type for NotificationEvents using a category and subtype

Types

type Protocol added in v1.0.45

type Protocol struct {
	Server *nex.Server
}

Protocol handles the Notifications protocol

func NewProtocol added in v1.0.45

func NewProtocol(server *nex.Server) *Protocol

NewProtocol returns a new Notifications protocol

func (*Protocol) Setup added in v1.0.45

func (protocol *Protocol) Setup()

Setup initializes the protocol

Directories

Path Synopsis
Package types implements all the types used by the Notifications protocol
Package types implements all the types used by the Notifications protocol

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL