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: 6 Imported by: 0

Documentation

Overview

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Package protocol implements the DataStorePokemonGen6 protocol

Index

Constants

View Source
const (
	// ProtocolID is the Protocol ID for the DataStore (Pokemon Gen6) protocol
	ProtocolID = 0x73

	// MethodUploadPokemon is the method ID for the UploadPokemon method
	MethodUploadPokemon = 0x29

	// MethodSearchPokemon is the method ID for the SearchPokemon method
	MethodSearchPokemon = 0x2A

	// MethodPrepareTradePokemon is the method ID for the PrepareTradePokemon method
	MethodPrepareTradePokemon = 0x2B

	// MethodTradePokemon is the method ID for the TradePokemon method
	MethodTradePokemon = 0x2C

	// MethodDownloadOtherPokemon is the method ID for the DownloadOtherPokemon method
	MethodDownloadOtherPokemon = 0x2D

	// MethodDownloadMyPokemon is the method ID for the DownloadMyPokemon method
	MethodDownloadMyPokemon = 0x2E

	// MethodDeletePokemon is the method ID for the DeletePokemon method
	MethodDeletePokemon = 0x2F
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	Server *nex.Server
	// contains filtered or unexported fields
}

Protocol stores all the RMC method handlers for the DataStore (Pokemon Gen6) protocol and listens for requests Embeds the DataStore protocol

func NewProtocol

func NewProtocol(server *nex.Server) *Protocol

NewProtocol returns a new DataStorePokemonGen6 protocol

func (*Protocol) DeletePokemon

func (protocol *Protocol) DeletePokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationDeletePokemonParam) uint32)

DeletePokemon sets the DeletePokemon handler function

func (*Protocol) DownloadMyPokemon

func (protocol *Protocol) DownloadMyPokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationDownloadMyPokemonParam) uint32)

DownloadMyPokemon sets the DownloadMyPokemon handler function

func (*Protocol) DownloadOtherPokemon

func (protocol *Protocol) DownloadOtherPokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationDownloadOtherPokemonParam) uint32)

DownloadOtherPokemon sets the DownloadOtherPokemon handler function

func (*Protocol) HandlePacket

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

HandlePacket sends the packet to the correct RMC method handler

func (*Protocol) PrepareTradePokemon

func (protocol *Protocol) PrepareTradePokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationPrepareTradePokemonParam) uint32)

PrepareTradePokemon sets the PrepareTradePokemon handler function

func (*Protocol) SearchPokemon

func (protocol *Protocol) SearchPokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationSearchPokemonParam) uint32)

SearchPokemon sets the SearchPokemon handler function

func (*Protocol) Setup

func (protocol *Protocol) Setup()

Setup initializes the protocol

func (*Protocol) TradePokemon

func (protocol *Protocol) TradePokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationTradePokemonParam) uint32)

TradePokemon sets the TradePokemon handler function

func (*Protocol) UploadPokemon

func (protocol *Protocol) UploadPokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_gen6_types.GlobalTradeStationUploadPokemonParam) uint32)

UploadPokemon sets the UploadPokemon handler function

Directories

Path Synopsis
Package types implements all the types used by the DataStore (Pokemon Gen6) protocol
Package types implements all the types used by the DataStore (Pokemon Gen6) protocol

Jump to

Keyboard shortcuts

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