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

Documentation

Overview

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Package protocol implements the DataStorePokemonBank protocol

Index

Constants

View Source
const (
	// ProtocolID is the Protocol ID for the DataStore (Pokemon Bank) 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

	// MethodGetTransactionParam is the method ID for the GetTransactionParam method
	MethodGetTransactionParam = 0x30

	// MethodPreparePostBankObject is the method ID for the PreparePostBankObject method
	MethodPreparePostBankObject = 0x31

	// MethodCompletePostBankObject is the method ID for the CompletePostBankObject method
	MethodCompletePostBankObject = 0x32

	// MethodPrepareGetBankObject is the method ID for the PrepareGetBankObject method
	MethodPrepareGetBankObject = 0x33

	// MethodPrepareUpdateBankObject is the method ID for the PrepareUpdateBankObject method
	MethodPrepareUpdateBankObject = 0x34

	// MethodCompleteUpdateBankObject is the method ID for the CompleteUpdateBankObject method
	MethodCompleteUpdateBankObject = 0x35

	// MethodRollbackBankObject is the method ID for the RollbackBankObject method
	MethodRollbackBankObject = 0x36

	// MethodGetUnlockKey is the method ID for the GetUnlockKey method
	MethodGetUnlockKey = 0x37

	// MethodRequestMigration is the method ID for the RequestMigration method
	MethodRequestMigration = 0x38
)

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 Bank) protocol and listens for requests Embeds the DataStore protocol

func NewProtocol

func NewProtocol(server *nex.Server) *Protocol

NewProtocol returns a new DataStorePokemonBank protocol

func (*Protocol) CompletePostBankObject

func (protocol *Protocol) CompletePostBankObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreCompletePostParam) uint32)

CompletePostBankObject sets the CompletePostBankObject handler function

func (*Protocol) CompleteUpdateBankObject

func (protocol *Protocol) CompleteUpdateBankObject(handler func(err error, packet nex.PacketInterface, callID uint32, slotID uint16, transactionParam *datastore_pokemon_bank_types.BankTransactionParam, isForce bool) uint32)

CompleteUpdateBankObject sets the CompleteUpdateBankObject handler function

func (*Protocol) DeletePokemon

func (protocol *Protocol) DeletePokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_bank_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_bank_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_bank_types.GlobalTradeStationDownloadOtherPokemonParam) uint32)

DownloadOtherPokemon sets the DownloadOtherPokemon handler function

func (*Protocol) GetTransactionParam

func (protocol *Protocol) GetTransactionParam(handler func(err error, packet nex.PacketInterface, callID uint32, slotID uint16) uint32)

GetTransactionParam sets the GetTransactionParam handler function

func (*Protocol) GetUnlockKey

func (protocol *Protocol) GetUnlockKey(handler func(err error, packet nex.PacketInterface, callID uint32, challengeValue uint32) uint32)

GetUnlockKey sets the GetUnlockKey handler function

func (*Protocol) HandlePacket

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

HandlePacket sends the packet to the correct RMC method handler

func (*Protocol) PrepareGetBankObject

func (protocol *Protocol) PrepareGetBankObject(handler func(err error, packet nex.PacketInterface, callID uint32, slotID uint16, applicationID uint16) uint32)

PrepareGetBankObject sets the PrepareGetBankObject handler function

func (*Protocol) PreparePostBankObject

func (protocol *Protocol) PreparePostBankObject(handler func(err error, packet nex.PacketInterface, callID uint32, slotID uint16, size uint32) uint32)

PreparePostBankObject sets the PreparePostBankObject handler function

func (*Protocol) PrepareTradePokemon

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

PrepareTradePokemon sets the PrepareTradePokemon handler function

func (*Protocol) PrepareUpdateBankObject

func (protocol *Protocol) PrepareUpdateBankObject(handler func(err error, packet nex.PacketInterface, callID uint32, transactionParam *datastore_pokemon_bank_types.BankTransactionParam) uint32)

PrepareUpdateBankObject sets the PrepareUpdateBankObject handler function

func (*Protocol) RequestMigration

func (protocol *Protocol) RequestMigration(handler func(err error, packet nex.PacketInterface, callID uint32, oneTimePassword string, boxes []uint32) uint32)

RequestMigration sets the RequestMigration handler function

func (*Protocol) RollbackBankObject

func (protocol *Protocol) RollbackBankObject(handler func(err error, packet nex.PacketInterface, callID uint32, slotID uint16, transactionParam *datastore_pokemon_bank_types.BankTransactionParam, isForce bool) uint32)

RollbackBankObject sets the RollbackBankObject handler function

func (*Protocol) SearchPokemon

func (protocol *Protocol) SearchPokemon(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_pokemon_bank_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_bank_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_bank_types.GlobalTradeStationUploadPokemonParam) uint32)

UploadPokemon sets the UploadPokemon handler function

Directories

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

Jump to

Keyboard shortcuts

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