public override void CallServerMethod(uint token, uint methodId, CodedInputStream stream) { switch (methodId) { case 1: { LogonRequest request = new LogonRequest(); request.MergeFrom(stream); NoData response = new NoData(); BattlenetRpcErrorCode status = HandleLogon(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.Logon(bgs.protocol.authentication.v1.LogonRequest: {1}) returned bgs.protocol.NoData: {2} status {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 2: { ModuleNotification request = new ModuleNotification(); request.MergeFrom(stream); NoData response = new NoData(); BattlenetRpcErrorCode status = HandleModuleNotify(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.ModuleNotify(bgs.protocol.authentication.v1.ModuleNotification: {1}) returned bgs.protocol.NoData: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 3: { ModuleMessageRequest request = new ModuleMessageRequest(); request.MergeFrom(stream); NoData response = new NoData(); BattlenetRpcErrorCode status = HandleModuleMessage(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.ModuleMessage(bgs.protocol.authentication.v1.ModuleMessageRequest: {1}) returned bgs.protocol.NoData: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 4: { EntityId request = new EntityId(); request.MergeFrom(stream); NoData response = new NoData(); BattlenetRpcErrorCode status = HandleSelectGameAccount_DEPRECATED(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.SelectGameAccount_DEPRECATED(bgs.protocol.EntityId: {1}) returned bgs.protocol.NoData: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 5: { GenerateSSOTokenRequest request = new GenerateSSOTokenRequest(); request.MergeFrom(stream); GenerateSSOTokenResponse response = new GenerateSSOTokenResponse(); BattlenetRpcErrorCode status = HandleGenerateSSOToken(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.GenerateSSOToken(bgs.protocol.authentication.v1.GenerateSSOTokenRequest: {1}) returned bgs.protocol.authentication.v1.GenerateSSOTokenResponse: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 6: { SelectGameAccountRequest request = new SelectGameAccountRequest(); request.MergeFrom(stream); NoData response = new NoData(); BattlenetRpcErrorCode status = HandleSelectGameAccount(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.SelectGameAccount(bgs.protocol.authentication.v1.SelectGameAccountRequest: {1}) returned bgs.protocol.NoData: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 7: { VerifyWebCredentialsRequest request = new VerifyWebCredentialsRequest(); request.MergeFrom(stream); NoData response = new NoData(); BattlenetRpcErrorCode status = HandleVerifyWebCredentials(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.VerifyWebCredentials(bgs.protocol.authentication.v1.VerifyWebCredentialsRequest: {1}) returned bgs.protocol.NoData: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } case 8: { GenerateWebCredentialsRequest request = new GenerateWebCredentialsRequest(); request.MergeFrom(stream); GenerateWebCredentialsResponse response = new GenerateWebCredentialsResponse(); BattlenetRpcErrorCode status = HandleGenerateWebCredentials(request, response); Log.outDebug(LogFilter.ServiceProtobuf, "{0} Client called server method AuthenticationService.GenerateWebCredentials(bgs.protocol.authentication.v1.GenerateWebCredentialsRequest: {1}) returned bgs.protocol.authentication.v1.GenerateWebCredentialsResponse: {2} status: {3}.", GetCallerInfo(), request.ToString(), response.ToString(), status); if (status == 0) { SendResponse(token, response); } else { SendResponse(token, status); } break; } default: Log.outError(LogFilter.ServiceProtobuf, "Bad method id {0}.", methodId); SendResponse(token, BattlenetRpcErrorCode.RpcInvalidMethod); break; } }
BattlenetRpcErrorCode HandleGenerateSSOToken(GenerateSSOTokenRequest request, GenerateSSOTokenResponse response) { Log.outError(LogFilter.ServiceProtobuf, "{0} Client tried to call not implemented method AuthenticationService.GenerateSSOToken: {1}", GetCallerInfo(), request.ToString()); return(BattlenetRpcErrorCode.RpcNotImplemented); }