stubbed GetDeletionReason

This commit is contained in:
Jonathan Barrow 2021-12-31 09:24:51 -05:00
parent 973d163563
commit a0102cef97
2 changed files with 43 additions and 0 deletions

42
get_deletion_reason.go Normal file
View File

@ -0,0 +1,42 @@
package main
import (
nex "github.com/PretendoNetwork/nex-go"
nexproto "github.com/PretendoNetwork/nex-protocols-go"
)
func getDeletionReason(err error, client *nex.Client, callID uint32, dataIdLst []uint64) {
// TODO: Complete this
pDeletionReasons := make([]uint32, 0)
for range dataIdLst {
// We don't need the values right now
// stub this
pDeletionReasons = append(pDeletionReasons, 0x690007)
}
rmcResponseStream := nex.NewStreamOut(nexServer)
rmcResponseStream.WriteListUInt32LE(pDeletionReasons)
rmcResponseBody := rmcResponseStream.Bytes()
rmcResponse := nex.NewRMCResponse(nexproto.DataStoreSMMProtocolID, callID)
rmcResponse.SetSuccess(nexproto.DataStoreSMMMethodGetDeletionReason, rmcResponseBody)
rmcResponseBytes := rmcResponse.Bytes()
responsePacket, _ := nex.NewPacketV1(client, nil)
responsePacket.SetVersion(1)
responsePacket.SetSource(0xA1)
responsePacket.SetDestination(0xAF)
responsePacket.SetType(nex.DataPacket)
responsePacket.SetPayload(rmcResponseBytes)
responsePacket.AddFlag(nex.FlagNeedsAck)
responsePacket.AddFlag(nex.FlagReliable)
nexServer.Send(responsePacket)
}

View File

@ -84,6 +84,7 @@ func main() {
dataStoreSmmServer.UploadCourseRecord(uploadCourseRecord)
dataStoreSmmServer.GetCourseRecord(getCourseRecord)
dataStoreSmmServer.GetApplicationConfigString(getApplicationConfigString)
dataStoreSmmServer.GetDeletionReason(getDeletionReason)
dataStoreSmmServer.GetMetasWithCourseRecord(getMetasWithCourseRecord)
dataStoreSmmServer.CheckRateCustomRankingCounter(checkRateCustomRankingCounter)
dataStoreSmmServer.CTRPickUpCourseSearchObject(ctrPickUpCourseSearchObject)