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: 1

Documentation

Overview

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Package protocol implements the Utility protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the Utility protocol
	ProtocolID = 0x6E

	// MethodAcquireNexUniqueID is the method ID for the method AcquireNexUniqueID
	MethodAcquireNexUniqueID = 0x1

	// MethodAcquireNexUniqueIDWithPassword is the method ID for the method AcquireNexUniqueIDWithPassword
	MethodAcquireNexUniqueIDWithPassword = 0x2

	// MethodAssociateNexUniqueIDWithMyPrincipalID is the method ID for the method AssociateNexUniqueIDWithMyPrincipalID
	MethodAssociateNexUniqueIDWithMyPrincipalID = 0x3

	// MethodAssociateNexUniqueIDsWithMyPrincipalID is the method ID for the method AssociateNexUniqueIDsWithMyPrincipalID
	MethodAssociateNexUniqueIDsWithMyPrincipalID = 0x4

	// MethodGetAssociatedNexUniqueIDWithMyPrincipalID is the method ID for the method GetAssociatedNexUniqueIDWithMyPrincipalID
	MethodGetAssociatedNexUniqueIDWithMyPrincipalID = 0x5

	// MethodGetAssociatedNexUniqueIDsWithMyPrincipalID is the method ID for the method GetAssociatedNexUniqueIDsWithMyPrincipalID
	MethodGetAssociatedNexUniqueIDsWithMyPrincipalID = 0x6

	// MethodGetIntegerSettings is the method ID for the method GetIntegerSettings
	MethodGetIntegerSettings = 0x7

	// MethodGetStringSettings is the method ID for the method GetStringSettings
	MethodGetStringSettings = 0x8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Endpoint() nex.EndpointInterface
	SetEndpoint(endpoint nex.EndpointInterface)
	SetHandlerAcquireNexUniqueID(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
	SetHandlerAcquireNexUniqueIDWithPassword(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
	SetHandlerAssociateNexUniqueIDWithMyPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32, uniqueIDInfo *utility_types.UniqueIDInfo) (*nex.RMCMessage, *nex.Error))
	SetHandlerAssociateNexUniqueIDsWithMyPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32, uniqueIDInfo *types.List[*utility_types.UniqueIDInfo]) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetAssociatedNexUniqueIDWithMyPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetAssociatedNexUniqueIDsWithMyPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetIntegerSettings(handler func(err error, packet nex.PacketInterface, callID uint32, integerSettingIndex *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetStringSettings(handler func(err error, packet nex.PacketInterface, callID uint32, stringSettingIndex *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error))
}

Interface implements the methods present on the Utility protocol struct

type Protocol

type Protocol struct {
	AcquireNexUniqueID                         func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	AcquireNexUniqueIDWithPassword             func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	AssociateNexUniqueIDWithMyPrincipalID      func(err error, packet nex.PacketInterface, callID uint32, uniqueIDInfo *utility_types.UniqueIDInfo) (*nex.RMCMessage, *nex.Error)
	AssociateNexUniqueIDsWithMyPrincipalID     func(err error, packet nex.PacketInterface, callID uint32, uniqueIDInfo *types.List[*utility_types.UniqueIDInfo]) (*nex.RMCMessage, *nex.Error)
	GetAssociatedNexUniqueIDWithMyPrincipalID  func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	GetAssociatedNexUniqueIDsWithMyPrincipalID func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	GetIntegerSettings                         func(err error, packet nex.PacketInterface, callID uint32, integerSettingIndex *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error)
	GetStringSettings                          func(err error, packet nex.PacketInterface, callID uint32, stringSettingIndex *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error)
	Patches                                    nex.ServiceProtocol
	PatchedMethods                             []uint32
	// contains filtered or unexported fields
}

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

func NewProtocol

func NewProtocol() *Protocol

NewProtocol returns a new Utility 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) SetHandlerAcquireNexUniqueID

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

SetHandlerAcquireNexUniqueID sets the handler for the AcquireNexUniqueID method

func (*Protocol) SetHandlerAcquireNexUniqueIDWithPassword

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

SetHandlerAcquireNexUniqueIDWithPassword sets the handler for the AcquireNexUniqueIDWithPassword method

func (*Protocol) SetHandlerAssociateNexUniqueIDWithMyPrincipalID

func (protocol *Protocol) SetHandlerAssociateNexUniqueIDWithMyPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32, uniqueIDInfo *utility_types.UniqueIDInfo) (*nex.RMCMessage, *nex.Error))

SetHandlerAssociateNexUniqueIDWithMyPrincipalID sets the handler for the AssociateNexUniqueIDWithMyPrincipalID method

func (*Protocol) SetHandlerAssociateNexUniqueIDsWithMyPrincipalID

func (protocol *Protocol) SetHandlerAssociateNexUniqueIDsWithMyPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32, uniqueIDInfo *types.List[*utility_types.UniqueIDInfo]) (*nex.RMCMessage, *nex.Error))

SetHandlerAssociateNexUniqueIDsWithMyPrincipalID sets the handler for the AssociateNexUniqueIDsWithMyPrincipalID method

func (*Protocol) SetHandlerGetAssociatedNexUniqueIDWithMyPrincipalID

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

SetHandlerGetAssociatedNexUniqueIDWithMyPrincipalID sets the handler for the GetAssociatedNexUniqueIDWithMyPrincipalID method

func (*Protocol) SetHandlerGetAssociatedNexUniqueIDsWithMyPrincipalID

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

SetHandlerGetAssociatedNexUniqueIDsWithMyPrincipalID sets the handler for the GetAssociatedNexUniqueIDsWithMyPrincipalID method

func (*Protocol) SetHandlerGetIntegerSettings

func (protocol *Protocol) SetHandlerGetIntegerSettings(handler func(err error, packet nex.PacketInterface, callID uint32, integerSettingIndex *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error))

SetHandlerGetIntegerSettings sets the handler for the GetIntegerSettings method

func (*Protocol) SetHandlerGetStringSettings

func (protocol *Protocol) SetHandlerGetStringSettings(handler func(err error, packet nex.PacketInterface, callID uint32, stringSettingIndex *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error))

SetHandlerGetStringSettings sets the handler for the GetStringSettings method

Directories

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

Jump to

Keyboard shortcuts

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