mirror of
https://github.com/PretendoNetwork/friends.git
synced 2026-04-25 23:37:46 -05:00
Update Friends protocol definition to FriendsWiiU
This commit is contained in:
parent
8ad33060c2
commit
738b430d93
|
|
@ -34,8 +34,8 @@ func acceptFriendRequest(err error, client *nex.Client, callID uint32, id uint64
|
|||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
// Build response packet
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodAcceptFriendRequest, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodAcceptFriendRequest, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ func addFriendRequest(err error, client *nex.Client, callID uint32, pid uint32,
|
|||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
// Build response packet
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodAddFriendRequest, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodAddFriendRequest, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ func checkSettingStatus(err error, client *nex.Client, callID uint32) {
|
|||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
// Build response packet
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodCheckSettingStatus, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodCheckSettingStatus, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
func deletePersistentNotification(err error, client *nex.Client, callID uint32, notifications []*nexproto.PersistentNotification) {
|
||||
// TODO: Do something here
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodDeletePersistentNotification, nil)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodDeletePersistentNotification, nil)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ func getBasicInfo(err error, client *nex.Client, callID uint32, pids []uint32) {
|
|||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
// Build response packet
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodGetBasicInfo, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodGetBasicInfo, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ func getRequestBlockSettings(err error, client *nex.Client, callID uint32, pids
|
|||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
// Build response packet
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodGetRequestBlockSettings, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodGetRequestBlockSettings, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ func markFriendRequestsAsReceived(err error, client *nex.Client, callID uint32,
|
|||
setFriendRequestReceived(id)
|
||||
}
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodMarkFriendRequestsAsReceived, nil)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodMarkFriendRequestsAsReceived, nil)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
24
protocols.go
24
protocols.go
|
|
@ -7,7 +7,7 @@ import (
|
|||
func assignNEXProtocols() {
|
||||
secureServer := nexproto.NewSecureProtocol(nexServer)
|
||||
accountManagementServer := nexproto.NewAccountManagementProtocol(nexServer)
|
||||
friendsServer := nexproto.NewFriendsProtocol(nexServer)
|
||||
friendsWiiUServer := nexproto.NewFriendsWiiUProtocol(nexServer)
|
||||
friends3DSServer := nexproto.NewFriends3DSProtocol(nexServer)
|
||||
|
||||
// Account Management protocol handles
|
||||
|
|
@ -18,17 +18,17 @@ func assignNEXProtocols() {
|
|||
secureServer.RegisterEx(registerEx)
|
||||
|
||||
// Friends (WiiU) protocol handles
|
||||
friendsServer.UpdateAndGetAllInformation(updateAndGetAllInformation)
|
||||
friendsServer.AddFriendRequest(addFriendRequest)
|
||||
friendsServer.AcceptFriendRequest(acceptFriendRequest)
|
||||
friendsServer.MarkFriendRequestsAsReceived(markFriendRequestsAsReceived)
|
||||
friendsServer.UpdatePresence(updatePresenceWiiU)
|
||||
friendsServer.UpdateComment(updateCommentWiiU)
|
||||
friendsServer.UpdatePreference(updatePreferenceWiiU)
|
||||
friendsServer.GetBasicInfo(getBasicInfo)
|
||||
friendsServer.DeletePersistentNotification(deletePersistentNotification)
|
||||
friendsServer.CheckSettingStatus(checkSettingStatus)
|
||||
friendsServer.GetRequestBlockSettings(getRequestBlockSettings)
|
||||
friendsWiiUServer.UpdateAndGetAllInformation(updateAndGetAllInformation)
|
||||
friendsWiiUServer.AddFriendRequest(addFriendRequest)
|
||||
friendsWiiUServer.AcceptFriendRequest(acceptFriendRequest)
|
||||
friendsWiiUServer.MarkFriendRequestsAsReceived(markFriendRequestsAsReceived)
|
||||
friendsWiiUServer.UpdatePresence(updatePresenceWiiU)
|
||||
friendsWiiUServer.UpdateComment(updateCommentWiiU)
|
||||
friendsWiiUServer.UpdatePreference(updatePreferenceWiiU)
|
||||
friendsWiiUServer.GetBasicInfo(getBasicInfo)
|
||||
friendsWiiUServer.DeletePersistentNotification(deletePersistentNotification)
|
||||
friendsWiiUServer.CheckSettingStatus(checkSettingStatus)
|
||||
friendsWiiUServer.GetRequestBlockSettings(getRequestBlockSettings)
|
||||
|
||||
// Friends (3DS) protocol handles
|
||||
friends3DSServer.UpdateProfile(updateProfile)
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ func updateAndGetAllInformation(err error, client *nex.Client, callID uint32, nn
|
|||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
// Build response packet
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodUpdateAndGetAllInformation, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodUpdateAndGetAllInformation, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ func updateCommentWiiU(err error, client *nex.Client, callID uint32, comment *ne
|
|||
|
||||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodUpdateComment, rmcResponseBody)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodUpdateComment, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
func updatePreferenceWiiU(err error, client *nex.Client, callID uint32, principalPreference *nexproto.PrincipalPreference) {
|
||||
updateUserPrincipalPreference(client.PID(), principalPreference)
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodUpdatePreference, nil)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodUpdatePreference, nil)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ func updatePresenceWiiU(err error, client *nex.Client, callID uint32, presence *
|
|||
connectedUsers[pid].Presence = presence
|
||||
sendUpdatePresenceWiiUNotifications(presence)
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsMethodUpdatePresence, nil)
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.FriendsWiiUProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.FriendsWiiUMethodUpdatePresence, nil)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user