protocol

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package protocol implements the AAUser protocol

Package protocol implements the AAUser protocol

Package protocol implements the AAUser protocol

Package protocol implements the AAUser protocol

Package protocol implements the AAUser protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the AAUser protocol
	ProtocolID = 0x7B

	// MethodRegisterApplication is the method ID for the method RegisterApplication
	MethodRegisterApplication = 0x1

	// MethodUnregisterApplication is the method ID for the method UnregisterApplication
	MethodUnregisterApplication = 0x2

	// MethodSetApplicationInfo is the method ID for the method RegisterApplication
	MethodSetApplicationInfo = 0x3

	// MethodGetApplicationInfo is the method ID for the method GetApplicationInfo
	MethodGetApplicationInfo = 0x4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Endpoint() nex.EndpointInterface
	SetEndpoint(endpoint nex.EndpointInterface)
	SetHandlerRegisterApplication(handler func(err error, packet nex.PacketInterface, callID uint32, titleID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerUnregisterApplication(handler func(err error, packet nex.PacketInterface, callID uint32, titleID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerSetApplicationInfo(handler func(err error, packet nex.PacketInterface, callID uint32, applicationInfo *types.List[*aauser_types.ApplicationInfo]) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetApplicationInfo(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
}

Interface implements the methods present on the AAUser Protocol struct

type Protocol

type Protocol struct {
	RegisterApplication   func(err error, packet nex.PacketInterface, callID uint32, titleID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	UnregisterApplication func(err error, packet nex.PacketInterface, callID uint32, titleID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	SetApplicationInfo    func(err error, packet nex.PacketInterface, callID uint32, applicationInfo *types.List[*aauser_types.ApplicationInfo]) (*nex.RMCMessage, *nex.Error)
	GetApplicationInfo    func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	Patches               nex.ServiceProtocol
	PatchedMethods        []uint32
	// contains filtered or unexported fields
}

Protocol stores all the RMC method handlers for the AAUser protocol and listens for requests

func NewProtocol

func NewProtocol() *Protocol

NewProtocol returns a new AAUser protocol

func (*Protocol) Endpoint

func (protocol *Protocol) Endpoint() nex.EndpointInterface

Endpoint returns the endpoint implementing the protocol

func (*Protocol) HandlePacket

func (protocol *Protocol) HandlePacket(packet nex.PacketInterface)

HandlePacket sends the packet to the correct RMC method handler

func (*Protocol) SetEndpoint

func (protocol *Protocol) SetEndpoint(endpoint nex.EndpointInterface)

SetEndpoint sets the endpoint implementing the protocol

func (*Protocol) SetHandlerGetApplicationInfo

func (protocol *Protocol) SetHandlerGetApplicationInfo(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))

SetHandlerGetApplicationInfo sets the handler for the GetApplicationInfo method

func (*Protocol) SetHandlerRegisterApplication

func (protocol *Protocol) SetHandlerRegisterApplication(handler func(err error, packet nex.PacketInterface, callID uint32, titleID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerRegisterApplication sets the handler for the RegisterApplication method

func (*Protocol) SetHandlerSetApplicationInfo

func (protocol *Protocol) SetHandlerSetApplicationInfo(handler func(err error, packet nex.PacketInterface, callID uint32, applicationInfo *types.List[*aauser_types.ApplicationInfo]) (*nex.RMCMessage, *nex.Error))

SetHandlerSetApplicationInfo sets the handler for the SetApplicationInfo method

func (*Protocol) SetHandlerUnregisterApplication

func (protocol *Protocol) SetHandlerUnregisterApplication(handler func(err error, packet nex.PacketInterface, callID uint32, titleID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerUnregisterApplication sets the handler for the UnregisterApplication method

Directories

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

Jump to

Keyboard shortcuts

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